diff --git a/package-lock.json b/package-lock.json index a19773b1..e49ad51c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "packages": { "": { "dependencies": { - "alpinejs": "^3.13.3", "filepond": "^4.30.6", "filepond-plugin-file-validate-size": "^2.2.8", "filepond-plugin-file-validate-type": "^1.2.9", @@ -16,418 +15,746 @@ "uniqid": "^5.2.0" }, "devDependencies": { - "laravel-vite-plugin": "^0.7.8", - "vite": "^4.5.5" + "vite": "^6.2.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/@vue/reactivity": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", - "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", - "dependencies": { - "@vue/shared": "3.1.5" - } + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.9.tgz", + "integrity": "sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@vue/shared": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", - "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==" + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.9.tgz", + "integrity": "sha512-4KW7P53h6HtJf5Y608T1ISKvNIYLWRKMvfnG0c44M6In4DQVU58HZFEVhWINDZKp7FZps98G3gxwC1sb0wXUUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] }, - "node_modules/alpinejs": { - "version": "3.13.10", - "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.10.tgz", - "integrity": "sha512-86RB307VWICex0vG15Eq0x058cNNsvS57ohrjN6n/TJAVSFV+zXOK/E34nNHDHc6Poq+yTNCLqEzPqEkRBTMRQ==", - "dependencies": { - "@vue/reactivity": "~3.1.1" - } + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.9.tgz", + "integrity": "sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.9.tgz", + "integrity": "sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.9.tgz", + "integrity": "sha512-2lzjQPJbN5UnHm7bHIUKFMulGTQwdvOkouJDpPysJS+QFBGDJqcfh+CxxtG23Ik/9tEvnebQiylYoazFMAgrYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.9.tgz", + "integrity": "sha512-SLl0hi2Ah2H7xQYd6Qaiu01kFPzQ+hqvdYSoOtHYg/zCIFs6t8sV95kaoqjzjFwuYQLtOI0RZre/Ke0nPaQV+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.9.tgz", + "integrity": "sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.9.tgz", + "integrity": "sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.9.tgz", + "integrity": "sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.9.tgz", + "integrity": "sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.9.tgz", + "integrity": "sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.9.tgz", + "integrity": "sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.9.tgz", + "integrity": "sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.9.tgz", + "integrity": "sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.9.tgz", + "integrity": "sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.9.tgz", + "integrity": "sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.9.tgz", + "integrity": "sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.9.tgz", + "integrity": "sha512-KB48mPtaoHy1AwDNkAJfHXvHp24H0ryZog28spEs0V48l3H1fr4i37tiyHsgKZJnCmvxsbATdZGBpbmxTE3a9w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.9.tgz", + "integrity": "sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "node_modules/filepond": { @@ -473,6 +800,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -481,22 +809,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/laravel-vite-plugin": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.7.8.tgz", - "integrity": "sha512-HWYqpQYHR3kEQ1LsHX7gHJoNNf0bz5z5mDaHBLzS+PGLCTmYqlU5/SZyeEgObV7z7bC/cnStYcY9H1DI1D5Udg==", - "dev": true, - "dependencies": { - "picocolors": "^1.0.0", - "vite-plugin-full-reload": "^1.0.5" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0" - } - }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -509,9 +821,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -519,6 +831,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -527,27 +840,16 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } + "license": "ISC" }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "dev": true, "funding": [ { @@ -563,36 +865,61 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/rollup": { - "version": "3.29.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", - "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.9.tgz", + "integrity": "sha512-nF5XYqWWp9hx/LrpC8sZvvvmq0TeTjQgaZHYmAgwysT9nh8sWnZhBnM8ZyVbbJFIQBLwHDNoMqsBZBbUo4U8sQ==", "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=14.18.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.34.9", + "@rollup/rollup-android-arm64": "4.34.9", + "@rollup/rollup-darwin-arm64": "4.34.9", + "@rollup/rollup-darwin-x64": "4.34.9", + "@rollup/rollup-freebsd-arm64": "4.34.9", + "@rollup/rollup-freebsd-x64": "4.34.9", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.9", + "@rollup/rollup-linux-arm-musleabihf": "4.34.9", + "@rollup/rollup-linux-arm64-gnu": "4.34.9", + "@rollup/rollup-linux-arm64-musl": "4.34.9", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.9", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.9", + "@rollup/rollup-linux-riscv64-gnu": "4.34.9", + "@rollup/rollup-linux-s390x-gnu": "4.34.9", + "@rollup/rollup-linux-x64-gnu": "4.34.9", + "@rollup/rollup-linux-x64-musl": "4.34.9", + "@rollup/rollup-win32-arm64-msvc": "4.34.9", + "@rollup/rollup-win32-ia32-msvc": "4.34.9", + "@rollup/rollup-win32-x64-msvc": "4.34.9", "fsevents": "~2.3.2" } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -608,40 +935,48 @@ "integrity": "sha512-38JRbJ4Fj94VmnC7G/J/5n5SC7Ab46OM5iNtSstB/ko3l1b5g7ALt4qzHFgGciFkyiRNtDXtLNb+VsxtMSE77A==" }, "node_modules/vite": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", - "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.0.tgz", + "integrity": "sha512-7dPxoo+WsT/64rDcwoOjk76XHj+TqNTIvHKcuMQ1k4/SeHDaQt5GFAeLYzrimZrMpn/O6DtdI03WUjdxuPM0oQ==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" + "esbuild": "^0.25.0", + "postcss": "^8.5.3", + "rollup": "^4.30.1" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { - "fsevents": "~2.3.2" + "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": ">= 14", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", - "terser": "^5.4.0" + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -651,6 +986,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -659,18 +997,14 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } - }, - "node_modules/vite-plugin-full-reload": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.1.0.tgz", - "integrity": "sha512-3cObNDzX6DdfhD9E7kf6w2mNunFpD7drxyNgHLw+XwIYAgb+Xt16SEXo0Up4VH+TMf3n+DSVJZtW2POBGcBYAA==", - "dev": true, - "dependencies": { - "picocolors": "^1.0.0", - "picomatch": "^2.3.1" - } } } } diff --git a/package.json b/package.json index f707b95c..c351a01a 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build" }, "dependencies": { - "alpinejs": "^3.13.3", "filepond": "^4.30.6", "filepond-plugin-file-validate-size": "^2.2.8", "filepond-plugin-file-validate-type": "^1.2.9", @@ -16,7 +16,6 @@ "uniqid": "^5.2.0" }, "devDependencies": { - "laravel-vite-plugin": "^0.7.8", - "vite": "^4.5.5" + "vite": "^6.2.0" } } diff --git a/resources/dist/css/livewire-forms.css b/resources/dist/css/livewire-forms.css new file mode 100644 index 00000000..1efbd903 --- /dev/null +++ b/resources/dist/css/livewire-forms.css @@ -0,0 +1,9 @@ +/*! + * FilePond 4.31.1 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:#00000003}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:""}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:#00000080;background-image:none;box-shadow:0 0 #fff0;transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em #ffffffe6}.filepond--file-action-button[disabled]{color:#ffffff80;background-color:#00000040}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translate(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translate(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translate(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translate(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translate(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translate(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translate(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translate(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity;touch-action:none}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em #00000040}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em #00000053}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:"";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:"";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.175;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}/*! +* FilePondPluginImagePreview 4.6.12 +* Licensed under MIT, https://opensource.org/licenses/MIT/ +* Please visit https://pqina.nl/filepond/ for details. +*/.filepond--image-preview-markup{position:absolute;left:0;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;position:absolute;left:0;top:0;width:100%;min-height:5rem;max-height:7rem;margin:0;opacity:0;z-index:2;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--image-preview-overlay svg{width:100%;height:auto;color:inherit;max-height:inherit}.filepond--image-preview-overlay-idle{mix-blend-mode:multiply;color:#282828d9}.filepond--image-preview-overlay-success{mix-blend-mode:normal;color:#369763}.filepond--image-preview-overlay-failure{mix-blend-mode:normal;color:#c44e47}@supports (-webkit-marquee-repetition:infinite) and ((-o-object-fit:fill) or (object-fit:fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;left:0;top:0;right:0;height:100%;margin:0;border-radius:.45em;overflow:hidden;background:#00000003}.filepond--image-preview{position:absolute;left:0;top:0;z-index:1;display:flex;align-items:center;height:100%;width:100%;pointer-events:none;background:#222;will-change:transform,opacity}.filepond--image-clip{position:relative;overflow:hidden;margin:0 auto}.filepond--image-clip[data-transparency-indicator=grid] canvas,.filepond--image-clip[data-transparency-indicator=grid] img{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0h50v50H0M50 50h50v50H50'/%3E%3C/svg%3E");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{position:absolute;left:0;top:0;will-change:transform}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview{height:100%;display:flex;justify-content:center;align-items:center}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay{top:auto;bottom:0;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*=center]){margin-bottom:.325em}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left]{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right]{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left],.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right]{margin-bottom:.5125em}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center]{margin-top:0;margin-bottom:.1875em;margin-left:.1875em} diff --git a/resources/dist/js/livewire-forms.js b/resources/dist/js/livewire-forms.js index cd3ef977..f5816cf9 100644 --- a/resources/dist/js/livewire-forms.js +++ b/resources/dist/js/livewire-forms.js @@ -1,21 +1,5043 @@ -(function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";var Q=Object.defineProperty;var K=(e,t,a)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Z=(e,t,a)=>(K(e,typeof t!="symbol"?t+"":t,a),a);/*! +var Z = Object.defineProperty; +var Q = (e, t, i) => t in e ? Z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; +var X = (e, t, i) => Q(e, typeof t != "symbol" ? t + "" : t, i); +/*! * FilePond 4.31.1 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. - */const isNode=e=>e instanceof HTMLElement,createStore=(e,t=[],a=[])=>{const n={...e},l=[],r=[],s=()=>({...n}),o=()=>{const g=[...l];return l.length=0,g},c=()=>{const g=[...r];r.length=0,g.forEach(({type:E,data:T})=>{u(E,T)})},u=(g,E,T)=>{if(T&&!document.hidden){r.push({type:g,data:E});return}m[g]&&m[g](E),l.push({type:g,data:E})},d=(g,...E)=>h[g]?h[g](...E):null,p={getState:s,processActionQueue:o,processDispatchQueue:c,dispatch:u,query:d};let h={};t.forEach(g=>{h={...g(n),...h}});let m={};return a.forEach(g=>{m={...g(u,d,n),...m}}),p},defineProperty=(e,t,a)=>{if(typeof a=="function"){e[t]=a;return}Object.defineProperty(e,t,{...a})},forin=(e,t)=>{for(const a in e)e.hasOwnProperty(a)&&t(a,e[a])},createObject=e=>{const t={};return forin(e,a=>{defineProperty(t,a,e[a])}),t},attr=(e,t,a=null)=>{if(a===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,a)},ns$1="http://www.w3.org/2000/svg",svgElements=["svg","path"],isSVGElement=e=>svgElements.includes(e),createElement=(e,t,a={})=>{typeof t=="object"&&(a=t,t=null);const n=isSVGElement(e)?document.createElementNS(ns$1,e):document.createElement(e);return t&&(isSVGElement(e)?attr(n,"class",t):n.className=t),forin(a,(l,r)=>{attr(n,l,r)}),n},appendChild=e=>(t,a)=>{typeof a<"u"&&e.children[a]?e.insertBefore(t,e.children[a]):e.appendChild(t)},appendChildView=(e,t)=>(a,n)=>(typeof n<"u"?t.splice(n,0,a):t.push(a),a),removeChildView=(e,t)=>a=>(t.splice(t.indexOf(a),1),a.element.parentNode&&e.removeChild(a.element),a),IS_BROWSER=(()=>typeof window<"u"&&typeof window.document<"u")(),isBrowser$4=()=>IS_BROWSER,testElement=isBrowser$4()?createElement("svg"):{},getChildCount="children"in testElement?e=>e.children.length:e=>e.childNodes.length,getViewRect=(e,t,a,n)=>{const l=a[0]||e.left,r=a[1]||e.top,s=l+e.width,o=r+e.height*(n[1]||1),c={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:l,top:r,right:s,bottom:o}};return t.filter(u=>!u.isRectIgnored()).map(u=>u.rect).forEach(u=>{expandRect(c.inner,{...u.inner}),expandRect(c.outer,{...u.outer})}),calculateRectSize(c.inner),c.outer.bottom+=c.element.marginBottom,c.outer.right+=c.element.marginRight,calculateRectSize(c.outer),c},expandRect=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},calculateRectSize=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},isNumber$1=e=>typeof e=="number",thereYet=(e,t,a,n=.001)=>Math.abs(e-t){let n=null,l=null,r=0,s=!1;const u=createObject({interpolate:(d,p)=>{if(s)return;if(!(isNumber$1(n)&&isNumber$1(l))){s=!0,r=0;return}const h=-(l-n)*e;r+=h/a,l+=r,r*=t,thereYet(l,n,r)||p?(l=n,r=0,s=!0,u.onupdate(l),u.oncomplete(l)):u.onupdate(l)},target:{set:d=>{if(isNumber$1(d)&&!isNumber$1(l)&&(l=d),n===null&&(n=d,l=d),n=d,l===n||typeof n>"u"){s=!0,r=0,u.onupdate(l),u.oncomplete(l);return}s=!1},get:()=>n},resting:{get:()=>s},onupdate:d=>{},oncomplete:d=>{}});return u},easeInOutQuad=e=>e<.5?2*e*e:-1+(4-2*e)*e,tween=({duration:e=500,easing:t=easeInOutQuad,delay:a=0}={})=>{let n=null,l,r,s=!0,o=!1,c=null;const d=createObject({interpolate:(p,h)=>{s||c===null||(n===null&&(n=p),!(p-n=e||h?(l=1,r=o?0:1,d.onupdate(r*c),d.oncomplete(r*c),s=!0):(r=l/e,d.onupdate((l>=0?t(o?1-r:r):0)*c))))},target:{get:()=>o?0:c,set:p=>{if(c===null){c=p,d.onupdate(p),d.oncomplete(p);return}ps},onupdate:p=>{},oncomplete:p=>{}});return d},animator={spring,tween},createAnimator=(e,t,a)=>{const n=e[t]&&typeof e[t][a]=="object"?e[t][a]:e[t]||e,l=typeof n=="string"?n:n.type,r=typeof n=="object"?{...n}:{};return animator[l]?animator[l](r):null},addGetSet=(e,t,a,n=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(l=>{e.forEach(r=>{let s=r,o=()=>a[r],c=u=>a[r]=u;typeof r=="object"&&(s=r.key,o=r.getter||o,c=r.setter||c),!(l[s]&&!n)&&(l[s]={get:o,set:c})})})},animations=({mixinConfig:e,viewProps:t,viewInternalAPI:a,viewExternalAPI:n})=>{const l={...t},r=[];return forin(e,(s,o)=>{const c=createAnimator(o);if(!c)return;c.onupdate=d=>{t[s]=d},c.target=l[s],addGetSet([{key:s,setter:d=>{c.target!==d&&(c.target=d)},getter:()=>t[s]}],[a,n],t,!0),r.push(c)}),{write:s=>{let o=document.hidden,c=!0;return r.forEach(u=>{u.resting||(c=!1),u.interpolate(s,o)}),c},destroy:()=>{}}},addEvent=e=>(t,a)=>{e.addEventListener(t,a)},removeEvent=e=>(t,a)=>{e.removeEventListener(t,a)},listeners=({mixinConfig:e,viewProps:t,viewInternalAPI:a,viewExternalAPI:n,viewState:l,view:r})=>{const s=[],o=addEvent(r.element),c=removeEvent(r.element);return n.on=(u,d)=>{s.push({type:u,fn:d}),o(u,d)},n.off=(u,d)=>{s.splice(s.findIndex(p=>p.type===u&&p.fn===d),1),c(u,d)},{write:()=>!0,destroy:()=>{s.forEach(u=>{c(u.type,u.fn)})}}},apis=({mixinConfig:e,viewProps:t,viewExternalAPI:a})=>{addGetSet(e,a,t)},isDefined$1=e=>e!=null,defaults$1={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},styles=({mixinConfig:e,viewProps:t,viewInternalAPI:a,viewExternalAPI:n,view:l})=>{const r={...t},s={};addGetSet(e,[a,n],t);const o=()=>[t.translateX||0,t.translateY||0],c=()=>[t.scaleX||0,t.scaleY||0],u=()=>l.rect?getViewRect(l.rect,l.childViews,o(),c()):null;return a.rect={get:u},n.rect={get:u},e.forEach(d=>{t[d]=typeof r[d]>"u"?defaults$1[d]:r[d]}),{write:()=>{if(propsHaveChanged(s,t))return applyStyles(l.element,t),Object.assign(s,{...t}),!0},destroy:()=>{}}},propsHaveChanged=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(const a in t)if(t[a]!==e[a])return!0;return!1},applyStyles=(e,{opacity:t,perspective:a,translateX:n,translateY:l,scaleX:r,scaleY:s,rotateX:o,rotateY:c,rotateZ:u,originX:d,originY:p,width:h,height:m})=>{let g="",E="";(isDefined$1(d)||isDefined$1(p))&&(E+=`transform-origin: ${d||0}px ${p||0}px;`),isDefined$1(a)&&(g+=`perspective(${a}px) `),(isDefined$1(n)||isDefined$1(l))&&(g+=`translate3d(${n||0}px, ${l||0}px, 0) `),(isDefined$1(r)||isDefined$1(s))&&(g+=`scale3d(${isDefined$1(r)?r:1}, ${isDefined$1(s)?s:1}, 1) `),isDefined$1(u)&&(g+=`rotateZ(${u}rad) `),isDefined$1(o)&&(g+=`rotateX(${o}rad) `),isDefined$1(c)&&(g+=`rotateY(${c}rad) `),g.length&&(E+=`transform:${g};`),isDefined$1(t)&&(E+=`opacity:${t};`,t===0&&(E+="visibility:hidden;"),t<1&&(E+="pointer-events:none;")),isDefined$1(m)&&(E+=`height:${m}px;`),isDefined$1(h)&&(E+=`width:${h}px;`);const T=e.elementCurrentStyle||"";(E.length!==T.length||E!==T)&&(e.style.cssText=E,e.elementCurrentStyle=E)},Mixins={styles,listeners,animations,apis},updateRect$1=(e={},t={},a={})=>(t.layoutCalculated||(e.paddingTop=parseInt(a.paddingTop,10)||0,e.marginTop=parseInt(a.marginTop,10)||0,e.marginRight=parseInt(a.marginRight,10)||0,e.marginBottom=parseInt(a.marginBottom,10)||0,e.marginLeft=parseInt(a.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=t.offsetParent===null,e),createView=({tag:e="div",name:t=null,attributes:a={},read:n=()=>{},write:l=()=>{},create:r=()=>{},destroy:s=()=>{},filterFrameActionsForChild:o=(m,g)=>g,didCreateView:c=()=>{},didWriteView:u=()=>{},ignoreRect:d=!1,ignoreRectUpdate:p=!1,mixins:h=[]}={})=>(m,g={})=>{const E=createElement(e,`filepond--${t}`,a),T=window.getComputedStyle(E,null),I=updateRect$1();let f=null,b=!1;const S=[],R=[],A={},O={},L=[l],P=[n],D=[s],M=()=>E,w=()=>S.concat(),V=()=>A,x=B=>(G,H)=>G(B,H),k=()=>f||(f=getViewRect(I,S,[0,0],[1,1]),f),y=()=>T,F=()=>{f=null,S.forEach(H=>H._read()),!(p&&I.width&&I.height)&&updateRect$1(I,E,T);const G={root:$,props:g,rect:I};P.forEach(H=>H(G))},z=(B,G,H)=>{let q=G.length===0;return L.forEach(U=>{U({props:g,root:$,actions:G,timestamp:B,shouldOptimize:H})===!1&&(q=!1)}),R.forEach(U=>{U.write(B)===!1&&(q=!1)}),S.filter(U=>!!U.element.parentNode).forEach(U=>{U._write(B,o(U,G),H)||(q=!1)}),S.forEach((U,Y)=>{U.element.parentNode||($.appendChild(U.element,Y),U._read(),U._write(B,o(U,G),H),q=!1)}),b=q,u({props:g,root:$,actions:G,timestamp:B}),q},v=()=>{R.forEach(B=>B.destroy()),D.forEach(B=>{B({root:$,props:g})}),S.forEach(B=>B._destroy())},C={element:{get:M},style:{get:y},childViews:{get:w}},N={...C,rect:{get:k},ref:{get:V},is:B=>t===B,appendChild:appendChild(E),createChildView:x(m),linkView:B=>(S.push(B),B),unlinkView:B=>{S.splice(S.indexOf(B),1)},appendChildView:appendChildView(E,S),removeChildView:removeChildView(E,S),registerWriter:B=>L.push(B),registerReader:B=>P.push(B),registerDestroyer:B=>D.push(B),invalidateLayout:()=>E.layoutCalculated=!1,dispatch:m.dispatch,query:m.query},W={element:{get:M},childViews:{get:w},rect:{get:k},resting:{get:()=>b},isRectIgnored:()=>d,_read:F,_write:z,_destroy:v},j={...C,rect:{get:()=>I}};Object.keys(h).sort((B,G)=>B==="styles"?1:G==="styles"?-1:0).forEach(B=>{const G=Mixins[B]({mixinConfig:h[B],viewProps:g,viewState:O,viewInternalAPI:N,viewExternalAPI:W,view:createObject(j)});G&&R.push(G)});const $=createObject(N);r({root:$,props:g});const X=getChildCount(E);return S.forEach((B,G)=>{$.appendChild(B.element,X+G)}),c($),createObject(W)},createPainter=(e,t,a=60)=>{const n="__framePainter";if(window[n]){window[n].readers.push(e),window[n].writers.push(t);return}window[n]={readers:[e],writers:[t]};const l=window[n],r=1e3/a;let s=null,o=null,c=null,u=null;const d=()=>{document.hidden?(c=()=>window.setTimeout(()=>p(performance.now()),r),u=()=>window.clearTimeout(o)):(c=()=>window.requestAnimationFrame(p),u=()=>window.cancelAnimationFrame(o))};document.addEventListener("visibilitychange",()=>{u&&u(),d(),p(performance.now())});const p=h=>{o=c(p),s||(s=h);const m=h-s;m<=r||(s=h-m%r,l.readers.forEach(g=>g()),l.writers.forEach(g=>g(h)))};return d(),p(performance.now()),{pause:()=>{u(o)}}},createRoute=(e,t)=>({root:a,props:n,actions:l=[],timestamp:r,shouldOptimize:s})=>{l.filter(o=>e[o.type]).forEach(o=>e[o.type]({root:a,props:n,action:o.data,timestamp:r,shouldOptimize:s})),t&&t({root:a,props:n,actions:l,timestamp:r,shouldOptimize:s})},insertBefore=(e,t)=>t.parentNode.insertBefore(e,t),insertAfter=(e,t)=>t.parentNode.insertBefore(e,t.nextSibling),isArray$1=e=>Array.isArray(e),isEmpty$1=e=>e==null,trim=e=>e.trim(),toString$1=e=>""+e,toArray=(e,t=",")=>isEmpty$1(e)?[]:isArray$1(e)?e:toString$1(e).split(t).map(trim).filter(a=>a.length),isBoolean=e=>typeof e=="boolean",toBoolean=e=>isBoolean(e)?e:e==="true",isString$1=e=>typeof e=="string",toNumber=e=>isNumber$1(e)?e:isString$1(e)?toString$1(e).replace(/[a-z]+/gi,""):0,toInt=e=>parseInt(toNumber(e),10),toFloat=e=>parseFloat(toNumber(e)),isInt=e=>isNumber$1(e)&&isFinite(e)&&Math.floor(e)===e,toBytes=(e,t=1e3)=>{if(isInt(e))return e;let a=toString$1(e).trim();return/MB$/i.test(a)?(a=a.replace(/MB$i/,"").trim(),toInt(a)*t*t):/KB/i.test(a)?(a=a.replace(/KB$i/,"").trim(),toInt(a)*t):toInt(a)},isFunction$2=e=>typeof e=="function",toFunctionReference=e=>{let t=self,a=e.split("."),n=null;for(;n=a.shift();)if(t=t[n],!t)return null;return t},methods={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},createServerAPI=e=>{const t={};return t.url=isString$1(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},forin(methods,a=>{t[a]=createAction(a,e[a],methods[a],t.timeout,t.headers)}),t.process=e.process||isString$1(e)||e.url?t.process:null,t.remove=e.remove||null,delete t.headers,t},createAction=(e,t,a,n,l)=>{if(t===null)return null;if(typeof t=="function")return t;const r={url:a==="GET"||a==="PATCH"?`?${e}=`:"",method:a,headers:l,withCredentials:!1,timeout:n,onload:null,ondata:null,onerror:null};if(isString$1(t))return r.url=t,r;if(Object.assign(r,t),isString$1(r.headers)){const s=r.headers.split(/:(.+)/);r.headers={header:s[0],value:s[1]}}return r.withCredentials=toBoolean(r.withCredentials),r},toServerAPI=e=>createServerAPI(e),isNull=e=>e===null,isObject$1=e=>typeof e=="object"&&e!==null,isAPI=e=>isObject$1(e)&&isString$1(e.url)&&isObject$1(e.process)&&isObject$1(e.revert)&&isObject$1(e.restore)&&isObject$1(e.fetch),getType=e=>isArray$1(e)?"array":isNull(e)?"null":isInt(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":isAPI(e)?"api":typeof e,replaceSingleQuotes=e=>e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'),conversionTable={array:toArray,boolean:toBoolean,int:e=>getType(e)==="bytes"?toBytes(e):toInt(e),number:toFloat,float:toFloat,bytes:toBytes,string:e=>isFunction$2(e)?e:toString$1(e),function:e=>toFunctionReference(e),serverapi:toServerAPI,object:e=>{try{return JSON.parse(replaceSingleQuotes(e))}catch{return null}}},convertTo=(e,t)=>conversionTable[t](e),getValueByType=(e,t,a)=>{if(e===t)return e;let n=getType(e);if(n!==a){const l=convertTo(e,a);if(n=getType(l),l===null)throw`Trying to assign value with incorrect type to "${option}", allowed type: "${a}"`;e=l}return e},createOption=(e,t)=>{let a=e;return{enumerable:!0,get:()=>a,set:n=>{a=getValueByType(n,e,t)}}},createOptions=e=>{const t={};return forin(e,a=>{const n=e[a];t[a]=createOption(n[0],n[1])}),createObject(t)},createInitialState=e=>({items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:createOptions(e)}),fromCamels=(e,t="-")=>e.split(/(?=[A-Z])/).map(a=>a.toLowerCase()).join(t),createOptionAPI=(e,t)=>{const a={};return forin(t,n=>{a[n]={get:()=>e.getState().options[n],set:l=>{e.dispatch(`SET_${fromCamels(n,"_").toUpperCase()}`,{value:l})}}}),a},createOptionActions=e=>(t,a,n)=>{const l={};return forin(e,r=>{const s=fromCamels(r,"_").toUpperCase();l[`SET_${s}`]=o=>{try{n.options[r]=o.value}catch{}t(`DID_SET_${s}`,{value:n.options[r]})}}),l},createOptionQueries=e=>t=>{const a={};return forin(e,n=>{a[`GET_${fromCamels(n,"_").toUpperCase()}`]=l=>t.options[n]}),a},InteractionMethod={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},getUniqueId=()=>Math.random().toString(36).substring(2,11),arrayRemove=(e,t)=>e.splice(t,1),run=(e,t)=>{t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},on=()=>{const e=[],t=(n,l)=>{arrayRemove(e,e.findIndex(r=>r.event===n&&(r.cb===l||!l)))},a=(n,l,r)=>{e.filter(s=>s.event===n).map(s=>s.cb).forEach(s=>run(()=>s(...l),r))};return{fireSync:(n,...l)=>{a(n,l,!0)},fire:(n,...l)=>{a(n,l,!1)},on:(n,l)=>{e.push({event:n,cb:l})},onOnce:(n,l)=>{e.push({event:n,cb:(...r)=>{t(n,l),l(...r)}})},off:t}},copyObjectPropertiesToObject=(e,t,a)=>{Object.getOwnPropertyNames(e).filter(n=>!a.includes(n)).forEach(n=>Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n)))},PRIVATE=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],createItemAPI=e=>{const t={};return copyObjectPropertiesToObject(e,t,PRIVATE),t},removeReleasedItems=e=>{e.forEach((t,a)=>{t.released&&arrayRemove(e,a)})},ItemStatus={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},FileOrigin={INPUT:1,LIMBO:2,LOCAL:3},getNonNumeric=e=>/[^0-9]+/.exec(e),getDecimalSeparator=()=>getNonNumeric(1.1.toLocaleString())[0],getThousandsSeparator=()=>{const e=getDecimalSeparator(),t=1e3.toLocaleString(),a=1e3.toString();return t!==a?getNonNumeric(t)[0]:e==="."?",":"."},Type={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},filters=[],applyFilterChain=(e,t,a)=>new Promise((n,l)=>{const r=filters.filter(o=>o.key===e).map(o=>o.cb);if(r.length===0){n(t);return}const s=r.shift();r.reduce((o,c)=>o.then(u=>c(u,a)),s(t,a)).then(o=>n(o)).catch(o=>l(o))}),applyFilters=(e,t,a)=>filters.filter(n=>n.key===e).map(n=>n.cb(t,a)),addFilter=(e,t)=>filters.push({key:e,cb:t}),extendDefaultOptions=e=>Object.assign(defaultOptions,e),getOptions=()=>({...defaultOptions}),setOptions=e=>{forin(e,(t,a)=>{defaultOptions[t]&&(defaultOptions[t][0]=getValueByType(a,defaultOptions[t][0],defaultOptions[t][1]))})},defaultOptions={id:[null,Type.STRING],name:["filepond",Type.STRING],disabled:[!1,Type.BOOLEAN],className:[null,Type.STRING],required:[!1,Type.BOOLEAN],captureMethod:[null,Type.STRING],allowSyncAcceptAttribute:[!0,Type.BOOLEAN],allowDrop:[!0,Type.BOOLEAN],allowBrowse:[!0,Type.BOOLEAN],allowPaste:[!0,Type.BOOLEAN],allowMultiple:[!1,Type.BOOLEAN],allowReplace:[!0,Type.BOOLEAN],allowRevert:[!0,Type.BOOLEAN],allowRemove:[!0,Type.BOOLEAN],allowProcess:[!0,Type.BOOLEAN],allowReorder:[!1,Type.BOOLEAN],allowDirectoriesOnly:[!1,Type.BOOLEAN],storeAsFile:[!1,Type.BOOLEAN],forceRevert:[!1,Type.BOOLEAN],maxFiles:[null,Type.INT],checkValidity:[!1,Type.BOOLEAN],itemInsertLocationFreedom:[!0,Type.BOOLEAN],itemInsertLocation:["before",Type.STRING],itemInsertInterval:[75,Type.INT],dropOnPage:[!1,Type.BOOLEAN],dropOnElement:[!0,Type.BOOLEAN],dropValidation:[!1,Type.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],Type.ARRAY],instantUpload:[!0,Type.BOOLEAN],maxParallelUploads:[2,Type.INT],allowMinimumUploadDuration:[!0,Type.BOOLEAN],chunkUploads:[!1,Type.BOOLEAN],chunkForce:[!1,Type.BOOLEAN],chunkSize:[5e6,Type.INT],chunkRetryDelays:[[500,1e3,3e3],Type.ARRAY],server:[null,Type.SERVER_API],fileSizeBase:[1e3,Type.INT],labelFileSizeBytes:["bytes",Type.STRING],labelFileSizeKilobytes:["KB",Type.STRING],labelFileSizeMegabytes:["MB",Type.STRING],labelFileSizeGigabytes:["GB",Type.STRING],labelDecimalSeparator:[getDecimalSeparator(),Type.STRING],labelThousandsSeparator:[getThousandsSeparator(),Type.STRING],labelIdle:['Drag & Drop your files or Browse',Type.STRING],labelInvalidField:["Field contains invalid files",Type.STRING],labelFileWaitingForSize:["Waiting for size",Type.STRING],labelFileSizeNotAvailable:["Size not available",Type.STRING],labelFileCountSingular:["file in list",Type.STRING],labelFileCountPlural:["files in list",Type.STRING],labelFileLoading:["Loading",Type.STRING],labelFileAdded:["Added",Type.STRING],labelFileLoadError:["Error during load",Type.STRING],labelFileRemoved:["Removed",Type.STRING],labelFileRemoveError:["Error during remove",Type.STRING],labelFileProcessing:["Uploading",Type.STRING],labelFileProcessingComplete:["Upload complete",Type.STRING],labelFileProcessingAborted:["Upload cancelled",Type.STRING],labelFileProcessingError:["Error during upload",Type.STRING],labelFileProcessingRevertError:["Error during revert",Type.STRING],labelTapToCancel:["tap to cancel",Type.STRING],labelTapToRetry:["tap to retry",Type.STRING],labelTapToUndo:["tap to undo",Type.STRING],labelButtonRemoveItem:["Remove",Type.STRING],labelButtonAbortItemLoad:["Abort",Type.STRING],labelButtonRetryItemLoad:["Retry",Type.STRING],labelButtonAbortItemProcessing:["Cancel",Type.STRING],labelButtonUndoItemProcessing:["Undo",Type.STRING],labelButtonRetryItemProcessing:["Retry",Type.STRING],labelButtonProcessItem:["Upload",Type.STRING],iconRemove:['',Type.STRING],iconProcess:['',Type.STRING],iconRetry:['',Type.STRING],iconUndo:['',Type.STRING],iconDone:['',Type.STRING],oninit:[null,Type.FUNCTION],onwarning:[null,Type.FUNCTION],onerror:[null,Type.FUNCTION],onactivatefile:[null,Type.FUNCTION],oninitfile:[null,Type.FUNCTION],onaddfilestart:[null,Type.FUNCTION],onaddfileprogress:[null,Type.FUNCTION],onaddfile:[null,Type.FUNCTION],onprocessfilestart:[null,Type.FUNCTION],onprocessfileprogress:[null,Type.FUNCTION],onprocessfileabort:[null,Type.FUNCTION],onprocessfilerevert:[null,Type.FUNCTION],onprocessfile:[null,Type.FUNCTION],onprocessfiles:[null,Type.FUNCTION],onremovefile:[null,Type.FUNCTION],onpreparefile:[null,Type.FUNCTION],onupdatefiles:[null,Type.FUNCTION],onreorderfiles:[null,Type.FUNCTION],beforeDropFile:[null,Type.FUNCTION],beforeAddFile:[null,Type.FUNCTION],beforeRemoveFile:[null,Type.FUNCTION],beforePrepareFile:[null,Type.FUNCTION],stylePanelLayout:[null,Type.STRING],stylePanelAspectRatio:[null,Type.STRING],styleItemPanelAspectRatio:[null,Type.STRING],styleButtonRemoveItemPosition:["left",Type.STRING],styleButtonProcessItemPosition:["right",Type.STRING],styleLoadIndicatorPosition:["right",Type.STRING],styleProgressIndicatorPosition:["right",Type.STRING],styleButtonRemoveItemAlign:[!1,Type.BOOLEAN],files:[[],Type.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],Type.ARRAY]},getItemByQuery=(e,t)=>isEmpty$1(t)?e[0]||null:isInt(t)?e[t]||null:(typeof t=="object"&&(t=t.id),e.find(a=>a.id===t)||null),getNumericAspectRatioFromString=e=>{if(isEmpty$1(e))return e;if(/:/.test(e)){const t=e.split(":");return t[1]/t[0]}return parseFloat(e)},getActiveItems=e=>e.filter(t=>!t.archived),Status={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4};let res=null;const canUpdateFileInput=()=>{if(res===null)try{const e=new DataTransfer;e.items.add(new File(["hello world"],"This_Works.txt"));const t=document.createElement("input");t.setAttribute("type","file"),t.files=e.files,res=t.files.length===1}catch{res=!1}return res},ITEM_ERROR=[ItemStatus.LOAD_ERROR,ItemStatus.PROCESSING_ERROR,ItemStatus.PROCESSING_REVERT_ERROR],ITEM_BUSY=[ItemStatus.LOADING,ItemStatus.PROCESSING,ItemStatus.PROCESSING_QUEUED,ItemStatus.INIT],ITEM_READY=[ItemStatus.PROCESSING_COMPLETE],isItemInErrorState=e=>ITEM_ERROR.includes(e.status),isItemInBusyState=e=>ITEM_BUSY.includes(e.status),isItemInReadyState=e=>ITEM_READY.includes(e.status),isAsync=e=>isObject$1(e.options.server)&&(isObject$1(e.options.server.process)||isFunction$2(e.options.server.process)),queries=e=>({GET_STATUS:()=>{const t=getActiveItems(e.items),{EMPTY:a,ERROR:n,BUSY:l,IDLE:r,READY:s}=Status;return t.length===0?a:t.some(isItemInErrorState)?n:t.some(isItemInBusyState)?l:t.some(isItemInReadyState)?s:r},GET_ITEM:t=>getItemByQuery(e.items,t),GET_ACTIVE_ITEM:t=>getItemByQuery(getActiveItems(e.items),t),GET_ACTIVE_ITEMS:()=>getActiveItems(e.items),GET_ITEMS:()=>e.items,GET_ITEM_NAME:t=>{const a=getItemByQuery(e.items,t);return a?a.filename:null},GET_ITEM_SIZE:t=>{const a=getItemByQuery(e.items,t);return a?a.fileSize:null},GET_STYLES:()=>Object.keys(e.options).filter(t=>/^style/.test(t)).map(t=>({name:t,value:e.options[t]})),GET_PANEL_ASPECT_RATIO:()=>/circle/.test(e.options.stylePanelLayout)?1:getNumericAspectRatioFromString(e.options.stylePanelAspectRatio),GET_ITEM_PANEL_ASPECT_RATIO:()=>e.options.styleItemPanelAspectRatio,GET_ITEMS_BY_STATUS:t=>getActiveItems(e.items).filter(a=>a.status===t),GET_TOTAL_ITEMS:()=>getActiveItems(e.items).length,SHOULD_UPDATE_FILE_INPUT:()=>e.options.storeAsFile&&canUpdateFileInput()&&!isAsync(e),IS_ASYNC:()=>isAsync(e),GET_FILE_SIZE_LABELS:t=>({labelBytes:t("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:t("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:t("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:t("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0})}),hasRoomForItem=e=>{const t=getActiveItems(e.items).length;if(!e.options.allowMultiple)return t===0;const a=e.options.maxFiles;return a===null||tMath.max(Math.min(a,e),t),arrayInsert=(e,t,a)=>e.splice(t,0,a),insertItem=(e,t,a)=>isEmpty$1(t)?null:typeof a>"u"?(e.push(t),t):(a=limit(a,0,e.length),arrayInsert(e,a,t),t),isBase64DataURI=e=>/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e),getFilenameFromURL=e=>`${e}`.split("/").pop().split("?").shift(),getExtensionFromFilename=e=>e.split(".").pop(),guesstimateExtension=e=>{if(typeof e!="string")return"";const t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?t==="jpeg"?"jpg":t:""},leftPad=(e,t="")=>(t+e).slice(-t.length),getDateString=(e=new Date)=>`${e.getFullYear()}-${leftPad(e.getMonth()+1,"00")}-${leftPad(e.getDate(),"00")}_${leftPad(e.getHours(),"00")}-${leftPad(e.getMinutes(),"00")}-${leftPad(e.getSeconds(),"00")}`,getFileFromBlob=(e,t,a=null,n=null)=>{const l=typeof a=="string"?e.slice(0,e.size,a):e.slice(0,e.size,e.type);return l.lastModifiedDate=new Date,e._relativePath&&(l._relativePath=e._relativePath),isString$1(t)||(t=getDateString()),t&&n===null&&getExtensionFromFilename(t)?l.name=t:(n=n||guesstimateExtension(l.type),l.name=t+(n?"."+n:"")),l},getBlobBuilder=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,createBlob=(e,t)=>{const a=getBlobBuilder();if(a){const n=new a;return n.append(e),n.getBlob(t)}return new Blob([e],{type:t})},getBlobFromByteStringWithMimeType=(e,t)=>{const a=new ArrayBuffer(e.length),n=new Uint8Array(a);for(let l=0;l(/^data:(.+);/.exec(e)||[])[1]||null,getBase64DataFromBase64DataURI=e=>e.split(",")[1].replace(/\s/g,""),getByteStringFromBase64DataURI=e=>atob(getBase64DataFromBase64DataURI(e)),getBlobFromBase64DataURI=e=>{const t=getMimeTypeFromBase64DataURI(e),a=getByteStringFromBase64DataURI(e);return getBlobFromByteStringWithMimeType(a,t)},getFileFromBase64DataURI=(e,t,a)=>getFileFromBlob(getBlobFromBase64DataURI(e),t,null,a),getFileNameFromHeader=e=>{if(!/^content-disposition:/i.test(e))return null;const t=e.split(/filename=|filename\*=.+''/).splice(1).map(a=>a.trim().replace(/^["']|[;"']{0,2}$/g,"")).filter(a=>a.length);return t.length?decodeURI(t[t.length-1]):null},getFileSizeFromHeader=e=>{if(/content-length:/i.test(e)){const t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},getTranfserIdFromHeader=e=>/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null,getFileInfoFromHeaders=e=>{const t={source:null,name:null,size:null},a=e.split(` -`);for(let n of a){const l=getFileNameFromHeader(n);if(l){t.name=l;continue}const r=getFileSizeFromHeader(n);if(r){t.size=r;continue}const s=getTranfserIdFromHeader(n);if(s){t.source=s;continue}}return t},createFileLoader=e=>{const t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},a=()=>t.progress,n=()=>{t.request&&t.request.abort&&t.request.abort()},l=()=>{const o=t.source;s.fire("init",o),o instanceof File?s.fire("load",o):o instanceof Blob?s.fire("load",getFileFromBlob(o,o.name)):isBase64DataURI(o)?s.fire("load",getFileFromBase64DataURI(o)):r(o)},r=o=>{if(!e){s.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(o,c=>{t.duration=Date.now()-t.timestamp,t.complete=!0,c instanceof Blob&&(c=getFileFromBlob(c,c.name||getFilenameFromURL(o))),s.fire("load",c instanceof Blob?c:c?c.body:null)},c=>{s.fire("error",typeof c=="string"?{type:"error",code:0,body:c}:c)},(c,u,d)=>{if(d&&(t.size=d),t.duration=Date.now()-t.timestamp,!c){t.progress=null;return}t.progress=u/d,s.fire("progress",t.progress)},()=>{s.fire("abort")},c=>{const u=getFileInfoFromHeaders(typeof c=="string"?c:c.headers);s.fire("meta",{size:t.size||u.size,filename:u.name,source:u.source})})},s={...on(),setSource:o=>t.source=o,getProgress:a,abort:n,load:l};return s},isGet=e=>/GET|HEAD/.test(e),sendRequest=(e,t,a)=>{const n={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{l=!0,s.abort()}};let l=!1,r=!1;a={method:"POST",headers:{},withCredentials:!1,...a},t=encodeURI(t),isGet(a.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);const s=new XMLHttpRequest,o=isGet(a.method)?s:s.upload;return o.onprogress=c=>{l||n.onprogress(c.lengthComputable,c.loaded,c.total)},s.onreadystatechange=()=>{s.readyState<2||s.readyState===4&&s.status===0||r||(r=!0,n.onheaders(s))},s.onload=()=>{s.status>=200&&s.status<300?n.onload(s):n.onerror(s)},s.onerror=()=>n.onerror(s),s.onabort=()=>{l=!0,n.onabort()},s.ontimeout=()=>n.ontimeout(s),s.open(a.method,t,!0),isInt(a.timeout)&&(s.timeout=a.timeout),Object.keys(a.headers).forEach(c=>{const u=unescape(encodeURIComponent(a.headers[c]));s.setRequestHeader(c,u)}),a.responseType&&(s.responseType=a.responseType),a.withCredentials&&(s.withCredentials=!0),s.send(e),n},createResponse=(e,t,a,n)=>({type:e,code:t,body:a,headers:n}),createTimeoutResponse=e=>t=>{e(createResponse("error",0,"Timeout",t.getAllResponseHeaders()))},hasQS=e=>/\?/.test(e),buildURL=(...e)=>{let t="";return e.forEach(a=>{t+=hasQS(t)&&hasQS(a)?a.replace(/\?/,"&"):a}),t},createFetchFunction=(e="",t)=>{if(typeof t=="function")return t;if(!t||!isString$1(t.url))return null;const a=t.onload||(l=>l),n=t.onerror||(l=>null);return(l,r,s,o,c,u)=>{const d=sendRequest(l,buildURL(e,t.url),{...t,responseType:"blob"});return d.onload=p=>{const h=p.getAllResponseHeaders(),m=getFileInfoFromHeaders(h).name||getFilenameFromURL(l);r(createResponse("load",p.status,t.method==="HEAD"?null:getFileFromBlob(a(p.response),m),h))},d.onerror=p=>{s(createResponse("error",p.status,n(p.response)||p.statusText,p.getAllResponseHeaders()))},d.onheaders=p=>{u(createResponse("headers",p.status,null,p.getAllResponseHeaders()))},d.ontimeout=createTimeoutResponse(s),d.onprogress=o,d.onabort=c,d}},ChunkStatus={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},processFileChunked=(e,t,a,n,l,r,s,o,c,u,d)=>{const p=[],{chunkTransferId:h,chunkServer:m,chunkSize:g,chunkRetryDelays:E}=d,T={serverId:h,aborted:!1},I=t.ondata||(x=>x),f=t.onload||((x,k)=>k==="HEAD"?x.getResponseHeader("Upload-Offset"):x.response),b=t.onerror||(x=>null),S=x=>{const k=new FormData;isObject$1(l)&&k.append(a,JSON.stringify(l));const y=typeof t.headers=="function"?t.headers(n,l):{...t.headers,"Upload-Length":n.size},F={...t,headers:y},z=sendRequest(I(k),buildURL(e,t.url),F);z.onload=v=>x(f(v,F.method)),z.onerror=v=>s(createResponse("error",v.status,b(v.response)||v.statusText,v.getAllResponseHeaders())),z.ontimeout=createTimeoutResponse(s)},R=x=>{const k=buildURL(e,m.url,T.serverId),F={headers:typeof t.headers=="function"?t.headers(T.serverId):{...t.headers},method:"HEAD"},z=sendRequest(null,k,F);z.onload=v=>x(f(v,F.method)),z.onerror=v=>s(createResponse("error",v.status,b(v.response)||v.statusText,v.getAllResponseHeaders())),z.ontimeout=createTimeoutResponse(s)},A=Math.floor(n.size/g);for(let x=0;x<=A;x++){const k=x*g,y=n.slice(k,k+g,"application/offset+octet-stream");p[x]={index:x,size:y.size,offset:k,data:y,file:n,progress:0,retries:[...E],status:ChunkStatus.QUEUED,error:null,request:null,timeout:null}}const O=()=>r(T.serverId),L=x=>x.status===ChunkStatus.QUEUED||x.status===ChunkStatus.ERROR,P=x=>{if(T.aborted)return;if(x=x||p.find(L),!x){p.every(C=>C.status===ChunkStatus.COMPLETE)&&O();return}x.status=ChunkStatus.PROCESSING,x.progress=null;const k=m.ondata||(C=>C),y=m.onerror||(C=>null),F=buildURL(e,m.url,T.serverId),z=typeof m.headers=="function"?m.headers(x):{...m.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":x.offset,"Upload-Length":n.size,"Upload-Name":n.name},v=x.request=sendRequest(k(x.data),F,{...m,headers:z});v.onload=()=>{x.status=ChunkStatus.COMPLETE,x.request=null,w()},v.onprogress=(C,N,W)=>{x.progress=C?N:null,M()},v.onerror=C=>{x.status=ChunkStatus.ERROR,x.request=null,x.error=y(C.response)||C.statusText,D(x)||s(createResponse("error",C.status,y(C.response)||C.statusText,C.getAllResponseHeaders()))},v.ontimeout=C=>{x.status=ChunkStatus.ERROR,x.request=null,D(x)||createTimeoutResponse(s)(C)},v.onabort=()=>{x.status=ChunkStatus.QUEUED,x.request=null,c()}},D=x=>x.retries.length===0?!1:(x.status=ChunkStatus.WAITING,clearTimeout(x.timeout),x.timeout=setTimeout(()=>{P(x)},x.retries.shift()),!0),M=()=>{const x=p.reduce((y,F)=>y===null||F.progress===null?null:y+F.progress,0);if(x===null)return o(!1,0,0);const k=p.reduce((y,F)=>y+F.size,0);o(!0,x,k)},w=()=>{p.filter(k=>k.status===ChunkStatus.PROCESSING).length>=1||P()},V=()=>{p.forEach(x=>{clearTimeout(x.timeout),x.request&&x.request.abort()})};return T.serverId?R(x=>{T.aborted||(p.filter(k=>k.offset{k.status=ChunkStatus.COMPLETE,k.progress=k.size}),w())}):S(x=>{T.aborted||(u(x),T.serverId=x,w())}),{abort:()=>{T.aborted=!0,V()}}},createFileProcessorFunction=(e,t,a,n)=>(l,r,s,o,c,u,d)=>{if(!l)return;const p=n.chunkUploads,h=p&&l.size>n.chunkSize,m=p&&(h||n.chunkForce);if(l instanceof Blob&&m)return processFileChunked(e,t,a,l,r,s,o,c,u,d,n);const g=t.ondata||(R=>R),E=t.onload||(R=>R),T=t.onerror||(R=>null),I=typeof t.headers=="function"?t.headers(l,r)||{}:{...t.headers},f={...t,headers:I};var b=new FormData;isObject$1(r)&&b.append(a,JSON.stringify(r)),(l instanceof Blob?[{name:null,file:l}]:l).forEach(R=>{b.append(a,R.file,R.name===null?R.file.name:`${R.name}${R.file.name}`)});const S=sendRequest(g(b),buildURL(e,t.url),f);return S.onload=R=>{s(createResponse("load",R.status,E(R.response),R.getAllResponseHeaders()))},S.onerror=R=>{o(createResponse("error",R.status,T(R.response)||R.statusText,R.getAllResponseHeaders()))},S.ontimeout=createTimeoutResponse(o),S.onprogress=c,S.onabort=u,S},createProcessorFunction=(e="",t,a,n)=>typeof t=="function"?(...l)=>t(a,...l,n):!t||!isString$1(t.url)?null:createFileProcessorFunction(e,t,a,n),createRevertFunction=(e="",t)=>{if(typeof t=="function")return t;if(!t||!isString$1(t.url))return(l,r)=>r();const a=t.onload||(l=>l),n=t.onerror||(l=>null);return(l,r,s)=>{const o=sendRequest(l,e+t.url,t);return o.onload=c=>{r(createResponse("load",c.status,a(c.response),c.getAllResponseHeaders()))},o.onerror=c=>{s(createResponse("error",c.status,n(c.response)||c.statusText,c.getAllResponseHeaders()))},o.ontimeout=createTimeoutResponse(s),o}},getRandomNumber=(e=0,t=1)=>e+Math.random()*(t-e),createPerceivedPerformanceUpdater=(e,t=1e3,a=0,n=25,l=250)=>{let r=null;const s=Date.now(),o=()=>{let c=Date.now()-s,u=getRandomNumber(n,l);c+u>t&&(u=c+u-t);let d=c/t;if(d>=1||document.hidden){e(1);return}e(d),r=setTimeout(o,u)};return t>0&&o(),{clear:()=>{clearTimeout(r)}}},createFileProcessor=(e,t)=>{const a={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},{allowMinimumUploadDuration:n}=t,l=(d,p)=>{const h=()=>{a.duration===0||a.progress===null||u.fire("progress",u.getProgress())},m=()=>{a.complete=!0,u.fire("load-perceived",a.response.body)};u.fire("start"),a.timestamp=Date.now(),a.perceivedPerformanceUpdater=createPerceivedPerformanceUpdater(g=>{a.perceivedProgress=g,a.perceivedDuration=Date.now()-a.timestamp,h(),a.response&&a.perceivedProgress===1&&!a.complete&&m()},n?getRandomNumber(750,1500):0),a.request=e(d,p,g=>{a.response=isObject$1(g)?g:{type:"load",code:200,body:`${g}`,headers:{}},a.duration=Date.now()-a.timestamp,a.progress=1,u.fire("load",a.response.body),(!n||n&&a.perceivedProgress===1)&&m()},g=>{a.perceivedPerformanceUpdater.clear(),u.fire("error",isObject$1(g)?g:{type:"error",code:0,body:`${g}`})},(g,E,T)=>{a.duration=Date.now()-a.timestamp,a.progress=g?E/T:null,h()},()=>{a.perceivedPerformanceUpdater.clear(),u.fire("abort",a.response?a.response.body:null)},g=>{u.fire("transfer",g)})},r=()=>{a.request&&(a.perceivedPerformanceUpdater.clear(),a.request.abort&&a.request.abort(),a.complete=!0)},s=()=>{r(),a.complete=!1,a.perceivedProgress=0,a.progress=0,a.timestamp=null,a.perceivedDuration=0,a.duration=0,a.request=null,a.response=null},o=n?()=>a.progress?Math.min(a.progress,a.perceivedProgress):null:()=>a.progress||null,c=n?()=>Math.min(a.duration,a.perceivedDuration):()=>a.duration,u={...on(),process:l,abort:r,getProgress:o,getDuration:c,reset:s};return u},getFilenameWithoutExtension=e=>e.substring(0,e.lastIndexOf("."))||e,createFileStub=e=>{let t=[e.name,e.size,e.type];return e instanceof Blob||isBase64DataURI(e)?t[0]=e.name||getDateString():isBase64DataURI(e)?(t[1]=e.length,t[2]=getMimeTypeFromBase64DataURI(e)):isString$1(e)&&(t[0]=getFilenameFromURL(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},isFile=e=>!!(e instanceof File||e instanceof Blob&&e.name),deepCloneObject=e=>{if(!isObject$1(e))return e;const t=isArray$1(e)?[]:{};for(const a in e){if(!e.hasOwnProperty(a))continue;const n=e[a];t[a]=n&&isObject$1(n)?deepCloneObject(n):n}return t},createItem=(e=null,t=null,a=null)=>{const n=getUniqueId(),l={archived:!1,frozen:!1,released:!1,source:null,file:a,serverFileReference:t,transferId:null,processingAborted:!1,status:t?ItemStatus.PROCESSING_COMPLETE:ItemStatus.INIT,activeLoader:null,activeProcessor:null};let r=null;const s={},o=L=>l.status=L,c=(L,...P)=>{l.released||l.frozen||A.fire(L,...P)},u=()=>getExtensionFromFilename(l.file.name),d=()=>l.file.type,p=()=>l.file.size,h=()=>l.file,m=(L,P,D)=>{if(l.source=L,A.fireSync("init"),l.file){A.fireSync("load-skip");return}l.file=createFileStub(L),P.on("init",()=>{c("load-init")}),P.on("meta",M=>{l.file.size=M.size,l.file.filename=M.filename,M.source&&(e=FileOrigin.LIMBO,l.serverFileReference=M.source,l.status=ItemStatus.PROCESSING_COMPLETE),c("load-meta")}),P.on("progress",M=>{o(ItemStatus.LOADING),c("load-progress",M)}),P.on("error",M=>{o(ItemStatus.LOAD_ERROR),c("load-request-error",M)}),P.on("abort",()=>{o(ItemStatus.INIT),c("load-abort")}),P.on("load",M=>{l.activeLoader=null;const w=x=>{l.file=isFile(x)?x:l.file,e===FileOrigin.LIMBO&&l.serverFileReference?o(ItemStatus.PROCESSING_COMPLETE):o(ItemStatus.IDLE),c("load")},V=x=>{l.file=M,c("load-meta"),o(ItemStatus.LOAD_ERROR),c("load-file-error",x)};if(l.serverFileReference){w(M);return}D(M,w,V)}),P.setSource(L),l.activeLoader=P,P.load()},g=()=>{l.activeLoader&&l.activeLoader.load()},E=()=>{if(l.activeLoader){l.activeLoader.abort();return}o(ItemStatus.INIT),c("load-abort")},T=(L,P)=>{if(l.processingAborted){l.processingAborted=!1;return}if(o(ItemStatus.PROCESSING),r=null,!(l.file instanceof Blob)){A.on("load",()=>{T(L,P)});return}L.on("load",w=>{l.transferId=null,l.serverFileReference=w}),L.on("transfer",w=>{l.transferId=w}),L.on("load-perceived",w=>{l.activeProcessor=null,l.transferId=null,l.serverFileReference=w,o(ItemStatus.PROCESSING_COMPLETE),c("process-complete",w)}),L.on("start",()=>{c("process-start")}),L.on("error",w=>{l.activeProcessor=null,o(ItemStatus.PROCESSING_ERROR),c("process-error",w)}),L.on("abort",w=>{l.activeProcessor=null,l.serverFileReference=w,o(ItemStatus.IDLE),c("process-abort"),r&&r()}),L.on("progress",w=>{c("process-progress",w)});const D=w=>{l.archived||L.process(w,{...s})},M=console.error;P(l.file,D,M),l.activeProcessor=L},I=()=>{l.processingAborted=!1,o(ItemStatus.PROCESSING_QUEUED)},f=()=>new Promise(L=>{if(!l.activeProcessor){l.processingAborted=!0,o(ItemStatus.IDLE),c("process-abort"),L();return}r=()=>{L()},l.activeProcessor.abort()}),b=(L,P)=>new Promise((D,M)=>{const w=l.serverFileReference!==null?l.serverFileReference:l.transferId;if(w===null){D();return}L(w,()=>{l.serverFileReference=null,l.transferId=null,D()},V=>{if(!P){D();return}o(ItemStatus.PROCESSING_REVERT_ERROR),c("process-revert-error"),M(V)}),o(ItemStatus.IDLE),c("process-revert")}),S=(L,P,D)=>{const M=L.split("."),w=M[0],V=M.pop();let x=s;M.forEach(k=>x=x[k]),JSON.stringify(x[V])!==JSON.stringify(P)&&(x[V]=P,c("metadata-update",{key:w,value:s[w],silent:D}))},A={id:{get:()=>n},origin:{get:()=>e,set:L=>e=L},serverId:{get:()=>l.serverFileReference},transferId:{get:()=>l.transferId},status:{get:()=>l.status},filename:{get:()=>l.file.name},filenameWithoutExtension:{get:()=>getFilenameWithoutExtension(l.file.name)},fileExtension:{get:u},fileType:{get:d},fileSize:{get:p},file:{get:h},relativePath:{get:()=>l.file._relativePath},source:{get:()=>l.source},getMetadata:L=>deepCloneObject(L?s[L]:s),setMetadata:(L,P,D)=>{if(isObject$1(L)){const M=L;return Object.keys(M).forEach(w=>{S(w,M[w],P)}),L}return S(L,P,D),P},extend:(L,P)=>O[L]=P,abortLoad:E,retryLoad:g,requestProcessing:I,abortProcessing:f,load:m,process:T,revert:b,...on(),freeze:()=>l.frozen=!0,release:()=>l.released=!0,released:{get:()=>l.released},archive:()=>l.archived=!0,archived:{get:()=>l.archived},setFile:L=>l.file=L},O=createObject(A);return O},getItemIndexByQuery=(e,t)=>isEmpty$1(t)?0:isString$1(t)?e.findIndex(a=>a.id===t):-1,getItemById=(e,t)=>{const a=getItemIndexByQuery(e,t);if(!(a<0))return e[a]||null},fetchBlob=(e,t,a,n,l,r)=>{const s=sendRequest(null,e,{method:"GET",responseType:"blob"});return s.onload=o=>{const c=o.getAllResponseHeaders(),u=getFileInfoFromHeaders(c).name||getFilenameFromURL(e);t(createResponse("load",o.status,getFileFromBlob(o.response,u),c))},s.onerror=o=>{a(createResponse("error",o.status,o.statusText,o.getAllResponseHeaders()))},s.onheaders=o=>{r(createResponse("headers",o.status,null,o.getAllResponseHeaders()))},s.ontimeout=createTimeoutResponse(a),s.onprogress=n,s.onabort=l,s},getDomainFromURL=e=>(e.indexOf("//")===0&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]),isExternalURL=e=>(e.indexOf(":")>-1||e.indexOf("//")>-1)&&getDomainFromURL(location.href)!==getDomainFromURL(e),dynamicLabel=e=>(...t)=>isFunction$2(e)?e(...t):e,isMockItem=e=>!isFile(e.file),listUpdated=(e,t)=>{clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout(()=>{e("DID_UPDATE_ITEMS",{items:getActiveItems(t.items)})},0)},optionalPromise=(e,...t)=>new Promise(a=>{if(!e)return a(!0);const n=e(...t);if(n==null)return a(!0);if(typeof n=="boolean")return a(n);typeof n.then=="function"&&n.then(a)}),sortItems=(e,t)=>{e.items.sort((a,n)=>t(createItemAPI(a),createItemAPI(n)))},getItemByQueryFromState=(e,t)=>({query:a,success:n=()=>{},failure:l=()=>{},...r}={})=>{const s=getItemByQuery(e.items,a);if(!s){l({error:createResponse("error",0,"Item not found"),file:null});return}t(s,n,l,r||{})},actions=(e,t,a)=>({ABORT_ALL:()=>{getActiveItems(a.items).forEach(n=>{n.freeze(),n.abortLoad(),n.abortProcessing()})},DID_SET_FILES:({value:n=[]})=>{const l=n.map(s=>({source:s.source?s.source:s,options:s.options}));let r=getActiveItems(a.items);r.forEach(s=>{l.find(o=>o.source===s.source||o.source===s.file)||e("REMOVE_ITEM",{query:s,remove:!1})}),r=getActiveItems(a.items),l.forEach((s,o)=>{r.find(c=>c.source===s.source||c.file===s.source)||e("ADD_ITEM",{...s,interactionMethod:InteractionMethod.NONE,index:o})})},DID_UPDATE_ITEM_METADATA:({id:n,action:l,change:r})=>{r.silent||(clearTimeout(a.itemUpdateTimeout),a.itemUpdateTimeout=setTimeout(()=>{const s=getItemById(a.items,n);if(!t("IS_ASYNC")){applyFilterChain("SHOULD_PREPARE_OUTPUT",!1,{item:s,query:t,action:l,change:r}).then(d=>{const p=t("GET_BEFORE_PREPARE_FILE");p&&(d=p(s,d)),d&&e("REQUEST_PREPARE_OUTPUT",{query:n,item:s,success:h=>{e("DID_PREPARE_OUTPUT",{id:n,file:h})}},!0)});return}s.origin===FileOrigin.LOCAL&&e("DID_LOAD_ITEM",{id:s.id,error:null,serverFileReference:s.source});const o=()=>{setTimeout(()=>{e("REQUEST_ITEM_PROCESSING",{query:n})},32)},c=d=>{s.revert(createRevertFunction(a.options.server.url,a.options.server.revert),t("GET_FORCE_REVERT")).then(d?o:()=>{}).catch(()=>{})},u=d=>{s.abortProcessing().then(d?o:()=>{})};if(s.status===ItemStatus.PROCESSING_COMPLETE)return c(a.options.instantUpload);if(s.status===ItemStatus.PROCESSING)return u(a.options.instantUpload);a.options.instantUpload&&o()},0))},MOVE_ITEM:({query:n,index:l})=>{const r=getItemByQuery(a.items,n);if(!r)return;const s=a.items.indexOf(r);l=limit(l,0,a.items.length-1),s!==l&&a.items.splice(l,0,a.items.splice(s,1)[0])},SORT:({compare:n})=>{sortItems(a,n),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:({items:n,index:l,interactionMethod:r,success:s=()=>{},failure:o=()=>{}})=>{let c=l;if(l===-1||typeof l>"u"){const m=t("GET_ITEM_INSERT_LOCATION"),g=t("GET_TOTAL_ITEMS");c=m==="before"?0:g}const u=t("GET_IGNORED_FILES"),d=m=>isFile(m)?!u.includes(m.name.toLowerCase()):!isEmpty$1(m),h=n.filter(d).map(m=>new Promise((g,E)=>{e("ADD_ITEM",{interactionMethod:r,source:m.source||m,success:g,failure:E,index:c++,options:m.options||{}})}));Promise.all(h).then(s).catch(o)},ADD_ITEM:({source:n,index:l=-1,interactionMethod:r,success:s=()=>{},failure:o=()=>{},options:c={}})=>{if(isEmpty$1(n)){o({error:createResponse("error",0,"No source"),file:null});return}if(isFile(n)&&a.options.ignoredFiles.includes(n.name.toLowerCase()))return;if(!hasRoomForItem(a)){if(a.options.allowMultiple||!a.options.allowMultiple&&!a.options.allowReplace){const f=createResponse("warning",0,"Max files");e("DID_THROW_MAX_FILES",{source:n,error:f}),o({error:f,file:null});return}const I=getActiveItems(a.items)[0];if(I.status===ItemStatus.PROCESSING_COMPLETE||I.status===ItemStatus.PROCESSING_REVERT_ERROR){const f=t("GET_FORCE_REVERT");if(I.revert(createRevertFunction(a.options.server.url,a.options.server.revert),f).then(()=>{f&&e("ADD_ITEM",{source:n,index:l,interactionMethod:r,success:s,failure:o,options:c})}).catch(()=>{}),f)return}e("REMOVE_ITEM",{query:I.id})}const u=c.type==="local"?FileOrigin.LOCAL:c.type==="limbo"?FileOrigin.LIMBO:FileOrigin.INPUT,d=createItem(u,u===FileOrigin.INPUT?null:n,c.file);Object.keys(c.metadata||{}).forEach(I=>{d.setMetadata(I,c.metadata[I])}),applyFilters("DID_CREATE_ITEM",d,{query:t,dispatch:e});const p=t("GET_ITEM_INSERT_LOCATION");a.options.itemInsertLocationFreedom||(l=p==="before"?-1:a.items.length),insertItem(a.items,d,l),isFunction$2(p)&&n&&sortItems(a,p);const h=d.id;d.on("init",()=>{e("DID_INIT_ITEM",{id:h})}),d.on("load-init",()=>{e("DID_START_ITEM_LOAD",{id:h})}),d.on("load-meta",()=>{e("DID_UPDATE_ITEM_META",{id:h})}),d.on("load-progress",I=>{e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:h,progress:I})}),d.on("load-request-error",I=>{const f=dynamicLabel(a.options.labelFileLoadError)(I);if(I.code>=400&&I.code<500){e("DID_THROW_ITEM_INVALID",{id:h,error:I,status:{main:f,sub:`${I.code} (${I.body})`}}),o({error:I,file:createItemAPI(d)});return}e("DID_THROW_ITEM_LOAD_ERROR",{id:h,error:I,status:{main:f,sub:a.options.labelTapToRetry}})}),d.on("load-file-error",I=>{e("DID_THROW_ITEM_INVALID",{id:h,error:I.status,status:I.status}),o({error:I.status,file:createItemAPI(d)})}),d.on("load-abort",()=>{e("REMOVE_ITEM",{query:h})}),d.on("load-skip",()=>{d.on("metadata-update",I=>{isFile(d.file)&&e("DID_UPDATE_ITEM_METADATA",{id:h,change:I})}),e("COMPLETE_LOAD_ITEM",{query:h,item:d,data:{source:n,success:s}})}),d.on("load",()=>{const I=f=>{if(!f){e("REMOVE_ITEM",{query:h});return}d.on("metadata-update",b=>{e("DID_UPDATE_ITEM_METADATA",{id:h,change:b})}),applyFilterChain("SHOULD_PREPARE_OUTPUT",!1,{item:d,query:t}).then(b=>{const S=t("GET_BEFORE_PREPARE_FILE");S&&(b=S(d,b));const R=()=>{e("COMPLETE_LOAD_ITEM",{query:h,item:d,data:{source:n,success:s}}),listUpdated(e,a)};if(b){e("REQUEST_PREPARE_OUTPUT",{query:h,item:d,success:A=>{e("DID_PREPARE_OUTPUT",{id:h,file:A}),R()}},!0);return}R()})};applyFilterChain("DID_LOAD_ITEM",d,{query:t,dispatch:e}).then(()=>{optionalPromise(t("GET_BEFORE_ADD_FILE"),createItemAPI(d)).then(I)}).catch(f=>{if(!f||!f.error||!f.status)return I(!1);e("DID_THROW_ITEM_INVALID",{id:h,error:f.error,status:f.status})})}),d.on("process-start",()=>{e("DID_START_ITEM_PROCESSING",{id:h})}),d.on("process-progress",I=>{e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:h,progress:I})}),d.on("process-error",I=>{e("DID_THROW_ITEM_PROCESSING_ERROR",{id:h,error:I,status:{main:dynamicLabel(a.options.labelFileProcessingError)(I),sub:a.options.labelTapToRetry}})}),d.on("process-revert-error",I=>{e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:h,error:I,status:{main:dynamicLabel(a.options.labelFileProcessingRevertError)(I),sub:a.options.labelTapToRetry}})}),d.on("process-complete",I=>{e("DID_COMPLETE_ITEM_PROCESSING",{id:h,error:null,serverFileReference:I}),e("DID_DEFINE_VALUE",{id:h,value:I})}),d.on("process-abort",()=>{e("DID_ABORT_ITEM_PROCESSING",{id:h})}),d.on("process-revert",()=>{e("DID_REVERT_ITEM_PROCESSING",{id:h}),e("DID_DEFINE_VALUE",{id:h,value:null})}),e("DID_ADD_ITEM",{id:h,index:l,interactionMethod:r}),listUpdated(e,a);const{url:m,load:g,restore:E,fetch:T}=a.options.server||{};d.load(n,createFileLoader(u===FileOrigin.INPUT?isString$1(n)&&isExternalURL(n)&&T?createFetchFunction(m,T):fetchBlob:u===FileOrigin.LIMBO?createFetchFunction(m,E):createFetchFunction(m,g)),(I,f,b)=>{applyFilterChain("LOAD_FILE",I,{query:t}).then(f).catch(b)})},REQUEST_PREPARE_OUTPUT:({item:n,success:l,failure:r=()=>{}})=>{const s={error:createResponse("error",0,"Item not found"),file:null};if(n.archived)return r(s);applyFilterChain("PREPARE_OUTPUT",n.file,{query:t,item:n}).then(o=>{applyFilterChain("COMPLETE_PREPARE_OUTPUT",o,{query:t,item:n}).then(c=>{if(n.archived)return r(s);l(c)})})},COMPLETE_LOAD_ITEM:({item:n,data:l})=>{const{success:r,source:s}=l,o=t("GET_ITEM_INSERT_LOCATION");if(isFunction$2(o)&&s&&sortItems(a,o),e("DID_LOAD_ITEM",{id:n.id,error:null,serverFileReference:n.origin===FileOrigin.INPUT?null:s}),r(createItemAPI(n)),n.origin===FileOrigin.LOCAL){e("DID_LOAD_LOCAL_ITEM",{id:n.id});return}if(n.origin===FileOrigin.LIMBO){e("DID_COMPLETE_ITEM_PROCESSING",{id:n.id,error:null,serverFileReference:s}),e("DID_DEFINE_VALUE",{id:n.id,value:n.serverId||s});return}t("IS_ASYNC")&&a.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:n.id})},RETRY_ITEM_LOAD:getItemByQueryFromState(a,n=>{n.retryLoad()}),REQUEST_ITEM_PREPARE:getItemByQueryFromState(a,(n,l,r)=>{e("REQUEST_PREPARE_OUTPUT",{query:n.id,item:n,success:s=>{e("DID_PREPARE_OUTPUT",{id:n.id,file:s}),l({file:n,output:s})},failure:r},!0)}),REQUEST_ITEM_PROCESSING:getItemByQueryFromState(a,(n,l,r)=>{if(!(n.status===ItemStatus.IDLE||n.status===ItemStatus.PROCESSING_ERROR)){const o=()=>e("REQUEST_ITEM_PROCESSING",{query:n,success:l,failure:r}),c=()=>document.hidden?o():setTimeout(o,32);n.status===ItemStatus.PROCESSING_COMPLETE||n.status===ItemStatus.PROCESSING_REVERT_ERROR?n.revert(createRevertFunction(a.options.server.url,a.options.server.revert),t("GET_FORCE_REVERT")).then(c).catch(()=>{}):n.status===ItemStatus.PROCESSING&&n.abortProcessing().then(c);return}n.status!==ItemStatus.PROCESSING_QUEUED&&(n.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:n.id}),e("PROCESS_ITEM",{query:n,success:l,failure:r},!0))}),PROCESS_ITEM:getItemByQueryFromState(a,(n,l,r)=>{const s=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",ItemStatus.PROCESSING).length===s){a.processingQueue.push({id:n.id,success:l,failure:r});return}if(n.status===ItemStatus.PROCESSING)return;const c=()=>{const d=a.processingQueue.shift();if(!d)return;const{id:p,success:h,failure:m}=d,g=getItemByQuery(a.items,p);if(!g||g.archived){c();return}e("PROCESS_ITEM",{query:p,success:h,failure:m},!0)};n.onOnce("process-complete",()=>{l(createItemAPI(n)),c();const d=a.options.server;if(a.options.instantUpload&&n.origin===FileOrigin.LOCAL&&isFunction$2(d.remove)){const m=()=>{};n.origin=FileOrigin.LIMBO,a.options.server.remove(n.source,m,m)}t("GET_ITEMS_BY_STATUS",ItemStatus.PROCESSING_COMPLETE).length===a.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")}),n.onOnce("process-error",d=>{r({error:d,file:createItemAPI(n)}),c()});const u=a.options;n.process(createFileProcessor(createProcessorFunction(u.server.url,u.server.process,u.name,{chunkTransferId:n.transferId,chunkServer:u.server.patch,chunkUploads:u.chunkUploads,chunkForce:u.chunkForce,chunkSize:u.chunkSize,chunkRetryDelays:u.chunkRetryDelays}),{allowMinimumUploadDuration:t("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(d,p,h)=>{applyFilterChain("PREPARE_OUTPUT",d,{query:t,item:n}).then(m=>{e("DID_PREPARE_OUTPUT",{id:n.id,file:m}),p(m)}).catch(h)})}),RETRY_ITEM_PROCESSING:getItemByQueryFromState(a,n=>{e("REQUEST_ITEM_PROCESSING",{query:n})}),REQUEST_REMOVE_ITEM:getItemByQueryFromState(a,n=>{optionalPromise(t("GET_BEFORE_REMOVE_FILE"),createItemAPI(n)).then(l=>{l&&e("REMOVE_ITEM",{query:n})})}),RELEASE_ITEM:getItemByQueryFromState(a,n=>{n.release()}),REMOVE_ITEM:getItemByQueryFromState(a,(n,l,r,s)=>{const o=()=>{const u=n.id;getItemById(a.items,u).archive(),e("DID_REMOVE_ITEM",{error:null,id:u,item:n}),listUpdated(e,a),l(createItemAPI(n))},c=a.options.server;n.origin===FileOrigin.LOCAL&&c&&isFunction$2(c.remove)&&s.remove!==!1?(e("DID_START_ITEM_REMOVE",{id:n.id}),c.remove(n.source,()=>o(),u=>{e("DID_THROW_ITEM_REMOVE_ERROR",{id:n.id,error:createResponse("error",0,u,null),status:{main:dynamicLabel(a.options.labelFileRemoveError)(u),sub:a.options.labelTapToRetry}})})):((s.revert&&n.origin!==FileOrigin.LOCAL&&n.serverId!==null||a.options.chunkUploads&&n.file.size>a.options.chunkSize||a.options.chunkUploads&&a.options.chunkForce)&&n.revert(createRevertFunction(a.options.server.url,a.options.server.revert),t("GET_FORCE_REVERT")),o())}),ABORT_ITEM_LOAD:getItemByQueryFromState(a,n=>{n.abortLoad()}),ABORT_ITEM_PROCESSING:getItemByQueryFromState(a,n=>{if(n.serverId){e("REVERT_ITEM_PROCESSING",{id:n.id});return}n.abortProcessing().then(()=>{a.options.instantUpload&&e("REMOVE_ITEM",{query:n.id})})}),REQUEST_REVERT_ITEM_PROCESSING:getItemByQueryFromState(a,n=>{if(!a.options.instantUpload){e("REVERT_ITEM_PROCESSING",{query:n});return}const l=o=>{o&&e("REVERT_ITEM_PROCESSING",{query:n})},r=t("GET_BEFORE_REMOVE_FILE");if(!r)return l(!0);const s=r(createItemAPI(n));if(s==null)return l(!0);if(typeof s=="boolean")return l(s);typeof s.then=="function"&&s.then(l)}),REVERT_ITEM_PROCESSING:getItemByQueryFromState(a,n=>{n.revert(createRevertFunction(a.options.server.url,a.options.server.revert),t("GET_FORCE_REVERT")).then(()=>{(a.options.instantUpload||isMockItem(n))&&e("REMOVE_ITEM",{query:n.id})}).catch(()=>{})}),SET_OPTIONS:({options:n})=>{const l=Object.keys(n),r=PrioritizedOptions.filter(o=>l.includes(o));[...r,...Object.keys(n).filter(o=>!r.includes(o))].forEach(o=>{e(`SET_${fromCamels(o,"_").toUpperCase()}`,{value:n[o]})})}}),PrioritizedOptions=["server"],formatFilename=e=>e,createElement$1=e=>document.createElement(e),text=(e,t)=>{let a=e.childNodes[0];a?t!==a.nodeValue&&(a.nodeValue=t):(a=document.createTextNode(t),e.appendChild(a))},polarToCartesian=(e,t,a,n)=>{const l=(n%360-90)*Math.PI/180;return{x:e+a*Math.cos(l),y:t+a*Math.sin(l)}},describeArc=(e,t,a,n,l,r)=>{const s=polarToCartesian(e,t,a,l),o=polarToCartesian(e,t,a,n);return["M",s.x,s.y,"A",a,a,0,r,0,o.x,o.y].join(" ")},percentageArc=(e,t,a,n,l)=>{let r=1;return l>n&&l-n<=.5&&(r=0),n>l&&n-l>=.5&&(r=0),describeArc(e,t,a,Math.min(.9999,n)*360,Math.min(.9999,l)*360,r)},create=({root:e,props:t})=>{t.spin=!1,t.progress=0,t.opacity=0;const a=createElement("svg");e.ref.path=createElement("path",{"stroke-width":2,"stroke-linecap":"round"}),a.appendChild(e.ref.path),e.ref.svg=a,e.appendChild(a)},write=({root:e,props:t})=>{if(t.opacity===0)return;t.align&&(e.element.dataset.align=t.align);const a=parseInt(attr(e.ref.path,"stroke-width"),10),n=e.rect.element.width*.5;let l=0,r=0;t.spin?(l=0,r=.5):(l=0,r=t.progress);const s=percentageArc(n,n,n-a,l,r);attr(e.ref.path,"d",s),attr(e.ref.path,"stroke-opacity",t.spin||t.progress>0?1:0)},progressIndicator=createView({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create,write,mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),create$1=({root:e,props:t})=>{e.element.innerHTML=(t.icon||"")+`${t.label}`,t.isDisabled=!1},write$1=({root:e,props:t})=>{const{isDisabled:a}=t,n=e.query("GET_DISABLED")||t.opacity===0;n&&!a?(t.isDisabled=!0,attr(e.element,"disabled","disabled")):!n&&a&&(t.isDisabled=!1,e.element.removeAttribute("disabled"))},fileActionButton=createView({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:create$1,write:write$1}),toNaturalFileSize=(e,t=".",a=1e3,n={})=>{const{labelBytes:l="bytes",labelKilobytes:r="KB",labelMegabytes:s="MB",labelGigabytes:o="GB"}=n;e=Math.round(Math.abs(e));const c=a,u=a*a,d=a*a*a;return ee.toFixed(t).split(".").filter(n=>n!=="0").join(a),create$2=({root:e,props:t})=>{const a=createElement$1("span");a.className="filepond--file-info-main",attr(a,"aria-hidden","true"),e.appendChild(a),e.ref.fileName=a;const n=createElement$1("span");n.className="filepond--file-info-sub",e.appendChild(n),e.ref.fileSize=n,text(n,e.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),text(a,formatFilename(e.query("GET_ITEM_NAME",t.id)))},updateFile=({root:e,props:t})=>{text(e.ref.fileSize,toNaturalFileSize(e.query("GET_ITEM_SIZE",t.id),".",e.query("GET_FILE_SIZE_BASE"),e.query("GET_FILE_SIZE_LABELS",e.query))),text(e.ref.fileName,formatFilename(e.query("GET_ITEM_NAME",t.id)))},updateFileSizeOnError=({root:e,props:t})=>{if(isInt(e.query("GET_ITEM_SIZE",t.id))){updateFile({root:e,props:t});return}text(e.ref.fileSize,e.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},fileInfo=createView({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:updateFile,DID_UPDATE_ITEM_META:updateFile,DID_THROW_ITEM_LOAD_ERROR:updateFileSizeOnError,DID_THROW_ITEM_INVALID:updateFileSizeOnError}),didCreateView:e=>{applyFilters("CREATE_VIEW",{...e,view:e})},create:create$2,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),toPercentage=e=>Math.round(e*100),create$3=({root:e})=>{const t=createElement$1("span");t.className="filepond--file-status-main",e.appendChild(t),e.ref.main=t;const a=createElement$1("span");a.className="filepond--file-status-sub",e.appendChild(a),e.ref.sub=a,didSetItemLoadProgress({root:e,action:{progress:null}})},didSetItemLoadProgress=({root:e,action:t})=>{const a=t.progress===null?e.query("GET_LABEL_FILE_LOADING"):`${e.query("GET_LABEL_FILE_LOADING")} ${toPercentage(t.progress)}%`;text(e.ref.main,a),text(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},didSetItemProcessProgress=({root:e,action:t})=>{const a=t.progress===null?e.query("GET_LABEL_FILE_PROCESSING"):`${e.query("GET_LABEL_FILE_PROCESSING")} ${toPercentage(t.progress)}%`;text(e.ref.main,a),text(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},didRequestItemProcessing=({root:e})=>{text(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING")),text(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},didAbortItemProcessing=({root:e})=>{text(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_ABORTED")),text(e.ref.sub,e.query("GET_LABEL_TAP_TO_RETRY"))},didCompleteItemProcessing=({root:e})=>{text(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),text(e.ref.sub,e.query("GET_LABEL_TAP_TO_UNDO"))},clear=({root:e})=>{text(e.ref.main,""),text(e.ref.sub,"")},error=({root:e,action:t})=>{text(e.ref.main,t.status.main),text(e.ref.sub,t.status.sub)},fileStatus=createView({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:clear,DID_REVERT_ITEM_PROCESSING:clear,DID_REQUEST_ITEM_PROCESSING:didRequestItemProcessing,DID_ABORT_ITEM_PROCESSING:didAbortItemProcessing,DID_COMPLETE_ITEM_PROCESSING:didCompleteItemProcessing,DID_UPDATE_ITEM_PROCESS_PROGRESS:didSetItemProcessProgress,DID_UPDATE_ITEM_LOAD_PROGRESS:didSetItemLoadProgress,DID_THROW_ITEM_LOAD_ERROR:error,DID_THROW_ITEM_INVALID:error,DID_THROW_ITEM_PROCESSING_ERROR:error,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:error,DID_THROW_ITEM_REMOVE_ERROR:error}),didCreateView:e=>{applyFilters("CREATE_VIEW",{...e,view:e})},create:create$3,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Buttons={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},ButtonKeys=[];forin(Buttons,e=>{ButtonKeys.push(e)});const calculateFileInfoOffset=e=>{if(getRemoveIndicatorAligment(e)==="right")return 0;const t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},calculateButtonWidth=e=>e.ref.buttonAbortItemLoad.rect.element.width,calculateFileVerticalCenterOffset=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.height/4),calculateFileHorizontalCenterOffset=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.left/2),getLoadIndicatorAlignment=e=>e.query("GET_STYLE_LOAD_INDICATOR_POSITION"),getProcessIndicatorAlignment=e=>e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"),getRemoveIndicatorAligment=e=>e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"),DefaultStyle={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:getLoadIndicatorAlignment},processProgressIndicator:{opacity:0,align:getProcessIndicatorAlignment},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},IdleStyle={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset}},ProcessingStyle={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},StyleMap={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:getRemoveIndicatorAligment},info:{translateX:calculateFileInfoOffset},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:getRemoveIndicatorAligment},buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1,translateX:calculateFileInfoOffset}},DID_LOAD_ITEM:IdleStyle,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{translateX:calculateFileInfoOffset}},DID_START_ITEM_PROCESSING:ProcessingStyle,DID_REQUEST_ITEM_PROCESSING:ProcessingStyle,DID_UPDATE_ITEM_PROCESS_PROGRESS:ProcessingStyle,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:calculateFileInfoOffset}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:calculateFileInfoOffset},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:IdleStyle},processingCompleteIndicatorView=createView({create:({root:e})=>{e.element.innerHTML=e.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),create$4=({root:e,props:t})=>{const a=Object.keys(Buttons).reduce((g,E)=>(g[E]={...Buttons[E]},g),{}),{id:n}=t,l=e.query("GET_ALLOW_REVERT"),r=e.query("GET_ALLOW_REMOVE"),s=e.query("GET_ALLOW_PROCESS"),o=e.query("GET_INSTANT_UPLOAD"),c=e.query("IS_ASYNC"),u=e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");let d;c?s&&!l?d=g=>!/RevertItemProcessing/.test(g):!s&&l?d=g=>!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(g):!s&&!l&&(d=g=>!/Process/.test(g)):d=g=>!/Process/.test(g);const p=d?ButtonKeys.filter(d):ButtonKeys.concat();if(o&&l&&(a.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",a.RevertItemProcessing.icon="GET_ICON_REMOVE"),c&&!l){const g=StyleMap.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=calculateFileHorizontalCenterOffset,g.info.translateY=calculateFileVerticalCenterOffset,g.status.translateY=calculateFileVerticalCenterOffset,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(c&&!s&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach(g=>{StyleMap[g].status.translateY=calculateFileVerticalCenterOffset}),StyleMap.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=calculateButtonWidth),u&&l){a.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";const g=StyleMap.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=calculateFileInfoOffset,g.status.translateY=calculateFileVerticalCenterOffset,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}r||(a.RemoveItem.disabled=!0),forin(a,(g,E)=>{const T=e.createChildView(fileActionButton,{label:e.query(E.label),icon:e.query(E.icon),opacity:0});p.includes(g)&&e.appendChildView(T),E.disabled&&(T.element.setAttribute("disabled","disabled"),T.element.setAttribute("hidden","hidden")),T.element.dataset.align=e.query(`GET_STYLE_${E.align}`),T.element.classList.add(E.className),T.on("click",I=>{I.stopPropagation(),!E.disabled&&e.dispatch(E.action,{query:n})}),e.ref[`button${g}`]=T}),e.ref.processingCompleteIndicator=e.appendChildView(e.createChildView(processingCompleteIndicatorView)),e.ref.processingCompleteIndicator.element.dataset.align=e.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),e.ref.info=e.appendChildView(e.createChildView(fileInfo,{id:n})),e.ref.status=e.appendChildView(e.createChildView(fileStatus,{id:n}));const h=e.appendChildView(e.createChildView(progressIndicator,{opacity:0,align:e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));h.element.classList.add("filepond--load-indicator"),e.ref.loadProgressIndicator=h;const m=e.appendChildView(e.createChildView(progressIndicator,{opacity:0,align:e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));m.element.classList.add("filepond--process-indicator"),e.ref.processProgressIndicator=m,e.ref.activeStyles=[]},write$2=({root:e,actions:t,props:a})=>{route({root:e,actions:t,props:a});let n=t.concat().filter(l=>/^DID_/.test(l.type)).reverse().find(l=>StyleMap[l.type]);if(n){e.ref.activeStyles=[];const l=StyleMap[n.type];forin(DefaultStyle,(r,s)=>{const o=e.ref[r];forin(s,(c,u)=>{const d=l[r]&&typeof l[r][c]<"u"?l[r][c]:u;e.ref.activeStyles.push({control:o,key:c,value:d})})})}e.ref.activeStyles.forEach(({control:l,key:r,value:s})=>{l[r]=typeof s=="function"?s(e):s})},route=createRoute({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:({root:e,action:t})=>{e.ref.buttonAbortItemProcessing.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:({root:e,action:t})=>{e.ref.buttonAbortItemLoad.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:({root:e,action:t})=>{e.ref.buttonAbortItemRemoval.label=t.value},DID_REQUEST_ITEM_PROCESSING:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:({root:e})=>{e.ref.loadProgressIndicator.spin=!0,e.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:({root:e,action:t})=>{e.ref.loadProgressIndicator.spin=!1,e.ref.loadProgressIndicator.progress=t.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:({root:e,action:t})=>{e.ref.processProgressIndicator.spin=!1,e.ref.processProgressIndicator.progress=t.progress}}),file=createView({create:create$4,write:write$2,didCreateView:e=>{applyFilters("CREATE_VIEW",{...e,view:e})},name:"file"}),create$5=({root:e,props:t})=>{e.ref.fileName=createElement$1("legend"),e.appendChild(e.ref.fileName),e.ref.file=e.appendChildView(e.createChildView(file,{id:t.id})),e.ref.data=!1},didLoadItem=({root:e,props:t})=>{text(e.ref.fileName,formatFilename(e.query("GET_ITEM_NAME",t.id)))},fileWrapper=createView({create:create$5,ignoreRect:!0,write:createRoute({DID_LOAD_ITEM:didLoadItem}),didCreateView:e=>{applyFilters("CREATE_VIEW",{...e,view:e})},tag:"fieldset",name:"file-wrapper"}),PANEL_SPRING_PROPS={type:"spring",damping:.6,mass:7},create$6=({root:e,props:t})=>{[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:PANEL_SPRING_PROPS},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:PANEL_SPRING_PROPS},styles:["translateY"]}}].forEach(a=>{createSection(e,a,t.name)}),e.element.classList.add(`filepond--${t.name}`),e.ref.scalable=null},createSection=(e,t,a)=>{const n=createView({name:`panel-${t.name} filepond--${a}`,mixins:t.mixins,ignoreRectUpdate:!0}),l=e.createChildView(n,t.props);e.ref[t.name]=e.appendChildView(l)},write$3=({root:e,props:t})=>{if((e.ref.scalable===null||t.scalable!==e.ref.scalable)&&(e.ref.scalable=isBoolean(t.scalable)?t.scalable:!0,e.element.dataset.scalable=e.ref.scalable),!t.height)return;const a=e.ref.top.rect.element,n=e.ref.bottom.rect.element,l=Math.max(a.height+n.height,t.height);e.ref.center.translateY=a.height,e.ref.center.scaleY=(l-a.height-n.height)/100,e.ref.bottom.translateY=l-n.height},panel=createView({name:"panel",read:({root:e,props:t})=>t.heightCurrent=e.ref.bottom.translateY,write:write$3,create:create$6,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),createDragHelper=e=>{const t=e.map(n=>n.id);let a;return{setIndex:n=>{a=n},getIndex:()=>a,getItemIndex:n=>t.indexOf(n.id)}},ITEM_TRANSLATE_SPRING={type:"spring",stiffness:.75,damping:.45,mass:10},ITEM_SCALE_SPRING="spring",StateMap={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},create$7=({root:e,props:t})=>{if(e.ref.handleClick=n=>e.dispatch("DID_ACTIVATE_ITEM",{id:t.id}),e.element.id=`filepond--item-${t.id}`,e.element.addEventListener("click",e.ref.handleClick),e.ref.container=e.appendChildView(e.createChildView(fileWrapper,{id:t.id})),e.ref.panel=e.appendChildView(e.createChildView(panel,{name:"item-panel"})),e.ref.panel.height=null,t.markedForRemoval=!1,!e.query("GET_ALLOW_REORDER"))return;e.element.dataset.dragState="idle";const a=n=>{if(!n.isPrimary)return;let l=!1;const r={x:n.pageX,y:n.pageY};t.dragOrigin={x:e.translateX,y:e.translateY},t.dragCenter={x:n.offsetX,y:n.offsetY};const s=createDragHelper(e.query("GET_ACTIVE_ITEMS"));e.dispatch("DID_GRAB_ITEM",{id:t.id,dragState:s});const o=p=>{if(!p.isPrimary)return;p.stopPropagation(),p.preventDefault(),t.dragOffset={x:p.pageX-r.x,y:p.pageY-r.y},t.dragOffset.x*t.dragOffset.x+t.dragOffset.y*t.dragOffset.y>16&&!l&&(l=!0,e.element.removeEventListener("click",e.ref.handleClick)),e.dispatch("DID_DRAG_ITEM",{id:t.id,dragState:s})},c=p=>{p.isPrimary&&(t.dragOffset={x:p.pageX-r.x,y:p.pageY-r.y},d())},u=()=>{d()},d=()=>{document.removeEventListener("pointercancel",u),document.removeEventListener("pointermove",o),document.removeEventListener("pointerup",c),e.dispatch("DID_DROP_ITEM",{id:t.id,dragState:s}),l&&setTimeout(()=>e.element.addEventListener("click",e.ref.handleClick),0)};document.addEventListener("pointercancel",u),document.addEventListener("pointermove",o),document.addEventListener("pointerup",c)};e.element.addEventListener("pointerdown",a)},route$1=createRoute({DID_UPDATE_PANEL_HEIGHT:({root:e,action:t})=>{e.height=t.height}}),write$4=createRoute({DID_GRAB_ITEM:({root:e,props:t})=>{t.dragOrigin={x:e.translateX,y:e.translateY}},DID_DRAG_ITEM:({root:e})=>{e.element.dataset.dragState="drag"},DID_DROP_ITEM:({root:e,props:t})=>{t.dragOffset=null,t.dragOrigin=null,e.element.dataset.dragState="drop"}},({root:e,actions:t,props:a,shouldOptimize:n})=>{e.element.dataset.dragState==="drop"&&e.scaleX<=1&&(e.element.dataset.dragState="idle");let l=t.concat().filter(s=>/^DID_/.test(s.type)).reverse().find(s=>StateMap[s.type]);l&&l.type!==a.currentState&&(a.currentState=l.type,e.element.dataset.filepondItemState=StateMap[a.currentState]||"");const r=e.query("GET_ITEM_PANEL_ASPECT_RATIO")||e.query("GET_PANEL_ASPECT_RATIO");r?n||(e.height=e.rect.element.width*r):(route$1({root:e,actions:t,props:a}),!e.height&&e.ref.container.rect.element.height>0&&(e.height=e.ref.container.rect.element.height)),n&&(e.ref.panel.height=null),e.ref.panel.height=e.height}),item=createView({create:create$7,write:write$4,destroy:({root:e,props:t})=>{e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:t.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:ITEM_SCALE_SPRING,scaleY:ITEM_SCALE_SPRING,translateX:ITEM_TRANSLATE_SPRING,translateY:ITEM_TRANSLATE_SPRING,opacity:{type:"tween",duration:150}}}});var getItemsPerRow=(e,t)=>Math.max(1,Math.floor((e+1)/t));const getItemIndexByPosition=(e,t,a)=>{if(!a)return;const n=e.rect.element.width,l=t.length;let r=null;if(l===0||a.topf){if(a.left{attr(e.element,"role","list"),e.ref.lastItemSpanwDate=Date.now()},addItemView=({root:e,action:t})=>{const{id:a,index:n,interactionMethod:l}=t;e.ref.addIndex=n;const r=Date.now();let s=r,o=1;if(l!==InteractionMethod.NONE){o=0;const c=e.query("GET_ITEM_INSERT_INTERVAL"),u=r-e.ref.lastItemSpanwDate;s=u{e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=a,Date.now()>e.spawnDate&&(e.opacity===0&&introItemView(e,t,a,n,l),e.scaleX=1,e.scaleY=1,e.opacity=1))},introItemView=(e,t,a,n,l)=>{e.interactionMethod===InteractionMethod.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=a):e.interactionMethod===InteractionMethod.DROP?(e.translateX=null,e.translateX=t-n*20,e.translateY=null,e.translateY=a-l*10,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===InteractionMethod.BROWSE?(e.translateY=null,e.translateY=a-30):e.interactionMethod===InteractionMethod.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},removeItemView=({root:e,action:t})=>{const{id:a}=t,n=e.childViews.find(l=>l.id===a);n&&(n.scaleX=.9,n.scaleY=.9,n.opacity=0,n.markedForRemoval=!0)},getItemHeight=e=>e.rect.element.height+e.rect.element.marginBottom*.5+e.rect.element.marginTop*.5,getItemWidth=e=>e.rect.element.width+e.rect.element.marginLeft*.5+e.rect.element.marginRight*.5,dragItem=({root:e,action:t})=>{const{id:a,dragState:n}=t,l=e.query("GET_ITEM",{id:a}),r=e.childViews.find(T=>T.id===a),s=e.childViews.length,o=n.getItemIndex(l);if(!r)return;const c={x:r.dragOrigin.x+r.dragOffset.x+r.dragCenter.x,y:r.dragOrigin.y+r.dragOffset.y+r.dragCenter.y},u=getItemHeight(r),d=getItemWidth(r);let p=Math.floor(e.rect.outer.width/d);p>s&&(p=s);const h=Math.floor(s/p+1);dropAreaDimensions.setHeight=u*h,dropAreaDimensions.setWidth=d*p;var m={y:Math.floor(c.y/u),x:Math.floor(c.x/d),getGridIndex:function(){return c.y>dropAreaDimensions.getHeight||c.y<0||c.x>dropAreaDimensions.getWidth||c.x<0?o:this.y*p+this.x},getColIndex:function(){const I=e.query("GET_ACTIVE_ITEMS"),f=e.childViews.filter(M=>M.rect.element.height),b=I.map(M=>f.find(w=>w.id===M.id)),S=b.findIndex(M=>M===r),R=getItemHeight(r),A=b.length;let O=A,L=0,P=0,D=0;for(let M=0;MM){if(c.y1?m.getGridIndex():m.getColIndex();e.dispatch("MOVE_ITEM",{query:r,index:g});const E=n.getIndex();if(E===void 0||E!==g){if(n.setIndex(g),E===void 0)return;e.dispatch("DID_REORDER_ITEMS",{items:e.query("GET_ACTIVE_ITEMS"),origin:o,target:g})}},route$2=createRoute({DID_ADD_ITEM:addItemView,DID_REMOVE_ITEM:removeItemView,DID_DRAG_ITEM:dragItem}),write$5=({root:e,props:t,actions:a,shouldOptimize:n})=>{route$2({root:e,props:t,actions:a});const{dragCoordinates:l}=t,r=e.rect.element.width,s=e.childViews.filter(b=>b.rect.element.height),o=e.query("GET_ACTIVE_ITEMS").map(b=>s.find(S=>S.id===b.id)).filter(b=>b),c=l?getItemIndexByPosition(e,o,l):null,u=e.ref.addIndex||null;e.ref.addIndex=null;let d=0,p=0,h=0;if(o.length===0)return;const m=o[0].rect.element,g=m.marginTop+m.marginBottom,E=m.marginLeft+m.marginRight,T=m.width+E,I=m.height+g,f=getItemsPerRow(r,T);if(f===1){let b=0,S=0;o.forEach((R,A)=>{if(c){let P=A-c;P===-2?S=-g*.25:P===-1?S=-g*.75:P===0?S=g*.75:P===1?S=g*.25:S=0}n&&(R.translateX=null,R.translateY=null),R.markedForRemoval||moveItem(R,0,b+S);let L=(R.rect.element.height+g)*(R.markedForRemoval?R.opacity:1);b+=L})}else{let b=0,S=0;o.forEach((R,A)=>{A===c&&(d=1),A===u&&(h+=1),R.markedForRemoval&&R.opacity<.5&&(p-=1);const O=A+h+d+p,L=O%f,P=Math.floor(O/f),D=L*T,M=P*I,w=Math.sign(D-b),V=Math.sign(M-S);b=D,S=M,!R.markedForRemoval&&(n&&(R.translateX=null,R.translateY=null),moveItem(R,D,M,w,V))})}},filterSetItemActions=(e,t)=>t.filter(a=>a.data&&a.data.id?e.id===a.data.id:!0),list=createView({create:create$8,write:write$5,tag:"ul",name:"list",didWriteView:({root:e})=>{e.childViews.filter(t=>t.markedForRemoval&&t.opacity===0&&t.resting).forEach(t=>{t._destroy(),e.removeChildView(t)})},filterFrameActionsForChild:filterSetItemActions,mixins:{apis:["dragCoordinates"]}}),create$9=({root:e,props:t})=>{e.ref.list=e.appendChildView(e.createChildView(list)),t.dragCoordinates=null,t.overflowing=!1},storeDragCoordinates=({root:e,props:t,action:a})=>{e.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(t.dragCoordinates={left:a.position.scopeLeft-e.ref.list.rect.element.left,top:a.position.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},clearDragCoordinates=({props:e})=>{e.dragCoordinates=null},route$3=createRoute({DID_DRAG:storeDragCoordinates,DID_END_DRAG:clearDragCoordinates}),write$6=({root:e,props:t,actions:a})=>{if(route$3({root:e,props:t,actions:a}),e.ref.list.dragCoordinates=t.dragCoordinates,t.overflowing&&!t.overflow&&(t.overflowing=!1,e.element.dataset.state="",e.height=null),t.overflow){const n=Math.round(t.overflow);n!==e.height&&(t.overflowing=!0,e.element.dataset.state="overflow",e.height=n)}},listScroller=createView({create:create$9,write:write$6,name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),attrToggle=(e,t,a,n="")=>{a?attr(e,t,n):e.removeAttribute(t)},resetFileInput=e=>{if(!(!e||e.value==="")){try{e.value=""}catch{}if(e.value){const t=createElement$1("form"),a=e.parentNode,n=e.nextSibling;t.appendChild(e),t.reset(),n?a.insertBefore(e,n):a.appendChild(e)}}},create$a=({root:e,props:t})=>{e.element.id=`filepond--browser-${t.id}`,attr(e.element,"name",e.query("GET_NAME")),attr(e.element,"aria-controls",`filepond--assistant-${t.id}`),attr(e.element,"aria-labelledby",`filepond--drop-label-${t.id}`),setAcceptedFileTypes({root:e,action:{value:e.query("GET_ACCEPTED_FILE_TYPES")}}),toggleAllowMultiple({root:e,action:{value:e.query("GET_ALLOW_MULTIPLE")}}),toggleDirectoryFilter({root:e,action:{value:e.query("GET_ALLOW_DIRECTORIES_ONLY")}}),toggleDisabled({root:e}),toggleRequired({root:e,action:{value:e.query("GET_REQUIRED")}}),setCaptureMethod({root:e,action:{value:e.query("GET_CAPTURE_METHOD")}}),e.ref.handleChange=a=>{if(!e.element.value)return;const n=Array.from(e.element.files).map(l=>(l._relativePath=l.webkitRelativePath,l));setTimeout(()=>{t.onload(n),resetFileInput(e.element)},250)},e.element.addEventListener("change",e.ref.handleChange)},setAcceptedFileTypes=({root:e,action:t})=>{e.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&attrToggle(e.element,"accept",!!t.value,t.value?t.value.join(","):"")},toggleAllowMultiple=({root:e,action:t})=>{attrToggle(e.element,"multiple",t.value)},toggleDirectoryFilter=({root:e,action:t})=>{attrToggle(e.element,"webkitdirectory",t.value)},toggleDisabled=({root:e})=>{const t=e.query("GET_DISABLED"),a=e.query("GET_ALLOW_BROWSE"),n=t||!a;attrToggle(e.element,"disabled",n)},toggleRequired=({root:e,action:t})=>{t.value?e.query("GET_TOTAL_ITEMS")===0&&attrToggle(e.element,"required",!0):attrToggle(e.element,"required",!1)},setCaptureMethod=({root:e,action:t})=>{attrToggle(e.element,"capture",!!t.value,t.value===!0?"":t.value)},updateRequiredStatus=({root:e})=>{const{element:t}=e;e.query("GET_TOTAL_ITEMS")>0?(attrToggle(t,"required",!1),attrToggle(t,"name",!1)):(attrToggle(t,"name",!0,e.query("GET_NAME")),e.query("GET_CHECK_VALIDITY")&&t.setCustomValidity(""),e.query("GET_REQUIRED")&&attrToggle(t,"required",!0))},updateFieldValidityStatus=({root:e})=>{e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},browser=createView({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:create$a,destroy:({root:e})=>{e.element.removeEventListener("change",e.ref.handleChange)},write:createRoute({DID_LOAD_ITEM:updateRequiredStatus,DID_REMOVE_ITEM:updateRequiredStatus,DID_THROW_ITEM_INVALID:updateFieldValidityStatus,DID_SET_DISABLED:toggleDisabled,DID_SET_ALLOW_BROWSE:toggleDisabled,DID_SET_ALLOW_DIRECTORIES_ONLY:toggleDirectoryFilter,DID_SET_ALLOW_MULTIPLE:toggleAllowMultiple,DID_SET_ACCEPTED_FILE_TYPES:setAcceptedFileTypes,DID_SET_CAPTURE_METHOD:setCaptureMethod,DID_SET_REQUIRED:toggleRequired})}),Key={ENTER:13,SPACE:32},create$b=({root:e,props:t})=>{const a=createElement$1("label");attr(a,"for",`filepond--browser-${t.id}`),attr(a,"id",`filepond--drop-label-${t.id}`),attr(a,"aria-hidden","true"),e.ref.handleKeyDown=n=>{(n.keyCode===Key.ENTER||n.keyCode===Key.SPACE)&&(n.preventDefault(),e.ref.label.click())},e.ref.handleClick=n=>{n.target===a||a.contains(n.target)||e.ref.label.click()},a.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),updateLabelValue(a,t.caption),e.appendChild(a),e.ref.label=a},updateLabelValue=(e,t)=>{e.innerHTML=t;const a=e.querySelector(".filepond--label-action");return a&&attr(a,"tabindex","0"),t},dropLabel=createView({name:"drop-label",ignoreRect:!0,create:create$b,destroy:({root:e})=>{e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:createRoute({DID_SET_LABEL_IDLE:({root:e,action:t})=>{updateLabelValue(e.ref.label,t.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),blob=createView({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),addBlob=({root:e})=>{const t=e.rect.element.width*.5,a=e.rect.element.height*.5;e.ref.blob=e.appendChildView(e.createChildView(blob,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:t,translateY:a}))},moveBlob=({root:e,action:t})=>{if(!e.ref.blob){addBlob({root:e});return}e.ref.blob.translateX=t.position.scopeLeft,e.ref.blob.translateY=t.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1},hideBlob=({root:e})=>{e.ref.blob&&(e.ref.blob.opacity=0)},explodeBlob=({root:e})=>{e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},write$7=({root:e,props:t,actions:a})=>{route$4({root:e,props:t,actions:a});const{blob:n}=e.ref;a.length===0&&n&&n.opacity===0&&(e.removeChildView(n),e.ref.blob=null)},route$4=createRoute({DID_DRAG:moveBlob,DID_DROP:explodeBlob,DID_END_DRAG:hideBlob}),drip=createView({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:write$7}),setInputFiles=(e,t)=>{try{const a=new DataTransfer;t.forEach(n=>{n instanceof File?a.items.add(n):a.items.add(new File([n],n.name,{type:n.type}))}),e.files=a.files}catch{return!1}return!0},create$c=({root:e})=>e.ref.fields={},getField=(e,t)=>e.ref.fields[t],syncFieldPositionsWithItems=e=>{e.query("GET_ACTIVE_ITEMS").forEach(t=>{e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])})},didReorderItems=({root:e})=>syncFieldPositionsWithItems(e),didAddItem=({root:e,action:t})=>{const l=!(e.query("GET_ITEM",t.id).origin===FileOrigin.LOCAL)&&e.query("SHOULD_UPDATE_FILE_INPUT"),r=createElement$1("input");r.type=l?"file":"hidden",r.name=e.query("GET_NAME"),r.disabled=e.query("GET_DISABLED"),e.ref.fields[t.id]=r,syncFieldPositionsWithItems(e)},didLoadItem$1=({root:e,action:t})=>{const a=getField(e,t.id);if(!a||(t.serverFileReference!==null&&(a.value=t.serverFileReference),!e.query("SHOULD_UPDATE_FILE_INPUT")))return;const n=e.query("GET_ITEM",t.id);setInputFiles(a,[n.file])},didPrepareOutput=({root:e,action:t})=>{e.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout(()=>{const a=getField(e,t.id);a&&setInputFiles(a,[t.file])},0)},didSetDisabled=({root:e})=>{e.element.disabled=e.query("GET_DISABLED")},didRemoveItem=({root:e,action:t})=>{const a=getField(e,t.id);a&&(a.parentNode&&a.parentNode.removeChild(a),delete e.ref.fields[t.id])},didDefineValue=({root:e,action:t})=>{const a=getField(e,t.id);a&&(t.value===null?a.removeAttribute("value"):a.type!="file"&&(a.value=t.value),syncFieldPositionsWithItems(e))},write$8=createRoute({DID_SET_DISABLED:didSetDisabled,DID_ADD_ITEM:didAddItem,DID_LOAD_ITEM:didLoadItem$1,DID_REMOVE_ITEM:didRemoveItem,DID_DEFINE_VALUE:didDefineValue,DID_PREPARE_OUTPUT:didPrepareOutput,DID_REORDER_ITEMS:didReorderItems,DID_SORT_ITEMS:didReorderItems}),data$1=createView({tag:"fieldset",name:"data",create:create$c,write:write$8,ignoreRect:!0}),getRootNode=e=>"getRootNode"in e?e.getRootNode():document,images=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],text$1=["css","csv","html","txt"],map$1={zip:"zip|compressed",epub:"application/epub+zip"},guesstimateMimeType=(e="")=>(e=e.toLowerCase(),images.includes(e)?"image/"+(e==="jpg"?"jpeg":e==="svg"?"svg+xml":e):text$1.includes(e)?"text/"+e:map$1[e]||""),requestDataTransferItems=e=>new Promise((t,a)=>{const n=getLinks(e);if(n.length&&!hasFiles(e))return t(n);getFiles(e).then(t)}),hasFiles=e=>e.files?e.files.length>0:!1,getFiles=e=>new Promise((t,a)=>{const n=(e.items?Array.from(e.items):[]).filter(l=>isFileSystemItem(l)).map(l=>getFilesFromItem(l));if(!n.length){t(e.files?Array.from(e.files):[]);return}Promise.all(n).then(l=>{const r=[];l.forEach(s=>{r.push.apply(r,s)}),t(r.filter(s=>s).map(s=>(s._relativePath||(s._relativePath=s.webkitRelativePath),s)))}).catch(console.error)}),isFileSystemItem=e=>{if(isEntry(e)){const t=getAsEntry(e);if(t)return t.isFile||t.isDirectory}return e.kind==="file"},getFilesFromItem=e=>new Promise((t,a)=>{if(isDirectoryEntry(e)){getFilesInDirectory(getAsEntry(e)).then(t).catch(a);return}t([e.getAsFile()])}),getFilesInDirectory=e=>new Promise((t,a)=>{const n=[];let l=0,r=0;const s=()=>{r===0&&l===0&&t(n)},o=c=>{l++;const u=c.createReader(),d=()=>{u.readEntries(p=>{if(p.length===0){l--,s();return}p.forEach(h=>{h.isDirectory?o(h):(r++,h.file(m=>{const g=correctMissingFileType(m);h.fullPath&&(g._relativePath=h.fullPath),n.push(g),r--,s()}))}),d()},a)};d()};o(e)}),correctMissingFileType=e=>{if(e.type.length)return e;const t=e.lastModifiedDate,a=e.name,n=guesstimateMimeType(getExtensionFromFilename(e.name));return n.length&&(e=e.slice(0,e.size,n),e.name=a,e.lastModifiedDate=t),e},isDirectoryEntry=e=>isEntry(e)&&(getAsEntry(e)||{}).isDirectory,isEntry=e=>"webkitGetAsEntry"in e,getAsEntry=e=>e.webkitGetAsEntry(),getLinks=e=>{let t=[];try{if(t=getLinksFromTransferMetaData(e),t.length)return t;t=getLinksFromTransferURLData(e)}catch{}return t},getLinksFromTransferURLData=e=>{let t=e.getData("url");return typeof t=="string"&&t.length?[t]:[]},getLinksFromTransferMetaData=e=>{let t=e.getData("text/html");if(typeof t=="string"&&t.length){const a=t.match(/src\s*=\s*"(.+?)"/);if(a)return[a[1]]}return[]},dragNDropObservers=[],eventPosition=e=>({pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}),createDragNDropClient=(e,t,a)=>{const n=getDragNDropObserver(t),l={element:e,filterElement:a,state:null,ondrop:()=>{},onenter:()=>{},ondrag:()=>{},onexit:()=>{},onload:()=>{},allowdrop:()=>{}};return l.destroy=n.addListener(l),l},getDragNDropObserver=e=>{const t=dragNDropObservers.find(n=>n.element===e);if(t)return t;const a=createDragNDropObserver(e);return dragNDropObservers.push(a),a},createDragNDropObserver=e=>{const t=[],a={dragenter,dragover,dragleave,drop},n={};forin(a,(r,s)=>{n[r]=s(e,t),e.addEventListener(r,n[r],!1)});const l={element:e,addListener:r=>(t.push(r),()=>{t.splice(t.indexOf(r),1),t.length===0&&(dragNDropObservers.splice(dragNDropObservers.indexOf(l),1),forin(a,s=>{e.removeEventListener(s,n[s],!1)}))})};return l},elementFromPoint=(e,t)=>("elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)),isEventTarget=(e,t)=>{const a=getRootNode(t),n=elementFromPoint(a,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return n===t||t.contains(n)};let initialTarget=null;const setDropEffect=(e,t)=>{try{e.dropEffect=t}catch{}},dragenter=(e,t)=>a=>{a.preventDefault(),initialTarget=a.target,t.forEach(n=>{const{element:l,onenter:r}=n;isEventTarget(a,l)&&(n.state="enter",r(eventPosition(a)))})},dragover=(e,t)=>a=>{a.preventDefault();const n=a.dataTransfer;requestDataTransferItems(n).then(l=>{let r=!1;t.some(s=>{const{filterElement:o,element:c,onenter:u,onexit:d,ondrag:p,allowdrop:h}=s;setDropEffect(n,"copy");const m=h(l);if(!m){setDropEffect(n,"none");return}if(isEventTarget(a,c)){if(r=!0,s.state===null){s.state="enter",u(eventPosition(a));return}if(s.state="over",o&&!m){setDropEffect(n,"none");return}p(eventPosition(a))}else o&&!r&&setDropEffect(n,"none"),s.state&&(s.state=null,d(eventPosition(a)))})})},drop=(e,t)=>a=>{a.preventDefault();const n=a.dataTransfer;requestDataTransferItems(n).then(l=>{t.forEach(r=>{const{filterElement:s,element:o,ondrop:c,onexit:u,allowdrop:d}=r;if(r.state=null,!(s&&!isEventTarget(a,o))){if(!d(l))return u(eventPosition(a));c(eventPosition(a),l)}})})},dragleave=(e,t)=>a=>{initialTarget===a.target&&t.forEach(n=>{const{onexit:l}=n;n.state=null,l(eventPosition(a))})},createHopper=(e,t,a)=>{e.classList.add("filepond--hopper");const{catchesDropsOnPage:n,requiresDropOnElement:l,filterItems:r=d=>d}=a,s=createDragNDropClient(e,n?document.documentElement:e,l);let o="",c="";s.allowdrop=d=>t(r(d)),s.ondrop=(d,p)=>{const h=r(p);if(!t(h)){u.ondragend(d);return}c="drag-drop",u.onload(h,d)},s.ondrag=d=>{u.ondrag(d)},s.onenter=d=>{c="drag-over",u.ondragstart(d)},s.onexit=d=>{c="drag-exit",u.ondragend(d)};const u={updateHopperState:()=>{o!==c&&(e.dataset.hopperState=c,o=c)},onload:()=>{},ondragstart:()=>{},ondrag:()=>{},ondragend:()=>{},destroy:()=>{s.destroy()}};return u};let listening=!1;const listeners$1=[],handlePaste=e=>{const t=document.activeElement;if(t&&/textarea|input/i.test(t.nodeName)){let a=!1,n=t;for(;n!==document.body;){if(n.classList.contains("filepond--root")){a=!0;break}n=n.parentNode}if(!a)return}requestDataTransferItems(e.clipboardData).then(a=>{a.length&&listeners$1.forEach(n=>n(a))})},listen=e=>{listeners$1.includes(e)||(listeners$1.push(e),!listening&&(listening=!0,document.addEventListener("paste",handlePaste)))},unlisten=e=>{arrayRemove(listeners$1,listeners$1.indexOf(e)),listeners$1.length===0&&(document.removeEventListener("paste",handlePaste),listening=!1)},createPaster=()=>{const e=a=>{t.onload(a)},t={destroy:()=>{unlisten(e)},onload:()=>{}};return listen(e),t},create$d=({root:e,props:t})=>{e.element.id=`filepond--assistant-${t.id}`,attr(e.element,"role","status"),attr(e.element,"aria-live","polite"),attr(e.element,"aria-relevant","additions")};let addFilesNotificationTimeout=null,notificationClearTimeout=null;const filenames=[],assist=(e,t)=>{e.element.textContent=t},clear$1=e=>{e.element.textContent=""},listModified=(e,t,a)=>{const n=e.query("GET_TOTAL_ITEMS");assist(e,`${a} ${t}, ${n} ${n===1?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL")}`),clearTimeout(notificationClearTimeout),notificationClearTimeout=setTimeout(()=>{clear$1(e)},1500)},isUsingFilePond=e=>e.element.parentNode.contains(document.activeElement),itemAdded=({root:e,action:t})=>{if(!isUsingFilePond(e))return;e.element.textContent="";const a=e.query("GET_ITEM",t.id);filenames.push(a.filename),clearTimeout(addFilesNotificationTimeout),addFilesNotificationTimeout=setTimeout(()=>{listModified(e,filenames.join(", "),e.query("GET_LABEL_FILE_ADDED")),filenames.length=0},750)},itemRemoved=({root:e,action:t})=>{if(!isUsingFilePond(e))return;const a=t.item;listModified(e,a.filename,e.query("GET_LABEL_FILE_REMOVED"))},itemProcessed=({root:e,action:t})=>{const n=e.query("GET_ITEM",t.id).filename,l=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");assist(e,`${n} ${l}`)},itemProcessedUndo=({root:e,action:t})=>{const n=e.query("GET_ITEM",t.id).filename,l=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");assist(e,`${n} ${l}`)},itemError=({root:e,action:t})=>{const n=e.query("GET_ITEM",t.id).filename;assist(e,`${t.status.main} ${n} ${t.status.sub}`)},assistant=createView({create:create$d,ignoreRect:!0,ignoreRectUpdate:!0,write:createRoute({DID_LOAD_ITEM:itemAdded,DID_REMOVE_ITEM:itemRemoved,DID_COMPLETE_ITEM_PROCESSING:itemProcessed,DID_ABORT_ITEM_PROCESSING:itemProcessedUndo,DID_REVERT_ITEM_PROCESSING:itemProcessedUndo,DID_THROW_ITEM_REMOVE_ERROR:itemError,DID_THROW_ITEM_LOAD_ERROR:itemError,DID_THROW_ITEM_INVALID:itemError,DID_THROW_ITEM_PROCESSING_ERROR:itemError}),tag:"span",name:"assistant"}),toCamels=(e,t="-")=>e.replace(new RegExp(`${t}.`,"g"),a=>a.charAt(1).toUpperCase()),debounce=(e,t=16,a=!0)=>{let n=Date.now(),l=null;return(...r)=>{clearTimeout(l);const s=Date.now()-n,o=()=>{n=Date.now(),e(...r)};se.preventDefault(),create$e=({root:e,props:t})=>{const a=e.query("GET_ID");a&&(e.element.id=a);const n=e.query("GET_CLASS_NAME");n&&n.split(" ").filter(c=>c.length).forEach(c=>{e.element.classList.add(c)}),e.ref.label=e.appendChildView(e.createChildView(dropLabel,{...t,translateY:null,caption:e.query("GET_LABEL_IDLE")})),e.ref.list=e.appendChildView(e.createChildView(listScroller,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(panel,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(assistant,{...t})),e.ref.data=e.appendChildView(e.createChildView(data$1,{...t})),e.ref.measure=createElement$1("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter(c=>!isEmpty$1(c.value)).map(({name:c,value:u})=>{e.element.dataset[c]=u}),e.ref.widthPrevious=null,e.ref.widthUpdated=debounce(()=>{e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")},250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[];const l=window.matchMedia("(pointer: fine) and (hover: hover)").matches,r="PointerEvent"in window;e.query("GET_ALLOW_REORDER")&&r&&!l&&(e.element.addEventListener("touchmove",prevent,{passive:!1}),e.element.addEventListener("gesturestart",prevent));const s=e.query("GET_CREDITS");if(s.length===2){const c=document.createElement("a");c.className="filepond--credits",c.setAttribute("aria-hidden","true"),c.href=s[0],c.tabindex=-1,c.target="_blank",c.rel="noopener noreferrer",c.textContent=s[1],e.element.appendChild(c),e.ref.credits=c}},write$9=({root:e,props:t,actions:a})=>{if(route$5({root:e,props:t,actions:a}),a.filter(A=>/^DID_SET_STYLE_/.test(A.type)).filter(A=>!isEmpty$1(A.data.value)).map(({type:A,data:O})=>{const L=toCamels(A.substring(8).toLowerCase(),"_");e.element.dataset[L]=O.value,e.invalidateLayout()}),e.rect.element.hidden)return;e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());let n=e.ref.bounds;n||(n=e.ref.bounds=calculateRootBoundingBoxHeight(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);const{hopper:l,label:r,list:s,panel:o}=e.ref;l&&l.updateHopperState();const c=e.query("GET_PANEL_ASPECT_RATIO"),u=e.query("GET_ALLOW_MULTIPLE"),d=e.query("GET_TOTAL_ITEMS"),p=u?e.query("GET_MAX_FILES")||MAX_FILES_LIMIT:1,h=d===p,m=a.find(A=>A.type==="DID_ADD_ITEM");if(h&&m){const A=m.data.interactionMethod;r.opacity=0,u?r.translateY=-40:A===InteractionMethod.API?r.translateX=40:A===InteractionMethod.BROWSE?r.translateY=40:r.translateY=30}else h||(r.opacity=1,r.translateX=0,r.translateY=0);const g=calculateListItemMargin(e),E=calculateListHeight(e),T=r.rect.element.height,I=!u||h?0:T,f=h?s.rect.element.marginTop:0,b=d===0?0:s.rect.element.marginBottom,S=I+f+E.visual+b,R=I+f+E.bounds+b;if(s.translateY=Math.max(0,I-s.rect.element.marginTop)-g.top,c){const A=e.rect.element.width,O=A*c;c!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=c,e.ref.updateHistory=[]);const L=e.ref.updateHistory;L.push(A);const P=2;if(L.length>P*2){const M=L.length,w=M-10;let V=0;for(let x=M;x>=w;x--)if(L[x]===L[x-2]&&V++,V>=P)return}o.scalable=!1,o.height=O;const D=O-I-(b-g.bottom)-(h?f:0);E.visual>D?s.overflow=D:s.overflow=null,e.height=O}else if(n.fixedHeight){o.scalable=!1;const A=n.fixedHeight-I-(b-g.bottom)-(h?f:0);E.visual>A?s.overflow=A:s.overflow=null}else if(n.cappedHeight){const A=S>=n.cappedHeight,O=Math.min(n.cappedHeight,S);o.scalable=!0,o.height=A?O:O-g.top-g.bottom;const L=O-I-(b-g.bottom)-(h?f:0);S>n.cappedHeight&&E.visual>L?s.overflow=L:s.overflow=null,e.height=Math.min(n.cappedHeight,R-g.top-g.bottom)}else{const A=d>0?g.top+g.bottom:0;o.scalable=!0,o.height=Math.max(T,S-A),e.height=Math.max(T,R-A)}e.ref.credits&&o.heightCurrent&&(e.ref.credits.style.transform=`translateY(${o.heightCurrent}px)`)},calculateListItemMargin=e=>{const t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},calculateListHeight=e=>{let t=0,a=0;const n=e.ref.list,l=n.childViews[0],r=l.childViews.filter(f=>f.rect.element.height),s=e.query("GET_ACTIVE_ITEMS").map(f=>r.find(b=>b.id===f.id)).filter(f=>f);if(s.length===0)return{visual:t,bounds:a};const o=l.rect.element.width,c=getItemIndexByPosition(l,s,n.dragCoordinates),u=s[0].rect.element,d=u.marginTop+u.marginBottom,p=u.marginLeft+u.marginRight,h=u.width+p,m=u.height+d,g=typeof c<"u"&&c>=0?1:0,E=s.find(f=>f.markedForRemoval&&f.opacity<.45)?-1:0,T=s.length+g+E,I=getItemsPerRow(o,h);return I===1?s.forEach(f=>{const b=f.rect.element.height+d;a+=b,t+=b*f.opacity}):(a=Math.ceil(T/I)*m,t=a),{visual:t,bounds:a}},calculateRootBoundingBoxHeight=e=>{const t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:t===0?null:t}},exceedsMaxFiles=(e,t)=>{const a=e.query("GET_ALLOW_REPLACE"),n=e.query("GET_ALLOW_MULTIPLE"),l=e.query("GET_TOTAL_ITEMS");let r=e.query("GET_MAX_FILES");const s=t.length;return!n&&s>1?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:createResponse("warning",0,"Max files")}),!0):(r=n?r:1,!n&&a?!1:isInt(r)&&l+s>r?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:createResponse("warning",0,"Max files")}),!0):!1)},getDragIndex=(e,t,a)=>{const n=e.childViews[0];return getItemIndexByPosition(n,t,{left:a.scopeLeft-n.rect.element.left,top:a.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},toggleDrop=e=>{const t=e.query("GET_ALLOW_DROP"),a=e.query("GET_DISABLED"),n=t&&!a;if(n&&!e.ref.hopper){const l=createHopper(e.element,r=>{const s=e.query("GET_BEFORE_DROP_FILE")||(()=>!0);return e.query("GET_DROP_VALIDATION")?r.every(c=>applyFilters("ALLOW_HOPPER_ITEM",c,{query:e.query}).every(u=>u===!0)&&s(c)):!0},{filterItems:r=>{const s=e.query("GET_IGNORED_FILES");return r.filter(o=>isFile(o)?!s.includes(o.name.toLowerCase()):!0)},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});l.onload=(r,s)=>{const c=e.ref.list.childViews[0].childViews.filter(d=>d.rect.element.height),u=e.query("GET_ACTIVE_ITEMS").map(d=>c.find(p=>p.id===d.id)).filter(d=>d);applyFilterChain("ADD_ITEMS",r,{dispatch:e.dispatch}).then(d=>{if(exceedsMaxFiles(e,d))return!1;e.dispatch("ADD_ITEMS",{items:d,index:getDragIndex(e.ref.list,u,s),interactionMethod:InteractionMethod.DROP})}),e.dispatch("DID_DROP",{position:s}),e.dispatch("DID_END_DRAG",{position:s})},l.ondragstart=r=>{e.dispatch("DID_START_DRAG",{position:r})},l.ondrag=debounce(r=>{e.dispatch("DID_DRAG",{position:r})}),l.ondragend=r=>{e.dispatch("DID_END_DRAG",{position:r})},e.ref.hopper=l,e.ref.drip=e.appendChildView(e.createChildView(drip))}else!n&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},toggleBrowse=(e,t)=>{const a=e.query("GET_ALLOW_BROWSE"),n=e.query("GET_DISABLED"),l=a&&!n;l&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(browser,{...t,onload:r=>{applyFilterChain("ADD_ITEMS",r,{dispatch:e.dispatch}).then(s=>{if(exceedsMaxFiles(e,s))return!1;e.dispatch("ADD_ITEMS",{items:s,index:-1,interactionMethod:InteractionMethod.BROWSE})})}}),0):!l&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},togglePaste=e=>{const t=e.query("GET_ALLOW_PASTE"),a=e.query("GET_DISABLED"),n=t&&!a;n&&!e.ref.paster?(e.ref.paster=createPaster(),e.ref.paster.onload=l=>{applyFilterChain("ADD_ITEMS",l,{dispatch:e.dispatch}).then(r=>{if(exceedsMaxFiles(e,r))return!1;e.dispatch("ADD_ITEMS",{items:r,index:-1,interactionMethod:InteractionMethod.PASTE})})}):!n&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},route$5=createRoute({DID_SET_ALLOW_BROWSE:({root:e,props:t})=>{toggleBrowse(e,t)},DID_SET_ALLOW_DROP:({root:e})=>{toggleDrop(e)},DID_SET_ALLOW_PASTE:({root:e})=>{togglePaste(e)},DID_SET_DISABLED:({root:e,props:t})=>{toggleDrop(e),togglePaste(e),toggleBrowse(e,t),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),root$1=createView({name:"root",read:({root:e})=>{e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:create$e,write:write$9,destroy:({root:e})=>{e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy(),e.element.removeEventListener("touchmove",prevent),e.element.removeEventListener("gesturestart",prevent)},mixins:{styles:["height"]}}),createApp=(e={})=>{let t=null;const a=getOptions(),n=createStore(createInitialState(a),[queries,createOptionQueries(a)],[actions,createOptionActions(a)]);n.dispatch("SET_OPTIONS",{options:e});const l=()=>{document.hidden||n.dispatch("KICK")};document.addEventListener("visibilitychange",l);let r=null,s=!1,o=!1,c=null,u=null;const d=()=>{s||(s=!0),clearTimeout(r),r=setTimeout(()=>{s=!1,c=null,u=null,o&&(o=!1,n.dispatch("DID_STOP_RESIZE"))},500)};window.addEventListener("resize",d);const p=root$1(n,{id:getUniqueId()});let h=!1,m=!1;const g={_read:()=>{s&&(u=window.innerWidth,c||(c=u),!o&&u!==c&&(n.dispatch("DID_START_RESIZE"),o=!0)),m&&h&&(h=p.element.offsetParent===null),!h&&(p._read(),m=p.rect.element.hidden)},_write:y=>{const F=n.processActionQueue().filter(z=>!/^SET_/.test(z.type));h&&!F.length||(f(F),h=p._write(y,F,o),removeReleasedItems(n.query("GET_ITEMS")),h&&n.processDispatchQueue())}},E=y=>F=>{const z={type:y};if(!F)return z;if(F.hasOwnProperty("error")&&(z.error=F.error?{...F.error}:null),F.status&&(z.status={...F.status}),F.file&&(z.output=F.file),F.source)z.file=F.source;else if(F.item||F.id){const v=F.item?F.item:n.query("GET_ITEM",F.id);z.file=v?createItemAPI(v):null}return F.items&&(z.items=F.items.map(createItemAPI)),/progress/.test(y)&&(z.progress=F.progress),F.hasOwnProperty("origin")&&F.hasOwnProperty("target")&&(z.origin=F.origin,z.target=F.target),z},T={DID_DESTROY:E("destroy"),DID_INIT:E("init"),DID_THROW_MAX_FILES:E("warning"),DID_INIT_ITEM:E("initfile"),DID_START_ITEM_LOAD:E("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:E("addfileprogress"),DID_LOAD_ITEM:E("addfile"),DID_THROW_ITEM_INVALID:[E("error"),E("addfile")],DID_THROW_ITEM_LOAD_ERROR:[E("error"),E("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[E("error"),E("removefile")],DID_PREPARE_OUTPUT:E("preparefile"),DID_START_ITEM_PROCESSING:E("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:E("processfileprogress"),DID_ABORT_ITEM_PROCESSING:E("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:E("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:E("processfiles"),DID_REVERT_ITEM_PROCESSING:E("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[E("error"),E("processfile")],DID_REMOVE_ITEM:E("removefile"),DID_UPDATE_ITEMS:E("updatefiles"),DID_ACTIVATE_ITEM:E("activatefile"),DID_REORDER_ITEMS:E("reorderfiles")},I=y=>{const F={pond:k,...y};delete F.type,p.element.dispatchEvent(new CustomEvent(`FilePond:${y.type}`,{detail:F,bubbles:!0,cancelable:!0,composed:!0}));const z=[];y.hasOwnProperty("error")&&z.push(y.error),y.hasOwnProperty("file")&&z.push(y.file);const v=["type","error","file"];Object.keys(y).filter(N=>!v.includes(N)).forEach(N=>z.push(y[N])),k.fire(y.type,...z);const C=n.query(`GET_ON${y.type.toUpperCase()}`);C&&C(...z)},f=y=>{y.length&&y.filter(F=>T[F.type]).forEach(F=>{const z=T[F.type];(Array.isArray(z)?z:[z]).forEach(v=>{F.type==="DID_INIT_ITEM"?I(v(F.data)):setTimeout(()=>{I(v(F.data))},0)})})},b=y=>n.dispatch("SET_OPTIONS",{options:y}),S=y=>n.query("GET_ACTIVE_ITEM",y),R=y=>new Promise((F,z)=>{n.dispatch("REQUEST_ITEM_PREPARE",{query:y,success:v=>{F(v)},failure:v=>{z(v)}})}),A=(y,F={})=>new Promise((z,v)=>{P([{source:y,options:F}],{index:F.index}).then(C=>z(C&&C[0])).catch(v)}),O=y=>y.file&&y.id,L=(y,F)=>(typeof y=="object"&&!O(y)&&!F&&(F=y,y=void 0),n.dispatch("REMOVE_ITEM",{...F,query:y}),n.query("GET_ACTIVE_ITEM",y)===null),P=(...y)=>new Promise((F,z)=>{const v=[],C={};if(isArray$1(y[0]))v.push.apply(v,y[0]),Object.assign(C,y[1]||{});else{const N=y[y.length-1];typeof N=="object"&&!(N instanceof Blob)&&Object.assign(C,y.pop()),v.push(...y)}n.dispatch("ADD_ITEMS",{items:v,index:C.index,interactionMethod:InteractionMethod.API,success:F,failure:z})}),D=()=>n.query("GET_ACTIVE_ITEMS"),M=y=>new Promise((F,z)=>{n.dispatch("REQUEST_ITEM_PROCESSING",{query:y,success:v=>{F(v)},failure:v=>{z(v)}})}),w=(...y)=>{const F=Array.isArray(y[0])?y[0]:y,z=F.length?F:D();return Promise.all(z.map(R))},V=(...y)=>{const F=Array.isArray(y[0])?y[0]:y;if(!F.length){const z=D().filter(v=>!(v.status===ItemStatus.IDLE&&v.origin===FileOrigin.LOCAL)&&v.status!==ItemStatus.PROCESSING&&v.status!==ItemStatus.PROCESSING_COMPLETE&&v.status!==ItemStatus.PROCESSING_REVERT_ERROR);return Promise.all(z.map(M))}return Promise.all(F.map(M))},x=(...y)=>{const F=Array.isArray(y[0])?y[0]:y;let z;typeof F[F.length-1]=="object"?z=F.pop():Array.isArray(y[0])&&(z=y[1]);const v=D();return F.length?F.map(N=>isNumber$1(N)?v[N]?v[N].id:null:N).filter(N=>N).map(N=>L(N,z)):Promise.all(v.map(N=>L(N,z)))},k={...on(),...g,...createOptionAPI(n,a),setOptions:b,addFile:A,addFiles:P,getFile:S,processFile:M,prepareFile:R,removeFile:L,moveFile:(y,F)=>n.dispatch("MOVE_ITEM",{query:y,index:F}),getFiles:D,processFiles:V,removeFiles:x,prepareFiles:w,sort:y=>n.dispatch("SORT",{compare:y}),browse:()=>{var y=p.element.querySelector("input[type=file]");y&&y.click()},destroy:()=>{k.fire("destroy",p.element),n.dispatch("ABORT_ALL"),p._destroy(),window.removeEventListener("resize",d),document.removeEventListener("visibilitychange",l),n.dispatch("DID_DESTROY")},insertBefore:y=>insertBefore(p.element,y),insertAfter:y=>insertAfter(p.element,y),appendTo:y=>y.appendChild(p.element),replaceElement:y=>{insertBefore(p.element,y),y.parentNode.removeChild(y),t=y},restoreElement:()=>{t&&(insertAfter(t,p.element),p.element.parentNode.removeChild(p.element),t=null)},isAttachedTo:y=>p.element===y||t===y,element:{get:()=>p.element},status:{get:()=>n.query("GET_STATUS")}};return n.dispatch("DID_INIT"),createObject(k)},createAppObject=(e={})=>{const t={};return forin(getOptions(),(n,l)=>{t[n]=l[0]}),createApp({...t,...e})},lowerCaseFirstLetter=e=>e.charAt(0).toLowerCase()+e.slice(1),attributeNameToPropertyName=e=>toCamels(e.replace(/^data-/,"")),mapObject=(e,t)=>{forin(t,(a,n)=>{forin(e,(l,r)=>{const s=new RegExp(a);if(!s.test(l)||(delete e[l],n===!1))return;if(isString$1(n)){e[n]=r;return}const c=n.group;isObject$1(n)&&!e[c]&&(e[c]={}),e[c][lowerCaseFirstLetter(l.replace(s,""))]=r}),n.mapping&&mapObject(e[n.group],n.mapping)})},getAttributesAsObject=(e,t={})=>{const a=[];forin(e.attributes,l=>{a.push(e.attributes[l])});const n=a.filter(l=>l.name).reduce((l,r)=>{const s=attr(e,r.name);return l[attributeNameToPropertyName(r.name)]=s===r.name?!0:s,l},{});return mapObject(n,t),n},createAppAtElement=(e,t={})=>{const a={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};applyFilters("SET_ATTRIBUTE_TO_OPTION_MAP",a);const n={...t},l=getAttributesAsObject(e.nodeName==="FIELDSET"?e.querySelector("input[type=file]"):e,a);Object.keys(l).forEach(s=>{isObject$1(l[s])?(isObject$1(n[s])||(n[s]={}),Object.assign(n[s],l[s])):n[s]=l[s]}),n.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map(s=>({source:s.value,options:{type:s.dataset.type}})));const r=createAppObject(n);return e.files&&Array.from(e.files).forEach(s=>{r.addFile(s)}),r.replaceElement(e),r},createApp$1=(...e)=>isNode(e[0])?createAppAtElement(...e):createAppObject(...e),PRIVATE_METHODS=["fire","_read","_write"],createAppAPI=e=>{const t={};return copyObjectPropertiesToObject(e,t,PRIVATE_METHODS),t},replaceInString=(e,t)=>e.replace(/(?:{([a-zA-Z]+)})/g,(a,n)=>t[n]),createWorker=e=>{const t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),a=URL.createObjectURL(t),n=new Worker(a);return{transfer:(l,r)=>{},post:(l,r,s)=>{const o=getUniqueId();n.onmessage=c=>{c.data.id===o&&r(c.data.message)},n.postMessage({id:o,message:l},s)},terminate:()=>{n.terminate(),URL.revokeObjectURL(a)}}},loadImage$1=e=>new Promise((t,a)=>{const n=new Image;n.onload=()=>{t(n)},n.onerror=l=>{a(l)},n.src=e}),renameFile=(e,t)=>{const a=e.slice(0,e.size,e.type);return a.lastModifiedDate=e.lastModifiedDate,a.name=t,a},copyFile=e=>renameFile(e,e.name),registeredPlugins=[],createAppPlugin=e=>{if(registeredPlugins.includes(e))return;registeredPlugins.push(e);const t=e({addFilter,utils:{Type,forin,isString:isString$1,isFile,toNaturalFileSize,replaceInString,getExtensionFromFilename,getFilenameWithoutExtension,guesstimateMimeType,getFileFromBlob,getFilenameFromURL,createRoute,createWorker,createView,createItemAPI,loadImage:loadImage$1,copyFile,renameFile,createBlob,applyFilterChain,text,getNumericAspectRatioFromString},views:{fileActionButton}});extendDefaultOptions(t.options)},isOperaMini=()=>Object.prototype.toString.call(window.operamini)==="[object OperaMini]",hasPromises=()=>"Promise"in window,hasBlobSlice=()=>"slice"in Blob.prototype,hasCreateObjectURL=()=>"URL"in window&&"createObjectURL"in window.URL,hasVisibility=()=>"visibilityState"in document,hasTiming=()=>"performance"in window,hasCSSSupports=()=>"supports"in(window.CSS||{}),isIE11=()=>/MSIE|Trident/.test(window.navigator.userAgent),supported=(()=>{const e=isBrowser$4()&&!isOperaMini()&&hasVisibility()&&hasPromises()&&hasBlobSlice()&&hasCreateObjectURL()&&hasTiming()&&(hasCSSSupports()||isIE11());return()=>e})(),state={apps:[]},name="filepond",fn=()=>{};let OptionTypes={},create$f=fn,destroy=fn,parse=fn,find=fn,registerPlugin=fn,getOptions$1=fn,setOptions$1=fn;if(supported()){createPainter(()=>{state.apps.forEach(a=>a._read())},a=>{state.apps.forEach(n=>n._write(a))});const e=()=>{document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported,create:create$f,destroy,parse,find,registerPlugin,setOptions:setOptions$1}})),document.removeEventListener("DOMContentLoaded",e)};document.readyState!=="loading"?setTimeout(()=>e(),0):document.addEventListener("DOMContentLoaded",e);const t=()=>forin(getOptions(),(a,n)=>{OptionTypes[a]=n[1]});OptionTypes={},t(),create$f=(...a)=>{const n=createApp$1(...a);return n.on("destroy",destroy),state.apps.push(n),createAppAPI(n)},destroy=a=>{const n=state.apps.findIndex(l=>l.isAttachedTo(a));return n>=0?(state.apps.splice(n,1)[0].restoreElement(),!0):!1},parse=a=>Array.from(a.querySelectorAll(`.${name}`)).filter(r=>!state.apps.find(s=>s.isAttachedTo(r))).map(r=>create$f(r)),find=a=>{const n=state.apps.find(l=>l.isAttachedTo(a));return n?createAppAPI(n):null},registerPlugin=(...a)=>{a.forEach(createAppPlugin),t()},getOptions$1=()=>{const a={};return forin(getOptions(),(n,l)=>{a[n]=l[0]}),a},setOptions$1=a=>(isObject$1(a)&&(state.apps.forEach(n=>{n.setOptions(a)}),setOptions(a)),getOptions$1())}/*! + */ +const isNode = (e) => e instanceof HTMLElement, createStore = (e, t = [], i = []) => { + const a = { + ...e + }, n = [], l = [], r = () => ({ ...a }), s = () => { + const m = [...n]; + return n.length = 0, m; + }, o = () => { + const m = [...l]; + l.length = 0, m.forEach(({ type: h, data: I }) => { + d(h, I); + }); + }, d = (m, h, I) => { + if (I && !document.hidden) { + l.push({ type: m, data: h }); + return; + } + p[m] && p[m](h), n.push({ + type: m, + data: h + }); + }, c = (m, ...h) => f[m] ? f[m](...h) : null, u = { + getState: r, + processActionQueue: s, + processDispatchQueue: o, + dispatch: d, + query: c + }; + let f = {}; + t.forEach((m) => { + f = { + ...m(a), + ...f + }; + }); + let p = {}; + return i.forEach((m) => { + p = { + ...m(d, c, a), + ...p + }; + }), u; +}, defineProperty = (e, t, i) => { + if (typeof i == "function") { + e[t] = i; + return; + } + Object.defineProperty(e, t, { ...i }); +}, forin = (e, t) => { + for (const i in e) + e.hasOwnProperty(i) && t(i, e[i]); +}, createObject = (e) => { + const t = {}; + return forin(e, (i) => { + defineProperty(t, i, e[i]); + }), t; +}, attr = (e, t, i = null) => { + if (i === null) + return e.getAttribute(t) || e.hasAttribute(t); + e.setAttribute(t, i); +}, ns$1 = "http://www.w3.org/2000/svg", svgElements = ["svg", "path"], isSVGElement = (e) => svgElements.includes(e), createElement = (e, t, i = {}) => { + typeof t == "object" && (i = t, t = null); + const a = isSVGElement(e) ? document.createElementNS(ns$1, e) : document.createElement(e); + return t && (isSVGElement(e) ? attr(a, "class", t) : a.className = t), forin(i, (n, l) => { + attr(a, n, l); + }), a; +}, appendChild = (e) => (t, i) => { + typeof i < "u" && e.children[i] ? e.insertBefore(t, e.children[i]) : e.appendChild(t); +}, appendChildView = (e, t) => (i, a) => (typeof a < "u" ? t.splice(a, 0, i) : t.push(i), i), removeChildView = (e, t) => (i) => (t.splice(t.indexOf(i), 1), i.element.parentNode && e.removeChild(i.element), i), IS_BROWSER = typeof window < "u" && typeof window.document < "u", isBrowser$4 = () => IS_BROWSER, testElement = isBrowser$4() ? createElement("svg") : {}, getChildCount = "children" in testElement ? (e) => e.children.length : (e) => e.childNodes.length, getViewRect = (e, t, i, a) => { + const n = i[0] || e.left, l = i[1] || e.top, r = n + e.width, s = l + e.height * (a[1] || 1), o = { + // the rectangle of the element itself + element: { + ...e + }, + // the rectangle of the element expanded to contain its children, does not include any margins + inner: { + left: e.left, + top: e.top, + right: e.right, + bottom: e.bottom + }, + // the rectangle of the element expanded to contain its children including own margin and child margins + // margins will be added after we've recalculated the size + outer: { + left: n, + top: l, + right: r, + bottom: s + } + }; + return t.filter((d) => !d.isRectIgnored()).map((d) => d.rect).forEach((d) => { + expandRect(o.inner, { ...d.inner }), expandRect(o.outer, { ...d.outer }); + }), calculateRectSize(o.inner), o.outer.bottom += o.element.marginBottom, o.outer.right += o.element.marginRight, calculateRectSize(o.outer), o; +}, expandRect = (e, t) => { + t.top += e.top, t.right += e.left, t.bottom += e.top, t.left += e.left, t.bottom > e.bottom && (e.bottom = t.bottom), t.right > e.right && (e.right = t.right); +}, calculateRectSize = (e) => { + e.width = e.right - e.left, e.height = e.bottom - e.top; +}, isNumber$1 = (e) => typeof e == "number", thereYet = (e, t, i, a = 1e-3) => Math.abs(e - t) < a && Math.abs(i) < a, spring = ( + // default options + ({ stiffness: e = 0.5, damping: t = 0.75, mass: i = 10 } = {}) => { + let a = null, n = null, l = 0, r = !1; + const d = createObject({ + interpolate: (c, u) => { + if (r) return; + if (!(isNumber$1(a) && isNumber$1(n))) { + r = !0, l = 0; + return; + } + const f = -(n - a) * e; + l += f / i, n += l, l *= t, thereYet(n, a, l) || u ? (n = a, l = 0, r = !0, d.onupdate(n), d.oncomplete(n)) : d.onupdate(n); + }, + target: { + set: (c) => { + if (isNumber$1(c) && !isNumber$1(n) && (n = c), a === null && (a = c, n = c), a = c, n === a || typeof a > "u") { + r = !0, l = 0, d.onupdate(n), d.oncomplete(n); + return; + } + r = !1; + }, + get: () => a + }, + resting: { + get: () => r + }, + onupdate: (c) => { + }, + oncomplete: (c) => { + } + }); + return d; + } +), easeInOutQuad = (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e, tween = ( + // default values + ({ duration: e = 500, easing: t = easeInOutQuad, delay: i = 0 } = {}) => { + let a = null, n, l, r = !0, s = !1, o = null; + const c = createObject({ + interpolate: (u, f) => { + r || o === null || (a === null && (a = u), !(u - a < i) && (n = u - a - i, n >= e || f ? (n = 1, l = s ? 0 : 1, c.onupdate(l * o), c.oncomplete(l * o), r = !0) : (l = n / e, c.onupdate((n >= 0 ? t(s ? 1 - l : l) : 0) * o)))); + }, + target: { + get: () => s ? 0 : o, + set: (u) => { + if (o === null) { + o = u, c.onupdate(u), c.oncomplete(u); + return; + } + u < o ? (o = 1, s = !0) : (s = !1, o = u), r = !1, a = null; + } + }, + resting: { + get: () => r + }, + onupdate: (u) => { + }, + oncomplete: (u) => { + } + }); + return c; + } +), animator = { + spring, + tween +}, createAnimator = (e, t, i) => { + const a = e[t] && typeof e[t][i] == "object" ? e[t][i] : e[t] || e, n = typeof a == "string" ? a : a.type, l = typeof a == "object" ? { ...a } : {}; + return animator[n] ? animator[n](l) : null; +}, addGetSet = (e, t, i, a = !1) => { + t = Array.isArray(t) ? t : [t], t.forEach((n) => { + e.forEach((l) => { + let r = l, s = () => i[l], o = (d) => i[l] = d; + typeof l == "object" && (r = l.key, s = l.getter || s, o = l.setter || o), !(n[r] && !a) && (n[r] = { + get: s, + set: o + }); + }); + }); +}, animations = ({ mixinConfig: e, viewProps: t, viewInternalAPI: i, viewExternalAPI: a }) => { + const n = { ...t }, l = []; + return forin(e, (r, s) => { + const o = createAnimator(s); + if (!o) + return; + o.onupdate = (c) => { + t[r] = c; + }, o.target = n[r], addGetSet([{ + key: r, + setter: (c) => { + o.target !== c && (o.target = c); + }, + getter: () => t[r] + }], [i, a], t, !0), l.push(o); + }), { + write: (r) => { + let s = document.hidden, o = !0; + return l.forEach((d) => { + d.resting || (o = !1), d.interpolate(r, s); + }), o; + }, + destroy: () => { + } + }; +}, addEvent = (e) => (t, i) => { + e.addEventListener(t, i); +}, removeEvent = (e) => (t, i) => { + e.removeEventListener(t, i); +}, listeners = ({ + mixinConfig: e, + viewProps: t, + viewInternalAPI: i, + viewExternalAPI: a, + viewState: n, + view: l +}) => { + const r = [], s = addEvent(l.element), o = removeEvent(l.element); + return a.on = (d, c) => { + r.push({ + type: d, + fn: c + }), s(d, c); + }, a.off = (d, c) => { + r.splice(r.findIndex((u) => u.type === d && u.fn === c), 1), o(d, c); + }, { + write: () => !0, + destroy: () => { + r.forEach((d) => { + o(d.type, d.fn); + }); + } + }; +}, apis = ({ mixinConfig: e, viewProps: t, viewExternalAPI: i }) => { + addGetSet(e, i, t); +}, isDefined$1 = (e) => e != null, defaults$1 = { + opacity: 1, + scaleX: 1, + scaleY: 1, + translateX: 0, + translateY: 0, + rotateX: 0, + rotateY: 0, + rotateZ: 0, + originX: 0, + originY: 0 +}, styles = ({ mixinConfig: e, viewProps: t, viewInternalAPI: i, viewExternalAPI: a, view: n }) => { + const l = { ...t }, r = {}; + addGetSet(e, [i, a], t); + const s = () => [t.translateX || 0, t.translateY || 0], o = () => [t.scaleX || 0, t.scaleY || 0], d = () => n.rect ? getViewRect(n.rect, n.childViews, s(), o()) : null; + return i.rect = { get: d }, a.rect = { get: d }, e.forEach((c) => { + t[c] = typeof l[c] > "u" ? defaults$1[c] : l[c]; + }), { + write: () => { + if (propsHaveChanged(r, t)) + return applyStyles(n.element, t), Object.assign(r, { ...t }), !0; + }, + destroy: () => { + } + }; +}, propsHaveChanged = (e, t) => { + if (Object.keys(e).length !== Object.keys(t).length) + return !0; + for (const i in t) + if (t[i] !== e[i]) + return !0; + return !1; +}, applyStyles = (e, { + opacity: t, + perspective: i, + translateX: a, + translateY: n, + scaleX: l, + scaleY: r, + rotateX: s, + rotateY: o, + rotateZ: d, + originX: c, + originY: u, + width: f, + height: p +}) => { + let m = "", h = ""; + (isDefined$1(c) || isDefined$1(u)) && (h += `transform-origin: ${c || 0}px ${u || 0}px;`), isDefined$1(i) && (m += `perspective(${i}px) `), (isDefined$1(a) || isDefined$1(n)) && (m += `translate3d(${a || 0}px, ${n || 0}px, 0) `), (isDefined$1(l) || isDefined$1(r)) && (m += `scale3d(${isDefined$1(l) ? l : 1}, ${isDefined$1(r) ? r : 1}, 1) `), isDefined$1(d) && (m += `rotateZ(${d}rad) `), isDefined$1(s) && (m += `rotateX(${s}rad) `), isDefined$1(o) && (m += `rotateY(${o}rad) `), m.length && (h += `transform:${m};`), isDefined$1(t) && (h += `opacity:${t};`, t === 0 && (h += "visibility:hidden;"), t < 1 && (h += "pointer-events:none;")), isDefined$1(p) && (h += `height:${p}px;`), isDefined$1(f) && (h += `width:${f}px;`); + const I = e.elementCurrentStyle || ""; + (h.length !== I.length || h !== I) && (e.style.cssText = h, e.elementCurrentStyle = h); +}, Mixins = { + styles, + listeners, + animations, + apis +}, updateRect$1 = (e = {}, t = {}, i = {}) => (t.layoutCalculated || (e.paddingTop = parseInt(i.paddingTop, 10) || 0, e.marginTop = parseInt(i.marginTop, 10) || 0, e.marginRight = parseInt(i.marginRight, 10) || 0, e.marginBottom = parseInt(i.marginBottom, 10) || 0, e.marginLeft = parseInt(i.marginLeft, 10) || 0, t.layoutCalculated = !0), e.left = t.offsetLeft || 0, e.top = t.offsetTop || 0, e.width = t.offsetWidth || 0, e.height = t.offsetHeight || 0, e.right = e.left + e.width, e.bottom = e.top + e.height, e.scrollTop = t.scrollTop, e.hidden = t.offsetParent === null, e), createView = ( + // default view definition + ({ + // element definition + tag: e = "div", + name: t = null, + attributes: i = {}, + // view interaction + read: a = () => { + }, + write: n = () => { + }, + create: l = () => { + }, + destroy: r = () => { + }, + // hooks + filterFrameActionsForChild: s = (p, m) => m, + didCreateView: o = () => { + }, + didWriteView: d = () => { + }, + // rect related + ignoreRect: c = !1, + ignoreRectUpdate: u = !1, + // mixins + mixins: f = [] + } = {}) => (p, m = {}) => { + const h = createElement(e, `filepond--${t}`, i), I = window.getComputedStyle(h, null), b = updateRect$1(); + let g = null, E = !1; + const T = [], S = [], L = {}, M = {}, y = [ + n + // default writer + ], x = [ + a + // default reader + ], v = [ + r + // default destroy + ], P = () => h, O = () => T.concat(), B = () => L, F = (C) => (N, $) => N(C, $), D = () => g || (g = getViewRect(b, T, [0, 0], [1, 1]), g), R = () => I, A = () => { + g = null, T.forEach(($) => $._read()), !(u && b.width && b.height) && updateRect$1(b, h, I); + const N = { root: U, props: m, rect: b }; + x.forEach(($) => $(N)); + }, w = (C, N, $) => { + let W = N.length === 0; + return y.forEach((G) => { + G({ + props: m, + root: U, + actions: N, + timestamp: C, + shouldOptimize: $ + }) === !1 && (W = !1); + }), S.forEach((G) => { + G.write(C) === !1 && (W = !1); + }), T.filter((G) => !!G.element.parentNode).forEach((G) => { + G._write( + C, + s(G, N), + $ + ) || (W = !1); + }), T.forEach((G, j) => { + G.element.parentNode || (U.appendChild(G.element, j), G._read(), G._write( + C, + s(G, N), + $ + ), W = !1); + }), E = W, d({ + props: m, + root: U, + actions: N, + timestamp: C + }), W; + }, z = () => { + S.forEach((C) => C.destroy()), v.forEach((C) => { + C({ root: U, props: m }); + }), T.forEach((C) => C._destroy()); + }, k = { + element: { + get: P + }, + style: { + get: R + }, + childViews: { + get: O + } + }, V = { + ...k, + rect: { + get: D + }, + // access to custom children references + ref: { + get: B + }, + // dom modifiers + is: (C) => t === C, + appendChild: appendChild(h), + createChildView: F(p), + linkView: (C) => (T.push(C), C), + unlinkView: (C) => { + T.splice(T.indexOf(C), 1); + }, + appendChildView: appendChildView(h, T), + removeChildView: removeChildView(h, T), + registerWriter: (C) => y.push(C), + registerReader: (C) => x.push(C), + registerDestroyer: (C) => v.push(C), + invalidateLayout: () => h.layoutCalculated = !1, + // access to data store + dispatch: p.dispatch, + query: p.query + }, H = { + element: { + get: P + }, + childViews: { + get: O + }, + rect: { + get: D + }, + resting: { + get: () => E + }, + isRectIgnored: () => c, + _read: A, + _write: w, + _destroy: z + }, q = { + ...k, + rect: { + get: () => b + } + }; + Object.keys(f).sort((C, N) => C === "styles" ? 1 : N === "styles" ? -1 : 0).forEach((C) => { + const N = Mixins[C]({ + mixinConfig: f[C], + viewProps: m, + viewState: M, + viewInternalAPI: V, + viewExternalAPI: H, + view: createObject(q) + }); + N && S.push(N); + }); + const U = createObject(V); + l({ + root: U, + props: m + }); + const Y = getChildCount(h); + return T.forEach((C, N) => { + U.appendChild(C.element, Y + N); + }), o(U), createObject(H); + } +), createPainter = (e, t, i = 60) => { + const a = "__framePainter"; + if (window[a]) { + window[a].readers.push(e), window[a].writers.push(t); + return; + } + window[a] = { + readers: [e], + writers: [t] + }; + const n = window[a], l = 1e3 / i; + let r = null, s = null, o = null, d = null; + const c = () => { + document.hidden ? (o = () => window.setTimeout(() => u(performance.now()), l), d = () => window.clearTimeout(s)) : (o = () => window.requestAnimationFrame(u), d = () => window.cancelAnimationFrame(s)); + }; + document.addEventListener("visibilitychange", () => { + d && d(), c(), u(performance.now()); + }); + const u = (f) => { + s = o(u), r || (r = f); + const p = f - r; + p <= l || (r = f - p % l, n.readers.forEach((m) => m()), n.writers.forEach((m) => m(f))); + }; + return c(), u(performance.now()), { + pause: () => { + d(s); + } + }; +}, createRoute = (e, t) => ({ root: i, props: a, actions: n = [], timestamp: l, shouldOptimize: r }) => { + n.filter((s) => e[s.type]).forEach( + (s) => e[s.type]({ root: i, props: a, action: s.data, timestamp: l, shouldOptimize: r }) + ), t && t({ root: i, props: a, actions: n, timestamp: l, shouldOptimize: r }); +}, insertBefore = (e, t) => t.parentNode.insertBefore(e, t), insertAfter = (e, t) => t.parentNode.insertBefore(e, t.nextSibling), isArray$1 = (e) => Array.isArray(e), isEmpty$1 = (e) => e == null, trim = (e) => e.trim(), toString$1 = (e) => "" + e, toArray = (e, t = ",") => isEmpty$1(e) ? [] : isArray$1(e) ? e : toString$1(e).split(t).map(trim).filter((i) => i.length), isBoolean = (e) => typeof e == "boolean", toBoolean = (e) => isBoolean(e) ? e : e === "true", isString$1 = (e) => typeof e == "string", toNumber = (e) => isNumber$1(e) ? e : isString$1(e) ? toString$1(e).replace(/[a-z]+/gi, "") : 0, toInt = (e) => parseInt(toNumber(e), 10), toFloat = (e) => parseFloat(toNumber(e)), isInt = (e) => isNumber$1(e) && isFinite(e) && Math.floor(e) === e, toBytes = (e, t = 1e3) => { + if (isInt(e)) + return e; + let i = toString$1(e).trim(); + return /MB$/i.test(i) ? (i = i.replace(/MB$i/, "").trim(), toInt(i) * t * t) : /KB/i.test(i) ? (i = i.replace(/KB$i/, "").trim(), toInt(i) * t) : toInt(i); +}, isFunction$2 = (e) => typeof e == "function", toFunctionReference = (e) => { + let t = self, i = e.split("."), a = null; + for (; a = i.shift(); ) + if (t = t[a], !t) + return null; + return t; +}, methods = { + process: "POST", + patch: "PATCH", + revert: "DELETE", + fetch: "GET", + restore: "GET", + load: "GET" +}, createServerAPI = (e) => { + const t = {}; + return t.url = isString$1(e) ? e : e.url || "", t.timeout = e.timeout ? parseInt(e.timeout, 10) : 0, t.headers = e.headers ? e.headers : {}, forin(methods, (i) => { + t[i] = createAction(i, e[i], methods[i], t.timeout, t.headers); + }), t.process = e.process || isString$1(e) || e.url ? t.process : null, t.remove = e.remove || null, delete t.headers, t; +}, createAction = (e, t, i, a, n) => { + if (t === null) + return null; + if (typeof t == "function") + return t; + const l = { + url: i === "GET" || i === "PATCH" ? `?${e}=` : "", + method: i, + headers: n, + withCredentials: !1, + timeout: a, + onload: null, + ondata: null, + onerror: null + }; + if (isString$1(t)) + return l.url = t, l; + if (Object.assign(l, t), isString$1(l.headers)) { + const r = l.headers.split(/:(.+)/); + l.headers = { + header: r[0], + value: r[1] + }; + } + return l.withCredentials = toBoolean(l.withCredentials), l; +}, toServerAPI = (e) => createServerAPI(e), isNull = (e) => e === null, isObject$1 = (e) => typeof e == "object" && e !== null, isAPI = (e) => isObject$1(e) && isString$1(e.url) && isObject$1(e.process) && isObject$1(e.revert) && isObject$1(e.restore) && isObject$1(e.fetch), getType = (e) => isArray$1(e) ? "array" : isNull(e) ? "null" : isInt(e) ? "int" : /^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e) ? "bytes" : isAPI(e) ? "api" : typeof e, replaceSingleQuotes = (e) => e.replace(/{\s*'/g, '{"').replace(/'\s*}/g, '"}').replace(/'\s*:/g, '":').replace(/:\s*'/g, ':"').replace(/,\s*'/g, ',"').replace(/'\s*,/g, '",'), conversionTable = { + array: toArray, + boolean: toBoolean, + int: (e) => getType(e) === "bytes" ? toBytes(e) : toInt(e), + number: toFloat, + float: toFloat, + bytes: toBytes, + string: (e) => isFunction$2(e) ? e : toString$1(e), + function: (e) => toFunctionReference(e), + serverapi: toServerAPI, + object: (e) => { + try { + return JSON.parse(replaceSingleQuotes(e)); + } catch { + return null; + } + } +}, convertTo = (e, t) => conversionTable[t](e), getValueByType = (e, t, i) => { + if (e === t) + return e; + let a = getType(e); + if (a !== i) { + const n = convertTo(e, i); + if (a = getType(n), n === null) + throw `Trying to assign value with incorrect type to "${option}", allowed type: "${i}"`; + e = n; + } + return e; +}, createOption = (e, t) => { + let i = e; + return { + enumerable: !0, + get: () => i, + set: (a) => { + i = getValueByType(a, e, t); + } + }; +}, createOptions = (e) => { + const t = {}; + return forin(e, (i) => { + const a = e[i]; + t[i] = createOption(a[0], a[1]); + }), createObject(t); +}, createInitialState = (e) => ({ + // model + items: [], + // timeout used for calling update items + listUpdateTimeout: null, + // timeout used for stacking metadata updates + itemUpdateTimeout: null, + // queue of items waiting to be processed + processingQueue: [], + // options + options: createOptions(e) +}), fromCamels = (e, t = "-") => e.split(/(?=[A-Z])/).map((i) => i.toLowerCase()).join(t), createOptionAPI = (e, t) => { + const i = {}; + return forin(t, (a) => { + i[a] = { + get: () => e.getState().options[a], + set: (n) => { + e.dispatch(`SET_${fromCamels(a, "_").toUpperCase()}`, { + value: n + }); + } + }; + }), i; +}, createOptionActions = (e) => (t, i, a) => { + const n = {}; + return forin(e, (l) => { + const r = fromCamels(l, "_").toUpperCase(); + n[`SET_${r}`] = (s) => { + try { + a.options[l] = s.value; + } catch { + } + t(`DID_SET_${r}`, { value: a.options[l] }); + }; + }), n; +}, createOptionQueries = (e) => (t) => { + const i = {}; + return forin(e, (a) => { + i[`GET_${fromCamels(a, "_").toUpperCase()}`] = (n) => t.options[a]; + }), i; +}, InteractionMethod = { + API: 1, + DROP: 2, + BROWSE: 3, + PASTE: 4, + NONE: 5 +}, getUniqueId = () => Math.random().toString(36).substring(2, 11), arrayRemove = (e, t) => e.splice(t, 1), run = (e, t) => { + t ? e() : document.hidden ? Promise.resolve(1).then(e) : setTimeout(e, 0); +}, on = () => { + const e = [], t = (a, n) => { + arrayRemove( + e, + e.findIndex((l) => l.event === a && (l.cb === n || !n)) + ); + }, i = (a, n, l) => { + e.filter((r) => r.event === a).map((r) => r.cb).forEach((r) => run(() => r(...n), l)); + }; + return { + fireSync: (a, ...n) => { + i(a, n, !0); + }, + fire: (a, ...n) => { + i(a, n, !1); + }, + on: (a, n) => { + e.push({ event: a, cb: n }); + }, + onOnce: (a, n) => { + e.push({ + event: a, + cb: (...l) => { + t(a, n), n(...l); + } + }); + }, + off: t + }; +}, copyObjectPropertiesToObject = (e, t, i) => { + Object.getOwnPropertyNames(e).filter((a) => !i.includes(a)).forEach( + (a) => Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(e, a)) + ); +}, PRIVATE = [ + "fire", + "process", + "revert", + "load", + "on", + "off", + "onOnce", + "retryLoad", + "extend", + "archive", + "archived", + "release", + "released", + "requestProcessing", + "freeze" +], createItemAPI = (e) => { + const t = {}; + return copyObjectPropertiesToObject(e, t, PRIVATE), t; +}, removeReleasedItems = (e) => { + e.forEach((t, i) => { + t.released && arrayRemove(e, i); + }); +}, ItemStatus = { + INIT: 1, + IDLE: 2, + PROCESSING_QUEUED: 9, + PROCESSING: 3, + PROCESSING_COMPLETE: 5, + PROCESSING_ERROR: 6, + PROCESSING_REVERT_ERROR: 10, + LOADING: 7, + LOAD_ERROR: 8 +}, FileOrigin = { + INPUT: 1, + LIMBO: 2, + LOCAL: 3 +}, getNonNumeric = (e) => /[^0-9]+/.exec(e), getDecimalSeparator = () => getNonNumeric(1.1.toLocaleString())[0], getThousandsSeparator = () => { + const e = getDecimalSeparator(), t = 1e3.toLocaleString(); + return t !== "1000" ? getNonNumeric(t)[0] : e === "." ? "," : "."; +}, Type = { + BOOLEAN: "boolean", + INT: "int", + NUMBER: "number", + STRING: "string", + ARRAY: "array", + OBJECT: "object", + FUNCTION: "function", + ACTION: "action", + SERVER_API: "serverapi", + REGEX: "regex" +}, filters = [], applyFilterChain = (e, t, i) => new Promise((a, n) => { + const l = filters.filter((s) => s.key === e).map((s) => s.cb); + if (l.length === 0) { + a(t); + return; + } + const r = l.shift(); + l.reduce( + // loop over promises passing value to next promise + (s, o) => s.then((d) => o(d, i)), + // call initial filter, will return a promise + r(t, i) + // all executed + ).then((s) => a(s)).catch((s) => n(s)); +}), applyFilters = (e, t, i) => filters.filter((a) => a.key === e).map((a) => a.cb(t, i)), addFilter = (e, t) => filters.push({ key: e, cb: t }), extendDefaultOptions = (e) => Object.assign(defaultOptions, e), getOptions = () => ({ ...defaultOptions }), setOptions = (e) => { + forin(e, (t, i) => { + defaultOptions[t] && (defaultOptions[t][0] = getValueByType( + i, + defaultOptions[t][0], + defaultOptions[t][1] + )); + }); +}, defaultOptions = { + // the id to add to the root element + id: [null, Type.STRING], + // input field name to use + name: ["filepond", Type.STRING], + // disable the field + disabled: [!1, Type.BOOLEAN], + // classname to put on wrapper + className: [null, Type.STRING], + // is the field required + required: [!1, Type.BOOLEAN], + // Allow media capture when value is set + captureMethod: [null, Type.STRING], + // - "camera", "microphone" or "camcorder", + // - Does not work with multiple on apple devices + // - If set, acceptedFileTypes must be made to match with media wildcard "image/*", "audio/*" or "video/*" + // sync `acceptedFileTypes` property with `accept` attribute + allowSyncAcceptAttribute: [!0, Type.BOOLEAN], + // Feature toggles + allowDrop: [!0, Type.BOOLEAN], + // Allow dropping of files + allowBrowse: [!0, Type.BOOLEAN], + // Allow browsing the file system + allowPaste: [!0, Type.BOOLEAN], + // Allow pasting files + allowMultiple: [!1, Type.BOOLEAN], + // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple) + allowReplace: [!0, Type.BOOLEAN], + // Allow dropping a file on other file to replace it (only works when multiple is set to false) + allowRevert: [!0, Type.BOOLEAN], + // Allows user to revert file upload + allowRemove: [!0, Type.BOOLEAN], + // Allow user to remove a file + allowProcess: [!0, Type.BOOLEAN], + // Allows user to process a file, when set to false, this removes the file upload button + allowReorder: [!1, Type.BOOLEAN], + // Allow reordering of files + allowDirectoriesOnly: [!1, Type.BOOLEAN], + // Allow only selecting directories with browse (no support for filtering dnd at this point) + // Try store file if `server` not set + storeAsFile: [!1, Type.BOOLEAN], + // Revert mode + forceRevert: [!1, Type.BOOLEAN], + // Set to 'force' to require the file to be reverted before removal + // Input requirements + maxFiles: [null, Type.INT], + // Max number of files + checkValidity: [!1, Type.BOOLEAN], + // Enables custom validity messages + // Where to put file + itemInsertLocationFreedom: [!0, Type.BOOLEAN], + // Set to false to always add items to begin or end of list + itemInsertLocation: ["before", Type.STRING], + // Default index in list to add items that have been dropped at the top of the list + itemInsertInterval: [75, Type.INT], + // Drag 'n Drop related + dropOnPage: [!1, Type.BOOLEAN], + // Allow dropping of files anywhere on page (prevents browser from opening file if dropped outside of Up) + dropOnElement: [!0, Type.BOOLEAN], + // Drop needs to happen on element (set to false to also load drops outside of Up) + dropValidation: [!1, Type.BOOLEAN], + // Enable or disable validating files on drop + ignoredFiles: [[".ds_store", "thumbs.db", "desktop.ini"], Type.ARRAY], + // Upload related + instantUpload: [!0, Type.BOOLEAN], + // Should upload files immediately on drop + maxParallelUploads: [2, Type.INT], + // Maximum files to upload in parallel + allowMinimumUploadDuration: [!0, Type.BOOLEAN], + // if true uploads take at least 750 ms, this ensures the user sees the upload progress giving trust the upload actually happened + // Chunks + chunkUploads: [!1, Type.BOOLEAN], + // Enable chunked uploads + chunkForce: [!1, Type.BOOLEAN], + // Force use of chunk uploads even for files smaller than chunk size + chunkSize: [5e6, Type.INT], + // Size of chunks (5MB default) + chunkRetryDelays: [[500, 1e3, 3e3], Type.ARRAY], + // Amount of times to retry upload of a chunk when it fails + // The server api end points to use for uploading (see docs) + server: [null, Type.SERVER_API], + // File size calculations, can set to 1024, this is only used for display, properties use file size base 1000 + fileSizeBase: [1e3, Type.INT], + // Labels and status messages + labelFileSizeBytes: ["bytes", Type.STRING], + labelFileSizeKilobytes: ["KB", Type.STRING], + labelFileSizeMegabytes: ["MB", Type.STRING], + labelFileSizeGigabytes: ["GB", Type.STRING], + labelDecimalSeparator: [getDecimalSeparator(), Type.STRING], + // Default is locale separator + labelThousandsSeparator: [getThousandsSeparator(), Type.STRING], + // Default is locale separator + labelIdle: [ + 'Drag & Drop your files or Browse', + Type.STRING + ], + labelInvalidField: ["Field contains invalid files", Type.STRING], + labelFileWaitingForSize: ["Waiting for size", Type.STRING], + labelFileSizeNotAvailable: ["Size not available", Type.STRING], + labelFileCountSingular: ["file in list", Type.STRING], + labelFileCountPlural: ["files in list", Type.STRING], + labelFileLoading: ["Loading", Type.STRING], + labelFileAdded: ["Added", Type.STRING], + // assistive only + labelFileLoadError: ["Error during load", Type.STRING], + labelFileRemoved: ["Removed", Type.STRING], + // assistive only + labelFileRemoveError: ["Error during remove", Type.STRING], + labelFileProcessing: ["Uploading", Type.STRING], + labelFileProcessingComplete: ["Upload complete", Type.STRING], + labelFileProcessingAborted: ["Upload cancelled", Type.STRING], + labelFileProcessingError: ["Error during upload", Type.STRING], + labelFileProcessingRevertError: ["Error during revert", Type.STRING], + labelTapToCancel: ["tap to cancel", Type.STRING], + labelTapToRetry: ["tap to retry", Type.STRING], + labelTapToUndo: ["tap to undo", Type.STRING], + labelButtonRemoveItem: ["Remove", Type.STRING], + labelButtonAbortItemLoad: ["Abort", Type.STRING], + labelButtonRetryItemLoad: ["Retry", Type.STRING], + labelButtonAbortItemProcessing: ["Cancel", Type.STRING], + labelButtonUndoItemProcessing: ["Undo", Type.STRING], + labelButtonRetryItemProcessing: ["Retry", Type.STRING], + labelButtonProcessItem: ["Upload", Type.STRING], + // make sure width and height plus viewpox are even numbers so icons are nicely centered + iconRemove: [ + '', + Type.STRING + ], + iconProcess: [ + '', + Type.STRING + ], + iconRetry: [ + '', + Type.STRING + ], + iconUndo: [ + '', + Type.STRING + ], + iconDone: [ + '', + Type.STRING + ], + // event handlers + oninit: [null, Type.FUNCTION], + onwarning: [null, Type.FUNCTION], + onerror: [null, Type.FUNCTION], + onactivatefile: [null, Type.FUNCTION], + oninitfile: [null, Type.FUNCTION], + onaddfilestart: [null, Type.FUNCTION], + onaddfileprogress: [null, Type.FUNCTION], + onaddfile: [null, Type.FUNCTION], + onprocessfilestart: [null, Type.FUNCTION], + onprocessfileprogress: [null, Type.FUNCTION], + onprocessfileabort: [null, Type.FUNCTION], + onprocessfilerevert: [null, Type.FUNCTION], + onprocessfile: [null, Type.FUNCTION], + onprocessfiles: [null, Type.FUNCTION], + onremovefile: [null, Type.FUNCTION], + onpreparefile: [null, Type.FUNCTION], + onupdatefiles: [null, Type.FUNCTION], + onreorderfiles: [null, Type.FUNCTION], + // hooks + beforeDropFile: [null, Type.FUNCTION], + beforeAddFile: [null, Type.FUNCTION], + beforeRemoveFile: [null, Type.FUNCTION], + beforePrepareFile: [null, Type.FUNCTION], + // styles + stylePanelLayout: [null, Type.STRING], + // null 'integrated', 'compact', 'circle' + stylePanelAspectRatio: [null, Type.STRING], + // null or '3:2' or 1 + styleItemPanelAspectRatio: [null, Type.STRING], + styleButtonRemoveItemPosition: ["left", Type.STRING], + styleButtonProcessItemPosition: ["right", Type.STRING], + styleLoadIndicatorPosition: ["right", Type.STRING], + styleProgressIndicatorPosition: ["right", Type.STRING], + styleButtonRemoveItemAlign: [!1, Type.BOOLEAN], + // custom initial files array + files: [[], Type.ARRAY], + // show support by displaying credits + credits: [["https://pqina.nl/", "Powered by PQINA"], Type.ARRAY] +}, getItemByQuery = (e, t) => isEmpty$1(t) ? e[0] || null : isInt(t) ? e[t] || null : (typeof t == "object" && (t = t.id), e.find((i) => i.id === t) || null), getNumericAspectRatioFromString = (e) => { + if (isEmpty$1(e)) + return e; + if (/:/.test(e)) { + const t = e.split(":"); + return t[1] / t[0]; + } + return parseFloat(e); +}, getActiveItems = (e) => e.filter((t) => !t.archived), Status = { + EMPTY: 0, + IDLE: 1, + // waiting + ERROR: 2, + // a file is in error state + BUSY: 3, + // busy processing or loading + READY: 4 + // all files uploaded +}; +let res = null; +const canUpdateFileInput = () => { + if (res === null) + try { + const e = new DataTransfer(); + e.items.add(new File(["hello world"], "This_Works.txt")); + const t = document.createElement("input"); + t.setAttribute("type", "file"), t.files = e.files, res = t.files.length === 1; + } catch { + res = !1; + } + return res; +}, ITEM_ERROR = [ + ItemStatus.LOAD_ERROR, + ItemStatus.PROCESSING_ERROR, + ItemStatus.PROCESSING_REVERT_ERROR +], ITEM_BUSY = [ + ItemStatus.LOADING, + ItemStatus.PROCESSING, + ItemStatus.PROCESSING_QUEUED, + ItemStatus.INIT +], ITEM_READY = [ItemStatus.PROCESSING_COMPLETE], isItemInErrorState = (e) => ITEM_ERROR.includes(e.status), isItemInBusyState = (e) => ITEM_BUSY.includes(e.status), isItemInReadyState = (e) => ITEM_READY.includes(e.status), isAsync = (e) => isObject$1(e.options.server) && (isObject$1(e.options.server.process) || isFunction$2(e.options.server.process)), queries = (e) => ({ + GET_STATUS: () => { + const t = getActiveItems(e.items), { EMPTY: i, ERROR: a, BUSY: n, IDLE: l, READY: r } = Status; + return t.length === 0 ? i : t.some(isItemInErrorState) ? a : t.some(isItemInBusyState) ? n : t.some(isItemInReadyState) ? r : l; + }, + GET_ITEM: (t) => getItemByQuery(e.items, t), + GET_ACTIVE_ITEM: (t) => getItemByQuery(getActiveItems(e.items), t), + GET_ACTIVE_ITEMS: () => getActiveItems(e.items), + GET_ITEMS: () => e.items, + GET_ITEM_NAME: (t) => { + const i = getItemByQuery(e.items, t); + return i ? i.filename : null; + }, + GET_ITEM_SIZE: (t) => { + const i = getItemByQuery(e.items, t); + return i ? i.fileSize : null; + }, + GET_STYLES: () => Object.keys(e.options).filter((t) => /^style/.test(t)).map((t) => ({ + name: t, + value: e.options[t] + })), + GET_PANEL_ASPECT_RATIO: () => /circle/.test(e.options.stylePanelLayout) ? 1 : getNumericAspectRatioFromString(e.options.stylePanelAspectRatio), + GET_ITEM_PANEL_ASPECT_RATIO: () => e.options.styleItemPanelAspectRatio, + GET_ITEMS_BY_STATUS: (t) => getActiveItems(e.items).filter((i) => i.status === t), + GET_TOTAL_ITEMS: () => getActiveItems(e.items).length, + SHOULD_UPDATE_FILE_INPUT: () => e.options.storeAsFile && canUpdateFileInput() && !isAsync(e), + IS_ASYNC: () => isAsync(e), + GET_FILE_SIZE_LABELS: (t) => ({ + labelBytes: t("GET_LABEL_FILE_SIZE_BYTES") || void 0, + labelKilobytes: t("GET_LABEL_FILE_SIZE_KILOBYTES") || void 0, + labelMegabytes: t("GET_LABEL_FILE_SIZE_MEGABYTES") || void 0, + labelGigabytes: t("GET_LABEL_FILE_SIZE_GIGABYTES") || void 0 + }) +}), hasRoomForItem = (e) => { + const t = getActiveItems(e.items).length; + if (!e.options.allowMultiple) + return t === 0; + const i = e.options.maxFiles; + return i === null || t < i; +}, limit = (e, t, i) => Math.max(Math.min(i, e), t), arrayInsert = (e, t, i) => e.splice(t, 0, i), insertItem = (e, t, i) => isEmpty$1(t) ? null : typeof i > "u" ? (e.push(t), t) : (i = limit(i, 0, e.length), arrayInsert(e, i, t), t), isBase64DataURI = (e) => /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test( + e +), getFilenameFromURL = (e) => `${e}`.split("/").pop().split("?").shift(), getExtensionFromFilename = (e) => e.split(".").pop(), guesstimateExtension = (e) => { + if (typeof e != "string") + return ""; + const t = e.split("/").pop(); + return /svg/.test(t) ? "svg" : /zip|compressed/.test(t) ? "zip" : /plain/.test(t) ? "txt" : /msword/.test(t) ? "doc" : /[a-z]+/.test(t) ? t === "jpeg" ? "jpg" : t : ""; +}, leftPad = (e, t = "") => (t + e).slice(-t.length), getDateString = (e = /* @__PURE__ */ new Date()) => `${e.getFullYear()}-${leftPad(e.getMonth() + 1, "00")}-${leftPad( + e.getDate(), + "00" +)}_${leftPad(e.getHours(), "00")}-${leftPad(e.getMinutes(), "00")}-${leftPad( + e.getSeconds(), + "00" +)}`, getFileFromBlob = (e, t, i = null, a = null) => { + const n = typeof i == "string" ? e.slice(0, e.size, i) : e.slice(0, e.size, e.type); + return n.lastModifiedDate = /* @__PURE__ */ new Date(), e._relativePath && (n._relativePath = e._relativePath), isString$1(t) || (t = getDateString()), t && a === null && getExtensionFromFilename(t) ? n.name = t : (a = a || guesstimateExtension(n.type), n.name = t + (a ? "." + a : "")), n; +}, getBlobBuilder = () => window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, createBlob = (e, t) => { + const i = getBlobBuilder(); + if (i) { + const a = new i(); + return a.append(e), a.getBlob(t); + } + return new Blob([e], { + type: t + }); +}, getBlobFromByteStringWithMimeType = (e, t) => { + const i = new ArrayBuffer(e.length), a = new Uint8Array(i); + for (let n = 0; n < e.length; n++) + a[n] = e.charCodeAt(n); + return createBlob(i, t); +}, getMimeTypeFromBase64DataURI = (e) => (/^data:(.+);/.exec(e) || [])[1] || null, getBase64DataFromBase64DataURI = (e) => e.split(",")[1].replace(/\s/g, ""), getByteStringFromBase64DataURI = (e) => atob(getBase64DataFromBase64DataURI(e)), getBlobFromBase64DataURI = (e) => { + const t = getMimeTypeFromBase64DataURI(e), i = getByteStringFromBase64DataURI(e); + return getBlobFromByteStringWithMimeType(i, t); +}, getFileFromBase64DataURI = (e, t, i) => getFileFromBlob(getBlobFromBase64DataURI(e), t, null, i), getFileNameFromHeader = (e) => { + if (!/^content-disposition:/i.test(e)) return null; + const t = e.split(/filename=|filename\*=.+''/).splice(1).map((i) => i.trim().replace(/^["']|[;"']{0,2}$/g, "")).filter((i) => i.length); + return t.length ? decodeURI(t[t.length - 1]) : null; +}, getFileSizeFromHeader = (e) => { + if (/content-length:/i.test(e)) { + const t = e.match(/[0-9]+/)[0]; + return t ? parseInt(t, 10) : null; + } + return null; +}, getTranfserIdFromHeader = (e) => /x-content-transfer-id:/i.test(e) && (e.split(":")[1] || "").trim() || null, getFileInfoFromHeaders = (e) => { + const t = { + source: null, + name: null, + size: null + }, i = e.split(` +`); + for (let a of i) { + const n = getFileNameFromHeader(a); + if (n) { + t.name = n; + continue; + } + const l = getFileSizeFromHeader(a); + if (l) { + t.size = l; + continue; + } + const r = getTranfserIdFromHeader(a); + if (r) { + t.source = r; + continue; + } + } + return t; +}, createFileLoader = (e) => { + const t = { + source: null, + complete: !1, + progress: 0, + size: null, + timestamp: null, + duration: 0, + request: null + }, i = () => t.progress, a = () => { + t.request && t.request.abort && t.request.abort(); + }, n = () => { + const s = t.source; + r.fire("init", s), s instanceof File ? r.fire("load", s) : s instanceof Blob ? r.fire("load", getFileFromBlob(s, s.name)) : isBase64DataURI(s) ? r.fire("load", getFileFromBase64DataURI(s)) : l(s); + }, l = (s) => { + if (!e) { + r.fire("error", { + type: "error", + body: "Can't load URL", + code: 400 + }); + return; + } + t.timestamp = Date.now(), t.request = e( + s, + (o) => { + t.duration = Date.now() - t.timestamp, t.complete = !0, o instanceof Blob && (o = getFileFromBlob(o, o.name || getFilenameFromURL(s))), r.fire( + "load", + // if has received blob, we go with blob, if no response, we return null + o instanceof Blob ? o : o ? o.body : null + ); + }, + (o) => { + r.fire( + "error", + typeof o == "string" ? { + type: "error", + code: 0, + body: o + } : o + ); + }, + (o, d, c) => { + if (c && (t.size = c), t.duration = Date.now() - t.timestamp, !o) { + t.progress = null; + return; + } + t.progress = d / c, r.fire("progress", t.progress); + }, + () => { + r.fire("abort"); + }, + (o) => { + const d = getFileInfoFromHeaders( + typeof o == "string" ? o : o.headers + ); + r.fire("meta", { + size: t.size || d.size, + filename: d.name, + source: d.source + }); + } + ); + }, r = { + ...on(), + setSource: (s) => t.source = s, + getProgress: i, + // file load progress + abort: a, + // abort file load + load: n + // start load + }; + return r; +}, isGet = (e) => /GET|HEAD/.test(e), sendRequest = (e, t, i) => { + const a = { + onheaders: () => { + }, + onprogress: () => { + }, + onload: () => { + }, + ontimeout: () => { + }, + onerror: () => { + }, + onabort: () => { + }, + abort: () => { + n = !0, r.abort(); + } + }; + let n = !1, l = !1; + i = { + method: "POST", + headers: {}, + withCredentials: !1, + ...i + }, t = encodeURI(t), isGet(i.method) && e && (t = `${t}${encodeURIComponent(typeof e == "string" ? e : JSON.stringify(e))}`); + const r = new XMLHttpRequest(), s = isGet(i.method) ? r : r.upload; + return s.onprogress = (o) => { + n || a.onprogress(o.lengthComputable, o.loaded, o.total); + }, r.onreadystatechange = () => { + r.readyState < 2 || r.readyState === 4 && r.status === 0 || l || (l = !0, a.onheaders(r)); + }, r.onload = () => { + r.status >= 200 && r.status < 300 ? a.onload(r) : a.onerror(r); + }, r.onerror = () => a.onerror(r), r.onabort = () => { + n = !0, a.onabort(); + }, r.ontimeout = () => a.ontimeout(r), r.open(i.method, t, !0), isInt(i.timeout) && (r.timeout = i.timeout), Object.keys(i.headers).forEach((o) => { + const d = unescape(encodeURIComponent(i.headers[o])); + r.setRequestHeader(o, d); + }), i.responseType && (r.responseType = i.responseType), i.withCredentials && (r.withCredentials = !0), r.send(e), a; +}, createResponse = (e, t, i, a) => ({ + type: e, + code: t, + body: i, + headers: a +}), createTimeoutResponse = (e) => (t) => { + e(createResponse("error", 0, "Timeout", t.getAllResponseHeaders())); +}, hasQS = (e) => /\?/.test(e), buildURL = (...e) => { + let t = ""; + return e.forEach((i) => { + t += hasQS(t) && hasQS(i) ? i.replace(/\?/, "&") : i; + }), t; +}, createFetchFunction = (e = "", t) => { + if (typeof t == "function") + return t; + if (!t || !isString$1(t.url)) + return null; + const i = t.onload || ((n) => n), a = t.onerror || ((n) => null); + return (n, l, r, s, o, d) => { + const c = sendRequest(n, buildURL(e, t.url), { + ...t, + responseType: "blob" + }); + return c.onload = (u) => { + const f = u.getAllResponseHeaders(), p = getFileInfoFromHeaders(f).name || getFilenameFromURL(n); + l( + createResponse( + "load", + u.status, + t.method === "HEAD" ? null : getFileFromBlob(i(u.response), p), + f + ) + ); + }, c.onerror = (u) => { + r( + createResponse( + "error", + u.status, + a(u.response) || u.statusText, + u.getAllResponseHeaders() + ) + ); + }, c.onheaders = (u) => { + d(createResponse("headers", u.status, null, u.getAllResponseHeaders())); + }, c.ontimeout = createTimeoutResponse(r), c.onprogress = s, c.onabort = o, c; + }; +}, ChunkStatus = { + QUEUED: 0, + COMPLETE: 1, + PROCESSING: 2, + ERROR: 3, + WAITING: 4 +}, processFileChunked = (e, t, i, a, n, l, r, s, o, d, c) => { + const u = [], { chunkTransferId: f, chunkServer: p, chunkSize: m, chunkRetryDelays: h } = c, I = { + serverId: f, + aborted: !1 + }, b = t.ondata || ((F) => F), g = t.onload || ((F, D) => D === "HEAD" ? F.getResponseHeader("Upload-Offset") : F.response), E = t.onerror || ((F) => null), T = (F) => { + const D = new FormData(); + isObject$1(n) && D.append(i, JSON.stringify(n)); + const R = typeof t.headers == "function" ? t.headers(a, n) : { + ...t.headers, + "Upload-Length": a.size + }, A = { + ...t, + headers: R + }, w = sendRequest(b(D), buildURL(e, t.url), A); + w.onload = (z) => F(g(z, A.method)), w.onerror = (z) => r( + createResponse( + "error", + z.status, + E(z.response) || z.statusText, + z.getAllResponseHeaders() + ) + ), w.ontimeout = createTimeoutResponse(r); + }, S = (F) => { + const D = buildURL(e, p.url, I.serverId), A = { + headers: typeof t.headers == "function" ? t.headers(I.serverId) : { + ...t.headers + }, + method: "HEAD" + }, w = sendRequest(null, D, A); + w.onload = (z) => F(g(z, A.method)), w.onerror = (z) => r( + createResponse( + "error", + z.status, + E(z.response) || z.statusText, + z.getAllResponseHeaders() + ) + ), w.ontimeout = createTimeoutResponse(r); + }, L = Math.floor(a.size / m); + for (let F = 0; F <= L; F++) { + const D = F * m, R = a.slice(D, D + m, "application/offset+octet-stream"); + u[F] = { + index: F, + size: R.size, + offset: D, + data: R, + file: a, + progress: 0, + retries: [...h], + status: ChunkStatus.QUEUED, + error: null, + request: null, + timeout: null + }; + } + const M = () => l(I.serverId), y = (F) => F.status === ChunkStatus.QUEUED || F.status === ChunkStatus.ERROR, x = (F) => { + if (I.aborted) return; + if (F = F || u.find(y), !F) { + u.every((k) => k.status === ChunkStatus.COMPLETE) && M(); + return; + } + F.status = ChunkStatus.PROCESSING, F.progress = null; + const D = p.ondata || ((k) => k), R = p.onerror || ((k) => null), A = buildURL(e, p.url, I.serverId), w = typeof p.headers == "function" ? p.headers(F) : { + ...p.headers, + "Content-Type": "application/offset+octet-stream", + "Upload-Offset": F.offset, + "Upload-Length": a.size, + "Upload-Name": a.name + }, z = F.request = sendRequest(D(F.data), A, { + ...p, + headers: w + }); + z.onload = () => { + F.status = ChunkStatus.COMPLETE, F.request = null, O(); + }, z.onprogress = (k, V, H) => { + F.progress = k ? V : null, P(); + }, z.onerror = (k) => { + F.status = ChunkStatus.ERROR, F.request = null, F.error = R(k.response) || k.statusText, v(F) || r( + createResponse( + "error", + k.status, + R(k.response) || k.statusText, + k.getAllResponseHeaders() + ) + ); + }, z.ontimeout = (k) => { + F.status = ChunkStatus.ERROR, F.request = null, v(F) || createTimeoutResponse(r)(k); + }, z.onabort = () => { + F.status = ChunkStatus.QUEUED, F.request = null, o(); + }; + }, v = (F) => F.retries.length === 0 ? !1 : (F.status = ChunkStatus.WAITING, clearTimeout(F.timeout), F.timeout = setTimeout(() => { + x(F); + }, F.retries.shift()), !0), P = () => { + const F = u.reduce((R, A) => R === null || A.progress === null ? null : R + A.progress, 0); + if (F === null) return s(!1, 0, 0); + const D = u.reduce((R, A) => R + A.size, 0); + s(!0, F, D); + }, O = () => { + u.filter((D) => D.status === ChunkStatus.PROCESSING).length >= 1 || x(); + }, B = () => { + u.forEach((F) => { + clearTimeout(F.timeout), F.request && F.request.abort(); + }); + }; + return I.serverId ? S((F) => { + I.aborted || (u.filter((D) => D.offset < F).forEach((D) => { + D.status = ChunkStatus.COMPLETE, D.progress = D.size; + }), O()); + }) : T((F) => { + I.aborted || (d(F), I.serverId = F, O()); + }), { + abort: () => { + I.aborted = !0, B(); + } + }; +}, createFileProcessorFunction = (e, t, i, a) => (n, l, r, s, o, d, c) => { + if (!n) return; + const u = a.chunkUploads, f = u && n.size > a.chunkSize, p = u && (f || a.chunkForce); + if (n instanceof Blob && p) + return processFileChunked( + e, + t, + i, + n, + l, + r, + s, + o, + d, + c, + a + ); + const m = t.ondata || ((S) => S), h = t.onload || ((S) => S), I = t.onerror || ((S) => null), b = typeof t.headers == "function" ? t.headers(n, l) || {} : { + ...t.headers + }, g = { + ...t, + headers: b + }; + var E = new FormData(); + isObject$1(l) && E.append(i, JSON.stringify(l)), (n instanceof Blob ? [{ name: null, file: n }] : n).forEach((S) => { + E.append( + i, + S.file, + S.name === null ? S.file.name : `${S.name}${S.file.name}` + ); + }); + const T = sendRequest(m(E), buildURL(e, t.url), g); + return T.onload = (S) => { + r(createResponse("load", S.status, h(S.response), S.getAllResponseHeaders())); + }, T.onerror = (S) => { + s( + createResponse( + "error", + S.status, + I(S.response) || S.statusText, + S.getAllResponseHeaders() + ) + ); + }, T.ontimeout = createTimeoutResponse(s), T.onprogress = o, T.onabort = d, T; +}, createProcessorFunction = (e = "", t, i, a) => typeof t == "function" ? (...n) => t(i, ...n, a) : !t || !isString$1(t.url) ? null : createFileProcessorFunction(e, t, i, a), createRevertFunction = (e = "", t) => { + if (typeof t == "function") + return t; + if (!t || !isString$1(t.url)) + return (n, l) => l(); + const i = t.onload || ((n) => n), a = t.onerror || ((n) => null); + return (n, l, r) => { + const s = sendRequest( + n, + e + t.url, + t + // contains method, headers and withCredentials properties + ); + return s.onload = (o) => { + l( + createResponse( + "load", + o.status, + i(o.response), + o.getAllResponseHeaders() + ) + ); + }, s.onerror = (o) => { + r( + createResponse( + "error", + o.status, + a(o.response) || o.statusText, + o.getAllResponseHeaders() + ) + ); + }, s.ontimeout = createTimeoutResponse(r), s; + }; +}, getRandomNumber = (e = 0, t = 1) => e + Math.random() * (t - e), createPerceivedPerformanceUpdater = (e, t = 1e3, i = 0, a = 25, n = 250) => { + let l = null; + const r = Date.now(), s = () => { + let o = Date.now() - r, d = getRandomNumber(a, n); + o + d > t && (d = o + d - t); + let c = o / t; + if (c >= 1 || document.hidden) { + e(1); + return; + } + e(c), l = setTimeout(s, d); + }; + return t > 0 && s(), { + clear: () => { + clearTimeout(l); + } + }; +}, createFileProcessor = (e, t) => { + const i = { + complete: !1, + perceivedProgress: 0, + perceivedPerformanceUpdater: null, + progress: null, + timestamp: null, + perceivedDuration: 0, + duration: 0, + request: null, + response: null + }, { allowMinimumUploadDuration: a } = t, n = (c, u) => { + const f = () => { + i.duration === 0 || i.progress === null || d.fire("progress", d.getProgress()); + }, p = () => { + i.complete = !0, d.fire("load-perceived", i.response.body); + }; + d.fire("start"), i.timestamp = Date.now(), i.perceivedPerformanceUpdater = createPerceivedPerformanceUpdater( + (m) => { + i.perceivedProgress = m, i.perceivedDuration = Date.now() - i.timestamp, f(), i.response && i.perceivedProgress === 1 && !i.complete && p(); + }, + // random delay as in a list of files you start noticing + // files uploading at the exact same speed + a ? getRandomNumber(750, 1500) : 0 + ), i.request = e( + // the file to process + c, + // the metadata to send along + u, + // callbacks (load, error, progress, abort, transfer) + // load expects the body to be a server id if + // you want to make use of revert + (m) => { + i.response = isObject$1(m) ? m : { + type: "load", + code: 200, + body: `${m}`, + headers: {} + }, i.duration = Date.now() - i.timestamp, i.progress = 1, d.fire("load", i.response.body), (!a || a && i.perceivedProgress === 1) && p(); + }, + // error is expected to be an object with type, code, body + (m) => { + i.perceivedPerformanceUpdater.clear(), d.fire( + "error", + isObject$1(m) ? m : { + type: "error", + code: 0, + body: `${m}` + } + ); + }, + // actual processing progress + (m, h, I) => { + i.duration = Date.now() - i.timestamp, i.progress = m ? h / I : null, f(); + }, + // abort does not expect a value + () => { + i.perceivedPerformanceUpdater.clear(), d.fire("abort", i.response ? i.response.body : null); + }, + // register the id for this transfer + (m) => { + d.fire("transfer", m); + } + ); + }, l = () => { + i.request && (i.perceivedPerformanceUpdater.clear(), i.request.abort && i.request.abort(), i.complete = !0); + }, r = () => { + l(), i.complete = !1, i.perceivedProgress = 0, i.progress = 0, i.timestamp = null, i.perceivedDuration = 0, i.duration = 0, i.request = null, i.response = null; + }, s = a ? () => i.progress ? Math.min(i.progress, i.perceivedProgress) : null : () => i.progress || null, o = a ? () => Math.min(i.duration, i.perceivedDuration) : () => i.duration, d = { + ...on(), + process: n, + // start processing file + abort: l, + // abort active process request + getProgress: s, + getDuration: o, + reset: r + }; + return d; +}, getFilenameWithoutExtension = (e) => e.substring(0, e.lastIndexOf(".")) || e, createFileStub = (e) => { + let t = [e.name, e.size, e.type]; + return e instanceof Blob || isBase64DataURI(e) ? t[0] = e.name || getDateString() : isBase64DataURI(e) ? (t[1] = e.length, t[2] = getMimeTypeFromBase64DataURI(e)) : isString$1(e) && (t[0] = getFilenameFromURL(e), t[1] = 0, t[2] = "application/octet-stream"), { + name: t[0], + size: t[1], + type: t[2] + }; +}, isFile = (e) => !!(e instanceof File || e instanceof Blob && e.name), deepCloneObject = (e) => { + if (!isObject$1(e)) return e; + const t = isArray$1(e) ? [] : {}; + for (const i in e) { + if (!e.hasOwnProperty(i)) continue; + const a = e[i]; + t[i] = a && isObject$1(a) ? deepCloneObject(a) : a; + } + return t; +}, createItem = (e = null, t = null, i = null) => { + const a = getUniqueId(), n = { + // is archived + archived: !1, + // if is frozen, no longer fires events + frozen: !1, + // removed from view + released: !1, + // original source + source: null, + // file model reference + file: i, + // id of file on server + serverFileReference: t, + // id of file transfer on server + transferId: null, + // is aborted + processingAborted: !1, + // current item status + status: t ? ItemStatus.PROCESSING_COMPLETE : ItemStatus.INIT, + // active processes + activeLoader: null, + activeProcessor: null + }; + let l = null; + const r = {}, s = (y) => n.status = y, o = (y, ...x) => { + n.released || n.frozen || L.fire(y, ...x); + }, d = () => getExtensionFromFilename(n.file.name), c = () => n.file.type, u = () => n.file.size, f = () => n.file, p = (y, x, v) => { + if (n.source = y, L.fireSync("init"), n.file) { + L.fireSync("load-skip"); + return; + } + n.file = createFileStub(y), x.on("init", () => { + o("load-init"); + }), x.on("meta", (P) => { + n.file.size = P.size, n.file.filename = P.filename, P.source && (e = FileOrigin.LIMBO, n.serverFileReference = P.source, n.status = ItemStatus.PROCESSING_COMPLETE), o("load-meta"); + }), x.on("progress", (P) => { + s(ItemStatus.LOADING), o("load-progress", P); + }), x.on("error", (P) => { + s(ItemStatus.LOAD_ERROR), o("load-request-error", P); + }), x.on("abort", () => { + s(ItemStatus.INIT), o("load-abort"); + }), x.on("load", (P) => { + n.activeLoader = null; + const O = (F) => { + n.file = isFile(F) ? F : n.file, e === FileOrigin.LIMBO && n.serverFileReference ? s(ItemStatus.PROCESSING_COMPLETE) : s(ItemStatus.IDLE), o("load"); + }, B = (F) => { + n.file = P, o("load-meta"), s(ItemStatus.LOAD_ERROR), o("load-file-error", F); + }; + if (n.serverFileReference) { + O(P); + return; + } + v(P, O, B); + }), x.setSource(y), n.activeLoader = x, x.load(); + }, m = () => { + n.activeLoader && n.activeLoader.load(); + }, h = () => { + if (n.activeLoader) { + n.activeLoader.abort(); + return; + } + s(ItemStatus.INIT), o("load-abort"); + }, I = (y, x) => { + if (n.processingAborted) { + n.processingAborted = !1; + return; + } + if (s(ItemStatus.PROCESSING), l = null, !(n.file instanceof Blob)) { + L.on("load", () => { + I(y, x); + }); + return; + } + y.on("load", (O) => { + n.transferId = null, n.serverFileReference = O; + }), y.on("transfer", (O) => { + n.transferId = O; + }), y.on("load-perceived", (O) => { + n.activeProcessor = null, n.transferId = null, n.serverFileReference = O, s(ItemStatus.PROCESSING_COMPLETE), o("process-complete", O); + }), y.on("start", () => { + o("process-start"); + }), y.on("error", (O) => { + n.activeProcessor = null, s(ItemStatus.PROCESSING_ERROR), o("process-error", O); + }), y.on("abort", (O) => { + n.activeProcessor = null, n.serverFileReference = O, s(ItemStatus.IDLE), o("process-abort"), l && l(); + }), y.on("progress", (O) => { + o("process-progress", O); + }); + const v = (O) => { + n.archived || y.process(O, { ...r }); + }, P = console.error; + x(n.file, v, P), n.activeProcessor = y; + }, b = () => { + n.processingAborted = !1, s(ItemStatus.PROCESSING_QUEUED); + }, g = () => new Promise((y) => { + if (!n.activeProcessor) { + n.processingAborted = !0, s(ItemStatus.IDLE), o("process-abort"), y(); + return; + } + l = () => { + y(); + }, n.activeProcessor.abort(); + }), E = (y, x) => new Promise((v, P) => { + const O = n.serverFileReference !== null ? n.serverFileReference : n.transferId; + if (O === null) { + v(); + return; + } + y( + O, + () => { + n.serverFileReference = null, n.transferId = null, v(); + }, + (B) => { + if (!x) { + v(); + return; + } + s(ItemStatus.PROCESSING_REVERT_ERROR), o("process-revert-error"), P(B); + } + ), s(ItemStatus.IDLE), o("process-revert"); + }), T = (y, x, v) => { + const P = y.split("."), O = P[0], B = P.pop(); + let F = r; + P.forEach((D) => F = F[D]), JSON.stringify(F[B]) !== JSON.stringify(x) && (F[B] = x, o("metadata-update", { + key: O, + value: r[O], + silent: v + })); + }, L = { + id: { get: () => a }, + origin: { get: () => e, set: (y) => e = y }, + serverId: { get: () => n.serverFileReference }, + transferId: { get: () => n.transferId }, + status: { get: () => n.status }, + filename: { get: () => n.file.name }, + filenameWithoutExtension: { get: () => getFilenameWithoutExtension(n.file.name) }, + fileExtension: { get: d }, + fileType: { get: c }, + fileSize: { get: u }, + file: { get: f }, + relativePath: { get: () => n.file._relativePath }, + source: { get: () => n.source }, + getMetadata: (y) => deepCloneObject(y ? r[y] : r), + setMetadata: (y, x, v) => { + if (isObject$1(y)) { + const P = y; + return Object.keys(P).forEach((O) => { + T(O, P[O], x); + }), y; + } + return T(y, x, v), x; + }, + extend: (y, x) => M[y] = x, + abortLoad: h, + retryLoad: m, + requestProcessing: b, + abortProcessing: g, + load: p, + process: I, + revert: E, + ...on(), + freeze: () => n.frozen = !0, + release: () => n.released = !0, + released: { get: () => n.released }, + archive: () => n.archived = !0, + archived: { get: () => n.archived }, + // replace source and file object + setFile: (y) => n.file = y + }, M = createObject(L); + return M; +}, getItemIndexByQuery = (e, t) => isEmpty$1(t) ? 0 : isString$1(t) ? e.findIndex((i) => i.id === t) : -1, getItemById = (e, t) => { + const i = getItemIndexByQuery(e, t); + if (!(i < 0)) + return e[i] || null; +}, fetchBlob = (e, t, i, a, n, l) => { + const r = sendRequest(null, e, { + method: "GET", + responseType: "blob" + }); + return r.onload = (s) => { + const o = s.getAllResponseHeaders(), d = getFileInfoFromHeaders(o).name || getFilenameFromURL(e); + t(createResponse("load", s.status, getFileFromBlob(s.response, d), o)); + }, r.onerror = (s) => { + i(createResponse("error", s.status, s.statusText, s.getAllResponseHeaders())); + }, r.onheaders = (s) => { + l(createResponse("headers", s.status, null, s.getAllResponseHeaders())); + }, r.ontimeout = createTimeoutResponse(i), r.onprogress = a, r.onabort = n, r; +}, getDomainFromURL = (e) => (e.indexOf("//") === 0 && (e = location.protocol + e), e.toLowerCase().replace("blob:", "").replace(/([a-z])?:\/\//, "$1").split("/")[0]), isExternalURL = (e) => (e.indexOf(":") > -1 || e.indexOf("//") > -1) && getDomainFromURL(location.href) !== getDomainFromURL(e), dynamicLabel = (e) => (...t) => isFunction$2(e) ? e(...t) : e, isMockItem = (e) => !isFile(e.file), listUpdated = (e, t) => { + clearTimeout(t.listUpdateTimeout), t.listUpdateTimeout = setTimeout(() => { + e("DID_UPDATE_ITEMS", { items: getActiveItems(t.items) }); + }, 0); +}, optionalPromise = (e, ...t) => new Promise((i) => { + if (!e) + return i(!0); + const a = e(...t); + if (a == null) + return i(!0); + if (typeof a == "boolean") + return i(a); + typeof a.then == "function" && a.then(i); +}), sortItems = (e, t) => { + e.items.sort((i, a) => t(createItemAPI(i), createItemAPI(a))); +}, getItemByQueryFromState = (e, t) => ({ + query: i, + success: a = () => { + }, + failure: n = () => { + }, + ...l +} = {}) => { + const r = getItemByQuery(e.items, i); + if (!r) { + n({ + error: createResponse("error", 0, "Item not found"), + file: null + }); + return; + } + t(r, a, n, l || {}); +}, actions = (e, t, i) => ({ + /** + * Aborts all ongoing processes + */ + ABORT_ALL: () => { + getActiveItems(i.items).forEach((a) => { + a.freeze(), a.abortLoad(), a.abortProcessing(); + }); + }, + /** + * Sets initial files + */ + DID_SET_FILES: ({ value: a = [] }) => { + const n = a.map((r) => ({ + source: r.source ? r.source : r, + options: r.options + })); + let l = getActiveItems(i.items); + l.forEach((r) => { + n.find((s) => s.source === r.source || s.source === r.file) || e("REMOVE_ITEM", { query: r, remove: !1 }); + }), l = getActiveItems(i.items), n.forEach((r, s) => { + l.find((o) => o.source === r.source || o.file === r.source) || e("ADD_ITEM", { + ...r, + interactionMethod: InteractionMethod.NONE, + index: s + }); + }); + }, + DID_UPDATE_ITEM_METADATA: ({ id: a, action: n, change: l }) => { + l.silent || (clearTimeout(i.itemUpdateTimeout), i.itemUpdateTimeout = setTimeout(() => { + const r = getItemById(i.items, a); + if (!t("IS_ASYNC")) { + applyFilterChain("SHOULD_PREPARE_OUTPUT", !1, { + item: r, + query: t, + action: n, + change: l + }).then((c) => { + const u = t("GET_BEFORE_PREPARE_FILE"); + u && (c = u(r, c)), c && e( + "REQUEST_PREPARE_OUTPUT", + { + query: a, + item: r, + success: (f) => { + e("DID_PREPARE_OUTPUT", { id: a, file: f }); + } + }, + !0 + ); + }); + return; + } + r.origin === FileOrigin.LOCAL && e("DID_LOAD_ITEM", { + id: r.id, + error: null, + serverFileReference: r.source + }); + const s = () => { + setTimeout(() => { + e("REQUEST_ITEM_PROCESSING", { query: a }); + }, 32); + }, o = (c) => { + r.revert( + createRevertFunction(i.options.server.url, i.options.server.revert), + t("GET_FORCE_REVERT") + ).then(c ? s : () => { + }).catch(() => { + }); + }, d = (c) => { + r.abortProcessing().then(c ? s : () => { + }); + }; + if (r.status === ItemStatus.PROCESSING_COMPLETE) + return o(i.options.instantUpload); + if (r.status === ItemStatus.PROCESSING) + return d(i.options.instantUpload); + i.options.instantUpload && s(); + }, 0)); + }, + MOVE_ITEM: ({ query: a, index: n }) => { + const l = getItemByQuery(i.items, a); + if (!l) return; + const r = i.items.indexOf(l); + n = limit(n, 0, i.items.length - 1), r !== n && i.items.splice(n, 0, i.items.splice(r, 1)[0]); + }, + SORT: ({ compare: a }) => { + sortItems(i, a), e("DID_SORT_ITEMS", { + items: t("GET_ACTIVE_ITEMS") + }); + }, + ADD_ITEMS: ({ items: a, index: n, interactionMethod: l, success: r = () => { + }, failure: s = () => { + } }) => { + let o = n; + if (n === -1 || typeof n > "u") { + const p = t("GET_ITEM_INSERT_LOCATION"), m = t("GET_TOTAL_ITEMS"); + o = p === "before" ? 0 : m; + } + const d = t("GET_IGNORED_FILES"), c = (p) => isFile(p) ? !d.includes(p.name.toLowerCase()) : !isEmpty$1(p), f = a.filter(c).map( + (p) => new Promise((m, h) => { + e("ADD_ITEM", { + interactionMethod: l, + source: p.source || p, + success: m, + failure: h, + index: o++, + options: p.options || {} + }); + }) + ); + Promise.all(f).then(r).catch(s); + }, + /** + * @param source + * @param index + * @param interactionMethod + */ + ADD_ITEM: ({ + source: a, + index: n = -1, + interactionMethod: l, + success: r = () => { + }, + failure: s = () => { + }, + options: o = {} + }) => { + if (isEmpty$1(a)) { + s({ + error: createResponse("error", 0, "No source"), + file: null + }); + return; + } + if (isFile(a) && i.options.ignoredFiles.includes(a.name.toLowerCase())) + return; + if (!hasRoomForItem(i)) { + if (i.options.allowMultiple || !i.options.allowMultiple && !i.options.allowReplace) { + const g = createResponse("warning", 0, "Max files"); + e("DID_THROW_MAX_FILES", { + source: a, + error: g + }), s({ error: g, file: null }); + return; + } + const b = getActiveItems(i.items)[0]; + if (b.status === ItemStatus.PROCESSING_COMPLETE || b.status === ItemStatus.PROCESSING_REVERT_ERROR) { + const g = t("GET_FORCE_REVERT"); + if (b.revert( + createRevertFunction(i.options.server.url, i.options.server.revert), + g + ).then(() => { + g && e("ADD_ITEM", { + source: a, + index: n, + interactionMethod: l, + success: r, + failure: s, + options: o + }); + }).catch(() => { + }), g) return; + } + e("REMOVE_ITEM", { query: b.id }); + } + const d = o.type === "local" ? FileOrigin.LOCAL : o.type === "limbo" ? FileOrigin.LIMBO : FileOrigin.INPUT, c = createItem( + // where did this file come from + d, + // an input file never has a server file reference + d === FileOrigin.INPUT ? null : a, + // file mock data, if defined + o.file + ); + Object.keys(o.metadata || {}).forEach((b) => { + c.setMetadata(b, o.metadata[b]); + }), applyFilters("DID_CREATE_ITEM", c, { query: t, dispatch: e }); + const u = t("GET_ITEM_INSERT_LOCATION"); + i.options.itemInsertLocationFreedom || (n = u === "before" ? -1 : i.items.length), insertItem(i.items, c, n), isFunction$2(u) && a && sortItems(i, u); + const f = c.id; + c.on("init", () => { + e("DID_INIT_ITEM", { id: f }); + }), c.on("load-init", () => { + e("DID_START_ITEM_LOAD", { id: f }); + }), c.on("load-meta", () => { + e("DID_UPDATE_ITEM_META", { id: f }); + }), c.on("load-progress", (b) => { + e("DID_UPDATE_ITEM_LOAD_PROGRESS", { id: f, progress: b }); + }), c.on("load-request-error", (b) => { + const g = dynamicLabel(i.options.labelFileLoadError)(b); + if (b.code >= 400 && b.code < 500) { + e("DID_THROW_ITEM_INVALID", { + id: f, + error: b, + status: { + main: g, + sub: `${b.code} (${b.body})` + } + }), s({ error: b, file: createItemAPI(c) }); + return; + } + e("DID_THROW_ITEM_LOAD_ERROR", { + id: f, + error: b, + status: { + main: g, + sub: i.options.labelTapToRetry + } + }); + }), c.on("load-file-error", (b) => { + e("DID_THROW_ITEM_INVALID", { + id: f, + error: b.status, + status: b.status + }), s({ error: b.status, file: createItemAPI(c) }); + }), c.on("load-abort", () => { + e("REMOVE_ITEM", { query: f }); + }), c.on("load-skip", () => { + c.on("metadata-update", (b) => { + isFile(c.file) && e("DID_UPDATE_ITEM_METADATA", { id: f, change: b }); + }), e("COMPLETE_LOAD_ITEM", { + query: f, + item: c, + data: { + source: a, + success: r + } + }); + }), c.on("load", () => { + const b = (g) => { + if (!g) { + e("REMOVE_ITEM", { + query: f + }); + return; + } + c.on("metadata-update", (E) => { + e("DID_UPDATE_ITEM_METADATA", { id: f, change: E }); + }), applyFilterChain("SHOULD_PREPARE_OUTPUT", !1, { item: c, query: t }).then( + (E) => { + const T = t("GET_BEFORE_PREPARE_FILE"); + T && (E = T(c, E)); + const S = () => { + e("COMPLETE_LOAD_ITEM", { + query: f, + item: c, + data: { + source: a, + success: r + } + }), listUpdated(e, i); + }; + if (E) { + e( + "REQUEST_PREPARE_OUTPUT", + { + query: f, + item: c, + success: (L) => { + e("DID_PREPARE_OUTPUT", { id: f, file: L }), S(); + } + }, + !0 + ); + return; + } + S(); + } + ); + }; + applyFilterChain("DID_LOAD_ITEM", c, { query: t, dispatch: e }).then(() => { + optionalPromise(t("GET_BEFORE_ADD_FILE"), createItemAPI(c)).then( + b + ); + }).catch((g) => { + if (!g || !g.error || !g.status) return b(!1); + e("DID_THROW_ITEM_INVALID", { + id: f, + error: g.error, + status: g.status + }); + }); + }), c.on("process-start", () => { + e("DID_START_ITEM_PROCESSING", { id: f }); + }), c.on("process-progress", (b) => { + e("DID_UPDATE_ITEM_PROCESS_PROGRESS", { id: f, progress: b }); + }), c.on("process-error", (b) => { + e("DID_THROW_ITEM_PROCESSING_ERROR", { + id: f, + error: b, + status: { + main: dynamicLabel(i.options.labelFileProcessingError)(b), + sub: i.options.labelTapToRetry + } + }); + }), c.on("process-revert-error", (b) => { + e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR", { + id: f, + error: b, + status: { + main: dynamicLabel(i.options.labelFileProcessingRevertError)(b), + sub: i.options.labelTapToRetry + } + }); + }), c.on("process-complete", (b) => { + e("DID_COMPLETE_ITEM_PROCESSING", { + id: f, + error: null, + serverFileReference: b + }), e("DID_DEFINE_VALUE", { id: f, value: b }); + }), c.on("process-abort", () => { + e("DID_ABORT_ITEM_PROCESSING", { id: f }); + }), c.on("process-revert", () => { + e("DID_REVERT_ITEM_PROCESSING", { id: f }), e("DID_DEFINE_VALUE", { id: f, value: null }); + }), e("DID_ADD_ITEM", { id: f, index: n, interactionMethod: l }), listUpdated(e, i); + const { url: p, load: m, restore: h, fetch: I } = i.options.server || {}; + c.load( + a, + // this creates a function that loads the file based on the type of file (string, base64, blob, file) and location of file (local, remote, limbo) + createFileLoader( + d === FileOrigin.INPUT ? ( + // input, if is remote, see if should use custom fetch, else use default fetchBlob + isString$1(a) && isExternalURL(a) && I ? createFetchFunction(p, I) : fetchBlob + ) : ( + // limbo or local + d === FileOrigin.LIMBO ? createFetchFunction(p, h) : createFetchFunction(p, m) + ) + // local + ), + // called when the file is loaded so it can be piped through the filters + (b, g, E) => { + applyFilterChain("LOAD_FILE", b, { query: t }).then(g).catch(E); + } + ); + }, + REQUEST_PREPARE_OUTPUT: ({ item: a, success: n, failure: l = () => { + } }) => { + const r = { + error: createResponse("error", 0, "Item not found"), + file: null + }; + if (a.archived) return l(r); + applyFilterChain("PREPARE_OUTPUT", a.file, { query: t, item: a }).then((s) => { + applyFilterChain("COMPLETE_PREPARE_OUTPUT", s, { query: t, item: a }).then((o) => { + if (a.archived) return l(r); + n(o); + }); + }); + }, + COMPLETE_LOAD_ITEM: ({ item: a, data: n }) => { + const { success: l, source: r } = n, s = t("GET_ITEM_INSERT_LOCATION"); + if (isFunction$2(s) && r && sortItems(i, s), e("DID_LOAD_ITEM", { + id: a.id, + error: null, + serverFileReference: a.origin === FileOrigin.INPUT ? null : r + }), l(createItemAPI(a)), a.origin === FileOrigin.LOCAL) { + e("DID_LOAD_LOCAL_ITEM", { id: a.id }); + return; + } + if (a.origin === FileOrigin.LIMBO) { + e("DID_COMPLETE_ITEM_PROCESSING", { + id: a.id, + error: null, + serverFileReference: r + }), e("DID_DEFINE_VALUE", { + id: a.id, + value: a.serverId || r + }); + return; + } + t("IS_ASYNC") && i.options.instantUpload && e("REQUEST_ITEM_PROCESSING", { query: a.id }); + }, + RETRY_ITEM_LOAD: getItemByQueryFromState(i, (a) => { + a.retryLoad(); + }), + REQUEST_ITEM_PREPARE: getItemByQueryFromState(i, (a, n, l) => { + e( + "REQUEST_PREPARE_OUTPUT", + { + query: a.id, + item: a, + success: (r) => { + e("DID_PREPARE_OUTPUT", { id: a.id, file: r }), n({ + file: a, + output: r + }); + }, + failure: l + }, + !0 + ); + }), + REQUEST_ITEM_PROCESSING: getItemByQueryFromState(i, (a, n, l) => { + if (!// waiting for something + (a.status === ItemStatus.IDLE || // processing went wrong earlier + a.status === ItemStatus.PROCESSING_ERROR)) { + const s = () => e("REQUEST_ITEM_PROCESSING", { query: a, success: n, failure: l }), o = () => document.hidden ? s() : setTimeout(s, 32); + a.status === ItemStatus.PROCESSING_COMPLETE || a.status === ItemStatus.PROCESSING_REVERT_ERROR ? a.revert( + createRevertFunction(i.options.server.url, i.options.server.revert), + t("GET_FORCE_REVERT") + ).then(o).catch(() => { + }) : a.status === ItemStatus.PROCESSING && a.abortProcessing().then(o); + return; + } + a.status !== ItemStatus.PROCESSING_QUEUED && (a.requestProcessing(), e("DID_REQUEST_ITEM_PROCESSING", { id: a.id }), e("PROCESS_ITEM", { query: a, success: n, failure: l }, !0)); + }), + PROCESS_ITEM: getItemByQueryFromState(i, (a, n, l) => { + const r = t("GET_MAX_PARALLEL_UPLOADS"); + if (t("GET_ITEMS_BY_STATUS", ItemStatus.PROCESSING).length === r) { + i.processingQueue.push({ + id: a.id, + success: n, + failure: l + }); + return; + } + if (a.status === ItemStatus.PROCESSING) return; + const o = () => { + const c = i.processingQueue.shift(); + if (!c) return; + const { id: u, success: f, failure: p } = c, m = getItemByQuery(i.items, u); + if (!m || m.archived) { + o(); + return; + } + e("PROCESS_ITEM", { query: u, success: f, failure: p }, !0); + }; + a.onOnce("process-complete", () => { + n(createItemAPI(a)), o(); + const c = i.options.server; + if (i.options.instantUpload && a.origin === FileOrigin.LOCAL && isFunction$2(c.remove)) { + const p = () => { + }; + a.origin = FileOrigin.LIMBO, i.options.server.remove(a.source, p, p); + } + t("GET_ITEMS_BY_STATUS", ItemStatus.PROCESSING_COMPLETE).length === i.items.length && e("DID_COMPLETE_ITEM_PROCESSING_ALL"); + }), a.onOnce("process-error", (c) => { + l({ error: c, file: createItemAPI(a) }), o(); + }); + const d = i.options; + a.process( + createFileProcessor( + createProcessorFunction(d.server.url, d.server.process, d.name, { + chunkTransferId: a.transferId, + chunkServer: d.server.patch, + chunkUploads: d.chunkUploads, + chunkForce: d.chunkForce, + chunkSize: d.chunkSize, + chunkRetryDelays: d.chunkRetryDelays + }), + { + allowMinimumUploadDuration: t("GET_ALLOW_MINIMUM_UPLOAD_DURATION") + } + ), + // called when the file is about to be processed so it can be piped through the transform filters + (c, u, f) => { + applyFilterChain("PREPARE_OUTPUT", c, { query: t, item: a }).then((p) => { + e("DID_PREPARE_OUTPUT", { id: a.id, file: p }), u(p); + }).catch(f); + } + ); + }), + RETRY_ITEM_PROCESSING: getItemByQueryFromState(i, (a) => { + e("REQUEST_ITEM_PROCESSING", { query: a }); + }), + REQUEST_REMOVE_ITEM: getItemByQueryFromState(i, (a) => { + optionalPromise(t("GET_BEFORE_REMOVE_FILE"), createItemAPI(a)).then((n) => { + n && e("REMOVE_ITEM", { query: a }); + }); + }), + RELEASE_ITEM: getItemByQueryFromState(i, (a) => { + a.release(); + }), + REMOVE_ITEM: getItemByQueryFromState(i, (a, n, l, r) => { + const s = () => { + const d = a.id; + getItemById(i.items, d).archive(), e("DID_REMOVE_ITEM", { error: null, id: d, item: a }), listUpdated(e, i), n(createItemAPI(a)); + }, o = i.options.server; + a.origin === FileOrigin.LOCAL && o && isFunction$2(o.remove) && r.remove !== !1 ? (e("DID_START_ITEM_REMOVE", { id: a.id }), o.remove( + a.source, + () => s(), + (d) => { + e("DID_THROW_ITEM_REMOVE_ERROR", { + id: a.id, + error: createResponse("error", 0, d, null), + status: { + main: dynamicLabel(i.options.labelFileRemoveError)(d), + sub: i.options.labelTapToRetry + } + }); + } + )) : ((r.revert && a.origin !== FileOrigin.LOCAL && a.serverId !== null || // if chunked uploads are enabled and we're uploading in chunks for this specific file + // or if the file isn't big enough for chunked uploads but chunkForce is set then call + // revert before removing from the view... + i.options.chunkUploads && a.file.size > i.options.chunkSize || i.options.chunkUploads && i.options.chunkForce) && a.revert( + createRevertFunction(i.options.server.url, i.options.server.revert), + t("GET_FORCE_REVERT") + ), s()); + }), + ABORT_ITEM_LOAD: getItemByQueryFromState(i, (a) => { + a.abortLoad(); + }), + ABORT_ITEM_PROCESSING: getItemByQueryFromState(i, (a) => { + if (a.serverId) { + e("REVERT_ITEM_PROCESSING", { id: a.id }); + return; + } + a.abortProcessing().then(() => { + i.options.instantUpload && e("REMOVE_ITEM", { query: a.id }); + }); + }), + REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(i, (a) => { + if (!i.options.instantUpload) { + e("REVERT_ITEM_PROCESSING", { query: a }); + return; + } + const n = (s) => { + s && e("REVERT_ITEM_PROCESSING", { query: a }); + }, l = t("GET_BEFORE_REMOVE_FILE"); + if (!l) + return n(!0); + const r = l(createItemAPI(a)); + if (r == null) + return n(!0); + if (typeof r == "boolean") + return n(r); + typeof r.then == "function" && r.then(n); + }), + REVERT_ITEM_PROCESSING: getItemByQueryFromState(i, (a) => { + a.revert( + createRevertFunction(i.options.server.url, i.options.server.revert), + t("GET_FORCE_REVERT") + ).then(() => { + (i.options.instantUpload || isMockItem(a)) && e("REMOVE_ITEM", { query: a.id }); + }).catch(() => { + }); + }), + SET_OPTIONS: ({ options: a }) => { + const n = Object.keys(a), l = PrioritizedOptions.filter((s) => n.includes(s)); + [ + // add prioritized first if passed to options, else remove + ...l, + // prevent duplicate keys + ...Object.keys(a).filter((s) => !l.includes(s)) + ].forEach((s) => { + e(`SET_${fromCamels(s, "_").toUpperCase()}`, { + value: a[s] + }); + }); + } +}), PrioritizedOptions = [ + "server" + // must be processed before "files" +], formatFilename = (e) => e, createElement$1 = (e) => document.createElement(e), text = (e, t) => { + let i = e.childNodes[0]; + i ? t !== i.nodeValue && (i.nodeValue = t) : (i = document.createTextNode(t), e.appendChild(i)); +}, polarToCartesian = (e, t, i, a) => { + const n = (a % 360 - 90) * Math.PI / 180; + return { + x: e + i * Math.cos(n), + y: t + i * Math.sin(n) + }; +}, describeArc = (e, t, i, a, n, l) => { + const r = polarToCartesian(e, t, i, n), s = polarToCartesian(e, t, i, a); + return ["M", r.x, r.y, "A", i, i, 0, l, 0, s.x, s.y].join(" "); +}, percentageArc = (e, t, i, a, n) => { + let l = 1; + return n > a && n - a <= 0.5 && (l = 0), a > n && a - n >= 0.5 && (l = 0), describeArc( + e, + t, + i, + Math.min(0.9999, a) * 360, + Math.min(0.9999, n) * 360, + l + ); +}, create = ({ root: e, props: t }) => { + t.spin = !1, t.progress = 0, t.opacity = 0; + const i = createElement("svg"); + e.ref.path = createElement("path", { + "stroke-width": 2, + "stroke-linecap": "round" + }), i.appendChild(e.ref.path), e.ref.svg = i, e.appendChild(i); +}, write = ({ root: e, props: t }) => { + if (t.opacity === 0) + return; + t.align && (e.element.dataset.align = t.align); + const i = parseInt(attr(e.ref.path, "stroke-width"), 10), a = e.rect.element.width * 0.5; + let n = 0, l = 0; + t.spin ? (n = 0, l = 0.5) : (n = 0, l = t.progress); + const r = percentageArc(a, a, a - i, n, l); + attr(e.ref.path, "d", r), attr(e.ref.path, "stroke-opacity", t.spin || t.progress > 0 ? 1 : 0); +}, progressIndicator = createView({ + tag: "div", + name: "progress-indicator", + ignoreRectUpdate: !0, + ignoreRect: !0, + create, + write, + mixins: { + apis: ["progress", "spin", "align"], + styles: ["opacity"], + animations: { + opacity: { type: "tween", duration: 500 }, + progress: { + type: "spring", + stiffness: 0.95, + damping: 0.65, + mass: 10 + } + } + } +}), create$1 = ({ root: e, props: t }) => { + e.element.innerHTML = (t.icon || "") + `${t.label}`, t.isDisabled = !1; +}, write$1 = ({ root: e, props: t }) => { + const { isDisabled: i } = t, a = e.query("GET_DISABLED") || t.opacity === 0; + a && !i ? (t.isDisabled = !0, attr(e.element, "disabled", "disabled")) : !a && i && (t.isDisabled = !1, e.element.removeAttribute("disabled")); +}, fileActionButton = createView({ + tag: "button", + attributes: { + type: "button" + }, + ignoreRect: !0, + ignoreRectUpdate: !0, + name: "file-action-button", + mixins: { + apis: ["label"], + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + translateX: "spring", + translateY: "spring", + opacity: { type: "tween", duration: 250 } + }, + listeners: !0 + }, + create: create$1, + write: write$1 +}), toNaturalFileSize = (e, t = ".", i = 1e3, a = {}) => { + const { + labelBytes: n = "bytes", + labelKilobytes: l = "KB", + labelMegabytes: r = "MB", + labelGigabytes: s = "GB" + } = a; + e = Math.round(Math.abs(e)); + const o = i, d = i * i, c = i * i * i; + return e < o ? `${e} ${n}` : e < d ? `${Math.floor(e / o)} ${l}` : e < c ? `${removeDecimalsWhenZero(e / d, 1, t)} ${r}` : `${removeDecimalsWhenZero(e / c, 2, t)} ${s}`; +}, removeDecimalsWhenZero = (e, t, i) => e.toFixed(t).split(".").filter((a) => a !== "0").join(i), create$2 = ({ root: e, props: t }) => { + const i = createElement$1("span"); + i.className = "filepond--file-info-main", attr(i, "aria-hidden", "true"), e.appendChild(i), e.ref.fileName = i; + const a = createElement$1("span"); + a.className = "filepond--file-info-sub", e.appendChild(a), e.ref.fileSize = a, text(a, e.query("GET_LABEL_FILE_WAITING_FOR_SIZE")), text(i, formatFilename(e.query("GET_ITEM_NAME", t.id))); +}, updateFile = ({ root: e, props: t }) => { + text( + e.ref.fileSize, + toNaturalFileSize( + e.query("GET_ITEM_SIZE", t.id), + ".", + e.query("GET_FILE_SIZE_BASE"), + e.query("GET_FILE_SIZE_LABELS", e.query) + ) + ), text(e.ref.fileName, formatFilename(e.query("GET_ITEM_NAME", t.id))); +}, updateFileSizeOnError = ({ root: e, props: t }) => { + if (isInt(e.query("GET_ITEM_SIZE", t.id))) { + updateFile({ root: e, props: t }); + return; + } + text(e.ref.fileSize, e.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE")); +}, fileInfo = createView({ + name: "file-info", + ignoreRect: !0, + ignoreRectUpdate: !0, + write: createRoute({ + DID_LOAD_ITEM: updateFile, + DID_UPDATE_ITEM_META: updateFile, + DID_THROW_ITEM_LOAD_ERROR: updateFileSizeOnError, + DID_THROW_ITEM_INVALID: updateFileSizeOnError + }), + didCreateView: (e) => { + applyFilters("CREATE_VIEW", { ...e, view: e }); + }, + create: create$2, + mixins: { + styles: ["translateX", "translateY"], + animations: { + translateX: "spring", + translateY: "spring" + } + } +}), toPercentage = (e) => Math.round(e * 100), create$3 = ({ root: e }) => { + const t = createElement$1("span"); + t.className = "filepond--file-status-main", e.appendChild(t), e.ref.main = t; + const i = createElement$1("span"); + i.className = "filepond--file-status-sub", e.appendChild(i), e.ref.sub = i, didSetItemLoadProgress({ root: e, action: { progress: null } }); +}, didSetItemLoadProgress = ({ root: e, action: t }) => { + const i = t.progress === null ? e.query("GET_LABEL_FILE_LOADING") : `${e.query("GET_LABEL_FILE_LOADING")} ${toPercentage(t.progress)}%`; + text(e.ref.main, i), text(e.ref.sub, e.query("GET_LABEL_TAP_TO_CANCEL")); +}, didSetItemProcessProgress = ({ root: e, action: t }) => { + const i = t.progress === null ? e.query("GET_LABEL_FILE_PROCESSING") : `${e.query("GET_LABEL_FILE_PROCESSING")} ${toPercentage(t.progress)}%`; + text(e.ref.main, i), text(e.ref.sub, e.query("GET_LABEL_TAP_TO_CANCEL")); +}, didRequestItemProcessing = ({ root: e }) => { + text(e.ref.main, e.query("GET_LABEL_FILE_PROCESSING")), text(e.ref.sub, e.query("GET_LABEL_TAP_TO_CANCEL")); +}, didAbortItemProcessing = ({ root: e }) => { + text(e.ref.main, e.query("GET_LABEL_FILE_PROCESSING_ABORTED")), text(e.ref.sub, e.query("GET_LABEL_TAP_TO_RETRY")); +}, didCompleteItemProcessing = ({ root: e }) => { + text(e.ref.main, e.query("GET_LABEL_FILE_PROCESSING_COMPLETE")), text(e.ref.sub, e.query("GET_LABEL_TAP_TO_UNDO")); +}, clear = ({ root: e }) => { + text(e.ref.main, ""), text(e.ref.sub, ""); +}, error = ({ root: e, action: t }) => { + text(e.ref.main, t.status.main), text(e.ref.sub, t.status.sub); +}, fileStatus = createView({ + name: "file-status", + ignoreRect: !0, + ignoreRectUpdate: !0, + write: createRoute({ + DID_LOAD_ITEM: clear, + DID_REVERT_ITEM_PROCESSING: clear, + DID_REQUEST_ITEM_PROCESSING: didRequestItemProcessing, + DID_ABORT_ITEM_PROCESSING: didAbortItemProcessing, + DID_COMPLETE_ITEM_PROCESSING: didCompleteItemProcessing, + DID_UPDATE_ITEM_PROCESS_PROGRESS: didSetItemProcessProgress, + DID_UPDATE_ITEM_LOAD_PROGRESS: didSetItemLoadProgress, + DID_THROW_ITEM_LOAD_ERROR: error, + DID_THROW_ITEM_INVALID: error, + DID_THROW_ITEM_PROCESSING_ERROR: error, + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: error, + DID_THROW_ITEM_REMOVE_ERROR: error + }), + didCreateView: (e) => { + applyFilters("CREATE_VIEW", { ...e, view: e }); + }, + create: create$3, + mixins: { + styles: ["translateX", "translateY", "opacity"], + animations: { + opacity: { type: "tween", duration: 250 }, + translateX: "spring", + translateY: "spring" + } + } +}), Buttons = { + AbortItemLoad: { + label: "GET_LABEL_BUTTON_ABORT_ITEM_LOAD", + action: "ABORT_ITEM_LOAD", + className: "filepond--action-abort-item-load", + align: "LOAD_INDICATOR_POSITION" + // right + }, + RetryItemLoad: { + label: "GET_LABEL_BUTTON_RETRY_ITEM_LOAD", + action: "RETRY_ITEM_LOAD", + icon: "GET_ICON_RETRY", + className: "filepond--action-retry-item-load", + align: "BUTTON_PROCESS_ITEM_POSITION" + // right + }, + RemoveItem: { + label: "GET_LABEL_BUTTON_REMOVE_ITEM", + action: "REQUEST_REMOVE_ITEM", + icon: "GET_ICON_REMOVE", + className: "filepond--action-remove-item", + align: "BUTTON_REMOVE_ITEM_POSITION" + // left + }, + ProcessItem: { + label: "GET_LABEL_BUTTON_PROCESS_ITEM", + action: "REQUEST_ITEM_PROCESSING", + icon: "GET_ICON_PROCESS", + className: "filepond--action-process-item", + align: "BUTTON_PROCESS_ITEM_POSITION" + // right + }, + AbortItemProcessing: { + label: "GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING", + action: "ABORT_ITEM_PROCESSING", + className: "filepond--action-abort-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + // right + }, + RetryItemProcessing: { + label: "GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING", + action: "RETRY_ITEM_PROCESSING", + icon: "GET_ICON_RETRY", + className: "filepond--action-retry-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + // right + }, + RevertItemProcessing: { + label: "GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING", + action: "REQUEST_REVERT_ITEM_PROCESSING", + icon: "GET_ICON_UNDO", + className: "filepond--action-revert-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + // right + } +}, ButtonKeys = []; +forin(Buttons, (e) => { + ButtonKeys.push(e); +}); +const calculateFileInfoOffset = (e) => { + if (getRemoveIndicatorAligment(e) === "right") return 0; + const t = e.ref.buttonRemoveItem.rect.element; + return t.hidden ? null : t.width + t.left; +}, calculateButtonWidth = (e) => e.ref.buttonAbortItemLoad.rect.element.width, calculateFileVerticalCenterOffset = (e) => Math.floor(e.ref.buttonRemoveItem.rect.element.height / 4), calculateFileHorizontalCenterOffset = (e) => Math.floor(e.ref.buttonRemoveItem.rect.element.left / 2), getLoadIndicatorAlignment = (e) => e.query("GET_STYLE_LOAD_INDICATOR_POSITION"), getProcessIndicatorAlignment = (e) => e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"), getRemoveIndicatorAligment = (e) => e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"), DefaultStyle = { + buttonAbortItemLoad: { opacity: 0 }, + buttonRetryItemLoad: { opacity: 0 }, + buttonRemoveItem: { opacity: 0 }, + buttonProcessItem: { opacity: 0 }, + buttonAbortItemProcessing: { opacity: 0 }, + buttonRetryItemProcessing: { opacity: 0 }, + buttonRevertItemProcessing: { opacity: 0 }, + loadProgressIndicator: { opacity: 0, align: getLoadIndicatorAlignment }, + processProgressIndicator: { opacity: 0, align: getProcessIndicatorAlignment }, + processingCompleteIndicator: { opacity: 0, scaleX: 0.75, scaleY: 0.75 }, + info: { translateX: 0, translateY: 0, opacity: 0 }, + status: { translateX: 0, translateY: 0, opacity: 0 } +}, IdleStyle = { + buttonRemoveItem: { opacity: 1 }, + buttonProcessItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { translateX: calculateFileInfoOffset } +}, ProcessingStyle = { + buttonAbortItemProcessing: { opacity: 1 }, + processProgressIndicator: { opacity: 1 }, + status: { opacity: 1 } +}, StyleMap = { + DID_THROW_ITEM_INVALID: { + buttonRemoveItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { translateX: calculateFileInfoOffset, opacity: 1 } + }, + DID_START_ITEM_LOAD: { + buttonAbortItemLoad: { opacity: 1 }, + loadProgressIndicator: { opacity: 1 }, + status: { opacity: 1 } + }, + DID_THROW_ITEM_LOAD_ERROR: { + buttonRetryItemLoad: { opacity: 1 }, + buttonRemoveItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { opacity: 1 } + }, + DID_START_ITEM_REMOVE: { + processProgressIndicator: { opacity: 1, align: getRemoveIndicatorAligment }, + info: { translateX: calculateFileInfoOffset }, + status: { opacity: 0 } + }, + DID_THROW_ITEM_REMOVE_ERROR: { + processProgressIndicator: { opacity: 0, align: getRemoveIndicatorAligment }, + buttonRemoveItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { opacity: 1, translateX: calculateFileInfoOffset } + }, + DID_LOAD_ITEM: IdleStyle, + DID_LOAD_LOCAL_ITEM: { + buttonRemoveItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { translateX: calculateFileInfoOffset } + }, + DID_START_ITEM_PROCESSING: ProcessingStyle, + DID_REQUEST_ITEM_PROCESSING: ProcessingStyle, + DID_UPDATE_ITEM_PROCESS_PROGRESS: ProcessingStyle, + DID_COMPLETE_ITEM_PROCESSING: { + buttonRevertItemProcessing: { opacity: 1 }, + info: { opacity: 1 }, + status: { opacity: 1 } + }, + DID_THROW_ITEM_PROCESSING_ERROR: { + buttonRemoveItem: { opacity: 1 }, + buttonRetryItemProcessing: { opacity: 1 }, + status: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset } + }, + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: { + buttonRevertItemProcessing: { opacity: 1 }, + status: { opacity: 1 }, + info: { opacity: 1 } + }, + DID_ABORT_ITEM_PROCESSING: { + buttonRemoveItem: { opacity: 1 }, + buttonProcessItem: { opacity: 1 }, + info: { translateX: calculateFileInfoOffset }, + status: { opacity: 1 } + }, + DID_REVERT_ITEM_PROCESSING: IdleStyle +}, processingCompleteIndicatorView = createView({ + create: ({ root: e }) => { + e.element.innerHTML = e.query("GET_ICON_DONE"); + }, + name: "processing-complete-indicator", + ignoreRect: !0, + mixins: { + styles: ["scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + opacity: { type: "tween", duration: 250 } + } + } +}), create$4 = ({ root: e, props: t }) => { + const i = Object.keys(Buttons).reduce((m, h) => (m[h] = { ...Buttons[h] }, m), {}), { id: a } = t, n = e.query("GET_ALLOW_REVERT"), l = e.query("GET_ALLOW_REMOVE"), r = e.query("GET_ALLOW_PROCESS"), s = e.query("GET_INSTANT_UPLOAD"), o = e.query("IS_ASYNC"), d = e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN"); + let c; + o ? r && !n ? c = (m) => !/RevertItemProcessing/.test(m) : !r && n ? c = (m) => !/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(m) : !r && !n && (c = (m) => !/Process/.test(m)) : c = (m) => !/Process/.test(m); + const u = c ? ButtonKeys.filter(c) : ButtonKeys.concat(); + if (s && n && (i.RevertItemProcessing.label = "GET_LABEL_BUTTON_REMOVE_ITEM", i.RevertItemProcessing.icon = "GET_ICON_REMOVE"), o && !n) { + const m = StyleMap.DID_COMPLETE_ITEM_PROCESSING; + m.info.translateX = calculateFileHorizontalCenterOffset, m.info.translateY = calculateFileVerticalCenterOffset, m.status.translateY = calculateFileVerticalCenterOffset, m.processingCompleteIndicator = { opacity: 1, scaleX: 1, scaleY: 1 }; + } + if (o && !r && ([ + "DID_START_ITEM_PROCESSING", + "DID_REQUEST_ITEM_PROCESSING", + "DID_UPDATE_ITEM_PROCESS_PROGRESS", + "DID_THROW_ITEM_PROCESSING_ERROR" + ].forEach((m) => { + StyleMap[m].status.translateY = calculateFileVerticalCenterOffset; + }), StyleMap.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX = calculateButtonWidth), d && n) { + i.RevertItemProcessing.align = "BUTTON_REMOVE_ITEM_POSITION"; + const m = StyleMap.DID_COMPLETE_ITEM_PROCESSING; + m.info.translateX = calculateFileInfoOffset, m.status.translateY = calculateFileVerticalCenterOffset, m.processingCompleteIndicator = { opacity: 1, scaleX: 1, scaleY: 1 }; + } + l || (i.RemoveItem.disabled = !0), forin(i, (m, h) => { + const I = e.createChildView(fileActionButton, { + label: e.query(h.label), + icon: e.query(h.icon), + opacity: 0 + }); + u.includes(m) && e.appendChildView(I), h.disabled && (I.element.setAttribute("disabled", "disabled"), I.element.setAttribute("hidden", "hidden")), I.element.dataset.align = e.query(`GET_STYLE_${h.align}`), I.element.classList.add(h.className), I.on("click", (b) => { + b.stopPropagation(), !h.disabled && e.dispatch(h.action, { query: a }); + }), e.ref[`button${m}`] = I; + }), e.ref.processingCompleteIndicator = e.appendChildView( + e.createChildView(processingCompleteIndicatorView) + ), e.ref.processingCompleteIndicator.element.dataset.align = e.query( + "GET_STYLE_BUTTON_PROCESS_ITEM_POSITION" + ), e.ref.info = e.appendChildView(e.createChildView(fileInfo, { id: a })), e.ref.status = e.appendChildView(e.createChildView(fileStatus, { id: a })); + const f = e.appendChildView( + e.createChildView(progressIndicator, { + opacity: 0, + align: e.query("GET_STYLE_LOAD_INDICATOR_POSITION") + }) + ); + f.element.classList.add("filepond--load-indicator"), e.ref.loadProgressIndicator = f; + const p = e.appendChildView( + e.createChildView(progressIndicator, { + opacity: 0, + align: e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION") + }) + ); + p.element.classList.add("filepond--process-indicator"), e.ref.processProgressIndicator = p, e.ref.activeStyles = []; +}, write$2 = ({ root: e, actions: t, props: i }) => { + route({ root: e, actions: t, props: i }); + let a = t.concat().filter((n) => /^DID_/.test(n.type)).reverse().find((n) => StyleMap[n.type]); + if (a) { + e.ref.activeStyles = []; + const n = StyleMap[a.type]; + forin(DefaultStyle, (l, r) => { + const s = e.ref[l]; + forin(r, (o, d) => { + const c = n[l] && typeof n[l][o] < "u" ? n[l][o] : d; + e.ref.activeStyles.push({ control: s, key: o, value: c }); + }); + }); + } + e.ref.activeStyles.forEach(({ control: n, key: l, value: r }) => { + n[l] = typeof r == "function" ? r(e) : r; + }); +}, route = createRoute({ + DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING: ({ root: e, action: t }) => { + e.ref.buttonAbortItemProcessing.label = t.value; + }, + DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD: ({ root: e, action: t }) => { + e.ref.buttonAbortItemLoad.label = t.value; + }, + DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL: ({ root: e, action: t }) => { + e.ref.buttonAbortItemRemoval.label = t.value; + }, + DID_REQUEST_ITEM_PROCESSING: ({ root: e }) => { + e.ref.processProgressIndicator.spin = !0, e.ref.processProgressIndicator.progress = 0; + }, + DID_START_ITEM_LOAD: ({ root: e }) => { + e.ref.loadProgressIndicator.spin = !0, e.ref.loadProgressIndicator.progress = 0; + }, + DID_START_ITEM_REMOVE: ({ root: e }) => { + e.ref.processProgressIndicator.spin = !0, e.ref.processProgressIndicator.progress = 0; + }, + DID_UPDATE_ITEM_LOAD_PROGRESS: ({ root: e, action: t }) => { + e.ref.loadProgressIndicator.spin = !1, e.ref.loadProgressIndicator.progress = t.progress; + }, + DID_UPDATE_ITEM_PROCESS_PROGRESS: ({ root: e, action: t }) => { + e.ref.processProgressIndicator.spin = !1, e.ref.processProgressIndicator.progress = t.progress; + } +}), file = createView({ + create: create$4, + write: write$2, + didCreateView: (e) => { + applyFilters("CREATE_VIEW", { ...e, view: e }); + }, + name: "file" +}), create$5 = ({ root: e, props: t }) => { + e.ref.fileName = createElement$1("legend"), e.appendChild(e.ref.fileName), e.ref.file = e.appendChildView(e.createChildView(file, { id: t.id })), e.ref.data = !1; +}, didLoadItem = ({ root: e, props: t }) => { + text(e.ref.fileName, formatFilename(e.query("GET_ITEM_NAME", t.id))); +}, fileWrapper = createView({ + create: create$5, + ignoreRect: !0, + write: createRoute({ + DID_LOAD_ITEM: didLoadItem + }), + didCreateView: (e) => { + applyFilters("CREATE_VIEW", { ...e, view: e }); + }, + tag: "fieldset", + name: "file-wrapper" +}), PANEL_SPRING_PROPS = { type: "spring", damping: 0.6, mass: 7 }, create$6 = ({ root: e, props: t }) => { + [ + { + name: "top" + }, + { + name: "center", + props: { + translateY: null, + scaleY: null + }, + mixins: { + animations: { + scaleY: PANEL_SPRING_PROPS + }, + styles: ["translateY", "scaleY"] + } + }, + { + name: "bottom", + props: { + translateY: null + }, + mixins: { + animations: { + translateY: PANEL_SPRING_PROPS + }, + styles: ["translateY"] + } + } + ].forEach((i) => { + createSection(e, i, t.name); + }), e.element.classList.add(`filepond--${t.name}`), e.ref.scalable = null; +}, createSection = (e, t, i) => { + const a = createView({ + name: `panel-${t.name} filepond--${i}`, + mixins: t.mixins, + ignoreRectUpdate: !0 + }), n = e.createChildView(a, t.props); + e.ref[t.name] = e.appendChildView(n); +}, write$3 = ({ root: e, props: t }) => { + if ((e.ref.scalable === null || t.scalable !== e.ref.scalable) && (e.ref.scalable = isBoolean(t.scalable) ? t.scalable : !0, e.element.dataset.scalable = e.ref.scalable), !t.height) return; + const i = e.ref.top.rect.element, a = e.ref.bottom.rect.element, n = Math.max(i.height + a.height, t.height); + e.ref.center.translateY = i.height, e.ref.center.scaleY = (n - i.height - a.height) / 100, e.ref.bottom.translateY = n - a.height; +}, panel = createView({ + name: "panel", + read: ({ root: e, props: t }) => t.heightCurrent = e.ref.bottom.translateY, + write: write$3, + create: create$6, + ignoreRect: !0, + mixins: { + apis: ["height", "heightCurrent", "scalable"] + } +}), createDragHelper = (e) => { + const t = e.map((a) => a.id); + let i; + return { + setIndex: (a) => { + i = a; + }, + getIndex: () => i, + getItemIndex: (a) => t.indexOf(a.id) + }; +}, ITEM_TRANSLATE_SPRING = { + type: "spring", + stiffness: 0.75, + damping: 0.45, + mass: 10 +}, ITEM_SCALE_SPRING = "spring", StateMap = { + DID_START_ITEM_LOAD: "busy", + DID_UPDATE_ITEM_LOAD_PROGRESS: "loading", + DID_THROW_ITEM_INVALID: "load-invalid", + DID_THROW_ITEM_LOAD_ERROR: "load-error", + DID_LOAD_ITEM: "idle", + DID_THROW_ITEM_REMOVE_ERROR: "remove-error", + DID_START_ITEM_REMOVE: "busy", + DID_START_ITEM_PROCESSING: "busy processing", + DID_REQUEST_ITEM_PROCESSING: "busy processing", + DID_UPDATE_ITEM_PROCESS_PROGRESS: "processing", + DID_COMPLETE_ITEM_PROCESSING: "processing-complete", + DID_THROW_ITEM_PROCESSING_ERROR: "processing-error", + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: "processing-revert-error", + DID_ABORT_ITEM_PROCESSING: "cancelled", + DID_REVERT_ITEM_PROCESSING: "idle" +}, create$7 = ({ root: e, props: t }) => { + if (e.ref.handleClick = (a) => e.dispatch("DID_ACTIVATE_ITEM", { id: t.id }), e.element.id = `filepond--item-${t.id}`, e.element.addEventListener("click", e.ref.handleClick), e.ref.container = e.appendChildView(e.createChildView(fileWrapper, { id: t.id })), e.ref.panel = e.appendChildView(e.createChildView(panel, { name: "item-panel" })), e.ref.panel.height = null, t.markedForRemoval = !1, !e.query("GET_ALLOW_REORDER")) return; + e.element.dataset.dragState = "idle"; + const i = (a) => { + if (!a.isPrimary) return; + let n = !1; + const l = { + x: a.pageX, + y: a.pageY + }; + t.dragOrigin = { + x: e.translateX, + y: e.translateY + }, t.dragCenter = { + x: a.offsetX, + y: a.offsetY + }; + const r = createDragHelper(e.query("GET_ACTIVE_ITEMS")); + e.dispatch("DID_GRAB_ITEM", { id: t.id, dragState: r }); + const s = (u) => { + if (!u.isPrimary) return; + u.stopPropagation(), u.preventDefault(), t.dragOffset = { + x: u.pageX - l.x, + y: u.pageY - l.y + }, t.dragOffset.x * t.dragOffset.x + t.dragOffset.y * t.dragOffset.y > 16 && !n && (n = !0, e.element.removeEventListener("click", e.ref.handleClick)), e.dispatch("DID_DRAG_ITEM", { id: t.id, dragState: r }); + }, o = (u) => { + u.isPrimary && (t.dragOffset = { + x: u.pageX - l.x, + y: u.pageY - l.y + }, c()); + }, d = () => { + c(); + }, c = () => { + document.removeEventListener("pointercancel", d), document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", o), e.dispatch("DID_DROP_ITEM", { id: t.id, dragState: r }), n && setTimeout(() => e.element.addEventListener("click", e.ref.handleClick), 0); + }; + document.addEventListener("pointercancel", d), document.addEventListener("pointermove", s), document.addEventListener("pointerup", o); + }; + e.element.addEventListener("pointerdown", i); +}, route$1 = createRoute({ + DID_UPDATE_PANEL_HEIGHT: ({ root: e, action: t }) => { + e.height = t.height; + } +}), write$4 = createRoute( + { + DID_GRAB_ITEM: ({ root: e, props: t }) => { + t.dragOrigin = { + x: e.translateX, + y: e.translateY + }; + }, + DID_DRAG_ITEM: ({ root: e }) => { + e.element.dataset.dragState = "drag"; + }, + DID_DROP_ITEM: ({ root: e, props: t }) => { + t.dragOffset = null, t.dragOrigin = null, e.element.dataset.dragState = "drop"; + } + }, + ({ root: e, actions: t, props: i, shouldOptimize: a }) => { + e.element.dataset.dragState === "drop" && e.scaleX <= 1 && (e.element.dataset.dragState = "idle"); + let n = t.concat().filter((r) => /^DID_/.test(r.type)).reverse().find((r) => StateMap[r.type]); + n && n.type !== i.currentState && (i.currentState = n.type, e.element.dataset.filepondItemState = StateMap[i.currentState] || ""); + const l = e.query("GET_ITEM_PANEL_ASPECT_RATIO") || e.query("GET_PANEL_ASPECT_RATIO"); + l ? a || (e.height = e.rect.element.width * l) : (route$1({ root: e, actions: t, props: i }), !e.height && e.ref.container.rect.element.height > 0 && (e.height = e.ref.container.rect.element.height)), a && (e.ref.panel.height = null), e.ref.panel.height = e.height; + } +), item = createView({ + create: create$7, + write: write$4, + destroy: ({ root: e, props: t }) => { + e.element.removeEventListener("click", e.ref.handleClick), e.dispatch("RELEASE_ITEM", { query: t.id }); + }, + tag: "li", + name: "item", + mixins: { + apis: [ + "id", + "interactionMethod", + "markedForRemoval", + "spawnDate", + "dragCenter", + "dragOrigin", + "dragOffset" + ], + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity", "height"], + animations: { + scaleX: ITEM_SCALE_SPRING, + scaleY: ITEM_SCALE_SPRING, + translateX: ITEM_TRANSLATE_SPRING, + translateY: ITEM_TRANSLATE_SPRING, + opacity: { type: "tween", duration: 150 } + } + } +}); +var getItemsPerRow = (e, t) => Math.max(1, Math.floor((e + 1) / t)); +const getItemIndexByPosition = (e, t, i) => { + if (!i) return; + const a = e.rect.element.width, n = t.length; + let l = null; + if (n === 0 || i.top < t[0].rect.element.top) return -1; + const s = t[0].rect.element, o = s.marginLeft + s.marginRight, d = s.width + o, c = getItemsPerRow(a, d); + if (c === 1) { + for (let p = 0; p < n; p++) { + const m = t[p], h = m.rect.outer.top + m.rect.element.height * 0.5; + if (i.top < h) + return p; + } + return n; + } + const u = s.marginTop + s.marginBottom, f = s.height + u; + for (let p = 0; p < n; p++) { + const m = p % c, h = Math.floor(p / c), I = m * d, b = h * f, g = b - s.marginTop, E = I + d, T = b + f + s.marginBottom; + if (i.top < T && i.top > g) { + if (i.left < E) + return p; + p !== n - 1 ? l = p : l = null; + } + } + return l !== null ? l : n; +}, dropAreaDimensions = { + height: 0, + width: 0, + get getHeight() { + return this.height; + }, + set setHeight(e) { + (this.height === 0 || e === 0) && (this.height = e); + }, + get getWidth() { + return this.width; + }, + set setWidth(e) { + (this.width === 0 || e === 0) && (this.width = e); + } +}, create$8 = ({ root: e }) => { + attr(e.element, "role", "list"), e.ref.lastItemSpanwDate = Date.now(); +}, addItemView = ({ root: e, action: t }) => { + const { id: i, index: a, interactionMethod: n } = t; + e.ref.addIndex = a; + const l = Date.now(); + let r = l, s = 1; + if (n !== InteractionMethod.NONE) { + s = 0; + const o = e.query("GET_ITEM_INSERT_INTERVAL"), d = l - e.ref.lastItemSpanwDate; + r = d < o ? l + (o - d) : l; + } + e.ref.lastItemSpanwDate = r, e.appendChildView( + e.createChildView( + // view type + item, + // props + { + spawnDate: r, + id: i, + opacity: s, + interactionMethod: n + } + ), + a + ); +}, moveItem = (e, t, i, a = 0, n = 1) => { + e.dragOffset ? (e.translateX = null, e.translateY = null, e.translateX = e.dragOrigin.x + e.dragOffset.x, e.translateY = e.dragOrigin.y + e.dragOffset.y, e.scaleX = 1.025, e.scaleY = 1.025) : (e.translateX = t, e.translateY = i, Date.now() > e.spawnDate && (e.opacity === 0 && introItemView(e, t, i, a, n), e.scaleX = 1, e.scaleY = 1, e.opacity = 1)); +}, introItemView = (e, t, i, a, n) => { + e.interactionMethod === InteractionMethod.NONE ? (e.translateX = null, e.translateX = t, e.translateY = null, e.translateY = i) : e.interactionMethod === InteractionMethod.DROP ? (e.translateX = null, e.translateX = t - a * 20, e.translateY = null, e.translateY = i - n * 10, e.scaleX = 0.8, e.scaleY = 0.8) : e.interactionMethod === InteractionMethod.BROWSE ? (e.translateY = null, e.translateY = i - 30) : e.interactionMethod === InteractionMethod.API && (e.translateX = null, e.translateX = t - 30, e.translateY = null); +}, removeItemView = ({ root: e, action: t }) => { + const { id: i } = t, a = e.childViews.find((n) => n.id === i); + a && (a.scaleX = 0.9, a.scaleY = 0.9, a.opacity = 0, a.markedForRemoval = !0); +}, getItemHeight = (e) => e.rect.element.height + e.rect.element.marginBottom * 0.5 + e.rect.element.marginTop * 0.5, getItemWidth = (e) => e.rect.element.width + e.rect.element.marginLeft * 0.5 + e.rect.element.marginRight * 0.5, dragItem = ({ root: e, action: t }) => { + const { id: i, dragState: a } = t, n = e.query("GET_ITEM", { id: i }), l = e.childViews.find((I) => I.id === i), r = e.childViews.length, s = a.getItemIndex(n); + if (!l) return; + const o = { + x: l.dragOrigin.x + l.dragOffset.x + l.dragCenter.x, + y: l.dragOrigin.y + l.dragOffset.y + l.dragCenter.y + }, d = getItemHeight(l), c = getItemWidth(l); + let u = Math.floor(e.rect.outer.width / c); + u > r && (u = r); + const f = Math.floor(r / u + 1); + dropAreaDimensions.setHeight = d * f, dropAreaDimensions.setWidth = c * u; + var p = { + y: Math.floor(o.y / d), + x: Math.floor(o.x / c), + getGridIndex: function() { + return o.y > dropAreaDimensions.getHeight || o.y < 0 || o.x > dropAreaDimensions.getWidth || o.x < 0 ? s : this.y * u + this.x; + }, + getColIndex: function() { + const b = e.query("GET_ACTIVE_ITEMS"), g = e.childViews.filter((P) => P.rect.element.height), E = b.map( + (P) => g.find((O) => O.id === P.id) + ), T = E.findIndex((P) => P === l), S = getItemHeight(l), L = E.length; + let M = L, y = 0, x = 0, v = 0; + for (let P = 0; P < L; P++) + if (y = getItemHeight(E[P]), v = x, x = v + y, o.y < x) { + if (T > P) { + if (o.y < v + S) { + M = P; + break; + } + continue; + } + M = P; + break; + } + return M; + } + }; + const m = u > 1 ? p.getGridIndex() : p.getColIndex(); + e.dispatch("MOVE_ITEM", { query: l, index: m }); + const h = a.getIndex(); + if (h === void 0 || h !== m) { + if (a.setIndex(m), h === void 0) return; + e.dispatch("DID_REORDER_ITEMS", { + items: e.query("GET_ACTIVE_ITEMS"), + origin: s, + target: m + }); + } +}, route$2 = createRoute({ + DID_ADD_ITEM: addItemView, + DID_REMOVE_ITEM: removeItemView, + DID_DRAG_ITEM: dragItem +}), write$5 = ({ root: e, props: t, actions: i, shouldOptimize: a }) => { + route$2({ root: e, props: t, actions: i }); + const { dragCoordinates: n } = t, l = e.rect.element.width, r = e.childViews.filter((E) => E.rect.element.height), s = e.query("GET_ACTIVE_ITEMS").map((E) => r.find((T) => T.id === E.id)).filter((E) => E), o = n ? getItemIndexByPosition(e, s, n) : null, d = e.ref.addIndex || null; + e.ref.addIndex = null; + let c = 0, u = 0, f = 0; + if (s.length === 0) return; + const p = s[0].rect.element, m = p.marginTop + p.marginBottom, h = p.marginLeft + p.marginRight, I = p.width + h, b = p.height + m, g = getItemsPerRow(l, I); + if (g === 1) { + let E = 0, T = 0; + s.forEach((S, L) => { + if (o) { + let x = L - o; + x === -2 ? T = -m * 0.25 : x === -1 ? T = -m * 0.75 : x === 0 ? T = m * 0.75 : x === 1 ? T = m * 0.25 : T = 0; + } + a && (S.translateX = null, S.translateY = null), S.markedForRemoval || moveItem(S, 0, E + T); + let y = (S.rect.element.height + m) * (S.markedForRemoval ? S.opacity : 1); + E += y; + }); + } else { + let E = 0, T = 0; + s.forEach((S, L) => { + L === o && (c = 1), L === d && (f += 1), S.markedForRemoval && S.opacity < 0.5 && (u -= 1); + const M = L + f + c + u, y = M % g, x = Math.floor(M / g), v = y * I, P = x * b, O = Math.sign(v - E), B = Math.sign(P - T); + E = v, T = P, !S.markedForRemoval && (a && (S.translateX = null, S.translateY = null), moveItem(S, v, P, O, B)); + }); + } +}, filterSetItemActions = (e, t) => t.filter((i) => i.data && i.data.id ? e.id === i.data.id : !0), list = createView({ + create: create$8, + write: write$5, + tag: "ul", + name: "list", + didWriteView: ({ root: e }) => { + e.childViews.filter((t) => t.markedForRemoval && t.opacity === 0 && t.resting).forEach((t) => { + t._destroy(), e.removeChildView(t); + }); + }, + filterFrameActionsForChild: filterSetItemActions, + mixins: { + apis: ["dragCoordinates"] + } +}), create$9 = ({ root: e, props: t }) => { + e.ref.list = e.appendChildView(e.createChildView(list)), t.dragCoordinates = null, t.overflowing = !1; +}, storeDragCoordinates = ({ root: e, props: t, action: i }) => { + e.query("GET_ITEM_INSERT_LOCATION_FREEDOM") && (t.dragCoordinates = { + left: i.position.scopeLeft - e.ref.list.rect.element.left, + top: i.position.scopeTop - (e.rect.outer.top + e.rect.element.marginTop + e.rect.element.scrollTop) + }); +}, clearDragCoordinates = ({ props: e }) => { + e.dragCoordinates = null; +}, route$3 = createRoute({ + DID_DRAG: storeDragCoordinates, + DID_END_DRAG: clearDragCoordinates +}), write$6 = ({ root: e, props: t, actions: i }) => { + if (route$3({ root: e, props: t, actions: i }), e.ref.list.dragCoordinates = t.dragCoordinates, t.overflowing && !t.overflow && (t.overflowing = !1, e.element.dataset.state = "", e.height = null), t.overflow) { + const a = Math.round(t.overflow); + a !== e.height && (t.overflowing = !0, e.element.dataset.state = "overflow", e.height = a); + } +}, listScroller = createView({ + create: create$9, + write: write$6, + name: "list-scroller", + mixins: { + apis: ["overflow", "dragCoordinates"], + styles: ["height", "translateY"], + animations: { + translateY: "spring" + } + } +}), attrToggle = (e, t, i, a = "") => { + i ? attr(e, t, a) : e.removeAttribute(t); +}, resetFileInput = (e) => { + if (!(!e || e.value === "")) { + try { + e.value = ""; + } catch { + } + if (e.value) { + const t = createElement$1("form"), i = e.parentNode, a = e.nextSibling; + t.appendChild(e), t.reset(), a ? i.insertBefore(e, a) : i.appendChild(e); + } + } +}, create$a = ({ root: e, props: t }) => { + e.element.id = `filepond--browser-${t.id}`, attr(e.element, "name", e.query("GET_NAME")), attr(e.element, "aria-controls", `filepond--assistant-${t.id}`), attr(e.element, "aria-labelledby", `filepond--drop-label-${t.id}`), setAcceptedFileTypes({ root: e, action: { value: e.query("GET_ACCEPTED_FILE_TYPES") } }), toggleAllowMultiple({ root: e, action: { value: e.query("GET_ALLOW_MULTIPLE") } }), toggleDirectoryFilter({ root: e, action: { value: e.query("GET_ALLOW_DIRECTORIES_ONLY") } }), toggleDisabled({ root: e }), toggleRequired({ root: e, action: { value: e.query("GET_REQUIRED") } }), setCaptureMethod({ root: e, action: { value: e.query("GET_CAPTURE_METHOD") } }), e.ref.handleChange = (i) => { + if (!e.element.value) + return; + const a = Array.from(e.element.files).map((n) => (n._relativePath = n.webkitRelativePath, n)); + setTimeout(() => { + t.onload(a), resetFileInput(e.element); + }, 250); + }, e.element.addEventListener("change", e.ref.handleChange); +}, setAcceptedFileTypes = ({ root: e, action: t }) => { + e.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE") && attrToggle(e.element, "accept", !!t.value, t.value ? t.value.join(",") : ""); +}, toggleAllowMultiple = ({ root: e, action: t }) => { + attrToggle(e.element, "multiple", t.value); +}, toggleDirectoryFilter = ({ root: e, action: t }) => { + attrToggle(e.element, "webkitdirectory", t.value); +}, toggleDisabled = ({ root: e }) => { + const t = e.query("GET_DISABLED"), i = e.query("GET_ALLOW_BROWSE"), a = t || !i; + attrToggle(e.element, "disabled", a); +}, toggleRequired = ({ root: e, action: t }) => { + t.value ? e.query("GET_TOTAL_ITEMS") === 0 && attrToggle(e.element, "required", !0) : attrToggle(e.element, "required", !1); +}, setCaptureMethod = ({ root: e, action: t }) => { + attrToggle(e.element, "capture", !!t.value, t.value === !0 ? "" : t.value); +}, updateRequiredStatus = ({ root: e }) => { + const { element: t } = e; + e.query("GET_TOTAL_ITEMS") > 0 ? (attrToggle(t, "required", !1), attrToggle(t, "name", !1)) : (attrToggle(t, "name", !0, e.query("GET_NAME")), e.query("GET_CHECK_VALIDITY") && t.setCustomValidity(""), e.query("GET_REQUIRED") && attrToggle(t, "required", !0)); +}, updateFieldValidityStatus = ({ root: e }) => { + e.query("GET_CHECK_VALIDITY") && e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD")); +}, browser = createView({ + tag: "input", + name: "browser", + ignoreRect: !0, + ignoreRectUpdate: !0, + attributes: { + type: "file" + }, + create: create$a, + destroy: ({ root: e }) => { + e.element.removeEventListener("change", e.ref.handleChange); + }, + write: createRoute({ + DID_LOAD_ITEM: updateRequiredStatus, + DID_REMOVE_ITEM: updateRequiredStatus, + DID_THROW_ITEM_INVALID: updateFieldValidityStatus, + DID_SET_DISABLED: toggleDisabled, + DID_SET_ALLOW_BROWSE: toggleDisabled, + DID_SET_ALLOW_DIRECTORIES_ONLY: toggleDirectoryFilter, + DID_SET_ALLOW_MULTIPLE: toggleAllowMultiple, + DID_SET_ACCEPTED_FILE_TYPES: setAcceptedFileTypes, + DID_SET_CAPTURE_METHOD: setCaptureMethod, + DID_SET_REQUIRED: toggleRequired + }) +}), Key = { + ENTER: 13, + SPACE: 32 +}, create$b = ({ root: e, props: t }) => { + const i = createElement$1("label"); + attr(i, "for", `filepond--browser-${t.id}`), attr(i, "id", `filepond--drop-label-${t.id}`), attr(i, "aria-hidden", "true"), e.ref.handleKeyDown = (a) => { + (a.keyCode === Key.ENTER || a.keyCode === Key.SPACE) && (a.preventDefault(), e.ref.label.click()); + }, e.ref.handleClick = (a) => { + a.target === i || i.contains(a.target) || e.ref.label.click(); + }, i.addEventListener("keydown", e.ref.handleKeyDown), e.element.addEventListener("click", e.ref.handleClick), updateLabelValue(i, t.caption), e.appendChild(i), e.ref.label = i; +}, updateLabelValue = (e, t) => { + e.innerHTML = t; + const i = e.querySelector(".filepond--label-action"); + return i && attr(i, "tabindex", "0"), t; +}, dropLabel = createView({ + name: "drop-label", + ignoreRect: !0, + create: create$b, + destroy: ({ root: e }) => { + e.ref.label.addEventListener("keydown", e.ref.handleKeyDown), e.element.removeEventListener("click", e.ref.handleClick); + }, + write: createRoute({ + DID_SET_LABEL_IDLE: ({ root: e, action: t }) => { + updateLabelValue(e.ref.label, t.value); + } + }), + mixins: { + styles: ["opacity", "translateX", "translateY"], + animations: { + opacity: { type: "tween", duration: 150 }, + translateX: "spring", + translateY: "spring" + } + } +}), blob = createView({ + name: "drip-blob", + ignoreRect: !0, + mixins: { + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + translateX: "spring", + translateY: "spring", + opacity: { type: "tween", duration: 250 } + } + } +}), addBlob = ({ root: e }) => { + const t = e.rect.element.width * 0.5, i = e.rect.element.height * 0.5; + e.ref.blob = e.appendChildView( + e.createChildView(blob, { + opacity: 0, + scaleX: 2.5, + scaleY: 2.5, + translateX: t, + translateY: i + }) + ); +}, moveBlob = ({ root: e, action: t }) => { + if (!e.ref.blob) { + addBlob({ root: e }); + return; + } + e.ref.blob.translateX = t.position.scopeLeft, e.ref.blob.translateY = t.position.scopeTop, e.ref.blob.scaleX = 1, e.ref.blob.scaleY = 1, e.ref.blob.opacity = 1; +}, hideBlob = ({ root: e }) => { + e.ref.blob && (e.ref.blob.opacity = 0); +}, explodeBlob = ({ root: e }) => { + e.ref.blob && (e.ref.blob.scaleX = 2.5, e.ref.blob.scaleY = 2.5, e.ref.blob.opacity = 0); +}, write$7 = ({ root: e, props: t, actions: i }) => { + route$4({ root: e, props: t, actions: i }); + const { blob: a } = e.ref; + i.length === 0 && a && a.opacity === 0 && (e.removeChildView(a), e.ref.blob = null); +}, route$4 = createRoute({ + DID_DRAG: moveBlob, + DID_DROP: explodeBlob, + DID_END_DRAG: hideBlob +}), drip = createView({ + ignoreRect: !0, + ignoreRectUpdate: !0, + name: "drip", + write: write$7 +}), setInputFiles = (e, t) => { + try { + const i = new DataTransfer(); + t.forEach((a) => { + a instanceof File ? i.items.add(a) : i.items.add( + new File([a], a.name, { + type: a.type + }) + ); + }), e.files = i.files; + } catch { + return !1; + } + return !0; +}, create$c = ({ root: e }) => e.ref.fields = {}, getField = (e, t) => e.ref.fields[t], syncFieldPositionsWithItems = (e) => { + e.query("GET_ACTIVE_ITEMS").forEach((t) => { + e.ref.fields[t.id] && e.element.appendChild(e.ref.fields[t.id]); + }); +}, didReorderItems = ({ root: e }) => syncFieldPositionsWithItems(e), didAddItem = ({ root: e, action: t }) => { + const n = !(e.query("GET_ITEM", t.id).origin === FileOrigin.LOCAL) && e.query("SHOULD_UPDATE_FILE_INPUT"), l = createElement$1("input"); + l.type = n ? "file" : "hidden", l.name = e.query("GET_NAME"), l.disabled = e.query("GET_DISABLED"), e.ref.fields[t.id] = l, syncFieldPositionsWithItems(e); +}, didLoadItem$1 = ({ root: e, action: t }) => { + const i = getField(e, t.id); + if (!i || (t.serverFileReference !== null && (i.value = t.serverFileReference), !e.query("SHOULD_UPDATE_FILE_INPUT"))) return; + const a = e.query("GET_ITEM", t.id); + setInputFiles(i, [a.file]); +}, didPrepareOutput = ({ root: e, action: t }) => { + e.query("SHOULD_UPDATE_FILE_INPUT") && setTimeout(() => { + const i = getField(e, t.id); + i && setInputFiles(i, [t.file]); + }, 0); +}, didSetDisabled = ({ root: e }) => { + e.element.disabled = e.query("GET_DISABLED"); +}, didRemoveItem = ({ root: e, action: t }) => { + const i = getField(e, t.id); + i && (i.parentNode && i.parentNode.removeChild(i), delete e.ref.fields[t.id]); +}, didDefineValue = ({ root: e, action: t }) => { + const i = getField(e, t.id); + i && (t.value === null ? i.removeAttribute("value") : i.type != "file" && (i.value = t.value), syncFieldPositionsWithItems(e)); +}, write$8 = createRoute({ + DID_SET_DISABLED: didSetDisabled, + DID_ADD_ITEM: didAddItem, + DID_LOAD_ITEM: didLoadItem$1, + DID_REMOVE_ITEM: didRemoveItem, + DID_DEFINE_VALUE: didDefineValue, + DID_PREPARE_OUTPUT: didPrepareOutput, + DID_REORDER_ITEMS: didReorderItems, + DID_SORT_ITEMS: didReorderItems +}), data$1 = createView({ + tag: "fieldset", + name: "data", + create: create$c, + write: write$8, + ignoreRect: !0 +}), getRootNode = (e) => "getRootNode" in e ? e.getRootNode() : document, images = ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg", "tiff"], text$1 = ["css", "csv", "html", "txt"], map$1 = { + zip: "zip|compressed", + epub: "application/epub+zip" +}, guesstimateMimeType = (e = "") => (e = e.toLowerCase(), images.includes(e) ? "image/" + (e === "jpg" ? "jpeg" : e === "svg" ? "svg+xml" : e) : text$1.includes(e) ? "text/" + e : map$1[e] || ""), requestDataTransferItems = (e) => new Promise((t, i) => { + const a = getLinks(e); + if (a.length && !hasFiles(e)) + return t(a); + getFiles(e).then(t); +}), hasFiles = (e) => e.files ? e.files.length > 0 : !1, getFiles = (e) => new Promise((t, i) => { + const a = (e.items ? Array.from(e.items) : []).filter((n) => isFileSystemItem(n)).map((n) => getFilesFromItem(n)); + if (!a.length) { + t(e.files ? Array.from(e.files) : []); + return; + } + Promise.all(a).then((n) => { + const l = []; + n.forEach((r) => { + l.push.apply(l, r); + }), t( + l.filter((r) => r).map((r) => (r._relativePath || (r._relativePath = r.webkitRelativePath), r)) + ); + }).catch(console.error); +}), isFileSystemItem = (e) => { + if (isEntry(e)) { + const t = getAsEntry(e); + if (t) + return t.isFile || t.isDirectory; + } + return e.kind === "file"; +}, getFilesFromItem = (e) => new Promise((t, i) => { + if (isDirectoryEntry(e)) { + getFilesInDirectory(getAsEntry(e)).then(t).catch(i); + return; + } + t([e.getAsFile()]); +}), getFilesInDirectory = (e) => new Promise((t, i) => { + const a = []; + let n = 0, l = 0; + const r = () => { + l === 0 && n === 0 && t(a); + }, s = (o) => { + n++; + const d = o.createReader(), c = () => { + d.readEntries((u) => { + if (u.length === 0) { + n--, r(); + return; + } + u.forEach((f) => { + f.isDirectory ? s(f) : (l++, f.file((p) => { + const m = correctMissingFileType(p); + f.fullPath && (m._relativePath = f.fullPath), a.push(m), l--, r(); + })); + }), c(); + }, i); + }; + c(); + }; + s(e); +}), correctMissingFileType = (e) => { + if (e.type.length) return e; + const t = e.lastModifiedDate, i = e.name, a = guesstimateMimeType(getExtensionFromFilename(e.name)); + return a.length && (e = e.slice(0, e.size, a), e.name = i, e.lastModifiedDate = t), e; +}, isDirectoryEntry = (e) => isEntry(e) && (getAsEntry(e) || {}).isDirectory, isEntry = (e) => "webkitGetAsEntry" in e, getAsEntry = (e) => e.webkitGetAsEntry(), getLinks = (e) => { + let t = []; + try { + if (t = getLinksFromTransferMetaData(e), t.length) + return t; + t = getLinksFromTransferURLData(e); + } catch { + } + return t; +}, getLinksFromTransferURLData = (e) => { + let t = e.getData("url"); + return typeof t == "string" && t.length ? [t] : []; +}, getLinksFromTransferMetaData = (e) => { + let t = e.getData("text/html"); + if (typeof t == "string" && t.length) { + const i = t.match(/src\s*=\s*"(.+?)"/); + if (i) + return [i[1]]; + } + return []; +}, dragNDropObservers = [], eventPosition = (e) => ({ + pageLeft: e.pageX, + pageTop: e.pageY, + scopeLeft: e.offsetX || e.layerX, + scopeTop: e.offsetY || e.layerY +}), createDragNDropClient = (e, t, i) => { + const a = getDragNDropObserver(t), n = { + element: e, + filterElement: i, + state: null, + ondrop: () => { + }, + onenter: () => { + }, + ondrag: () => { + }, + onexit: () => { + }, + onload: () => { + }, + allowdrop: () => { + } + }; + return n.destroy = a.addListener(n), n; +}, getDragNDropObserver = (e) => { + const t = dragNDropObservers.find((a) => a.element === e); + if (t) + return t; + const i = createDragNDropObserver(e); + return dragNDropObservers.push(i), i; +}, createDragNDropObserver = (e) => { + const t = [], i = { + dragenter, + dragover, + dragleave, + drop + }, a = {}; + forin(i, (l, r) => { + a[l] = r(e, t), e.addEventListener(l, a[l], !1); + }); + const n = { + element: e, + addListener: (l) => (t.push(l), () => { + t.splice(t.indexOf(l), 1), t.length === 0 && (dragNDropObservers.splice(dragNDropObservers.indexOf(n), 1), forin(i, (r) => { + e.removeEventListener(r, a[r], !1); + })); + }) + }; + return n; +}, elementFromPoint = (e, t) => ("elementFromPoint" in e || (e = document), e.elementFromPoint(t.x, t.y)), isEventTarget = (e, t) => { + const i = getRootNode(t), a = elementFromPoint(i, { + x: e.pageX - window.pageXOffset, + y: e.pageY - window.pageYOffset + }); + return a === t || t.contains(a); +}; +let initialTarget = null; +const setDropEffect = (e, t) => { + try { + e.dropEffect = t; + } catch { + } +}, dragenter = (e, t) => (i) => { + i.preventDefault(), initialTarget = i.target, t.forEach((a) => { + const { element: n, onenter: l } = a; + isEventTarget(i, n) && (a.state = "enter", l(eventPosition(i))); + }); +}, dragover = (e, t) => (i) => { + i.preventDefault(); + const a = i.dataTransfer; + requestDataTransferItems(a).then((n) => { + let l = !1; + t.some((r) => { + const { filterElement: s, element: o, onenter: d, onexit: c, ondrag: u, allowdrop: f } = r; + setDropEffect(a, "copy"); + const p = f(n); + if (!p) { + setDropEffect(a, "none"); + return; + } + if (isEventTarget(i, o)) { + if (l = !0, r.state === null) { + r.state = "enter", d(eventPosition(i)); + return; + } + if (r.state = "over", s && !p) { + setDropEffect(a, "none"); + return; + } + u(eventPosition(i)); + } else + s && !l && setDropEffect(a, "none"), r.state && (r.state = null, c(eventPosition(i))); + }); + }); +}, drop = (e, t) => (i) => { + i.preventDefault(); + const a = i.dataTransfer; + requestDataTransferItems(a).then((n) => { + t.forEach((l) => { + const { filterElement: r, element: s, ondrop: o, onexit: d, allowdrop: c } = l; + if (l.state = null, !(r && !isEventTarget(i, s))) { + if (!c(n)) return d(eventPosition(i)); + o(eventPosition(i), n); + } + }); + }); +}, dragleave = (e, t) => (i) => { + initialTarget === i.target && t.forEach((a) => { + const { onexit: n } = a; + a.state = null, n(eventPosition(i)); + }); +}, createHopper = (e, t, i) => { + e.classList.add("filepond--hopper"); + const { catchesDropsOnPage: a, requiresDropOnElement: n, filterItems: l = (c) => c } = i, r = createDragNDropClient( + e, + a ? document.documentElement : e, + n + ); + let s = "", o = ""; + r.allowdrop = (c) => t(l(c)), r.ondrop = (c, u) => { + const f = l(u); + if (!t(f)) { + d.ondragend(c); + return; + } + o = "drag-drop", d.onload(f, c); + }, r.ondrag = (c) => { + d.ondrag(c); + }, r.onenter = (c) => { + o = "drag-over", d.ondragstart(c); + }, r.onexit = (c) => { + o = "drag-exit", d.ondragend(c); + }; + const d = { + updateHopperState: () => { + s !== o && (e.dataset.hopperState = o, s = o); + }, + onload: () => { + }, + ondragstart: () => { + }, + ondrag: () => { + }, + ondragend: () => { + }, + destroy: () => { + r.destroy(); + } + }; + return d; +}; +let listening = !1; +const listeners$1 = [], handlePaste = (e) => { + const t = document.activeElement; + if (t && /textarea|input/i.test(t.nodeName)) { + let i = !1, a = t; + for (; a !== document.body; ) { + if (a.classList.contains("filepond--root")) { + i = !0; + break; + } + a = a.parentNode; + } + if (!i) return; + } + requestDataTransferItems(e.clipboardData).then((i) => { + i.length && listeners$1.forEach((a) => a(i)); + }); +}, listen = (e) => { + listeners$1.includes(e) || (listeners$1.push(e), !listening && (listening = !0, document.addEventListener("paste", handlePaste))); +}, unlisten = (e) => { + arrayRemove(listeners$1, listeners$1.indexOf(e)), listeners$1.length === 0 && (document.removeEventListener("paste", handlePaste), listening = !1); +}, createPaster = () => { + const e = (i) => { + t.onload(i); + }, t = { + destroy: () => { + unlisten(e); + }, + onload: () => { + } + }; + return listen(e), t; +}, create$d = ({ root: e, props: t }) => { + e.element.id = `filepond--assistant-${t.id}`, attr(e.element, "role", "status"), attr(e.element, "aria-live", "polite"), attr(e.element, "aria-relevant", "additions"); +}; +let addFilesNotificationTimeout = null, notificationClearTimeout = null; +const filenames = [], assist = (e, t) => { + e.element.textContent = t; +}, clear$1 = (e) => { + e.element.textContent = ""; +}, listModified = (e, t, i) => { + const a = e.query("GET_TOTAL_ITEMS"); + assist( + e, + `${i} ${t}, ${a} ${a === 1 ? e.query("GET_LABEL_FILE_COUNT_SINGULAR") : e.query("GET_LABEL_FILE_COUNT_PLURAL")}` + ), clearTimeout(notificationClearTimeout), notificationClearTimeout = setTimeout(() => { + clear$1(e); + }, 1500); +}, isUsingFilePond = (e) => e.element.parentNode.contains(document.activeElement), itemAdded = ({ root: e, action: t }) => { + if (!isUsingFilePond(e)) + return; + e.element.textContent = ""; + const i = e.query("GET_ITEM", t.id); + filenames.push(i.filename), clearTimeout(addFilesNotificationTimeout), addFilesNotificationTimeout = setTimeout(() => { + listModified(e, filenames.join(", "), e.query("GET_LABEL_FILE_ADDED")), filenames.length = 0; + }, 750); +}, itemRemoved = ({ root: e, action: t }) => { + if (!isUsingFilePond(e)) + return; + const i = t.item; + listModified(e, i.filename, e.query("GET_LABEL_FILE_REMOVED")); +}, itemProcessed = ({ root: e, action: t }) => { + const a = e.query("GET_ITEM", t.id).filename, n = e.query("GET_LABEL_FILE_PROCESSING_COMPLETE"); + assist(e, `${a} ${n}`); +}, itemProcessedUndo = ({ root: e, action: t }) => { + const a = e.query("GET_ITEM", t.id).filename, n = e.query("GET_LABEL_FILE_PROCESSING_ABORTED"); + assist(e, `${a} ${n}`); +}, itemError = ({ root: e, action: t }) => { + const a = e.query("GET_ITEM", t.id).filename; + assist(e, `${t.status.main} ${a} ${t.status.sub}`); +}, assistant = createView({ + create: create$d, + ignoreRect: !0, + ignoreRectUpdate: !0, + write: createRoute({ + DID_LOAD_ITEM: itemAdded, + DID_REMOVE_ITEM: itemRemoved, + DID_COMPLETE_ITEM_PROCESSING: itemProcessed, + DID_ABORT_ITEM_PROCESSING: itemProcessedUndo, + DID_REVERT_ITEM_PROCESSING: itemProcessedUndo, + DID_THROW_ITEM_REMOVE_ERROR: itemError, + DID_THROW_ITEM_LOAD_ERROR: itemError, + DID_THROW_ITEM_INVALID: itemError, + DID_THROW_ITEM_PROCESSING_ERROR: itemError + }), + tag: "span", + name: "assistant" +}), toCamels = (e, t = "-") => e.replace(new RegExp(`${t}.`, "g"), (i) => i.charAt(1).toUpperCase()), debounce = (e, t = 16, i = !0) => { + let a = Date.now(), n = null; + return (...l) => { + clearTimeout(n); + const r = Date.now() - a, s = () => { + a = Date.now(), e(...l); + }; + r < t ? i || (n = setTimeout(s, t - r)) : s(); + }; +}, MAX_FILES_LIMIT = 1e6, prevent = (e) => e.preventDefault(), create$e = ({ root: e, props: t }) => { + const i = e.query("GET_ID"); + i && (e.element.id = i); + const a = e.query("GET_CLASS_NAME"); + a && a.split(" ").filter((o) => o.length).forEach((o) => { + e.element.classList.add(o); + }), e.ref.label = e.appendChildView( + e.createChildView(dropLabel, { + ...t, + translateY: null, + caption: e.query("GET_LABEL_IDLE") + }) + ), e.ref.list = e.appendChildView(e.createChildView(listScroller, { translateY: null })), e.ref.panel = e.appendChildView(e.createChildView(panel, { name: "panel-root" })), e.ref.assistant = e.appendChildView(e.createChildView(assistant, { ...t })), e.ref.data = e.appendChildView(e.createChildView(data$1, { ...t })), e.ref.measure = createElement$1("div"), e.ref.measure.style.height = "100%", e.element.appendChild(e.ref.measure), e.ref.bounds = null, e.query("GET_STYLES").filter((o) => !isEmpty$1(o.value)).map(({ name: o, value: d }) => { + e.element.dataset[o] = d; + }), e.ref.widthPrevious = null, e.ref.widthUpdated = debounce(() => { + e.ref.updateHistory = [], e.dispatch("DID_RESIZE_ROOT"); + }, 250), e.ref.previousAspectRatio = null, e.ref.updateHistory = []; + const n = window.matchMedia("(pointer: fine) and (hover: hover)").matches, l = "PointerEvent" in window; + e.query("GET_ALLOW_REORDER") && l && !n && (e.element.addEventListener("touchmove", prevent, { passive: !1 }), e.element.addEventListener("gesturestart", prevent)); + const r = e.query("GET_CREDITS"); + if (r.length === 2) { + const o = document.createElement("a"); + o.className = "filepond--credits", o.setAttribute("aria-hidden", "true"), o.href = r[0], o.tabindex = -1, o.target = "_blank", o.rel = "noopener noreferrer", o.textContent = r[1], e.element.appendChild(o), e.ref.credits = o; + } +}, write$9 = ({ root: e, props: t, actions: i }) => { + if (route$5({ root: e, props: t, actions: i }), i.filter((L) => /^DID_SET_STYLE_/.test(L.type)).filter((L) => !isEmpty$1(L.data.value)).map(({ type: L, data: M }) => { + const y = toCamels(L.substring(8).toLowerCase(), "_"); + e.element.dataset[y] = M.value, e.invalidateLayout(); + }), e.rect.element.hidden) return; + e.rect.element.width !== e.ref.widthPrevious && (e.ref.widthPrevious = e.rect.element.width, e.ref.widthUpdated()); + let a = e.ref.bounds; + a || (a = e.ref.bounds = calculateRootBoundingBoxHeight(e), e.element.removeChild(e.ref.measure), e.ref.measure = null); + const { hopper: n, label: l, list: r, panel: s } = e.ref; + n && n.updateHopperState(); + const o = e.query("GET_PANEL_ASPECT_RATIO"), d = e.query("GET_ALLOW_MULTIPLE"), c = e.query("GET_TOTAL_ITEMS"), u = d ? e.query("GET_MAX_FILES") || MAX_FILES_LIMIT : 1, f = c === u, p = i.find((L) => L.type === "DID_ADD_ITEM"); + if (f && p) { + const L = p.data.interactionMethod; + l.opacity = 0, d ? l.translateY = -40 : L === InteractionMethod.API ? l.translateX = 40 : L === InteractionMethod.BROWSE ? l.translateY = 40 : l.translateY = 30; + } else f || (l.opacity = 1, l.translateX = 0, l.translateY = 0); + const m = calculateListItemMargin(e), h = calculateListHeight(e), I = l.rect.element.height, b = !d || f ? 0 : I, g = f ? r.rect.element.marginTop : 0, E = c === 0 ? 0 : r.rect.element.marginBottom, T = b + g + h.visual + E, S = b + g + h.bounds + E; + if (r.translateY = Math.max(0, b - r.rect.element.marginTop) - m.top, o) { + const L = e.rect.element.width, M = L * o; + o !== e.ref.previousAspectRatio && (e.ref.previousAspectRatio = o, e.ref.updateHistory = []); + const y = e.ref.updateHistory; + y.push(L); + const x = 2; + if (y.length > x * 2) { + const P = y.length, O = P - 10; + let B = 0; + for (let F = P; F >= O; F--) + if (y[F] === y[F - 2] && B++, B >= x) + return; + } + s.scalable = !1, s.height = M; + const v = ( + // the height of the panel minus the label height + M - b - // the room we leave open between the end of the list and the panel bottom + (E - m.bottom) - // if we're full we need to leave some room between the top of the panel and the list + (f ? g : 0) + ); + h.visual > v ? r.overflow = v : r.overflow = null, e.height = M; + } else if (a.fixedHeight) { + s.scalable = !1; + const L = ( + // the height of the panel minus the label height + a.fixedHeight - b - // the room we leave open between the end of the list and the panel bottom + (E - m.bottom) - // if we're full we need to leave some room between the top of the panel and the list + (f ? g : 0) + ); + h.visual > L ? r.overflow = L : r.overflow = null; + } else if (a.cappedHeight) { + const L = T >= a.cappedHeight, M = Math.min(a.cappedHeight, T); + s.scalable = !0, s.height = L ? M : M - m.top - m.bottom; + const y = ( + // the height of the panel minus the label height + M - b - // the room we leave open between the end of the list and the panel bottom + (E - m.bottom) - // if we're full we need to leave some room between the top of the panel and the list + (f ? g : 0) + ); + T > a.cappedHeight && h.visual > y ? r.overflow = y : r.overflow = null, e.height = Math.min( + a.cappedHeight, + S - m.top - m.bottom + ); + } else { + const L = c > 0 ? m.top + m.bottom : 0; + s.scalable = !0, s.height = Math.max(I, T - L), e.height = Math.max(I, S - L); + } + e.ref.credits && s.heightCurrent && (e.ref.credits.style.transform = `translateY(${s.heightCurrent}px)`); +}, calculateListItemMargin = (e) => { + const t = e.ref.list.childViews[0].childViews[0]; + return t ? { + top: t.rect.element.marginTop, + bottom: t.rect.element.marginBottom + } : { + top: 0, + bottom: 0 + }; +}, calculateListHeight = (e) => { + let t = 0, i = 0; + const a = e.ref.list, n = a.childViews[0], l = n.childViews.filter((g) => g.rect.element.height), r = e.query("GET_ACTIVE_ITEMS").map((g) => l.find((E) => E.id === g.id)).filter((g) => g); + if (r.length === 0) return { visual: t, bounds: i }; + const s = n.rect.element.width, o = getItemIndexByPosition(n, r, a.dragCoordinates), d = r[0].rect.element, c = d.marginTop + d.marginBottom, u = d.marginLeft + d.marginRight, f = d.width + u, p = d.height + c, m = typeof o < "u" && o >= 0 ? 1 : 0, h = r.find((g) => g.markedForRemoval && g.opacity < 0.45) ? -1 : 0, I = r.length + m + h, b = getItemsPerRow(s, f); + return b === 1 ? r.forEach((g) => { + const E = g.rect.element.height + c; + i += E, t += E * g.opacity; + }) : (i = Math.ceil(I / b) * p, t = i), { visual: t, bounds: i }; +}, calculateRootBoundingBoxHeight = (e) => { + const t = e.ref.measureHeight || null; + return { + cappedHeight: parseInt(e.style.maxHeight, 10) || null, + fixedHeight: t === 0 ? null : t + }; +}, exceedsMaxFiles = (e, t) => { + const i = e.query("GET_ALLOW_REPLACE"), a = e.query("GET_ALLOW_MULTIPLE"), n = e.query("GET_TOTAL_ITEMS"); + let l = e.query("GET_MAX_FILES"); + const r = t.length; + return !a && r > 1 ? (e.dispatch("DID_THROW_MAX_FILES", { + source: t, + error: createResponse("warning", 0, "Max files") + }), !0) : (l = a ? l : 1, !a && i ? !1 : isInt(l) && n + r > l ? (e.dispatch("DID_THROW_MAX_FILES", { + source: t, + error: createResponse("warning", 0, "Max files") + }), !0) : !1); +}, getDragIndex = (e, t, i) => { + const a = e.childViews[0]; + return getItemIndexByPosition(a, t, { + left: i.scopeLeft - a.rect.element.left, + top: i.scopeTop - (e.rect.outer.top + e.rect.element.marginTop + e.rect.element.scrollTop) + }); +}, toggleDrop = (e) => { + const t = e.query("GET_ALLOW_DROP"), i = e.query("GET_DISABLED"), a = t && !i; + if (a && !e.ref.hopper) { + const n = createHopper( + e.element, + (l) => { + const r = e.query("GET_BEFORE_DROP_FILE") || (() => !0); + return e.query("GET_DROP_VALIDATION") ? l.every( + (o) => applyFilters("ALLOW_HOPPER_ITEM", o, { + query: e.query + }).every((d) => d === !0) && r(o) + ) : !0; + }, + { + filterItems: (l) => { + const r = e.query("GET_IGNORED_FILES"); + return l.filter((s) => isFile(s) ? !r.includes(s.name.toLowerCase()) : !0); + }, + catchesDropsOnPage: e.query("GET_DROP_ON_PAGE"), + requiresDropOnElement: e.query("GET_DROP_ON_ELEMENT") + } + ); + n.onload = (l, r) => { + const o = e.ref.list.childViews[0].childViews.filter((c) => c.rect.element.height), d = e.query("GET_ACTIVE_ITEMS").map((c) => o.find((u) => u.id === c.id)).filter((c) => c); + applyFilterChain("ADD_ITEMS", l, { dispatch: e.dispatch }).then((c) => { + if (exceedsMaxFiles(e, c)) return !1; + e.dispatch("ADD_ITEMS", { + items: c, + index: getDragIndex(e.ref.list, d, r), + interactionMethod: InteractionMethod.DROP + }); + }), e.dispatch("DID_DROP", { position: r }), e.dispatch("DID_END_DRAG", { position: r }); + }, n.ondragstart = (l) => { + e.dispatch("DID_START_DRAG", { position: l }); + }, n.ondrag = debounce((l) => { + e.dispatch("DID_DRAG", { position: l }); + }), n.ondragend = (l) => { + e.dispatch("DID_END_DRAG", { position: l }); + }, e.ref.hopper = n, e.ref.drip = e.appendChildView(e.createChildView(drip)); + } else !a && e.ref.hopper && (e.ref.hopper.destroy(), e.ref.hopper = null, e.removeChildView(e.ref.drip)); +}, toggleBrowse = (e, t) => { + const i = e.query("GET_ALLOW_BROWSE"), a = e.query("GET_DISABLED"), n = i && !a; + n && !e.ref.browser ? e.ref.browser = e.appendChildView( + e.createChildView(browser, { + ...t, + onload: (l) => { + applyFilterChain("ADD_ITEMS", l, { + dispatch: e.dispatch + }).then((r) => { + if (exceedsMaxFiles(e, r)) return !1; + e.dispatch("ADD_ITEMS", { + items: r, + index: -1, + interactionMethod: InteractionMethod.BROWSE + }); + }); + } + }), + 0 + ) : !n && e.ref.browser && (e.removeChildView(e.ref.browser), e.ref.browser = null); +}, togglePaste = (e) => { + const t = e.query("GET_ALLOW_PASTE"), i = e.query("GET_DISABLED"), a = t && !i; + a && !e.ref.paster ? (e.ref.paster = createPaster(), e.ref.paster.onload = (n) => { + applyFilterChain("ADD_ITEMS", n, { dispatch: e.dispatch }).then((l) => { + if (exceedsMaxFiles(e, l)) return !1; + e.dispatch("ADD_ITEMS", { + items: l, + index: -1, + interactionMethod: InteractionMethod.PASTE + }); + }); + }) : !a && e.ref.paster && (e.ref.paster.destroy(), e.ref.paster = null); +}, route$5 = createRoute({ + DID_SET_ALLOW_BROWSE: ({ root: e, props: t }) => { + toggleBrowse(e, t); + }, + DID_SET_ALLOW_DROP: ({ root: e }) => { + toggleDrop(e); + }, + DID_SET_ALLOW_PASTE: ({ root: e }) => { + togglePaste(e); + }, + DID_SET_DISABLED: ({ root: e, props: t }) => { + toggleDrop(e), togglePaste(e), toggleBrowse(e, t), e.query("GET_DISABLED") ? e.element.dataset.disabled = "disabled" : e.element.removeAttribute("data-disabled"); + } +}), root$1 = createView({ + name: "root", + read: ({ root: e }) => { + e.ref.measure && (e.ref.measureHeight = e.ref.measure.offsetHeight); + }, + create: create$e, + write: write$9, + destroy: ({ root: e }) => { + e.ref.paster && e.ref.paster.destroy(), e.ref.hopper && e.ref.hopper.destroy(), e.element.removeEventListener("touchmove", prevent), e.element.removeEventListener("gesturestart", prevent); + }, + mixins: { + styles: ["height"] + } +}), createApp = (e = {}) => { + let t = null; + const i = getOptions(), a = createStore( + // initial state (should be serializable) + createInitialState(i), + // queries + [queries, createOptionQueries(i)], + // action handlers + [actions, createOptionActions(i)] + ); + a.dispatch("SET_OPTIONS", { options: e }); + const n = () => { + document.hidden || a.dispatch("KICK"); + }; + document.addEventListener("visibilitychange", n); + let l = null, r = !1, s = !1, o = null, d = null; + const c = () => { + r || (r = !0), clearTimeout(l), l = setTimeout(() => { + r = !1, o = null, d = null, s && (s = !1, a.dispatch("DID_STOP_RESIZE")); + }, 500); + }; + window.addEventListener("resize", c); + const u = root$1(a, { id: getUniqueId() }); + let f = !1, p = !1; + const m = { + // necessary for update loop + /** + * Reads from dom (never call manually) + * @private + */ + _read: () => { + r && (d = window.innerWidth, o || (o = d), !s && d !== o && (a.dispatch("DID_START_RESIZE"), s = !0)), p && f && (f = u.element.offsetParent === null), !f && (u._read(), p = u.rect.element.hidden); + }, + /** + * Writes to dom (never call manually) + * @private + */ + _write: (R) => { + const A = a.processActionQueue().filter((w) => !/^SET_/.test(w.type)); + f && !A.length || (g(A), f = u._write(R, A, s), removeReleasedItems(a.query("GET_ITEMS")), f && a.processDispatchQueue()); + } + }, h = (R) => (A) => { + const w = { + type: R + }; + if (!A) + return w; + if (A.hasOwnProperty("error") && (w.error = A.error ? { ...A.error } : null), A.status && (w.status = { ...A.status }), A.file && (w.output = A.file), A.source) + w.file = A.source; + else if (A.item || A.id) { + const z = A.item ? A.item : a.query("GET_ITEM", A.id); + w.file = z ? createItemAPI(z) : null; + } + return A.items && (w.items = A.items.map(createItemAPI)), /progress/.test(R) && (w.progress = A.progress), A.hasOwnProperty("origin") && A.hasOwnProperty("target") && (w.origin = A.origin, w.target = A.target), w; + }, I = { + DID_DESTROY: h("destroy"), + DID_INIT: h("init"), + DID_THROW_MAX_FILES: h("warning"), + DID_INIT_ITEM: h("initfile"), + DID_START_ITEM_LOAD: h("addfilestart"), + DID_UPDATE_ITEM_LOAD_PROGRESS: h("addfileprogress"), + DID_LOAD_ITEM: h("addfile"), + DID_THROW_ITEM_INVALID: [h("error"), h("addfile")], + DID_THROW_ITEM_LOAD_ERROR: [h("error"), h("addfile")], + DID_THROW_ITEM_REMOVE_ERROR: [h("error"), h("removefile")], + DID_PREPARE_OUTPUT: h("preparefile"), + DID_START_ITEM_PROCESSING: h("processfilestart"), + DID_UPDATE_ITEM_PROCESS_PROGRESS: h("processfileprogress"), + DID_ABORT_ITEM_PROCESSING: h("processfileabort"), + DID_COMPLETE_ITEM_PROCESSING: h("processfile"), + DID_COMPLETE_ITEM_PROCESSING_ALL: h("processfiles"), + DID_REVERT_ITEM_PROCESSING: h("processfilerevert"), + DID_THROW_ITEM_PROCESSING_ERROR: [h("error"), h("processfile")], + DID_REMOVE_ITEM: h("removefile"), + DID_UPDATE_ITEMS: h("updatefiles"), + DID_ACTIVATE_ITEM: h("activatefile"), + DID_REORDER_ITEMS: h("reorderfiles") + }, b = (R) => { + const A = { pond: D, ...R }; + delete A.type, u.element.dispatchEvent( + new CustomEvent(`FilePond:${R.type}`, { + // event info + detail: A, + // event behaviour + bubbles: !0, + cancelable: !0, + composed: !0 + // triggers listeners outside of shadow root + }) + ); + const w = []; + R.hasOwnProperty("error") && w.push(R.error), R.hasOwnProperty("file") && w.push(R.file); + const z = ["type", "error", "file"]; + Object.keys(R).filter((V) => !z.includes(V)).forEach((V) => w.push(R[V])), D.fire(R.type, ...w); + const k = a.query(`GET_ON${R.type.toUpperCase()}`); + k && k(...w); + }, g = (R) => { + R.length && R.filter((A) => I[A.type]).forEach((A) => { + const w = I[A.type]; + (Array.isArray(w) ? w : [w]).forEach((z) => { + A.type === "DID_INIT_ITEM" ? b(z(A.data)) : setTimeout(() => { + b(z(A.data)); + }, 0); + }); + }); + }, E = (R) => a.dispatch("SET_OPTIONS", { options: R }), T = (R) => a.query("GET_ACTIVE_ITEM", R), S = (R) => new Promise((A, w) => { + a.dispatch("REQUEST_ITEM_PREPARE", { + query: R, + success: (z) => { + A(z); + }, + failure: (z) => { + w(z); + } + }); + }), L = (R, A = {}) => new Promise((w, z) => { + x([{ source: R, options: A }], { index: A.index }).then((k) => w(k && k[0])).catch(z); + }), M = (R) => R.file && R.id, y = (R, A) => (typeof R == "object" && !M(R) && !A && (A = R, R = void 0), a.dispatch("REMOVE_ITEM", { ...A, query: R }), a.query("GET_ACTIVE_ITEM", R) === null), x = (...R) => new Promise((A, w) => { + const z = [], k = {}; + if (isArray$1(R[0])) + z.push.apply(z, R[0]), Object.assign(k, R[1] || {}); + else { + const V = R[R.length - 1]; + typeof V == "object" && !(V instanceof Blob) && Object.assign(k, R.pop()), z.push(...R); + } + a.dispatch("ADD_ITEMS", { + items: z, + index: k.index, + interactionMethod: InteractionMethod.API, + success: A, + failure: w + }); + }), v = () => a.query("GET_ACTIVE_ITEMS"), P = (R) => new Promise((A, w) => { + a.dispatch("REQUEST_ITEM_PROCESSING", { + query: R, + success: (z) => { + A(z); + }, + failure: (z) => { + w(z); + } + }); + }), O = (...R) => { + const A = Array.isArray(R[0]) ? R[0] : R, w = A.length ? A : v(); + return Promise.all(w.map(S)); + }, B = (...R) => { + const A = Array.isArray(R[0]) ? R[0] : R; + if (!A.length) { + const w = v().filter( + (z) => !(z.status === ItemStatus.IDLE && z.origin === FileOrigin.LOCAL) && z.status !== ItemStatus.PROCESSING && z.status !== ItemStatus.PROCESSING_COMPLETE && z.status !== ItemStatus.PROCESSING_REVERT_ERROR + ); + return Promise.all(w.map(P)); + } + return Promise.all(A.map(P)); + }, F = (...R) => { + const A = Array.isArray(R[0]) ? R[0] : R; + let w; + typeof A[A.length - 1] == "object" ? w = A.pop() : Array.isArray(R[0]) && (w = R[1]); + const z = v(); + return A.length ? A.map((V) => isNumber$1(V) ? z[V] ? z[V].id : null : V).filter((V) => V).map((V) => y(V, w)) : Promise.all(z.map((V) => y(V, w))); + }, D = { + // supports events + ...on(), + // inject private api methods + ...m, + // inject all getters and setters + ...createOptionAPI(a, i), + /** + * Override options defined in options object + * @param options + */ + setOptions: E, + /** + * Load the given file + * @param source - the source of the file (either a File, base64 data uri or url) + * @param options - object, { index: 0 } + */ + addFile: L, + /** + * Load the given files + * @param sources - the sources of the files to load + * @param options - object, { index: 0 } + */ + addFiles: x, + /** + * Returns the file objects matching the given query + * @param query { string, number, null } + */ + getFile: T, + /** + * Upload file with given name + * @param query { string, number, null } + */ + processFile: P, + /** + * Request prepare output for file with given name + * @param query { string, number, null } + */ + prepareFile: S, + /** + * Removes a file by its name + * @param query { string, number, null } + */ + removeFile: y, + /** + * Moves a file to a new location in the files list + */ + moveFile: (R, A) => a.dispatch("MOVE_ITEM", { query: R, index: A }), + /** + * Returns all files (wrapped in public api) + */ + getFiles: v, + /** + * Starts uploading all files + */ + processFiles: B, + /** + * Clears all files from the files list + */ + removeFiles: F, + /** + * Starts preparing output of all files + */ + prepareFiles: O, + /** + * Sort list of files + */ + sort: (R) => a.dispatch("SORT", { compare: R }), + /** + * Browse the file system for a file + */ + browse: () => { + var R = u.element.querySelector("input[type=file]"); + R && R.click(); + }, + /** + * Destroys the app + */ + destroy: () => { + D.fire("destroy", u.element), a.dispatch("ABORT_ALL"), u._destroy(), window.removeEventListener("resize", c), document.removeEventListener("visibilitychange", n), a.dispatch("DID_DESTROY"); + }, + /** + * Inserts the plugin before the target element + */ + insertBefore: (R) => insertBefore(u.element, R), + /** + * Inserts the plugin after the target element + */ + insertAfter: (R) => insertAfter(u.element, R), + /** + * Appends the plugin to the target element + */ + appendTo: (R) => R.appendChild(u.element), + /** + * Replaces an element with the app + */ + replaceElement: (R) => { + insertBefore(u.element, R), R.parentNode.removeChild(R), t = R; + }, + /** + * Restores the original element + */ + restoreElement: () => { + t && (insertAfter(t, u.element), u.element.parentNode.removeChild(u.element), t = null); + }, + /** + * Returns true if the app root is attached to given element + * @param element + */ + isAttachedTo: (R) => u.element === R || t === R, + /** + * Returns the root element + */ + element: { + get: () => u.element + }, + /** + * Returns the current pond status + */ + status: { + get: () => a.query("GET_STATUS") + } + }; + return a.dispatch("DID_INIT"), createObject(D); +}, createAppObject = (e = {}) => { + const t = {}; + return forin(getOptions(), (a, n) => { + t[a] = n[0]; + }), createApp({ + // default options + ...t, + // custom options + ...e + }); +}, lowerCaseFirstLetter = (e) => e.charAt(0).toLowerCase() + e.slice(1), attributeNameToPropertyName = (e) => toCamels(e.replace(/^data-/, "")), mapObject = (e, t) => { + forin(t, (i, a) => { + forin(e, (n, l) => { + const r = new RegExp(i); + if (!r.test(n) || (delete e[n], a === !1)) + return; + if (isString$1(a)) { + e[a] = l; + return; + } + const o = a.group; + isObject$1(a) && !e[o] && (e[o] = {}), e[o][lowerCaseFirstLetter(n.replace(r, ""))] = l; + }), a.mapping && mapObject(e[a.group], a.mapping); + }); +}, getAttributesAsObject = (e, t = {}) => { + const i = []; + forin(e.attributes, (n) => { + i.push(e.attributes[n]); + }); + const a = i.filter((n) => n.name).reduce((n, l) => { + const r = attr(e, l.name); + return n[attributeNameToPropertyName(l.name)] = r === l.name ? !0 : r, n; + }, {}); + return mapObject(a, t), a; +}, createAppAtElement = (e, t = {}) => { + const i = { + // translate to other name + "^class$": "className", + "^multiple$": "allowMultiple", + "^capture$": "captureMethod", + "^webkitdirectory$": "allowDirectoriesOnly", + // group under single property + "^server": { + group: "server", + mapping: { + "^process": { + group: "process" + }, + "^revert": { + group: "revert" + }, + "^fetch": { + group: "fetch" + }, + "^restore": { + group: "restore" + }, + "^load": { + group: "load" + } + } + }, + // don't include in object + "^type$": !1, + "^files$": !1 + }; + applyFilters("SET_ATTRIBUTE_TO_OPTION_MAP", i); + const a = { + ...t + }, n = getAttributesAsObject( + e.nodeName === "FIELDSET" ? e.querySelector("input[type=file]") : e, + i + ); + Object.keys(n).forEach((r) => { + isObject$1(n[r]) ? (isObject$1(a[r]) || (a[r] = {}), Object.assign(a[r], n[r])) : a[r] = n[r]; + }), a.files = (t.files || []).concat( + Array.from(e.querySelectorAll("input:not([type=file])")).map((r) => ({ + source: r.value, + options: { + type: r.dataset.type + } + })) + ); + const l = createAppObject(a); + return e.files && Array.from(e.files).forEach((r) => { + l.addFile(r); + }), l.replaceElement(e), l; +}, createApp$1 = (...e) => isNode(e[0]) ? createAppAtElement(...e) : createAppObject(...e), PRIVATE_METHODS = ["fire", "_read", "_write"], createAppAPI = (e) => { + const t = {}; + return copyObjectPropertiesToObject(e, t, PRIVATE_METHODS), t; +}, replaceInString = (e, t) => e.replace(/(?:{([a-zA-Z]+)})/g, (i, a) => t[a]), createWorker = (e) => { + const t = new Blob(["(", e.toString(), ")()"], { + type: "application/javascript" + }), i = URL.createObjectURL(t), a = new Worker(i); + return { + transfer: (n, l) => { + }, + post: (n, l, r) => { + const s = getUniqueId(); + a.onmessage = (o) => { + o.data.id === s && l(o.data.message); + }, a.postMessage( + { + id: s, + message: n + }, + r + ); + }, + terminate: () => { + a.terminate(), URL.revokeObjectURL(i); + } + }; +}, loadImage$1 = (e) => new Promise((t, i) => { + const a = new Image(); + a.onload = () => { + t(a); + }, a.onerror = (n) => { + i(n); + }, a.src = e; +}), renameFile = (e, t) => { + const i = e.slice(0, e.size, e.type); + return i.lastModifiedDate = e.lastModifiedDate, i.name = t, i; +}, copyFile = (e) => renameFile(e, e.name), registeredPlugins = [], createAppPlugin = (e) => { + if (registeredPlugins.includes(e)) + return; + registeredPlugins.push(e); + const t = e({ + addFilter, + utils: { + Type, + forin, + isString: isString$1, + isFile, + toNaturalFileSize, + replaceInString, + getExtensionFromFilename, + getFilenameWithoutExtension, + guesstimateMimeType, + getFileFromBlob, + getFilenameFromURL, + createRoute, + createWorker, + createView, + createItemAPI, + loadImage: loadImage$1, + copyFile, + renameFile, + createBlob, + applyFilterChain, + text, + getNumericAspectRatioFromString + }, + views: { + fileActionButton + } + }); + extendDefaultOptions(t.options); +}, isOperaMini = () => Object.prototype.toString.call(window.operamini) === "[object OperaMini]", hasPromises = () => "Promise" in window, hasBlobSlice = () => "slice" in Blob.prototype, hasCreateObjectURL = () => "URL" in window && "createObjectURL" in window.URL, hasVisibility = () => "visibilityState" in document, hasTiming = () => "performance" in window, hasCSSSupports = () => "supports" in (window.CSS || {}), isIE11 = () => /MSIE|Trident/.test(window.navigator.userAgent), supported = (() => { + const e = ( + // Has to be a browser + isBrowser$4() && // Can't run on Opera Mini due to lack of everything + !isOperaMini() && // Require these APIs to feature detect a modern browser + hasVisibility() && hasPromises() && hasBlobSlice() && hasCreateObjectURL() && hasTiming() && // doesn't need CSSSupports but is a good way to detect Safari 9+ (we do want to support IE11 though) + (hasCSSSupports() || isIE11()) + ); + return () => e; +})(), state = { + // active app instances, used to redraw the apps and to find the later + apps: [] +}, name = "filepond", fn = () => { +}; +let OptionTypes = {}, create$f = fn, destroy = fn, parse = fn, find = fn, registerPlugin = fn, getOptions$1 = fn, setOptions$1 = fn; +if (supported()) { + createPainter( + () => { + state.apps.forEach((i) => i._read()); + }, + (i) => { + state.apps.forEach((a) => a._write(i)); + } + ); + const e = () => { + document.dispatchEvent( + new CustomEvent("FilePond:loaded", { + detail: { + supported, + create: create$f, + destroy, + parse, + find, + registerPlugin, + setOptions: setOptions$1 + } + }) + ), document.removeEventListener("DOMContentLoaded", e); + }; + document.readyState !== "loading" ? setTimeout(() => e(), 0) : document.addEventListener("DOMContentLoaded", e); + const t = () => forin(getOptions(), (i, a) => { + OptionTypes[i] = a[1]; + }); + OptionTypes = {}, t(), create$f = (...i) => { + const a = createApp$1(...i); + return a.on("destroy", destroy), state.apps.push(a), createAppAPI(a); + }, destroy = (i) => { + const a = state.apps.findIndex((n) => n.isAttachedTo(i)); + return a >= 0 ? (state.apps.splice(a, 1)[0].restoreElement(), !0) : !1; + }, parse = (i) => Array.from(i.querySelectorAll(`.${name}`)).filter( + (l) => !state.apps.find((r) => r.isAttachedTo(l)) + ).map((l) => create$f(l)), find = (i) => { + const a = state.apps.find((n) => n.isAttachedTo(i)); + return a ? createAppAPI(a) : null; + }, registerPlugin = (...i) => { + i.forEach(createAppPlugin), t(); + }, getOptions$1 = () => { + const i = {}; + return forin(getOptions(), (a, n) => { + i[a] = n[0]; + }), i; + }, setOptions$1 = (i) => (isObject$1(i) && (state.apps.forEach((a) => { + a.setOptions(i); + }), setOptions(i)), getOptions$1()); +} +/*! * FilePondPluginFileValidateSize 2.2.8 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. - */const plugin$3=({addFilter:e,utils:t})=>{const{Type:a,replaceInString:n,toNaturalFileSize:l}=t;return e("ALLOW_HOPPER_ITEM",(r,{query:s})=>{if(!s("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;const o=s("GET_MAX_FILE_SIZE");if(o!==null&&r.size>o)return!1;const c=s("GET_MIN_FILE_SIZE");return!(c!==null&&r.sizenew Promise((o,c)=>{if(!s("GET_ALLOW_FILE_SIZE_VALIDATION"))return o(r);const u=s("GET_FILE_VALIDATE_SIZE_FILTER");if(u&&!u(r))return o(r);const d=s("GET_MAX_FILE_SIZE");if(d!==null&&r.size>d){c({status:{main:s("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:n(s("GET_LABEL_MAX_FILE_SIZE"),{filesize:l(d,".",s("GET_FILE_SIZE_BASE"),s("GET_FILE_SIZE_LABELS",s))})}});return}const p=s("GET_MIN_FILE_SIZE");if(p!==null&&r.sizeg+E.fileSize,0)>h){c({status:{main:s("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:n(s("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:l(h,".",s("GET_FILE_SIZE_BASE"),s("GET_FILE_SIZE_LABELS",s))})}});return}o(r)})),{options:{allowFileSizeValidation:[!0,a.BOOLEAN],maxFileSize:[null,a.INT],minFileSize:[null,a.INT],maxTotalFileSize:[null,a.INT],fileValidateSizeFilter:[null,a.FUNCTION],labelMinFileSizeExceeded:["File is too small",a.STRING],labelMinFileSize:["Minimum file size is {filesize}",a.STRING],labelMaxFileSizeExceeded:["File is too large",a.STRING],labelMaxFileSize:["Maximum file size is {filesize}",a.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",a.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",a.STRING]}}},isBrowser$3=typeof window<"u"&&typeof window.document<"u";isBrowser$3&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin$3}));/*! + */ +const plugin$3 = ({ addFilter: e, utils: t }) => { + const { Type: i, replaceInString: a, toNaturalFileSize: n } = t; + return e("ALLOW_HOPPER_ITEM", (l, { query: r }) => { + if (!r("GET_ALLOW_FILE_SIZE_VALIDATION")) + return !0; + const s = r("GET_MAX_FILE_SIZE"); + if (s !== null && l.size > s) + return !1; + const o = r("GET_MIN_FILE_SIZE"); + return !(o !== null && l.size < o); + }), e( + "LOAD_FILE", + (l, { query: r }) => new Promise((s, o) => { + if (!r("GET_ALLOW_FILE_SIZE_VALIDATION")) + return s(l); + const d = r("GET_FILE_VALIDATE_SIZE_FILTER"); + if (d && !d(l)) + return s(l); + const c = r("GET_MAX_FILE_SIZE"); + if (c !== null && l.size > c) { + o({ + status: { + main: r("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"), + sub: a(r("GET_LABEL_MAX_FILE_SIZE"), { + filesize: n( + c, + ".", + r("GET_FILE_SIZE_BASE"), + r("GET_FILE_SIZE_LABELS", r) + ) + }) + } + }); + return; + } + const u = r("GET_MIN_FILE_SIZE"); + if (u !== null && l.size < u) { + o({ + status: { + main: r("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"), + sub: a(r("GET_LABEL_MIN_FILE_SIZE"), { + filesize: n( + u, + ".", + r("GET_FILE_SIZE_BASE"), + r("GET_FILE_SIZE_LABELS", r) + ) + }) + } + }); + return; + } + const f = r("GET_MAX_TOTAL_FILE_SIZE"); + if (f !== null && r("GET_ACTIVE_ITEMS").reduce((m, h) => m + h.fileSize, 0) > f) { + o({ + status: { + main: r("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"), + sub: a(r("GET_LABEL_MAX_TOTAL_FILE_SIZE"), { + filesize: n( + f, + ".", + r("GET_FILE_SIZE_BASE"), + r("GET_FILE_SIZE_LABELS", r) + ) + }) + } + }); + return; + } + s(l); + }) + ), { + options: { + // Enable or disable file type validation + allowFileSizeValidation: [!0, i.BOOLEAN], + // Max individual file size in bytes + maxFileSize: [null, i.INT], + // Min individual file size in bytes + minFileSize: [null, i.INT], + // Max total file size in bytes + maxTotalFileSize: [null, i.INT], + // Filter the files that need to be validated for size + fileValidateSizeFilter: [null, i.FUNCTION], + // error labels + labelMinFileSizeExceeded: ["File is too small", i.STRING], + labelMinFileSize: ["Minimum file size is {filesize}", i.STRING], + labelMaxFileSizeExceeded: ["File is too large", i.STRING], + labelMaxFileSize: ["Maximum file size is {filesize}", i.STRING], + labelMaxTotalFileSizeExceeded: ["Maximum total size exceeded", i.STRING], + labelMaxTotalFileSize: ["Maximum total file size is {filesize}", i.STRING] + } + }; +}, isBrowser$3 = typeof window < "u" && typeof window.document < "u"; +isBrowser$3 && document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", { detail: plugin$3 })); +/*! * FilePondPluginFileValidateType 1.2.9 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. - */const plugin$2=({addFilter:e,utils:t})=>{const{Type:a,isString:n,replaceInString:l,guesstimateMimeType:r,getExtensionFromFilename:s,getFilenameFromURL:o}=t,c=(m,g)=>{const E=(/^[^/]+/.exec(m)||[]).pop(),T=g.slice(0,-2);return E===T},u=(m,g)=>m.some(E=>/\*$/.test(E)?c(g,E):E===g),d=m=>{let g="";if(n(m)){const E=o(m),T=s(E);T&&(g=r(T))}else g=m.type;return g},p=(m,g,E)=>{if(g.length===0)return!0;const T=d(m);return E?new Promise((I,f)=>{E(m,T).then(b=>{u(g,b)?I():f()}).catch(f)}):u(g,T)},h=m=>g=>m[g]===null?!1:m[g]||g;return e("SET_ATTRIBUTE_TO_OPTION_MAP",m=>Object.assign(m,{accept:"acceptedFileTypes"})),e("ALLOW_HOPPER_ITEM",(m,{query:g})=>g("GET_ALLOW_FILE_TYPE_VALIDATION")?p(m,g("GET_ACCEPTED_FILE_TYPES")):!0),e("LOAD_FILE",(m,{query:g})=>new Promise((E,T)=>{if(!g("GET_ALLOW_FILE_TYPE_VALIDATION")){E(m);return}const I=g("GET_ACCEPTED_FILE_TYPES"),f=g("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),b=p(m,I,f),S=()=>{const R=I.map(h(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter(O=>O!==!1),A=R.filter((O,L)=>R.indexOf(O)===L);T({status:{main:g("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:l(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:A.join(", "),allButLastType:A.slice(0,-1).join(", "),lastType:A[A.length-1]})}})};if(typeof b=="boolean")return b?E(m):S();b.then(()=>{E(m)}).catch(S)})),{options:{allowFileTypeValidation:[!0,a.BOOLEAN],acceptedFileTypes:[[],a.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",a.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",a.STRING],fileValidateTypeLabelExpectedTypesMap:[{},a.OBJECT],fileValidateTypeDetectType:[null,a.FUNCTION]}}},isBrowser$2=typeof window<"u"&&typeof window.document<"u";isBrowser$2&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin$2}));/*! + */ +const plugin$2 = ({ addFilter: e, utils: t }) => { + const { + Type: i, + isString: a, + replaceInString: n, + guesstimateMimeType: l, + getExtensionFromFilename: r, + getFilenameFromURL: s + } = t, o = (p, m) => { + const h = (/^[^/]+/.exec(p) || []).pop(), I = m.slice(0, -2); + return h === I; + }, d = (p, m) => p.some((h) => /\*$/.test(h) ? o(m, h) : h === m), c = (p) => { + let m = ""; + if (a(p)) { + const h = s(p), I = r(h); + I && (m = l(I)); + } else + m = p.type; + return m; + }, u = (p, m, h) => { + if (m.length === 0) + return !0; + const I = c(p); + return h ? new Promise((b, g) => { + h(p, I).then((E) => { + d(m, E) ? b() : g(); + }).catch(g); + }) : d(m, I); + }, f = (p) => (m) => p[m] === null ? !1 : p[m] || m; + return e( + "SET_ATTRIBUTE_TO_OPTION_MAP", + (p) => Object.assign(p, { + accept: "acceptedFileTypes" + }) + ), e("ALLOW_HOPPER_ITEM", (p, { query: m }) => m("GET_ALLOW_FILE_TYPE_VALIDATION") ? u(p, m("GET_ACCEPTED_FILE_TYPES")) : !0), e( + "LOAD_FILE", + (p, { query: m }) => new Promise((h, I) => { + if (!m("GET_ALLOW_FILE_TYPE_VALIDATION")) { + h(p); + return; + } + const b = m("GET_ACCEPTED_FILE_TYPES"), g = m("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"), E = u(p, b, g), T = () => { + const S = b.map( + f( + m("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP") + ) + ).filter((M) => M !== !1), L = S.filter( + (M, y) => S.indexOf(M) === y + ); + I({ + status: { + main: m("GET_LABEL_FILE_TYPE_NOT_ALLOWED"), + sub: n( + m("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"), + { + allTypes: L.join(", "), + allButLastType: L.slice(0, -1).join(", "), + lastType: L[L.length - 1] + } + ) + } + }); + }; + if (typeof E == "boolean") + return E ? h(p) : T(); + E.then(() => { + h(p); + }).catch(T); + }) + ), { + // default options + options: { + // Enable or disable file type validation + allowFileTypeValidation: [!0, i.BOOLEAN], + // What file types to accept + acceptedFileTypes: [[], i.ARRAY], + // - must be comma separated + // - mime types: image/png, image/jpeg, image/gif + // - extensions: .png, .jpg, .jpeg ( not enabled yet ) + // - wildcards: image/* + // label to show when a type is not allowed + labelFileTypeNotAllowed: ["File is of invalid type", i.STRING], + // nicer label + fileValidateTypeLabelExpectedTypes: [ + "Expects {allButLastType} or {lastType}", + i.STRING + ], + // map mime types to extensions + fileValidateTypeLabelExpectedTypesMap: [{}, i.OBJECT], + // Custom function to detect type of file + fileValidateTypeDetectType: [null, i.FUNCTION] + } + }; +}, isBrowser$2 = typeof window < "u" && typeof window.document < "u"; +isBrowser$2 && document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", { detail: plugin$2 })); +/*! * FilePondPluginImagePreview 4.6.12 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. - */const isPreviewableImage=e=>/^image/.test(e.type),vectorMultiply=(e,t)=>createVector(e.x*t,e.y*t),vectorAdd=(e,t)=>createVector(e.x+t.x,e.y+t.y),vectorNormalize=e=>{const t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:createVector(e.x/t,e.y/t)},vectorRotate=(e,t,a)=>{const n=Math.cos(t),l=Math.sin(t),r=createVector(e.x-a.x,e.y-a.y);return createVector(a.x+n*r.x-l*r.y,a.y+l*r.x+n*r.y)},createVector=(e=0,t=0)=>({x:e,y:t}),getMarkupValue=(e,t,a=1,n)=>{if(typeof e=="string")return parseFloat(e)*a;if(typeof e=="number")return e*(n?t[n]:Math.min(t.width,t.height))},getMarkupStyles=(e,t,a)=>{const n=e.borderStyle||e.lineStyle||"solid",l=e.backgroundColor||e.fontColor||"transparent",r=e.borderColor||e.lineColor||"transparent",s=getMarkupValue(e.borderWidth||e.lineWidth,t,a),o=e.lineCap||"round",c=e.lineJoin||"round",u=typeof n=="string"?"":n.map(p=>getMarkupValue(p,t,a)).join(","),d=e.opacity||1;return{"stroke-linecap":o,"stroke-linejoin":c,"stroke-width":s||0,"stroke-dasharray":u,stroke:r,fill:l,opacity:d}},isDefined=e=>e!=null,getMarkupRect=(e,t,a=1)=>{let n=getMarkupValue(e.x,t,a,"width")||getMarkupValue(e.left,t,a,"width"),l=getMarkupValue(e.y,t,a,"height")||getMarkupValue(e.top,t,a,"height"),r=getMarkupValue(e.width,t,a,"width"),s=getMarkupValue(e.height,t,a,"height"),o=getMarkupValue(e.right,t,a,"width"),c=getMarkupValue(e.bottom,t,a,"height");return isDefined(l)||(isDefined(s)&&isDefined(c)?l=t.height-s-c:l=c),isDefined(n)||(isDefined(r)&&isDefined(o)?n=t.width-r-o:n=o),isDefined(r)||(isDefined(n)&&isDefined(o)?r=t.width-n-o:r=0),isDefined(s)||(isDefined(l)&&isDefined(c)?s=t.height-l-c:s=0),{x:n||0,y:l||0,width:r||0,height:s||0}},pointsToPathShape=e=>e.map((t,a)=>`${a===0?"M":"L"} ${t.x} ${t.y}`).join(" "),setAttributes=(e,t)=>Object.keys(t).forEach(a=>e.setAttribute(a,t[a])),ns="http://www.w3.org/2000/svg",svg=(e,t)=>{const a=document.createElementNS(ns,e);return t&&setAttributes(a,t),a},updateRect=e=>setAttributes(e,{...e.rect,...e.styles}),updateEllipse=e=>{const t=e.rect.x+e.rect.width*.5,a=e.rect.y+e.rect.height*.5,n=e.rect.width*.5,l=e.rect.height*.5;return setAttributes(e,{cx:t,cy:a,rx:n,ry:l,...e.styles})},IMAGE_FIT_STYLE={contain:"xMidYMid meet",cover:"xMidYMid slice"},updateImage=(e,t)=>{setAttributes(e,{...e.rect,...e.styles,preserveAspectRatio:IMAGE_FIT_STYLE[t.fit]||"none"})},TEXT_ANCHOR={left:"start",center:"middle",right:"end"},updateText=(e,t,a,n)=>{const l=getMarkupValue(t.fontSize,a,n),r=t.fontFamily||"sans-serif",s=t.fontWeight||"normal",o=TEXT_ANCHOR[t.textAlign]||"start";setAttributes(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":s,"font-size":l,"font-family":r,"text-anchor":o}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},updateLine=(e,t,a,n)=>{setAttributes(e,{...e.rect,...e.styles,fill:"none"});const l=e.childNodes[0],r=e.childNodes[1],s=e.childNodes[2],o=e.rect,c={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(setAttributes(l,{x1:o.x,y1:o.y,x2:c.x,y2:c.y}),!t.lineDecoration)return;r.style.display="none",s.style.display="none";const u=vectorNormalize({x:c.x-o.x,y:c.y-o.y}),d=getMarkupValue(.05,a,n);if(t.lineDecoration.indexOf("arrow-begin")!==-1){const p=vectorMultiply(u,d),h=vectorAdd(o,p),m=vectorRotate(o,2,h),g=vectorRotate(o,-2,h);setAttributes(r,{style:"display:block;",d:`M${m.x},${m.y} L${o.x},${o.y} L${g.x},${g.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){const p=vectorMultiply(u,-d),h=vectorAdd(c,p),m=vectorRotate(c,2,h),g=vectorRotate(c,-2,h);setAttributes(s,{style:"display:block;",d:`M${m.x},${m.y} L${c.x},${c.y} L${g.x},${g.y}`})}},updatePath=(e,t,a,n)=>{setAttributes(e,{...e.styles,fill:"none",d:pointsToPathShape(t.points.map(l=>({x:getMarkupValue(l.x,a,n,"width"),y:getMarkupValue(l.y,a,n,"height")})))})},createShape=e=>t=>svg(e,{id:t.id}),createImage=e=>{const t=svg("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},createLine=e=>{const t=svg("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),a=svg("line");t.appendChild(a);const n=svg("path");t.appendChild(n);const l=svg("path");return t.appendChild(l),t},CREATE_TYPE_ROUTES={image:createImage,rect:createShape("rect"),ellipse:createShape("ellipse"),text:createShape("text"),path:createShape("path"),line:createLine},UPDATE_TYPE_ROUTES={rect:updateRect,ellipse:updateEllipse,image:updateImage,text:updateText,path:updatePath,line:updateLine},createMarkupByType=(e,t)=>CREATE_TYPE_ROUTES[e](t),updateMarkupByType=(e,t,a,n,l)=>{t!=="path"&&(e.rect=getMarkupRect(a,n,l)),e.styles=getMarkupStyles(a,n,l),UPDATE_TYPE_ROUTES[t](e,a,n,l)},MARKUP_RECT=["x","y","left","top","right","bottom","width","height"],toOptionalFraction=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,prepareMarkup=e=>{const[t,a]=e,n=a.points?{}:MARKUP_RECT.reduce((l,r)=>(l[r]=toOptionalFraction(a[r]),l),{});return[t,{zIndex:0,...a,...n}]},sortMarkupByZIndex=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexe.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:({root:t,props:a})=>{if(!a.dirty)return;const{crop:n,resize:l,markup:r}=a,s=a.width,o=a.height;let c=n.width,u=n.height;if(l){const{size:m}=l;let g=m&&m.width,E=m&&m.height;const T=l.mode,I=l.upscale;g&&!E&&(E=g),E&&!g&&(g=E);const f=c{const[g,E]=m,T=createMarkupByType(g,E);updateMarkupByType(T,g,E,d,p),t.element.appendChild(T)})}}),createVector$1=(e,t)=>({x:e,y:t}),vectorDot=(e,t)=>e.x*t.x+e.y*t.y,vectorSubtract=(e,t)=>createVector$1(e.x-t.x,e.y-t.y),vectorDistanceSquared=(e,t)=>vectorDot(vectorSubtract(e,t),vectorSubtract(e,t)),vectorDistance=(e,t)=>Math.sqrt(vectorDistanceSquared(e,t)),getOffsetPointOnEdge=(e,t)=>{const a=e,n=1.5707963267948966,l=t,r=1.5707963267948966-t,s=Math.sin(n),o=Math.sin(l),c=Math.sin(r),u=Math.cos(r),d=a/s,p=d*o,h=d*c;return createVector$1(u*p,u*h)},getRotatedRectSize=(e,t)=>{const a=e.width,n=e.height,l=getOffsetPointOnEdge(a,t),r=getOffsetPointOnEdge(n,t),s=createVector$1(e.x+Math.abs(l.x),e.y-Math.abs(l.y)),o=createVector$1(e.x+e.width+Math.abs(r.y),e.y+Math.abs(r.x)),c=createVector$1(e.x-Math.abs(r.y),e.y+e.height-Math.abs(r.x));return{width:vectorDistance(s,o),height:vectorDistance(s,c)}},calculateCanvasSize=(e,t,a=1)=>{const n=e.height/e.width;let l=1,r=t,s=1,o=n;o>r&&(o=r,s=o/n);const c=Math.max(l/s,r/o),u=e.width/(a*c*s),d=u*t;return{width:u,height:d}},getImageRectZoomFactor=(e,t,a,n)=>{const l=n.x>.5?1-n.x:n.x,r=n.y>.5?1-n.y:n.y,s=l*2*e.width,o=r*2*e.height,c=getRotatedRectSize(t,a);return Math.max(c.width/s,c.height/o)},getCenteredCropRect=(e,t)=>{let a=e.width,n=a*t;n>e.height&&(n=e.height,a=n/t);const l=(e.width-a)*.5,r=(e.height-n)*.5;return{x:l,y:r,width:a,height:n}},getCurrentCropSize=(e,t={})=>{let{zoom:a,rotation:n,center:l,aspectRatio:r}=t;r||(r=e.height/e.width);const s=calculateCanvasSize(e,r,a),o={x:s.width*.5,y:s.height*.5},c={x:0,y:0,width:s.width,height:s.height,center:o},u=typeof t.scaleToFit>"u"||t.scaleToFit,d=getImageRectZoomFactor(e,getCenteredCropRect(c,r),n,u?l:{x:.5,y:.5}),p=a*d;return{widthFloat:s.width/p,heightFloat:s.height/p,width:Math.round(s.width/p),height:Math.round(s.height/p)}},IMAGE_SCALE_SPRING_PROPS={type:"spring",stiffness:.5,damping:.45,mass:10},createBitmapView=e=>e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:({root:t,props:a})=>{t.appendChild(a.image)}}),createImageCanvasWrapper=e=>e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:IMAGE_SCALE_SPRING_PROPS,originY:IMAGE_SCALE_SPRING_PROPS,scaleX:IMAGE_SCALE_SPRING_PROPS,scaleY:IMAGE_SCALE_SPRING_PROPS,translateX:IMAGE_SCALE_SPRING_PROPS,translateY:IMAGE_SCALE_SPRING_PROPS,rotateZ:IMAGE_SCALE_SPRING_PROPS}},create:({root:t,props:a})=>{a.width=a.image.width,a.height=a.image.height,t.ref.bitmap=t.appendChildView(t.createChildView(createBitmapView(e),{image:a.image}))},write:({root:t,props:a})=>{const{flip:n}=a.crop,{bitmap:l}=t.ref;l.scaleX=n.horizontal?-1:1,l.scaleY=n.vertical?-1:1}}),createClipView=e=>e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function({root:t,props:a}){a.background&&(t.element.style.backgroundColor=a.background)},create:({root:t,props:a})=>{t.ref.image=t.appendChildView(t.createChildView(createImageCanvasWrapper(e),Object.assign({},a))),t.ref.createMarkup=()=>{t.ref.markup||(t.ref.markup=t.appendChildView(t.createChildView(createMarkupView(e),Object.assign({},a))))},t.ref.destroyMarkup=()=>{t.ref.markup&&(t.removeChildView(t.ref.markup),t.ref.markup=null)};const n=t.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");n!==null&&(n==="grid"?t.element.dataset.transparencyIndicator=n:t.element.dataset.transparencyIndicator="color")},write:({root:t,props:a,shouldOptimize:n})=>{const{crop:l,markup:r,resize:s,dirty:o,width:c,height:u}=a;t.ref.image.crop=l;const d={x:0,y:0,width:c,height:u,center:{x:c*.5,y:u*.5}},p={width:t.ref.image.width,height:t.ref.image.height},h={x:l.center.x*p.width,y:l.center.y*p.height},m={x:d.center.x-p.width*l.center.x,y:d.center.y-p.height*l.center.y},g=Math.PI*2+l.rotation%(Math.PI*2),E=l.aspectRatio||p.height/p.width,T=typeof l.scaleToFit>"u"||l.scaleToFit,I=getImageRectZoomFactor(p,getCenteredCropRect(d,E),g,T?l.center:{x:.5,y:.5}),f=l.zoom*I;r&&r.length?(t.ref.createMarkup(),t.ref.markup.width=c,t.ref.markup.height=u,t.ref.markup.resize=s,t.ref.markup.dirty=o,t.ref.markup.markup=r,t.ref.markup.crop=getCurrentCropSize(p,l)):t.ref.markup&&t.ref.destroyMarkup();const b=t.ref.image;if(n){b.originX=null,b.originY=null,b.translateX=null,b.translateY=null,b.rotateZ=null,b.scaleX=null,b.scaleY=null;return}b.originX=h.x,b.originY=h.y,b.translateX=m.x,b.translateY=m.y,b.rotateZ=g,b.scaleX=f,b.scaleY=f}}),createImageView=e=>e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:IMAGE_SCALE_SPRING_PROPS,scaleY:IMAGE_SCALE_SPRING_PROPS,translateY:IMAGE_SCALE_SPRING_PROPS,opacity:{type:"tween",duration:400}}},create:({root:t,props:a})=>{t.ref.clip=t.appendChildView(t.createChildView(createClipView(e),{id:a.id,image:a.image,crop:a.crop,markup:a.markup,resize:a.resize,dirty:a.dirty,background:a.background}))},write:({root:t,props:a,shouldOptimize:n})=>{const{clip:l}=t.ref,{image:r,crop:s,markup:o,resize:c,dirty:u}=a;if(l.crop=s,l.markup=o,l.resize=c,l.dirty=u,l.opacity=n?0:1,n||t.rect.element.hidden)return;const d=r.height/r.width;let p=s.aspectRatio||d;const h=t.rect.inner.width,m=t.rect.inner.height;let g=t.query("GET_IMAGE_PREVIEW_HEIGHT");const E=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),T=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),I=t.query("GET_PANEL_ASPECT_RATIO"),f=t.query("GET_ALLOW_MULTIPLE");I&&!f&&(g=h*I,p=I);let b=g!==null?g:Math.max(E,Math.min(h*p,T)),S=b/p;S>h&&(S=h,b=S*p),b>m&&(b=m,S=m/p),l.width=S,l.height=b}});let SVG_MASK=` + */ +const isPreviewableImage = (e) => /^image/.test(e.type), vectorMultiply = (e, t) => createVector(e.x * t, e.y * t), vectorAdd = (e, t) => createVector(e.x + t.x, e.y + t.y), vectorNormalize = (e) => { + const t = Math.sqrt(e.x * e.x + e.y * e.y); + return t === 0 ? { + x: 0, + y: 0 + } : createVector(e.x / t, e.y / t); +}, vectorRotate = (e, t, i) => { + const a = Math.cos(t), n = Math.sin(t), l = createVector(e.x - i.x, e.y - i.y); + return createVector( + i.x + a * l.x - n * l.y, + i.y + n * l.x + a * l.y + ); +}, createVector = (e = 0, t = 0) => ({ x: e, y: t }), getMarkupValue = (e, t, i = 1, a) => { + if (typeof e == "string") + return parseFloat(e) * i; + if (typeof e == "number") + return e * (a ? t[a] : Math.min(t.width, t.height)); +}, getMarkupStyles = (e, t, i) => { + const a = e.borderStyle || e.lineStyle || "solid", n = e.backgroundColor || e.fontColor || "transparent", l = e.borderColor || e.lineColor || "transparent", r = getMarkupValue( + e.borderWidth || e.lineWidth, + t, + i + ), s = e.lineCap || "round", o = e.lineJoin || "round", d = typeof a == "string" ? "" : a.map((u) => getMarkupValue(u, t, i)).join(","), c = e.opacity || 1; + return { + "stroke-linecap": s, + "stroke-linejoin": o, + "stroke-width": r || 0, + "stroke-dasharray": d, + stroke: l, + fill: n, + opacity: c + }; +}, isDefined = (e) => e != null, getMarkupRect = (e, t, i = 1) => { + let a = getMarkupValue(e.x, t, i, "width") || getMarkupValue(e.left, t, i, "width"), n = getMarkupValue(e.y, t, i, "height") || getMarkupValue(e.top, t, i, "height"), l = getMarkupValue(e.width, t, i, "width"), r = getMarkupValue(e.height, t, i, "height"), s = getMarkupValue(e.right, t, i, "width"), o = getMarkupValue(e.bottom, t, i, "height"); + return isDefined(n) || (isDefined(r) && isDefined(o) ? n = t.height - r - o : n = o), isDefined(a) || (isDefined(l) && isDefined(s) ? a = t.width - l - s : a = s), isDefined(l) || (isDefined(a) && isDefined(s) ? l = t.width - a - s : l = 0), isDefined(r) || (isDefined(n) && isDefined(o) ? r = t.height - n - o : r = 0), { + x: a || 0, + y: n || 0, + width: l || 0, + height: r || 0 + }; +}, pointsToPathShape = (e) => e.map((t, i) => `${i === 0 ? "M" : "L"} ${t.x} ${t.y}`).join(" "), setAttributes = (e, t) => Object.keys(t).forEach((i) => e.setAttribute(i, t[i])), ns = "http://www.w3.org/2000/svg", svg = (e, t) => { + const i = document.createElementNS(ns, e); + return t && setAttributes(i, t), i; +}, updateRect = (e) => setAttributes(e, { + ...e.rect, + ...e.styles +}), updateEllipse = (e) => { + const t = e.rect.x + e.rect.width * 0.5, i = e.rect.y + e.rect.height * 0.5, a = e.rect.width * 0.5, n = e.rect.height * 0.5; + return setAttributes(e, { + cx: t, + cy: i, + rx: a, + ry: n, + ...e.styles + }); +}, IMAGE_FIT_STYLE = { + contain: "xMidYMid meet", + cover: "xMidYMid slice" +}, updateImage = (e, t) => { + setAttributes(e, { + ...e.rect, + ...e.styles, + preserveAspectRatio: IMAGE_FIT_STYLE[t.fit] || "none" + }); +}, TEXT_ANCHOR = { + left: "start", + center: "middle", + right: "end" +}, updateText = (e, t, i, a) => { + const n = getMarkupValue(t.fontSize, i, a), l = t.fontFamily || "sans-serif", r = t.fontWeight || "normal", s = TEXT_ANCHOR[t.textAlign] || "start"; + setAttributes(e, { + ...e.rect, + ...e.styles, + "stroke-width": 0, + "font-weight": r, + "font-size": n, + "font-family": l, + "text-anchor": s + }), e.text !== t.text && (e.text = t.text, e.textContent = t.text.length ? t.text : " "); +}, updateLine = (e, t, i, a) => { + setAttributes(e, { + ...e.rect, + ...e.styles, + fill: "none" + }); + const n = e.childNodes[0], l = e.childNodes[1], r = e.childNodes[2], s = e.rect, o = { + x: e.rect.x + e.rect.width, + y: e.rect.y + e.rect.height + }; + if (setAttributes(n, { + x1: s.x, + y1: s.y, + x2: o.x, + y2: o.y + }), !t.lineDecoration) return; + l.style.display = "none", r.style.display = "none"; + const d = vectorNormalize({ + x: o.x - s.x, + y: o.y - s.y + }), c = getMarkupValue(0.05, i, a); + if (t.lineDecoration.indexOf("arrow-begin") !== -1) { + const u = vectorMultiply(d, c), f = vectorAdd(s, u), p = vectorRotate(s, 2, f), m = vectorRotate(s, -2, f); + setAttributes(l, { + style: "display:block;", + d: `M${p.x},${p.y} L${s.x},${s.y} L${m.x},${m.y}` + }); + } + if (t.lineDecoration.indexOf("arrow-end") !== -1) { + const u = vectorMultiply(d, -c), f = vectorAdd(o, u), p = vectorRotate(o, 2, f), m = vectorRotate(o, -2, f); + setAttributes(r, { + style: "display:block;", + d: `M${p.x},${p.y} L${o.x},${o.y} L${m.x},${m.y}` + }); + } +}, updatePath = (e, t, i, a) => { + setAttributes(e, { + ...e.styles, + fill: "none", + d: pointsToPathShape( + t.points.map((n) => ({ + x: getMarkupValue(n.x, i, a, "width"), + y: getMarkupValue(n.y, i, a, "height") + })) + ) + }); +}, createShape = (e) => (t) => svg(e, { id: t.id }), createImage = (e) => { + const t = svg("image", { + id: e.id, + "stroke-linecap": "round", + "stroke-linejoin": "round", + opacity: "0" + }); + return t.onload = () => { + t.setAttribute("opacity", e.opacity || 1); + }, t.setAttributeNS( + "http://www.w3.org/1999/xlink", + "xlink:href", + e.src + ), t; +}, createLine = (e) => { + const t = svg("g", { + id: e.id, + "stroke-linecap": "round", + "stroke-linejoin": "round" + }), i = svg("line"); + t.appendChild(i); + const a = svg("path"); + t.appendChild(a); + const n = svg("path"); + return t.appendChild(n), t; +}, CREATE_TYPE_ROUTES = { + image: createImage, + rect: createShape("rect"), + ellipse: createShape("ellipse"), + text: createShape("text"), + path: createShape("path"), + line: createLine +}, UPDATE_TYPE_ROUTES = { + rect: updateRect, + ellipse: updateEllipse, + image: updateImage, + text: updateText, + path: updatePath, + line: updateLine +}, createMarkupByType = (e, t) => CREATE_TYPE_ROUTES[e](t), updateMarkupByType = (e, t, i, a, n) => { + t !== "path" && (e.rect = getMarkupRect(i, a, n)), e.styles = getMarkupStyles(i, a, n), UPDATE_TYPE_ROUTES[t](e, i, a, n); +}, MARKUP_RECT = [ + "x", + "y", + "left", + "top", + "right", + "bottom", + "width", + "height" +], toOptionalFraction = (e) => typeof e == "string" && /%/.test(e) ? parseFloat(e) / 100 : e, prepareMarkup = (e) => { + const [t, i] = e, a = i.points ? {} : MARKUP_RECT.reduce((n, l) => (n[l] = toOptionalFraction(i[l]), n), {}); + return [ + t, + { + zIndex: 0, + ...i, + ...a + } + ]; +}, sortMarkupByZIndex = (e, t) => e[1].zIndex > t[1].zIndex ? 1 : e[1].zIndex < t[1].zIndex ? -1 : 0, createMarkupView = (e) => e.utils.createView({ + name: "image-preview-markup", + tag: "svg", + ignoreRect: !0, + mixins: { + apis: ["width", "height", "crop", "markup", "resize", "dirty"] + }, + write: ({ root: t, props: i }) => { + if (!i.dirty) return; + const { crop: a, resize: n, markup: l } = i, r = i.width, s = i.height; + let o = a.width, d = a.height; + if (n) { + const { size: p } = n; + let m = p && p.width, h = p && p.height; + const I = n.mode, b = n.upscale; + m && !h && (h = m), h && !m && (m = h); + const g = o < m && d < h; + if (!g || g && b) { + let E = m / o, T = h / d; + if (I === "force") + o = m, d = h; + else { + let S; + I === "cover" ? S = Math.max(E, T) : I === "contain" && (S = Math.min(E, T)), o = o * S, d = d * S; + } + } + } + const c = { + width: r, + height: s + }; + t.element.setAttribute("width", c.width), t.element.setAttribute("height", c.height); + const u = Math.min(r / o, s / d); + t.element.innerHTML = ""; + const f = t.query("GET_IMAGE_PREVIEW_MARKUP_FILTER"); + l.filter(f).map(prepareMarkup).sort(sortMarkupByZIndex).forEach((p) => { + const [m, h] = p, I = createMarkupByType(m, h); + updateMarkupByType(I, m, h, c, u), t.element.appendChild(I); + }); + } +}), createVector$1 = (e, t) => ({ x: e, y: t }), vectorDot = (e, t) => e.x * t.x + e.y * t.y, vectorSubtract = (e, t) => createVector$1(e.x - t.x, e.y - t.y), vectorDistanceSquared = (e, t) => vectorDot(vectorSubtract(e, t), vectorSubtract(e, t)), vectorDistance = (e, t) => Math.sqrt(vectorDistanceSquared(e, t)), getOffsetPointOnEdge = (e, t) => { + const i = e, a = 1.5707963267948966, n = t, l = 1.5707963267948966 - t, r = Math.sin(a), s = Math.sin(n), o = Math.sin(l), d = Math.cos(l), c = i / r, u = c * s, f = c * o; + return createVector$1(d * u, d * f); +}, getRotatedRectSize = (e, t) => { + const i = e.width, a = e.height, n = getOffsetPointOnEdge(i, t), l = getOffsetPointOnEdge(a, t), r = createVector$1(e.x + Math.abs(n.x), e.y - Math.abs(n.y)), s = createVector$1( + e.x + e.width + Math.abs(l.y), + e.y + Math.abs(l.x) + ), o = createVector$1( + e.x - Math.abs(l.y), + e.y + e.height - Math.abs(l.x) + ); + return { + width: vectorDistance(r, s), + height: vectorDistance(r, o) + }; +}, calculateCanvasSize = (e, t, i = 1) => { + const a = e.height / e.width; + let n = 1, l = t, r = 1, s = a; + s > l && (s = l, r = s / a); + const o = Math.max(n / r, l / s), d = e.width / (i * o * r), c = d * t; + return { + width: d, + height: c + }; +}, getImageRectZoomFactor = (e, t, i, a) => { + const n = a.x > 0.5 ? 1 - a.x : a.x, l = a.y > 0.5 ? 1 - a.y : a.y, r = n * 2 * e.width, s = l * 2 * e.height, o = getRotatedRectSize(t, i); + return Math.max( + o.width / r, + o.height / s + ); +}, getCenteredCropRect = (e, t) => { + let i = e.width, a = i * t; + a > e.height && (a = e.height, i = a / t); + const n = (e.width - i) * 0.5, l = (e.height - a) * 0.5; + return { + x: n, + y: l, + width: i, + height: a + }; +}, getCurrentCropSize = (e, t = {}) => { + let { zoom: i, rotation: a, center: n, aspectRatio: l } = t; + l || (l = e.height / e.width); + const r = calculateCanvasSize(e, l, i), s = { + width: r.width, + height: r.height + }, o = typeof t.scaleToFit > "u" || t.scaleToFit, d = getImageRectZoomFactor( + e, + getCenteredCropRect(s, l), + a, + o ? n : { x: 0.5, y: 0.5 } + ), c = i * d; + return { + widthFloat: r.width / c, + heightFloat: r.height / c, + width: Math.round(r.width / c), + height: Math.round(r.height / c) + }; +}, IMAGE_SCALE_SPRING_PROPS = { + type: "spring", + stiffness: 0.5, + damping: 0.45, + mass: 10 +}, createBitmapView = (e) => e.utils.createView({ + name: "image-bitmap", + ignoreRect: !0, + mixins: { styles: ["scaleX", "scaleY"] }, + create: ({ root: t, props: i }) => { + t.appendChild(i.image); + } +}), createImageCanvasWrapper = (e) => e.utils.createView({ + name: "image-canvas-wrapper", + tag: "div", + ignoreRect: !0, + mixins: { + apis: ["crop", "width", "height"], + styles: [ + "originX", + "originY", + "translateX", + "translateY", + "scaleX", + "scaleY", + "rotateZ" + ], + animations: { + originX: IMAGE_SCALE_SPRING_PROPS, + originY: IMAGE_SCALE_SPRING_PROPS, + scaleX: IMAGE_SCALE_SPRING_PROPS, + scaleY: IMAGE_SCALE_SPRING_PROPS, + translateX: IMAGE_SCALE_SPRING_PROPS, + translateY: IMAGE_SCALE_SPRING_PROPS, + rotateZ: IMAGE_SCALE_SPRING_PROPS + } + }, + create: ({ root: t, props: i }) => { + i.width = i.image.width, i.height = i.image.height, t.ref.bitmap = t.appendChildView( + t.createChildView(createBitmapView(e), { image: i.image }) + ); + }, + write: ({ root: t, props: i }) => { + const { flip: a } = i.crop, { bitmap: n } = t.ref; + n.scaleX = a.horizontal ? -1 : 1, n.scaleY = a.vertical ? -1 : 1; + } +}), createClipView = (e) => e.utils.createView({ + name: "image-clip", + tag: "div", + ignoreRect: !0, + mixins: { + apis: [ + "crop", + "markup", + "resize", + "width", + "height", + "dirty", + "background" + ], + styles: ["width", "height", "opacity"], + animations: { + opacity: { type: "tween", duration: 250 } + } + }, + didWriteView: function({ root: t, props: i }) { + i.background && (t.element.style.backgroundColor = i.background); + }, + create: ({ root: t, props: i }) => { + t.ref.image = t.appendChildView( + t.createChildView( + createImageCanvasWrapper(e), + Object.assign({}, i) + ) + ), t.ref.createMarkup = () => { + t.ref.markup || (t.ref.markup = t.appendChildView( + t.createChildView(createMarkupView(e), Object.assign({}, i)) + )); + }, t.ref.destroyMarkup = () => { + t.ref.markup && (t.removeChildView(t.ref.markup), t.ref.markup = null); + }; + const a = t.query( + "GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR" + ); + a !== null && (a === "grid" ? t.element.dataset.transparencyIndicator = a : t.element.dataset.transparencyIndicator = "color"); + }, + write: ({ root: t, props: i, shouldOptimize: a }) => { + const { crop: n, markup: l, resize: r, dirty: s, width: o, height: d } = i; + t.ref.image.crop = n; + const c = { + width: o, + height: d, + center: { + x: o * 0.5, + y: d * 0.5 + } + }, u = { + width: t.ref.image.width, + height: t.ref.image.height + }, f = { + x: n.center.x * u.width, + y: n.center.y * u.height + }, p = { + x: c.center.x - u.width * n.center.x, + y: c.center.y - u.height * n.center.y + }, m = Math.PI * 2 + n.rotation % (Math.PI * 2), h = n.aspectRatio || u.height / u.width, I = typeof n.scaleToFit > "u" || n.scaleToFit, b = getImageRectZoomFactor( + u, + getCenteredCropRect(c, h), + m, + I ? n.center : { x: 0.5, y: 0.5 } + ), g = n.zoom * b; + l && l.length ? (t.ref.createMarkup(), t.ref.markup.width = o, t.ref.markup.height = d, t.ref.markup.resize = r, t.ref.markup.dirty = s, t.ref.markup.markup = l, t.ref.markup.crop = getCurrentCropSize(u, n)) : t.ref.markup && t.ref.destroyMarkup(); + const E = t.ref.image; + if (a) { + E.originX = null, E.originY = null, E.translateX = null, E.translateY = null, E.rotateZ = null, E.scaleX = null, E.scaleY = null; + return; + } + E.originX = f.x, E.originY = f.y, E.translateX = p.x, E.translateY = p.y, E.rotateZ = m, E.scaleX = g, E.scaleY = g; + } +}), createImageView = (e) => e.utils.createView({ + name: "image-preview", + tag: "div", + ignoreRect: !0, + mixins: { + apis: ["image", "crop", "markup", "resize", "dirty", "background"], + styles: ["translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: IMAGE_SCALE_SPRING_PROPS, + scaleY: IMAGE_SCALE_SPRING_PROPS, + translateY: IMAGE_SCALE_SPRING_PROPS, + opacity: { type: "tween", duration: 400 } + } + }, + create: ({ root: t, props: i }) => { + t.ref.clip = t.appendChildView( + t.createChildView(createClipView(e), { + id: i.id, + image: i.image, + crop: i.crop, + markup: i.markup, + resize: i.resize, + dirty: i.dirty, + background: i.background + }) + ); + }, + write: ({ root: t, props: i, shouldOptimize: a }) => { + const { clip: n } = t.ref, { image: l, crop: r, markup: s, resize: o, dirty: d } = i; + if (n.crop = r, n.markup = s, n.resize = o, n.dirty = d, n.opacity = a ? 0 : 1, a || t.rect.element.hidden) return; + const c = l.height / l.width; + let u = r.aspectRatio || c; + const f = t.rect.inner.width, p = t.rect.inner.height; + let m = t.query("GET_IMAGE_PREVIEW_HEIGHT"); + const h = t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"), I = t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"), b = t.query("GET_PANEL_ASPECT_RATIO"), g = t.query("GET_ALLOW_MULTIPLE"); + b && !g && (m = f * b, u = b); + let E = m !== null ? m : Math.max( + h, + Math.min(f * u, I) + ), T = E / u; + T > f && (T = f, E = T * u), E > p && (E = p, T = p / u), n.width = T, n.height = E; + } +}); +let SVG_MASK = ` @@ -33,53 +5055,4079 @@ -`,SVGMaskUniqueId=0;const createImageOverlayView=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:a})=>{let n=SVG_MASK;if(document.querySelector("base")){const l=new URL(window.location.href.replace(window.location.hash,"")).href;n=n.replace(/url\(\#/g,"url("+l+"#")}SVGMaskUniqueId++,t.element.classList.add(`filepond--image-preview-overlay-${a.status}`),t.element.innerHTML=n.replace(/__UID__/g,SVGMaskUniqueId)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),BitmapWorker=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},ColorMatrixWorker=function(){self.onmessage=e=>{const t=e.data.message.imageData,a=e.data.message.colorMatrix,n=t.data,l=n.length,r=a[0],s=a[1],o=a[2],c=a[3],u=a[4],d=a[5],p=a[6],h=a[7],m=a[8],g=a[9],E=a[10],T=a[11],I=a[12],f=a[13],b=a[14],S=a[15],R=a[16],A=a[17],O=a[18],L=a[19];let P=0,D=0,M=0,w=0,V=0;for(;P{let a=new Image;a.onload=()=>{const n=a.naturalWidth,l=a.naturalHeight;a=null,t(n,l)},a.src=e},transforms={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},fixImageOrientation=(e,t,a,n)=>{n!==-1&&e.transform.apply(e,transforms[n](t,a))},createPreviewImage=(e,t,a,n)=>{t=Math.round(t),a=Math.round(a);const l=document.createElement("canvas");l.width=t,l.height=a;const r=l.getContext("2d");return n>=5&&n<=8&&([t,a]=[a,t]),fixImageOrientation(r,t,a,n),r.drawImage(e,0,0,t,a),l},isBitmap=e=>/^image/.test(e.type)&&!/svg/.test(e.type),MAX_WIDTH=10,MAX_HEIGHT=10,calculateAverageColor=e=>{const t=Math.min(MAX_WIDTH/e.width,MAX_HEIGHT/e.height),a=document.createElement("canvas"),n=a.getContext("2d"),l=a.width=Math.ceil(e.width*t),r=a.height=Math.ceil(e.height*t);n.drawImage(e,0,0,l,r);let s=null;try{s=n.getImageData(0,0,l,r).data}catch{return null}const o=s.length;let c=0,u=0,d=0,p=0;for(;pMath.floor(Math.sqrt(e/(t/4))),cloneCanvas=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),cloneImageData=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},loadImage=e=>new Promise((t,a)=>{const n=new Image;n.crossOrigin="Anonymous",n.onload=()=>{t(n)},n.onerror=l=>{a(l)},n.src=e}),createImageWrapperView=e=>{const t=createImageOverlayView(e),a=createImageView(e),{createWorker:n}=e.utils,l=(f,b,S)=>new Promise(R=>{f.ref.imageData||(f.ref.imageData=S.getContext("2d").getImageData(0,0,S.width,S.height));const A=cloneImageData(f.ref.imageData);if(!b||b.length!==20)return S.getContext("2d").putImageData(A,0,0),R();const O=n(ColorMatrixWorker);O.post({imageData:A,colorMatrix:b},L=>{S.getContext("2d").putImageData(L,0,0),O.terminate(),R()},[A.data.buffer])}),r=(f,b)=>{f.removeChildView(b),b.image.width=1,b.image.height=1,b._destroy()},s=({root:f})=>{const b=f.ref.images.shift();return b.opacity=0,b.translateY=-15,f.ref.imageViewBin.push(b),b},o=({root:f,props:b,image:S})=>{const R=b.id,A=f.query("GET_ITEM",{id:R});if(!A)return;const O=A.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},L=f.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR");let P,D,M=!1;f.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(P=A.getMetadata("markup")||[],D=A.getMetadata("resize"),M=!0);const w=f.appendChildView(f.createChildView(a,{id:R,image:S,crop:O,resize:D,markup:P,dirty:M,background:L,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),f.childViews.length);f.ref.images.push(w),w.opacity=1,w.scaleX=1,w.scaleY=1,w.translateY=0,setTimeout(()=>{f.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:R})},250)},c=({root:f,props:b})=>{const S=f.query("GET_ITEM",{id:b.id});if(!S)return;const R=f.ref.images[f.ref.images.length-1];R.crop=S.getMetadata("crop"),R.background=f.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),f.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(R.dirty=!0,R.resize=S.getMetadata("resize"),R.markup=S.getMetadata("markup"))},u=({root:f,props:b,action:S})=>{if(!/crop|filter|markup|resize/.test(S.change.key)||!f.ref.images.length)return;const R=f.query("GET_ITEM",{id:b.id});if(R){if(/filter/.test(S.change.key)){const A=f.ref.images[f.ref.images.length-1];l(f,S.change.value,A.image);return}if(/crop|markup|resize/.test(S.change.key)){const A=R.getMetadata("crop"),O=f.ref.images[f.ref.images.length-1];if(A&&A.aspectRatio&&O.crop&&O.crop.aspectRatio&&Math.abs(A.aspectRatio-O.crop.aspectRatio)>1e-5){const L=s({root:f});o({root:f,props:b,image:cloneCanvas(L.image)})}else c({root:f,props:b})}}},d=f=>{const S=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),R=S?parseInt(S[1]):null;return R!==null&&R<=58?!1:"createImageBitmap"in window&&isBitmap(f)},p=({root:f,props:b})=>{const{id:S}=b,R=f.query("GET_ITEM",S);if(!R)return;const A=URL.createObjectURL(R.file);getImageSize$1(A,(O,L)=>{f.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:S,width:O,height:L})})},h=({root:f,props:b})=>{const{id:S}=b,R=f.query("GET_ITEM",S);if(!R)return;const A=URL.createObjectURL(R.file),O=()=>{loadImage(A).then(L)},L=P=>{URL.revokeObjectURL(A);const M=(R.getMetadata("exif")||{}).orientation||-1;let{width:w,height:V}=P;if(!w||!V)return;M>=5&&M<=8&&([w,V]=[V,w]);const x=Math.max(1,window.devicePixelRatio*.75),y=f.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*x,F=V/w,z=f.rect.element.width,v=f.rect.element.height;let C=z,N=C*F;F>1?(C=Math.min(w,z*y),N=C*F):(N=Math.min(V,v*y),C=N/F);const W=createPreviewImage(P,C,N,M),j=()=>{const X=f.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?calculateAverageColor(data):null;R.setMetadata("color",X,!0),"close"in P&&P.close(),f.ref.overlayShadow.opacity=1,o({root:f,props:b,image:W})},$=R.getMetadata("filter");$?l(f,$,W).then(j):j()};if(d(R.file)){const P=n(BitmapWorker);P.post({file:R.file},D=>{if(P.terminate(),!D){O();return}L(D)})}else O()},m=({root:f})=>{const b=f.ref.images[f.ref.images.length-1];b.translateY=0,b.scaleX=1,b.scaleY=1,b.opacity=1},g=({root:f})=>{f.ref.overlayShadow.opacity=1,f.ref.overlayError.opacity=0,f.ref.overlaySuccess.opacity=0},E=({root:f})=>{f.ref.overlayShadow.opacity=.25,f.ref.overlayError.opacity=1},T=({root:f})=>{f.ref.overlayShadow.opacity=.25,f.ref.overlaySuccess.opacity=1},I=({root:f})=>{f.ref.images=[],f.ref.imageData=null,f.ref.imageViewBin=[],f.ref.overlayShadow=f.appendChildView(f.createChildView(t,{opacity:0,status:"idle"})),f.ref.overlaySuccess=f.appendChildView(f.createChildView(t,{opacity:0,status:"success"})),f.ref.overlayError=f.appendChildView(f.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:I,styles:["height"],apis:["height"],destroy:({root:f})=>{f.ref.images.forEach(b=>{b.image.width=1,b.image.height=1})},didWriteView:({root:f})=>{f.ref.images.forEach(b=>{b.dirty=!1})},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:m,DID_IMAGE_PREVIEW_CONTAINER_CREATE:p,DID_FINISH_CALCULATE_PREVIEWSIZE:h,DID_UPDATE_ITEM_METADATA:u,DID_THROW_ITEM_LOAD_ERROR:E,DID_THROW_ITEM_PROCESSING_ERROR:E,DID_THROW_ITEM_INVALID:E,DID_COMPLETE_ITEM_PROCESSING:T,DID_START_ITEM_PROCESSING:g,DID_REVERT_ITEM_PROCESSING:g},({root:f})=>{const b=f.ref.imageViewBin.filter(S=>S.opacity===0);f.ref.imageViewBin=f.ref.imageViewBin.filter(S=>S.opacity>0),b.forEach(S=>r(f,S)),b.length=0})})},plugin$1=e=>{const{addFilter:t,utils:a}=e,{Type:n,createRoute:l,isFile:r}=a,s=createImageWrapperView(e);return t("CREATE_VIEW",o=>{const{is:c,view:u,query:d}=o;if(!c("file")||!d("GET_ALLOW_IMAGE_PREVIEW"))return;const p=({root:T,props:I})=>{const{id:f}=I,b=d("GET_ITEM",f);if(!b||!r(b.file)||b.archived)return;const S=b.file;if(!isPreviewableImage(S)||!d("GET_IMAGE_PREVIEW_FILTER_ITEM")(b))return;const R="createImageBitmap"in(window||{}),A=d("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!R&&A&&S.size>A)return;T.ref.imagePreview=u.appendChildView(u.createChildView(s,{id:f}));const O=T.query("GET_IMAGE_PREVIEW_HEIGHT");O&&T.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:b.id,height:O});const L=!R&&S.size>d("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");T.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:f},L)},h=(T,I)=>{if(!T.ref.imagePreview)return;let{id:f}=I;const b=T.query("GET_ITEM",{id:f});if(!b)return;const S=T.query("GET_PANEL_ASPECT_RATIO"),R=T.query("GET_ITEM_PANEL_ASPECT_RATIO"),A=T.query("GET_IMAGE_PREVIEW_HEIGHT");if(S||R||A)return;let{imageWidth:O,imageHeight:L}=T.ref;if(!O||!L)return;const P=T.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),D=T.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),w=(b.getMetadata("exif")||{}).orientation||-1;if(w>=5&&w<=8&&([O,L]=[L,O]),!isBitmap(b.file)||T.query("GET_IMAGE_PREVIEW_UPSCALE")){const z=2048/O;O*=z,L*=z}const V=L/O,x=(b.getMetadata("crop")||{}).aspectRatio||V;let k=Math.max(P,Math.min(L,D));const y=T.rect.element.width,F=Math.min(y*x,k);T.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:b.id,height:F})},m=({root:T})=>{T.ref.shouldRescale=!0},g=({root:T,action:I})=>{I.change.key==="crop"&&(T.ref.shouldRescale=!0)},E=({root:T,action:I})=>{T.ref.imageWidth=I.width,T.ref.imageHeight=I.height,T.ref.shouldRescale=!0,T.ref.shouldDrawPreview=!0,T.dispatch("KICK")};u.registerWriter(l({DID_RESIZE_ROOT:m,DID_STOP_RESIZE:m,DID_LOAD_ITEM:p,DID_IMAGE_PREVIEW_CALCULATE_SIZE:E,DID_UPDATE_ITEM_METADATA:g},({root:T,props:I})=>{T.ref.imagePreview&&(T.rect.element.hidden||(T.ref.shouldRescale&&(h(T,I),T.ref.shouldRescale=!1),T.ref.shouldDrawPreview&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{T.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:I.id})})}),T.ref.shouldDrawPreview=!1)))}))}),{options:{allowImagePreview:[!0,n.BOOLEAN],imagePreviewFilterItem:[()=>!0,n.FUNCTION],imagePreviewHeight:[null,n.INT],imagePreviewMinHeight:[44,n.INT],imagePreviewMaxHeight:[256,n.INT],imagePreviewMaxFileSize:[null,n.INT],imagePreviewZoomFactor:[2,n.INT],imagePreviewUpscale:[!1,n.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,n.INT],imagePreviewTransparencyIndicator:[null,n.STRING],imagePreviewCalculateAverageImageColor:[!1,n.BOOLEAN],imagePreviewMarkupShow:[!0,n.BOOLEAN],imagePreviewMarkupFilter:[()=>!0,n.FUNCTION]}}},isBrowser$1=typeof window<"u"&&typeof window.document<"u";isBrowser$1&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin$1}));/*! +`, SVGMaskUniqueId = 0; +const createImageOverlayView = (e) => e.utils.createView({ + name: "image-preview-overlay", + tag: "div", + ignoreRect: !0, + create: ({ root: t, props: i }) => { + let a = SVG_MASK; + if (document.querySelector("base")) { + const n = new URL( + window.location.href.replace(window.location.hash, "") + ).href; + a = a.replace(/url\(\#/g, "url(" + n + "#"); + } + SVGMaskUniqueId++, t.element.classList.add( + `filepond--image-preview-overlay-${i.status}` + ), t.element.innerHTML = a.replace(/__UID__/g, SVGMaskUniqueId); + }, + mixins: { + styles: ["opacity"], + animations: { + opacity: { type: "spring", mass: 25 } + } + } +}), BitmapWorker = function() { + self.onmessage = (e) => { + createImageBitmap(e.data.message.file).then((t) => { + self.postMessage({ id: e.data.id, message: t }, [t]); + }); + }; +}, ColorMatrixWorker = function() { + self.onmessage = (e) => { + const t = e.data.message.imageData, i = e.data.message.colorMatrix, a = t.data, n = a.length, l = i[0], r = i[1], s = i[2], o = i[3], d = i[4], c = i[5], u = i[6], f = i[7], p = i[8], m = i[9], h = i[10], I = i[11], b = i[12], g = i[13], E = i[14], T = i[15], S = i[16], L = i[17], M = i[18], y = i[19]; + let x = 0, v = 0, P = 0, O = 0, B = 0; + for (; x < n; x += 4) + v = a[x] / 255, P = a[x + 1] / 255, O = a[x + 2] / 255, B = a[x + 3] / 255, a[x] = Math.max( + 0, + Math.min((v * l + P * r + O * s + B * o + d) * 255, 255) + ), a[x + 1] = Math.max( + 0, + Math.min((v * c + P * u + O * f + B * p + m) * 255, 255) + ), a[x + 2] = Math.max( + 0, + Math.min((v * h + P * I + O * b + B * g + E) * 255, 255) + ), a[x + 3] = Math.max( + 0, + Math.min((v * T + P * S + O * L + B * M + y) * 255, 255) + ); + self.postMessage({ id: e.data.id, message: t }, [ + t.data.buffer + ]); + }; +}, getImageSize$1 = (e, t) => { + let i = new Image(); + i.onload = () => { + const a = i.naturalWidth, n = i.naturalHeight; + i = null, t(a, n); + }, i.src = e; +}, transforms = { + 1: () => [1, 0, 0, 1, 0, 0], + 2: (e) => [-1, 0, 0, 1, e, 0], + 3: (e, t) => [-1, 0, 0, -1, e, t], + 4: (e, t) => [1, 0, 0, -1, 0, t], + 5: () => [0, 1, 1, 0, 0, 0], + 6: (e, t) => [0, 1, -1, 0, t, 0], + 7: (e, t) => [0, -1, -1, 0, t, e], + 8: (e) => [0, -1, 1, 0, 0, e] +}, fixImageOrientation = (e, t, i, a) => { + a !== -1 && e.transform.apply(e, transforms[a](t, i)); +}, createPreviewImage = (e, t, i, a) => { + t = Math.round(t), i = Math.round(i); + const n = document.createElement("canvas"); + n.width = t, n.height = i; + const l = n.getContext("2d"); + return a >= 5 && a <= 8 && ([t, i] = [i, t]), fixImageOrientation(l, t, i, a), l.drawImage(e, 0, 0, t, i), n; +}, isBitmap = (e) => /^image/.test(e.type) && !/svg/.test(e.type), MAX_WIDTH = 10, MAX_HEIGHT = 10, calculateAverageColor = (e) => { + const t = Math.min(MAX_WIDTH / e.width, MAX_HEIGHT / e.height), i = document.createElement("canvas"), a = i.getContext("2d"), n = i.width = Math.ceil(e.width * t), l = i.height = Math.ceil(e.height * t); + a.drawImage(e, 0, 0, n, l); + let r = null; + try { + r = a.getImageData(0, 0, n, l).data; + } catch { + return null; + } + const s = r.length; + let o = 0, d = 0, c = 0, u = 0; + for (; u < s; u += 4) + o += r[u] * r[u], d += r[u + 1] * r[u + 1], c += r[u + 2] * r[u + 2]; + return o = averageColor(o, s), d = averageColor(d, s), c = averageColor(c, s), { r: o, g: d, b: c }; +}, averageColor = (e, t) => Math.floor(Math.sqrt(e / (t / 4))), cloneCanvas = (e, t) => (t = t || document.createElement("canvas"), t.width = e.width, t.height = e.height, t.getContext("2d").drawImage(e, 0, 0), t), cloneImageData = (e) => { + let t; + try { + t = new ImageData(e.width, e.height); + } catch { + t = document.createElement("canvas").getContext("2d").createImageData(e.width, e.height); + } + return t.data.set(new Uint8ClampedArray(e.data)), t; +}, loadImage = (e) => new Promise((t, i) => { + const a = new Image(); + a.crossOrigin = "Anonymous", a.onload = () => { + t(a); + }, a.onerror = (n) => { + i(n); + }, a.src = e; +}), createImageWrapperView = (e) => { + const t = createImageOverlayView(e), i = createImageView(e), { createWorker: a } = e.utils, n = (g, E, T) => new Promise((S) => { + g.ref.imageData || (g.ref.imageData = T.getContext("2d").getImageData(0, 0, T.width, T.height)); + const L = cloneImageData(g.ref.imageData); + if (!E || E.length !== 20) + return T.getContext("2d").putImageData(L, 0, 0), S(); + const M = a(ColorMatrixWorker); + M.post( + { + imageData: L, + colorMatrix: E + }, + (y) => { + T.getContext("2d").putImageData(y, 0, 0), M.terminate(), S(); + }, + [L.data.buffer] + ); + }), l = (g, E) => { + g.removeChildView(E), E.image.width = 1, E.image.height = 1, E._destroy(); + }, r = ({ root: g }) => { + const E = g.ref.images.shift(); + return E.opacity = 0, E.translateY = -15, g.ref.imageViewBin.push(E), E; + }, s = ({ root: g, props: E, image: T }) => { + const S = E.id, L = g.query("GET_ITEM", { id: S }); + if (!L) return; + const M = L.getMetadata("crop") || { + center: { + x: 0.5, + y: 0.5 + }, + flip: { + horizontal: !1, + vertical: !1 + }, + zoom: 1, + rotation: 0, + aspectRatio: null + }, y = g.query( + "GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR" + ); + let x, v, P = !1; + g.query("GET_IMAGE_PREVIEW_MARKUP_SHOW") && (x = L.getMetadata("markup") || [], v = L.getMetadata("resize"), P = !0); + const O = g.appendChildView( + g.createChildView(i, { + id: S, + image: T, + crop: M, + resize: v, + markup: x, + dirty: P, + background: y, + opacity: 0, + scaleX: 1.15, + scaleY: 1.15, + translateY: 15 + }), + g.childViews.length + ); + g.ref.images.push(O), O.opacity = 1, O.scaleX = 1, O.scaleY = 1, O.translateY = 0, setTimeout(() => { + g.dispatch("DID_IMAGE_PREVIEW_SHOW", { id: S }); + }, 250); + }, o = ({ root: g, props: E }) => { + const T = g.query("GET_ITEM", { id: E.id }); + if (!T) return; + const S = g.ref.images[g.ref.images.length - 1]; + S.crop = T.getMetadata("crop"), S.background = g.query( + "GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR" + ), g.query("GET_IMAGE_PREVIEW_MARKUP_SHOW") && (S.dirty = !0, S.resize = T.getMetadata("resize"), S.markup = T.getMetadata("markup")); + }, d = ({ root: g, props: E, action: T }) => { + if (!/crop|filter|markup|resize/.test(T.change.key) || !g.ref.images.length) return; + const S = g.query("GET_ITEM", { id: E.id }); + if (S) { + if (/filter/.test(T.change.key)) { + const L = g.ref.images[g.ref.images.length - 1]; + n(g, T.change.value, L.image); + return; + } + if (/crop|markup|resize/.test(T.change.key)) { + const L = S.getMetadata("crop"), M = g.ref.images[g.ref.images.length - 1]; + if (L && L.aspectRatio && M.crop && M.crop.aspectRatio && Math.abs(L.aspectRatio - M.crop.aspectRatio) > 1e-5) { + const y = r({ root: g }); + s({ root: g, props: E, image: cloneCanvas(y.image) }); + } else + o({ root: g, props: E }); + } + } + }, c = (g) => { + const T = window.navigator.userAgent.match(/Firefox\/([0-9]+)\./), S = T ? parseInt(T[1]) : null; + return S !== null && S <= 58 ? !1 : "createImageBitmap" in window && isBitmap(g); + }, u = ({ root: g, props: E }) => { + const { id: T } = E, S = g.query("GET_ITEM", T); + if (!S) return; + const L = URL.createObjectURL(S.file); + getImageSize$1(L, (M, y) => { + g.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE", { + id: T, + width: M, + height: y + }); + }); + }, f = ({ root: g, props: E }) => { + const { id: T } = E, S = g.query("GET_ITEM", T); + if (!S) return; + const L = URL.createObjectURL(S.file), M = () => { + loadImage(L).then(y); + }, y = (x) => { + URL.revokeObjectURL(L); + const P = (S.getMetadata("exif") || {}).orientation || -1; + let { width: O, height: B } = x; + if (!O || !B) return; + P >= 5 && P <= 8 && ([O, B] = [B, O]); + const F = Math.max(1, window.devicePixelRatio * 0.75), R = g.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR") * F, A = B / O, w = g.rect.element.width, z = g.rect.element.height; + let k = w, V = k * A; + A > 1 ? (k = Math.min(O, w * R), V = k * A) : (V = Math.min(B, z * R), k = V / A); + const H = createPreviewImage( + x, + k, + V, + P + ), q = () => { + const Y = g.query( + "GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR" + ) ? calculateAverageColor(data) : null; + S.setMetadata("color", Y, !0), "close" in x && x.close(), g.ref.overlayShadow.opacity = 1, s({ root: g, props: E, image: H }); + }, U = S.getMetadata("filter"); + U ? n(g, U, H).then(q) : q(); + }; + if (c(S.file)) { + const x = a(BitmapWorker); + x.post( + { + file: S.file + }, + (v) => { + if (x.terminate(), !v) { + M(); + return; + } + y(v); + } + ); + } else + M(); + }, p = ({ root: g }) => { + const E = g.ref.images[g.ref.images.length - 1]; + E.translateY = 0, E.scaleX = 1, E.scaleY = 1, E.opacity = 1; + }, m = ({ root: g }) => { + g.ref.overlayShadow.opacity = 1, g.ref.overlayError.opacity = 0, g.ref.overlaySuccess.opacity = 0; + }, h = ({ root: g }) => { + g.ref.overlayShadow.opacity = 0.25, g.ref.overlayError.opacity = 1; + }, I = ({ root: g }) => { + g.ref.overlayShadow.opacity = 0.25, g.ref.overlaySuccess.opacity = 1; + }, b = ({ root: g }) => { + g.ref.images = [], g.ref.imageData = null, g.ref.imageViewBin = [], g.ref.overlayShadow = g.appendChildView( + g.createChildView(t, { + opacity: 0, + status: "idle" + }) + ), g.ref.overlaySuccess = g.appendChildView( + g.createChildView(t, { + opacity: 0, + status: "success" + }) + ), g.ref.overlayError = g.appendChildView( + g.createChildView(t, { + opacity: 0, + status: "failure" + }) + ); + }; + return e.utils.createView({ + name: "image-preview-wrapper", + create: b, + styles: ["height"], + apis: ["height"], + destroy: ({ root: g }) => { + g.ref.images.forEach((E) => { + E.image.width = 1, E.image.height = 1; + }); + }, + didWriteView: ({ root: g }) => { + g.ref.images.forEach((E) => { + E.dirty = !1; + }); + }, + write: e.utils.createRoute( + { + // image preview stated + DID_IMAGE_PREVIEW_DRAW: p, + DID_IMAGE_PREVIEW_CONTAINER_CREATE: u, + DID_FINISH_CALCULATE_PREVIEWSIZE: f, + DID_UPDATE_ITEM_METADATA: d, + // file states + DID_THROW_ITEM_LOAD_ERROR: h, + DID_THROW_ITEM_PROCESSING_ERROR: h, + DID_THROW_ITEM_INVALID: h, + DID_COMPLETE_ITEM_PROCESSING: I, + DID_START_ITEM_PROCESSING: m, + DID_REVERT_ITEM_PROCESSING: m + }, + ({ root: g }) => { + const E = g.ref.imageViewBin.filter( + (T) => T.opacity === 0 + ); + g.ref.imageViewBin = g.ref.imageViewBin.filter( + (T) => T.opacity > 0 + ), E.forEach((T) => l(g, T)), E.length = 0; + } + ) + }); +}, plugin$1 = (e) => { + const { addFilter: t, utils: i } = e, { Type: a, createRoute: n, isFile: l } = i, r = createImageWrapperView(e); + return t("CREATE_VIEW", (s) => { + const { is: o, view: d, query: c } = s; + if (!o("file") || !c("GET_ALLOW_IMAGE_PREVIEW")) return; + const u = ({ root: I, props: b }) => { + const { id: g } = b, E = c("GET_ITEM", g); + if (!E || !l(E.file) || E.archived) return; + const T = E.file; + if (!isPreviewableImage(T) || !c("GET_IMAGE_PREVIEW_FILTER_ITEM")(E)) return; + const S = "createImageBitmap" in (window || {}), L = c("GET_IMAGE_PREVIEW_MAX_FILE_SIZE"); + if (!S && L && T.size > L) + return; + I.ref.imagePreview = d.appendChildView( + d.createChildView(r, { id: g }) + ); + const M = I.query("GET_IMAGE_PREVIEW_HEIGHT"); + M && I.dispatch("DID_UPDATE_PANEL_HEIGHT", { + id: E.id, + height: M + }); + const y = !S && T.size > c("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE"); + I.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE", { id: g }, y); + }, f = (I, b) => { + if (!I.ref.imagePreview) return; + let { id: g } = b; + const E = I.query("GET_ITEM", { id: g }); + if (!E) return; + const T = I.query("GET_PANEL_ASPECT_RATIO"), S = I.query("GET_ITEM_PANEL_ASPECT_RATIO"), L = I.query("GET_IMAGE_PREVIEW_HEIGHT"); + if (T || S || L) return; + let { imageWidth: M, imageHeight: y } = I.ref; + if (!M || !y) return; + const x = I.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"), v = I.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"), O = (E.getMetadata("exif") || {}).orientation || -1; + if (O >= 5 && O <= 8 && ([M, y] = [y, M]), !isBitmap(E.file) || I.query("GET_IMAGE_PREVIEW_UPSCALE")) { + const w = 2048 / M; + M *= w, y *= w; + } + const B = y / M, F = (E.getMetadata("crop") || {}).aspectRatio || B; + let D = Math.max( + x, + Math.min(y, v) + ); + const R = I.rect.element.width, A = Math.min( + R * F, + D + ); + I.dispatch("DID_UPDATE_PANEL_HEIGHT", { + id: E.id, + height: A + }); + }, p = ({ root: I }) => { + I.ref.shouldRescale = !0; + }, m = ({ root: I, action: b }) => { + b.change.key === "crop" && (I.ref.shouldRescale = !0); + }, h = ({ root: I, action: b }) => { + I.ref.imageWidth = b.width, I.ref.imageHeight = b.height, I.ref.shouldRescale = !0, I.ref.shouldDrawPreview = !0, I.dispatch("KICK"); + }; + d.registerWriter( + n( + { + DID_RESIZE_ROOT: p, + DID_STOP_RESIZE: p, + DID_LOAD_ITEM: u, + DID_IMAGE_PREVIEW_CALCULATE_SIZE: h, + DID_UPDATE_ITEM_METADATA: m + }, + ({ root: I, props: b }) => { + I.ref.imagePreview && (I.rect.element.hidden || (I.ref.shouldRescale && (f(I, b), I.ref.shouldRescale = !1), I.ref.shouldDrawPreview && (requestAnimationFrame(() => { + requestAnimationFrame(() => { + I.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE", { + id: b.id + }); + }); + }), I.ref.shouldDrawPreview = !1))); + } + ) + ); + }), { + options: { + // Enable or disable image preview + allowImagePreview: [!0, a.BOOLEAN], + // filters file items to determine which are shown as preview + imagePreviewFilterItem: [() => !0, a.FUNCTION], + // Fixed preview height + imagePreviewHeight: [null, a.INT], + // Min image height + imagePreviewMinHeight: [44, a.INT], + // Max image height + imagePreviewMaxHeight: [256, a.INT], + // Max size of preview file for when createImageBitmap is not supported + imagePreviewMaxFileSize: [null, a.INT], + // The amount of extra pixels added to the image preview to allow comfortable zooming + imagePreviewZoomFactor: [2, a.INT], + // Should we upscale small images to fit the max bounding box of the preview area + imagePreviewUpscale: [!1, a.BOOLEAN], + // Max size of preview file that we allow to try to instant preview if createImageBitmap is not supported, else image is queued for loading + imagePreviewMaxInstantPreviewFileSize: [1e6, a.INT], + // Style of the transparancy indicator used behind images + imagePreviewTransparencyIndicator: [null, a.STRING], + // Enables or disables reading average image color + imagePreviewCalculateAverageImageColor: [!1, a.BOOLEAN], + // Enables or disables the previewing of markup + imagePreviewMarkupShow: [!0, a.BOOLEAN], + // Allows filtering of markup to only show certain shapes + imagePreviewMarkupFilter: [() => !0, a.FUNCTION] + } + }; +}, isBrowser$1 = typeof window < "u" && typeof window.document < "u"; +isBrowser$1 && document.dispatchEvent( + new CustomEvent("FilePond:pluginloaded", { detail: plugin$1 }) +); +/*! * FilePondPluginImageValidateSize 1.2.7 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. - */const isImage=e=>/^image/.test(e.type),getImageSize=e=>new Promise((t,a)=>{const n=document.createElement("img");n.src=URL.createObjectURL(e),n.onerror=r=>{clearInterval(l),a(r)};const l=setInterval(()=>{n.naturalWidth&&n.naturalHeight&&(clearInterval(l),URL.revokeObjectURL(n.src),t({width:n.naturalWidth,height:n.naturalHeight}))},1)}),plugin=({addFilter:e,utils:t})=>{const{Type:a,replaceInString:n,isFile:l}=t,r=(s,o,c)=>new Promise((u,d)=>{const p=({width:h,height:m})=>{const{minWidth:g,minHeight:E,maxWidth:T,maxHeight:I,minResolution:f,maxResolution:b}=o,S=h*m;hT||m>I?d("TOO_BIG"):f!==null&&Sb&&d("TOO_HIGH_RES"),u()};getImageSize(s).then(p).catch(()=>{if(!c){d();return}c(s,o).then(p).catch(()=>d())})});return e("LOAD_FILE",(s,{query:o})=>new Promise((c,u)=>{if(!l(s)||!isImage(s)||!o("GET_ALLOW_IMAGE_VALIDATE_SIZE")){c(s);return}const d={minWidth:o("GET_IMAGE_VALIDATE_SIZE_MIN_WIDTH"),minHeight:o("GET_IMAGE_VALIDATE_SIZE_MIN_HEIGHT"),maxWidth:o("GET_IMAGE_VALIDATE_SIZE_MAX_WIDTH"),maxHeight:o("GET_IMAGE_VALIDATE_SIZE_MAX_HEIGHT"),minResolution:o("GET_IMAGE_VALIDATE_SIZE_MIN_RESOLUTION"),maxResolution:o("GET_IMAGE_VALIDATE_SIZE_MAX_RESOLUTION")},p=o("GET_IMAGE_VALIDATE_SIZE_MEASURE");r(s,d,p).then(()=>{c(s)}).catch(h=>{const m=h?{TOO_SMALL:{label:o("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_SMALL"),details:o("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_SIZE")},TOO_BIG:{label:o("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_BIG"),details:o("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_SIZE")},TOO_LOW_RES:{label:o("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_LOW"),details:o("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_RESOLUTION")},TOO_HIGH_RES:{label:o("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_HIGH"),details:o("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_RESOLUTION")}}[h]:{label:o("GET_IMAGE_VALIDATE_SIZE_LABEL_FORMAT_ERROR"),details:s.type};u({status:{main:m.label,sub:h?n(m.details,d):m.details}})})})),{options:{allowImageValidateSize:[!0,a.BOOLEAN],imageValidateSizeLabelFormatError:["Image type not supported",a.STRING],imageValidateSizeMeasure:[null,a.FUNCTION],imageValidateSizeMinResolution:[null,a.INT],imageValidateSizeMaxResolution:[null,a.INT],imageValidateSizeLabelImageResolutionTooLow:["Resolution is too low",a.STRING],imageValidateSizeLabelImageResolutionTooHigh:["Resolution is too high",a.STRING],imageValidateSizeLabelExpectedMinResolution:["Minimum resolution is {minResolution}",a.STRING],imageValidateSizeLabelExpectedMaxResolution:["Maximum resolution is {maxResolution}",a.STRING],imageValidateSizeMinWidth:[1,a.INT],imageValidateSizeMinHeight:[1,a.INT],imageValidateSizeMaxWidth:[65535,a.INT],imageValidateSizeMaxHeight:[65535,a.INT],imageValidateSizeLabelImageSizeTooSmall:["Image is too small",a.STRING],imageValidateSizeLabelImageSizeTooBig:["Image is too big",a.STRING],imageValidateSizeLabelExpectedMinSize:["Minimum size is {minWidth} × {minHeight}",a.STRING],imageValidateSizeLabelExpectedMaxSize:["Maximum size is {maxWidth} × {maxHeight}",a.STRING]}}},isBrowser=typeof window<"u"&&typeof window.document<"u";isBrowser&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin}));const ar_AR={labelIdle:'اسحب و ادرج ملفاتك أو تصفح ',labelInvalidField:"الحقل يحتوي على ملفات غير صالحة",labelFileWaitingForSize:"بانتظار الحجم",labelFileSizeNotAvailable:"الحجم غير متاح",labelFileLoading:"بالإنتظار",labelFileLoadError:"حدث خطأ أثناء التحميل",labelFileProcessing:"يتم الرفع",labelFileProcessingComplete:"تم الرفع",labelFileProcessingAborted:"تم إلغاء الرفع",labelFileProcessingError:"حدث خطأ أثناء الرفع",labelFileProcessingRevertError:"حدث خطأ أثناء التراجع",labelFileRemoveError:"حدث خطأ أثناء الحذف",labelTapToCancel:"انقر للإلغاء",labelTapToRetry:"انقر لإعادة المحاولة",labelTapToUndo:"انقر للتراجع",labelButtonRemoveItem:"مسح",labelButtonAbortItemLoad:"إلغاء",labelButtonRetryItemLoad:"إعادة",labelButtonAbortItemProcessing:"إلغاء",labelButtonUndoItemProcessing:"تراجع",labelButtonRetryItemProcessing:"إعادة",labelButtonProcessItem:"رفع",labelMaxFileSizeExceeded:"الملف كبير جدا",labelMaxFileSize:"حجم الملف الأقصى: {filesize}",labelMaxTotalFileSizeExceeded:"تم تجاوز الحد الأقصى للحجم الإجمالي",labelMaxTotalFileSize:"الحد الأقصى لحجم الملف: {filesize}",labelFileTypeNotAllowed:"ملف من نوع غير صالح",fileValidateTypeLabelExpectedTypes:"تتوقع {allButLastType} من {lastType}",imageValidateSizeLabelFormatError:"نوع الصورة غير مدعوم",imageValidateSizeLabelImageSizeTooSmall:"الصورة صغير جدا",imageValidateSizeLabelImageSizeTooBig:"الصورة كبيرة جدا",imageValidateSizeLabelExpectedMinSize:"الحد الأدنى للأبعاد هو: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"الحد الأقصى للأبعاد هو: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"الدقة ضعيفة جدا",imageValidateSizeLabelImageResolutionTooHigh:"الدقة مرتفعة جدا",imageValidateSizeLabelExpectedMinResolution:"أقل دقة: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"أقصى دقة: {maxResolution}"},az_AZ={labelIdle:'Faylınızı Sürüşdürün & Buraxın ya da Seçin ',labelInvalidField:"Sahədə etibarsız fayllar var",labelFileWaitingForSize:"Ölçü hesablanır",labelFileSizeNotAvailable:"Ölçü mövcud deyil",labelFileLoading:"Yüklənir",labelFileLoadError:"Yükləmə əsnasında xəta baş verdi",labelFileProcessing:"Yüklənir",labelFileProcessingComplete:"Yükləmə tamamlandı",labelFileProcessingAborted:"Yükləmə ləğv edildi",labelFileProcessingError:"Yükəyərkən xəta baş verdi",labelFileProcessingRevertError:"Geri çəkərkən xəta baş verdi",labelFileRemoveError:"Çıxararkən xəta baş verdi",labelTapToCancel:"İmtina etmək üçün klikləyin",labelTapToRetry:"Təkrar yoxlamaq üçün klikləyin",labelTapToUndo:"Geri almaq üçün klikləyin",labelButtonRemoveItem:"Çıxar",labelButtonAbortItemLoad:"İmtina Et",labelButtonRetryItemLoad:"Təkrar yoxla",labelButtonAbortItemProcessing:"İmtina et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"Təkrar yoxla",labelButtonProcessItem:"Yüklə",labelMaxFileSizeExceeded:"Fayl çox böyükdür",labelMaxFileSize:"Ən böyük fayl ölçüsü: {filesize}",labelMaxTotalFileSizeExceeded:"Maksimum ölçü keçildi",labelMaxTotalFileSize:"Maksimum fayl ölçüsü :{filesize}",labelFileTypeNotAllowed:"Etibarsız fayl tipi",fileValidateTypeLabelExpectedTypes:"Bu {allButLastType} ya da bu fayl olması lazımdır: {lastType}",imageValidateSizeLabelFormatError:"Şəkil tipi dəstəklənmir",imageValidateSizeLabelImageSizeTooSmall:"Şəkil çox kiçik",imageValidateSizeLabelImageSizeTooBig:"Şəkil çox böyük",imageValidateSizeLabelExpectedMinSize:"Minimum ölçü {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimum ölçü {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Görüntü imkanı çox aşağı",imageValidateSizeLabelImageResolutionTooHigh:"Görüntü imkanı çox yüksək",imageValidateSizeLabelExpectedMinResolution:"Minimum görüntü imkanı {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum görüntü imkanı {maxResolution}"},cs_CZ={labelIdle:'Přetáhněte soubor sem (drag&drop) nebo Vyhledat ',labelInvalidField:"Pole obsahuje chybné soubory",labelFileWaitingForSize:"Zjišťuje se velikost",labelFileSizeNotAvailable:"Velikost není známá",labelFileLoading:"Přenáší se",labelFileLoadError:"Chyba při přenosu",labelFileProcessing:"Probíhá upload",labelFileProcessingComplete:"Upload dokončen",labelFileProcessingAborted:"Upload stornován",labelFileProcessingError:"Chyba při uploadu",labelFileProcessingRevertError:"Chyba při obnově",labelFileRemoveError:"Chyba při odstranění",labelTapToCancel:"klepněte pro storno",labelTapToRetry:"klepněte pro opakování",labelTapToUndo:"klepněte pro vrácení",labelButtonRemoveItem:"Odstranit",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakovat",labelButtonAbortItemProcessing:"Zpět",labelButtonUndoItemProcessing:"Vrátit",labelButtonRetryItemProcessing:"Opakovat",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Soubor je příliš velký",labelMaxFileSize:"Největší velikost souboru je {filesize}",labelMaxTotalFileSizeExceeded:"Překročena maximální celková velikost souboru",labelMaxTotalFileSize:"Maximální celková velikost souboru je {filesize}",labelFileTypeNotAllowed:"Soubor je nesprávného typu",fileValidateTypeLabelExpectedTypes:"Očekává se {allButLastType} nebo {lastType}",imageValidateSizeLabelFormatError:"Obrázek tohoto typu není podporován",imageValidateSizeLabelImageSizeTooSmall:"Obrázek je příliš malý",imageValidateSizeLabelImageSizeTooBig:"Obrázek je příliš velký",imageValidateSizeLabelExpectedMinSize:"Minimální rozměr je {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximální rozměr je {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozlišení je příliš malé",imageValidateSizeLabelImageResolutionTooHigh:"Rozlišení je příliš velké",imageValidateSizeLabelExpectedMinResolution:"Minimální rozlišení je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximální rozlišení je {maxResolution}"},da_DK={labelIdle:'Træk & slip filer eller Gennemse ',labelInvalidField:"Felt indeholder ugyldige filer",labelFileWaitingForSize:"Venter på størrelse",labelFileSizeNotAvailable:"Størrelse ikke tilgængelig",labelFileLoading:"Loader",labelFileLoadError:"Load fejlede",labelFileProcessing:"Uploader",labelFileProcessingComplete:"Upload færdig",labelFileProcessingAborted:"Upload annulleret",labelFileProcessingError:"Upload fejlede",labelFileProcessingRevertError:"Fortryd fejlede",labelFileRemoveError:"Fjern fejlede",labelTapToCancel:"tryk for at annullere",labelTapToRetry:"tryk for at prøve igen",labelTapToUndo:"tryk for at fortryde",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Annuller",labelButtonRetryItemLoad:"Forsøg igen",labelButtonAbortItemProcessing:"Annuller",labelButtonUndoItemProcessing:"Fortryd",labelButtonRetryItemProcessing:"Prøv igen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filstørrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal totalstørrelse overskredet",labelMaxTotalFileSize:"Maksimal total filstørrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Ugyldigt format",imageValidateSizeLabelImageSizeTooSmall:"Billedet er for lille",imageValidateSizeLabelImageSizeTooBig:"Billedet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimum størrelse er {minBredde} × {minHøjde}",imageValidateSizeLabelExpectedMaxSize:"Maksimal størrelse er {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"For lav opløsning",imageValidateSizeLabelImageResolutionTooHigh:"For høj opløsning",imageValidateSizeLabelExpectedMinResolution:"Minimum opløsning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal opløsning er {maxResolution}"},de_DE={labelIdle:'Dateien ablegen oder auswählen ',labelInvalidField:"Feld beinhaltet ungültige Dateien",labelFileWaitingForSize:"Dateigröße berechnen",labelFileSizeNotAvailable:"Dateigröße nicht verfügbar",labelFileLoading:"Laden",labelFileLoadError:"Fehler beim Laden",labelFileProcessing:"Upload läuft",labelFileProcessingComplete:"Upload abgeschlossen",labelFileProcessingAborted:"Upload abgebrochen",labelFileProcessingError:"Fehler beim Upload",labelFileProcessingRevertError:"Fehler beim Wiederherstellen",labelFileRemoveError:"Fehler beim Löschen",labelTapToCancel:"abbrechen",labelTapToRetry:"erneut versuchen",labelTapToUndo:"rückgängig",labelButtonRemoveItem:"Entfernen",labelButtonAbortItemLoad:"Verwerfen",labelButtonRetryItemLoad:"Erneut versuchen",labelButtonAbortItemProcessing:"Abbrechen",labelButtonUndoItemProcessing:"Rückgängig",labelButtonRetryItemProcessing:"Erneut versuchen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Datei ist zu groß",labelMaxFileSize:"Maximale Dateigröße: {filesize}",labelMaxTotalFileSizeExceeded:"Maximale gesamte Dateigröße überschritten",labelMaxTotalFileSize:"Maximale gesamte Dateigröße: {filesize}",labelFileTypeNotAllowed:"Dateityp ungültig",fileValidateTypeLabelExpectedTypes:"Erwartet {allButLastType} oder {lastType}",imageValidateSizeLabelFormatError:"Bildtyp nicht unterstützt",imageValidateSizeLabelImageSizeTooSmall:"Bild ist zu klein",imageValidateSizeLabelImageSizeTooBig:"Bild ist zu groß",imageValidateSizeLabelExpectedMinSize:"Mindestgröße: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale Größe: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Auflösung ist zu niedrig",imageValidateSizeLabelImageResolutionTooHigh:"Auflösung ist zu hoch",imageValidateSizeLabelExpectedMinResolution:"Mindestauflösung: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale Auflösung: {maxResolution}"},el_EL={labelIdle:'Σύρετε τα αρχεία σας στο πλαίσιο ή Επιλέξτε ',labelInvalidField:"Το πεδίο περιέχει μη έγκυρα αρχεία",labelFileWaitingForSize:"Σε αναμονή για το μέγεθος",labelFileSizeNotAvailable:"Μέγεθος μη διαθέσιμο",labelFileLoading:"Φόρτωση σε εξέλιξη",labelFileLoadError:"Σφάλμα κατά τη φόρτωση",labelFileProcessing:"Επεξεργασία",labelFileProcessingComplete:"Η επεξεργασία ολοκληρώθηκε",labelFileProcessingAborted:"Η επεξεργασία ακυρώθηκε",labelFileProcessingError:"Σφάλμα κατά την επεξεργασία",labelFileProcessingRevertError:"Σφάλμα κατά την επαναφορά",labelFileRemoveError:"Σφάλμα κατά την διαγραφή",labelTapToCancel:"πατήστε για ακύρωση",labelTapToRetry:"πατήστε για επανάληψη",labelTapToUndo:"πατήστε για αναίρεση",labelButtonRemoveItem:"Αφαίρεση",labelButtonAbortItemLoad:"Ακύρωση",labelButtonRetryItemLoad:"Επανάληψη",labelButtonAbortItemProcessing:"Ακύρωση",labelButtonUndoItemProcessing:"Αναίρεση",labelButtonRetryItemProcessing:"Επανάληψη",labelButtonProcessItem:"Μεταφόρτωση",labelMaxFileSizeExceeded:"Το αρχείο είναι πολύ μεγάλο",labelMaxFileSize:"Το μέγιστο μέγεθος αρχείου είναι {filesize}",labelMaxTotalFileSizeExceeded:"Υπέρβαση του μέγιστου συνολικού μεγέθους",labelMaxTotalFileSize:"Το μέγιστο συνολικό μέγεθος αρχείων είναι {filesize}",labelFileTypeNotAllowed:"Μη έγκυρος τύπος αρχείου",fileValidateTypeLabelExpectedTypes:"Τα αποδεκτά αρχεία είναι {allButLastType} ή {lastType}",imageValidateSizeLabelFormatError:"Ο τύπος της εικόνας δεν υποστηρίζεται",imageValidateSizeLabelImageSizeTooSmall:"Η εικόνα είναι πολύ μικρή",imageValidateSizeLabelImageSizeTooBig:"Η εικόνα είναι πολύ μεγάλη",imageValidateSizeLabelExpectedMinSize:"Το ελάχιστο αποδεκτό μέγεθος είναι {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Το μέγιστο αποδεκτό μέγεθος είναι {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Η ανάλυση της εικόνας είναι πολύ χαμηλή",imageValidateSizeLabelImageResolutionTooHigh:"Η ανάλυση της εικόνας είναι πολύ υψηλή",imageValidateSizeLabelExpectedMinResolution:"Η ελάχιστη αποδεκτή ανάλυση είναι {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Η μέγιστη αποδεκτή ανάλυση είναι {maxResolution}"},en_EN={labelIdle:'Drag & Drop your files or Browse ',labelInvalidField:"Field contains invalid files",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"Size not available",labelFileLoading:"Loading",labelFileLoadError:"Error during load",labelFileProcessing:"Uploading",labelFileProcessingComplete:"Upload complete",labelFileProcessingAborted:"Upload cancelled",labelFileProcessingError:"Error during upload",labelFileProcessingRevertError:"Error during revert",labelFileRemoveError:"Error during remove",labelTapToCancel:"tap to cancel",labelTapToRetry:"tap to retry",labelTapToUndo:"tap to undo",labelButtonRemoveItem:"Remove",labelButtonAbortItemLoad:"Abort",labelButtonRetryItemLoad:"Retry",labelButtonAbortItemProcessing:"Cancel",labelButtonUndoItemProcessing:"Undo",labelButtonRetryItemProcessing:"Retry",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"File is too large",labelMaxFileSize:"Maximum file size is {filesize}",labelMaxTotalFileSizeExceeded:"Maximum total size exceeded",labelMaxTotalFileSize:"Maximum total file size is {filesize}",labelFileTypeNotAllowed:"File of invalid type",fileValidateTypeLabelExpectedTypes:"Expects {allButLastType} or {lastType}",imageValidateSizeLabelFormatError:"Image type not supported",imageValidateSizeLabelImageSizeTooSmall:"Image is too small",imageValidateSizeLabelImageSizeTooBig:"Image is too big",imageValidateSizeLabelExpectedMinSize:"Minimum size is {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum size is {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolution is too low",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimum resolution is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum resolution is {maxResolution}"},es_ES={labelIdle:'Arrastra y suelta tus archivos o Examina ',labelInvalidField:"El campo contiene archivos inválidos",labelFileWaitingForSize:"Esperando tamaño",labelFileSizeNotAvailable:"Tamaño no disponible",labelFileLoading:"Cargando",labelFileLoadError:"Error durante la carga",labelFileProcessing:"Subiendo",labelFileProcessingComplete:"Subida completa",labelFileProcessingAborted:"Subida cancelada",labelFileProcessingError:"Error durante la subida",labelFileProcessingRevertError:"Error durante la reversión",labelFileRemoveError:"Error durante la eliminación",labelTapToCancel:"toca para cancelar",labelTapToRetry:"tocar para reintentar",labelTapToUndo:"tocar para deshacer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancelar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Deshacer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Subir",labelMaxFileSizeExceeded:"El archivo es demasiado grande",labelMaxFileSize:"El tamaño máximo del archivo es {filesize}",labelMaxTotalFileSizeExceeded:"Tamaño total máximo excedido",labelMaxTotalFileSize:"El tamaño total máximo del archivo es {filesize}",labelFileTypeNotAllowed:"Archivo de tipo inválido",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagen no soportada",imageValidateSizeLabelImageSizeTooSmall:"La imagen es demasiado pequeña",imageValidateSizeLabelImageSizeTooBig:"La imagen es demasiado grande",imageValidateSizeLabelExpectedMinSize:"El tamaño mínimo es {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"El tamaño máximo es {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resolución es demasiado baja",imageValidateSizeLabelImageResolutionTooHigh:"La resolución es demasiado alta",imageValidateSizeLabelExpectedMinResolution:"La resolución mínima es {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resolución máxima es {maxResolution}"},fa_IR={labelIdle:'فایل را اینجا بکشید و رها کنید، یا جستجو کنید ',labelInvalidField:"فیلد دارای فایل های نامعتبر است",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"حجم فایل مجاز نیست",labelFileLoading:"درحال بارگذاری",labelFileLoadError:"خطا در زمان اجرا",labelFileProcessing:"درحال بارگذاری",labelFileProcessingComplete:"بارگذاری کامل شد",labelFileProcessingAborted:"بارگذاری لغو شد",labelFileProcessingError:"خطا در زمان بارگذاری",labelFileProcessingRevertError:"خطا در زمان حذف",labelFileRemoveError:"خطا در زمان حذف",labelTapToCancel:"برای لغو ضربه بزنید",labelTapToRetry:"برای تکرار کلیک کنید",labelTapToUndo:"برای برگشت کلیک کنید",labelButtonRemoveItem:"حذف",labelButtonAbortItemLoad:"لغو",labelButtonRetryItemLoad:"تکرار",labelButtonAbortItemProcessing:"لغو",labelButtonUndoItemProcessing:"برگشت",labelButtonRetryItemProcessing:"تکرار",labelButtonProcessItem:"بارگذاری",labelMaxFileSizeExceeded:"فایل بسیار حجیم است",labelMaxFileSize:"حداکثر مجاز فایل {filesize} است",labelMaxTotalFileSizeExceeded:"از حداکثر حجم فایل بیشتر شد",labelMaxTotalFileSize:"حداکثر حجم فایل {filesize} است",labelFileTypeNotAllowed:"نوع فایل نامعتبر است",fileValidateTypeLabelExpectedTypes:"در انتظار {allButLastType} یا {lastType}",imageValidateSizeLabelFormatError:"فرمت تصویر پشتیبانی نمی شود",imageValidateSizeLabelImageSizeTooSmall:"تصویر بسیار کوچک است",imageValidateSizeLabelImageSizeTooBig:"تصویر بسیار بزرگ است",imageValidateSizeLabelExpectedMinSize:"حداقل اندازه {minWidth} × {minHeight} است",imageValidateSizeLabelExpectedMaxSize:"حداکثر اندازه {maxWidth} × {maxHeight} است",imageValidateSizeLabelImageResolutionTooLow:"وضوح تصویر بسیار کم است",imageValidateSizeLabelImageResolutionTooHigh:"وضوع تصویر بسیار زیاد است",imageValidateSizeLabelExpectedMinResolution:"حداقل وضوح تصویر {minResolution} است",imageValidateSizeLabelExpectedMaxResolution:"حداکثر وضوح تصویر {maxResolution} است"},fi_FI={labelIdle:'Vedä ja pudota tiedostoja tai Selaa ',labelInvalidField:"Kentässä on virheellisiä tiedostoja",labelFileWaitingForSize:"Odotetaan kokoa",labelFileSizeNotAvailable:"Kokoa ei saatavilla",labelFileLoading:"Ladataan",labelFileLoadError:"Virhe latauksessa",labelFileProcessing:"Lähetetään",labelFileProcessingComplete:"Lähetys valmis",labelFileProcessingAborted:"Lähetys peruttu",labelFileProcessingError:"Virhe lähetyksessä",labelFileProcessingRevertError:"Virhe palautuksessa",labelFileRemoveError:"Virhe poistamisessa",labelTapToCancel:"peruuta napauttamalla",labelTapToRetry:"yritä uudelleen napauttamalla",labelTapToUndo:"kumoa napauttamalla",labelButtonRemoveItem:"Poista",labelButtonAbortItemLoad:"Keskeytä",labelButtonRetryItemLoad:"Yritä uudelleen",labelButtonAbortItemProcessing:"Peruuta",labelButtonUndoItemProcessing:"Kumoa",labelButtonRetryItemProcessing:"Yritä uudelleen",labelButtonProcessItem:"Lähetä",labelMaxFileSizeExceeded:"Tiedoston koko on liian suuri",labelMaxFileSize:"Tiedoston maksimikoko on {filesize}",labelMaxTotalFileSizeExceeded:"Tiedostojen yhdistetty maksimikoko ylitetty",labelMaxTotalFileSize:"Tiedostojen yhdistetty maksimikoko on {filesize}",labelFileTypeNotAllowed:"Tiedostotyyppiä ei sallita",fileValidateTypeLabelExpectedTypes:"Sallitaan {allButLastType} tai {lastType}",imageValidateSizeLabelFormatError:"Kuvatyyppiä ei tueta",imageValidateSizeLabelImageSizeTooSmall:"Kuva on liian pieni",imageValidateSizeLabelImageSizeTooBig:"Kuva on liian suuri",imageValidateSizeLabelExpectedMinSize:"Minimikoko on {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimikoko on {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resoluutio on liian pieni",imageValidateSizeLabelImageResolutionTooHigh:"Resoluutio on liian suuri",imageValidateSizeLabelExpectedMinResolution:"Minimiresoluutio on {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimiresoluutio on {maxResolution}"},fr_FR={labelIdle:'Faites glisser vos fichiers ou Parcourir ',labelInvalidField:"Le champ contient des fichiers invalides",labelFileWaitingForSize:"En attente de taille",labelFileSizeNotAvailable:"Taille non disponible",labelFileLoading:"Chargement",labelFileLoadError:"Erreur durant le chargement",labelFileProcessing:"Traitement",labelFileProcessingComplete:"Traitement effectué",labelFileProcessingAborted:"Traitement interrompu",labelFileProcessingError:"Erreur durant le traitement",labelFileProcessingRevertError:"Erreur durant la restauration",labelFileRemoveError:"Erreur durant la suppression",labelTapToCancel:"appuyer pour annuler",labelTapToRetry:"appuyer pour réessayer",labelTapToUndo:"appuyer pour revenir en arrière",labelButtonRemoveItem:"Retirer",labelButtonAbortItemLoad:"Annuler",labelButtonRetryItemLoad:"Recommencer",labelButtonAbortItemProcessing:"Annuler",labelButtonUndoItemProcessing:"Revenir en arrière",labelButtonRetryItemProcessing:"Recommencer",labelButtonProcessItem:"Transférer",labelMaxFileSizeExceeded:"Le fichier est trop volumineux",labelMaxFileSize:"La taille maximale de fichier est {filesize}",labelMaxTotalFileSizeExceeded:"Taille totale maximale dépassée",labelMaxTotalFileSize:"La taille totale maximale des fichiers est {filesize}",labelFileTypeNotAllowed:"Fichier non valide",fileValidateTypeLabelExpectedTypes:"Attendu {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Type d'image non pris en charge",imageValidateSizeLabelImageSizeTooSmall:"L'image est trop petite",imageValidateSizeLabelImageSizeTooBig:"L'image est trop grande",imageValidateSizeLabelExpectedMinSize:"La taille minimale est {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La taille maximale est {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La résolution est trop faible",imageValidateSizeLabelImageResolutionTooHigh:"La résolution est trop élevée",imageValidateSizeLabelExpectedMinResolution:"La résolution minimale est {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La résolution maximale est {maxResolution}"},he_HE={labelIdle:'גרור ושחרר את הקבצים כאן או לחץ כאן לבחירה ',labelInvalidField:"קובץ לא חוקי",labelFileWaitingForSize:"מחשב את גודל הקבצים",labelFileSizeNotAvailable:"לא ניתן לקבוע את גודל הקבצים",labelFileLoading:"טוען...",labelFileLoadError:"שגיאה ארעה בעת טעינת הקבצים",labelFileProcessing:"מעלה את הקבצים",labelFileProcessingComplete:"העלאת הקבצים הסתיימה",labelFileProcessingAborted:"העלאת הקבצים בוטלה",labelFileProcessingError:"שגיאה ארעה בעת העלאת הקבצים",labelFileProcessingRevertError:"שגיאה ארעה בעת שחזור הקבצים",labelFileRemoveError:"שגיאה ארעה בעת הסרת הקובץ",labelTapToCancel:"הקלק לביטול",labelTapToRetry:"הקלק לנסות שנית",labelTapToUndo:"הקלק לשחזר",labelButtonRemoveItem:"הסר",labelButtonAbortItemLoad:"בטל",labelButtonRetryItemLoad:"טען שנית",labelButtonAbortItemProcessing:"בטל",labelButtonUndoItemProcessing:"שחזר",labelButtonRetryItemProcessing:"נסה שנית",labelButtonProcessItem:"העלה קובץ",labelMaxFileSizeExceeded:"הקובץ גדול מדי",labelMaxFileSize:"גודל המירבי המותר הוא: {filesize}",labelMaxTotalFileSizeExceeded:"גודל הקבצים חורג מהכמות המותרת",labelMaxTotalFileSize:"הגודל המירבי של סך הקבצים: {filesize}",labelFileTypeNotAllowed:"קובץ מסוג זה אינו מותר",fileValidateTypeLabelExpectedTypes:"הקבצים המותרים הם {allButLastType} או {lastType}",imageValidateSizeLabelFormatError:"תמונה בפורמט זה אינה נתמכת",imageValidateSizeLabelImageSizeTooSmall:"תמונה זו קטנה מדי",imageValidateSizeLabelImageSizeTooBig:"תמונה זו גדולה מדי",imageValidateSizeLabelExpectedMinSize:"הגודל צריך להיות לפחות: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"הגודל המרבי המותר: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"הרזולוציה של תמונה זו נמוכה מדי",imageValidateSizeLabelImageResolutionTooHigh:"הרזולוציה של תמונה זו גבוהה מדי",imageValidateSizeLabelExpectedMinResolution:"הרזולוציה צריכה להיות לפחות: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"הרזולוציה המירבית המותרת היא: {maxResolution}"},hr_HR={labelIdle:'Ovdje "ispusti" datoteku ili Pretraži ',labelInvalidField:"Polje sadrži neispravne datoteke",labelFileWaitingForSize:"Čekanje na veličinu datoteke",labelFileSizeNotAvailable:"Veličina datoteke nije dostupna",labelFileLoading:"Učitavanje",labelFileLoadError:"Greška tijekom učitavanja",labelFileProcessing:"Prijenos",labelFileProcessingComplete:"Prijenos završen",labelFileProcessingAborted:"Prijenos otkazan",labelFileProcessingError:"Greška tijekom prijenosa",labelFileProcessingRevertError:"Greška tijekom vraćanja",labelFileRemoveError:"Greška tijekom uklananja datoteke",labelTapToCancel:"Dodirni za prekid",labelTapToRetry:"Dodirni za ponovno",labelTapToUndo:"Dodirni za vraćanje",labelButtonRemoveItem:"Ukloni",labelButtonAbortItemLoad:"Odbaci",labelButtonRetryItemLoad:"Ponovi",labelButtonAbortItemProcessing:"Prekini",labelButtonUndoItemProcessing:"Vrati",labelButtonRetryItemProcessing:"Ponovi",labelButtonProcessItem:"Prijenos",labelMaxFileSizeExceeded:"Datoteka je prevelika",labelMaxFileSize:"Maksimalna veličina datoteke je {filesize}",labelMaxTotalFileSizeExceeded:"Maksimalna ukupna veličina datoteke prekoračena",labelMaxTotalFileSize:"Maksimalna ukupna veličina datoteke je {filesize}",labelFileTypeNotAllowed:"Tip datoteke nije podržan",fileValidateTypeLabelExpectedTypes:"Očekivan {allButLastType} ili {lastType}",imageValidateSizeLabelFormatError:"Tip slike nije podržan",imageValidateSizeLabelImageSizeTooSmall:"Slika je premala",imageValidateSizeLabelImageSizeTooBig:"Slika je prevelika",imageValidateSizeLabelExpectedMinSize:"Minimalna veličina je {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalna veličina je {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolucija je preniska",imageValidateSizeLabelImageResolutionTooHigh:"Rezolucija je previsoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rezolucija je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimalna rezolucija je {maxResolution}"},hu_HU={labelIdle:'Mozgasd ide a fájlt a feltöltéshez, vagy tallózás ',labelInvalidField:"A mező érvénytelen fájlokat tartalmaz",labelFileWaitingForSize:"Fáljméret kiszámolása",labelFileSizeNotAvailable:"A fájlméret nem elérhető",labelFileLoading:"Töltés",labelFileLoadError:"Hiba a betöltés során",labelFileProcessing:"Feltöltés",labelFileProcessingComplete:"Sikeres feltöltés",labelFileProcessingAborted:"A feltöltés megszakítva",labelFileProcessingError:"Hiba történt a feltöltés során",labelFileProcessingRevertError:"Hiba a visszaállítás során",labelFileRemoveError:"Hiba történt az eltávolítás során",labelTapToCancel:"koppints a törléshez",labelTapToRetry:"koppints az újrakezdéshez",labelTapToUndo:"koppints a visszavonáshoz",labelButtonRemoveItem:"Eltávolítás",labelButtonAbortItemLoad:"Megszakítás",labelButtonRetryItemLoad:"Újrapróbálkozás",labelButtonAbortItemProcessing:"Megszakítás",labelButtonUndoItemProcessing:"Visszavonás",labelButtonRetryItemProcessing:"Újrapróbálkozás",labelButtonProcessItem:"Feltöltés",labelMaxFileSizeExceeded:"A fájl túllépte a maximális méretet",labelMaxFileSize:"Maximális fájlméret: {filesize}",labelMaxTotalFileSizeExceeded:"Túllépte a maximális teljes méretet",labelMaxTotalFileSize:"A maximáis teljes fájlméret: {filesize}",labelFileTypeNotAllowed:"Érvénytelen típusú fájl",fileValidateTypeLabelExpectedTypes:"Engedélyezett típusok {allButLastType} vagy {lastType}",imageValidateSizeLabelFormatError:"A képtípus nem támogatott",imageValidateSizeLabelImageSizeTooSmall:"A kép túl kicsi",imageValidateSizeLabelImageSizeTooBig:"A kép túl nagy",imageValidateSizeLabelExpectedMinSize:"Minimum méret: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum méret: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"A felbontás túl alacsony",imageValidateSizeLabelImageResolutionTooHigh:"A felbontás túl magas",imageValidateSizeLabelExpectedMinResolution:"Minimáis felbontás: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximális felbontás: {maxResolution}"},id_ID={labelIdle:'Seret & Jatuhkan berkas Anda atau Jelajahi',labelInvalidField:"Isian berisi berkas yang tidak valid",labelFileWaitingForSize:"Menunggu ukuran berkas",labelFileSizeNotAvailable:"Ukuran berkas tidak tersedia",labelFileLoading:"Memuat",labelFileLoadError:"Kesalahan saat memuat",labelFileProcessing:"Mengunggah",labelFileProcessingComplete:"Pengunggahan selesai",labelFileProcessingAborted:"Pengunggahan dibatalkan",labelFileProcessingError:"Kesalahan saat pengunggahan",labelFileProcessingRevertError:"Kesalahan saat pemulihan",labelFileRemoveError:"Kesalahan saat penghapusan",labelTapToCancel:"ketuk untuk membatalkan",labelTapToRetry:"ketuk untuk mencoba lagi",labelTapToUndo:"ketuk untuk mengurungkan",labelButtonRemoveItem:"Hapus",labelButtonAbortItemLoad:"Batalkan",labelButtonRetryItemLoad:"Coba Kembali",labelButtonAbortItemProcessing:"Batalkan",labelButtonUndoItemProcessing:"Urungkan",labelButtonRetryItemProcessing:"Coba Kembali",labelButtonProcessItem:"Unggah",labelMaxFileSizeExceeded:"Berkas terlalu besar",labelMaxFileSize:"Ukuran berkas maksimum adalah {filesize}",labelMaxTotalFileSizeExceeded:"Jumlah berkas maksimum terlampaui",labelMaxTotalFileSize:"Jumlah berkas maksimum adalah {filesize}",labelFileTypeNotAllowed:"Jenis berkas tidak valid",fileValidateTypeLabelExpectedTypes:"Mengharapkan {allButLastType} atau {lastType}",imageValidateSizeLabelFormatError:"Jenis citra tidak didukung",imageValidateSizeLabelImageSizeTooSmall:"Citra terlalu kecil",imageValidateSizeLabelImageSizeTooBig:"Citra terlalu besar",imageValidateSizeLabelExpectedMinSize:"Ukuran minimum adalah {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Ukuran maksimum adalah {minWidth} × {minHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolusi terlalu rendah",imageValidateSizeLabelImageResolutionTooHigh:"Resolusi terlalu tinggi",imageValidateSizeLabelExpectedMinResolution:"Resolusi minimum adalah {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolusi maksimum adalah {maxResolution}"},it_IT={labelIdle:'Trascina e rilascia i tuoi file oppure Carica ',labelInvalidField:"Il campo contiene dei file non validi",labelFileWaitingForSize:"Aspettando le dimensioni",labelFileSizeNotAvailable:"Dimensioni non disponibili",labelFileLoading:"Caricamento",labelFileLoadError:"Errore durante il caricamento",labelFileProcessing:"Caricamento",labelFileProcessingComplete:"Caricamento completato",labelFileProcessingAborted:"Caricamento cancellato",labelFileProcessingError:"Errore durante il caricamento",labelFileProcessingRevertError:"Errore durante il ripristino",labelFileRemoveError:"Errore durante l'eliminazione",labelTapToCancel:"tocca per cancellare",labelTapToRetry:"tocca per riprovare",labelTapToUndo:"tocca per ripristinare",labelButtonRemoveItem:"Elimina",labelButtonAbortItemLoad:"Cancella",labelButtonRetryItemLoad:"Ritenta",labelButtonAbortItemProcessing:"Camcella",labelButtonUndoItemProcessing:"Indietro",labelButtonRetryItemProcessing:"Ritenta",labelButtonProcessItem:"Carica",labelMaxFileSizeExceeded:"Il peso del file è eccessivo",labelMaxFileSize:"Il peso massimo del file è {filesize}",labelMaxTotalFileSizeExceeded:"Dimensione totale massima superata",labelMaxTotalFileSize:"La dimensione massima totale del file è {filesize}",labelFileTypeNotAllowed:"File non supportato",fileValidateTypeLabelExpectedTypes:"Aspetta {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo di immagine non compatibile",imageValidateSizeLabelImageSizeTooSmall:"L'immagine è troppo piccola",imageValidateSizeLabelImageSizeTooBig:"L'immagine è troppo grande",imageValidateSizeLabelExpectedMinSize:"La dimensione minima è {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La dimensione massima è {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La risoluzione è troppo bassa",imageValidateSizeLabelImageResolutionTooHigh:"La risoluzione è troppo alta",imageValidateSizeLabelExpectedMinResolution:"La risoluzione minima è {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La risoluzione massima è {maxResolution}"},ja_JA={labelIdle:'ファイルをドラッグ&ドロップ又はファイル選択',labelInvalidField:"アップロードできないファイルが含まれています",labelFileWaitingForSize:"ファイルサイズを待っています",labelFileSizeNotAvailable:"ファイルサイズがみつかりません",labelFileLoading:"読込中...",labelFileLoadError:"読込中にエラーが発生",labelFileProcessing:"読込中...",labelFileProcessingComplete:"アップロード完了",labelFileProcessingAborted:"アップロードがキャンセルされました",labelFileProcessingError:"アップロード中にエラーが発生",labelFileProcessingRevertError:"ロールバック中にエラーが発生",labelFileRemoveError:"削除中にエラーが発生",labelTapToCancel:"クリックしてキャンセル",labelTapToRetry:"クリックしてもう一度お試し下さい",labelTapToUndo:"元に戻すにはタップします",labelButtonRemoveItem:"削除",labelButtonAbortItemLoad:"中断",labelButtonRetryItemLoad:"もう一度実行",labelButtonAbortItemProcessing:"キャンセル",labelButtonUndoItemProcessing:"元に戻す",labelButtonRetryItemProcessing:"もう一度実行",labelButtonProcessItem:"アップロード",labelMaxFileSizeExceeded:"ファイルサイズが大きすぎます",labelMaxFileSize:"最大ファイルサイズは {filesize} です",labelMaxTotalFileSizeExceeded:"最大合計サイズを超えました",labelMaxTotalFileSize:"最大合計ファイルサイズは {filesize} です",labelFileTypeNotAllowed:"無効なファイルです",fileValidateTypeLabelExpectedTypes:"サポートしているファイルは {allButLastType} 又は {lastType} です",imageValidateSizeLabelFormatError:"サポートしていない画像です",imageValidateSizeLabelImageSizeTooSmall:"画像が小さすぎます",imageValidateSizeLabelImageSizeTooBig:"画像が大きすぎます",imageValidateSizeLabelExpectedMinSize:"画像の最小サイズは{minWidth}×{minHeight}です",imageValidateSizeLabelExpectedMaxSize:"画像の最大サイズは{maxWidth} × {maxHeight}です",imageValidateSizeLabelImageResolutionTooLow:"画像の解像度が低すぎます",imageValidateSizeLabelImageResolutionTooHigh:"画像の解像度が高すぎます",imageValidateSizeLabelExpectedMinResolution:"画像の最小解像度は{minResolution}です",imageValidateSizeLabelExpectedMaxResolution:"画像の最大解像度は{maxResolution}です"},km_KM={labelIdle:'ទាញ&ដាក់ហ្វាល់ឯកសាររបស់អ្នក ឬ ស្វែងរក ',labelInvalidField:"ចន្លោះមានឯកសារមិនត្រឹមត្រូវ",labelFileWaitingForSize:"កំពុងរង់ចាំទំហំ",labelFileSizeNotAvailable:"ទំហំមិនអាចប្រើបាន",labelFileLoading:"កំពុងដំណើរការ",labelFileLoadError:"មានបញ្ហាកំឡុងពេលដំណើរការ",labelFileProcessing:"កំពុងផ្ទុកឡើង",labelFileProcessingComplete:"ការផ្ទុកឡើងពេញលេញ",labelFileProcessingAborted:"ការបង្ហោះត្រូវបានបោះបង់",labelFileProcessingError:"មានបញ្ហាកំឡុងពេលកំពុងផ្ទុកឡើង",labelFileProcessingRevertError:"មានបញ្ហាកំឡុងពេលត្រឡប់",labelFileRemoveError:"មានបញ្ហាកំឡុងពេលដកចេញ",labelTapToCancel:"ចុចដើម្បីបោះបង់",labelTapToRetry:"ចុចដើម្បីព្យាយាមម្តងទៀត",labelTapToUndo:"ចុចដើម្បីមិនធ្វើវិញ",labelButtonRemoveItem:"យកចេញ",labelButtonAbortItemLoad:"បោះបង់",labelButtonRetryItemLoad:"ព្យាយាមម្តងទៀត",labelButtonAbortItemProcessing:"បោះបង់",labelButtonUndoItemProcessing:"មិនធ្វើវិញ",labelButtonRetryItemProcessing:"ព្យាយាមម្តងទៀត",labelButtonProcessItem:"ផ្ទុកឡើង",labelMaxFileSizeExceeded:"ឯកសារធំពេក",labelMaxFileSize:"ទំហំឯកសារអតិបរមាគឺ {filesize}",labelMaxTotalFileSizeExceeded:"លើសទំហំសរុបអតិបរមា",labelMaxTotalFileSize:"ទំហំឯកសារសរុបអតិបរមាគឺ {filesize}",labelFileTypeNotAllowed:"ប្រភេទឯកសារមិនត្រឹមត្រូវ",fileValidateTypeLabelExpectedTypes:"រំពឹងថា {allButLastType} ឬ {lastType}",imageValidateSizeLabelFormatError:"ប្រភេទរូបភាពមិនត្រឹមត្រូវ",imageValidateSizeLabelImageSizeTooSmall:"រូបភាពតូចពេក",imageValidateSizeLabelImageSizeTooBig:"រូបភាពធំពេក",imageValidateSizeLabelExpectedMinSize:"ទំហំអប្បបរមាគឺ {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"ទំហំអតិបរមាគឺ {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"គុណភាពបង្ហាញទាបពេក",imageValidateSizeLabelImageResolutionTooHigh:"គុណភាពបង្ហាញខ្ពស់ពេក",imageValidateSizeLabelExpectedMinResolution:"គុណភាពបង្ហាញអប្បបរមាគឺ {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"គុណភាពបង្ហាញអតិបរមាគឺ {maxResolution}"},lt_LT={labelIdle:'Įdėkite failus čia arba Ieškokite ',labelInvalidField:"Laukelis talpina netinkamus failus",labelFileWaitingForSize:"Laukiama dydžio",labelFileSizeNotAvailable:"Dydis nežinomas",labelFileLoading:"Kraunama",labelFileLoadError:"Klaida įkeliant",labelFileProcessing:"Įkeliama",labelFileProcessingComplete:"Įkėlimas sėkmingas",labelFileProcessingAborted:"Įkėlimas atšauktas",labelFileProcessingError:"Įkeliant įvyko klaida",labelFileProcessingRevertError:"Atšaukiant įvyko klaida",labelFileRemoveError:"Ištrinant įvyko klaida",labelTapToCancel:"Palieskite norėdami atšaukti",labelTapToRetry:"Palieskite norėdami pakartoti",labelTapToUndo:"Palieskite norėdami atšaukti",labelButtonRemoveItem:"Ištrinti",labelButtonAbortItemLoad:"Sustabdyti",labelButtonRetryItemLoad:"Pakartoti",labelButtonAbortItemProcessing:"Atšaukti",labelButtonUndoItemProcessing:"Atšaukti",labelButtonRetryItemProcessing:"Pakartoti",labelButtonProcessItem:"Įkelti",labelMaxFileSizeExceeded:"Failas per didelis",labelMaxFileSize:"Maksimalus failo dydis yra {filesize}",labelMaxTotalFileSizeExceeded:"Viršijote maksimalų leistiną dydį",labelMaxTotalFileSize:"Maksimalus leistinas dydis yra {filesize}",labelFileTypeNotAllowed:"Netinkamas failas",fileValidateTypeLabelExpectedTypes:"Tikisi {allButLastType} arba {lastType}",imageValidateSizeLabelFormatError:"Nuotraukos formatas nepalaikomas",imageValidateSizeLabelImageSizeTooSmall:"Nuotrauka per maža",imageValidateSizeLabelImageSizeTooBig:"Nuotrauka per didelė",imageValidateSizeLabelExpectedMinSize:"Minimalus dydis yra {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalus dydis yra {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezoliucija per maža",imageValidateSizeLabelImageResolutionTooHigh:"Rezoliucija per didelė",imageValidateSizeLabelExpectedMinResolution:"Minimali rezoliucija yra {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimali rezoliucija yra {maxResolution}"},nl_NL={labelIdle:'Drag & Drop je bestanden of Bladeren ',labelInvalidField:"Veld bevat ongeldige bestanden",labelFileWaitingForSize:"Wachten op grootte",labelFileSizeNotAvailable:"Grootte niet beschikbaar",labelFileLoading:"Laden",labelFileLoadError:"Fout tijdens laden",labelFileProcessing:"Uploaden",labelFileProcessingComplete:"Upload afgerond",labelFileProcessingAborted:"Upload geannuleerd",labelFileProcessingError:"Fout tijdens upload",labelFileProcessingRevertError:"Fout bij herstellen",labelFileRemoveError:"Fout bij verwijderen",labelTapToCancel:"tik om te annuleren",labelTapToRetry:"tik om opnieuw te proberen",labelTapToUndo:"tik om ongedaan te maken",labelButtonRemoveItem:"Verwijderen",labelButtonAbortItemLoad:"Afbreken",labelButtonRetryItemLoad:"Opnieuw proberen",labelButtonAbortItemProcessing:"Annuleren",labelButtonUndoItemProcessing:"Ongedaan maken",labelButtonRetryItemProcessing:"Opnieuw proberen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Bestand is te groot",labelMaxFileSize:"Maximale bestandsgrootte is {filesize}",labelMaxTotalFileSizeExceeded:"Maximale totale grootte overschreden",labelMaxTotalFileSize:"Maximale totale bestandsgrootte is {filesize}",labelFileTypeNotAllowed:"Ongeldig bestandstype",fileValidateTypeLabelExpectedTypes:"Verwacht {allButLastType} of {lastType}",imageValidateSizeLabelFormatError:"Afbeeldingstype niet ondersteund",imageValidateSizeLabelImageSizeTooSmall:"Afbeelding is te klein",imageValidateSizeLabelImageSizeTooBig:"Afbeelding is te groot",imageValidateSizeLabelExpectedMinSize:"Minimale afmeting is {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale afmeting is {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolutie is te laag",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimale resolutie is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale resolutie is {maxResolution}"},no_NB={labelIdle:'Dra og slipp filene dine, eller Bla gjennom... ',labelInvalidField:"Feltet inneholder ugyldige filer",labelFileWaitingForSize:"Venter på størrelse",labelFileSizeNotAvailable:"Størrelse ikke tilgjengelig",labelFileLoading:"Laster",labelFileLoadError:"Feil under lasting",labelFileProcessing:"Laster opp",labelFileProcessingComplete:"Opplasting ferdig",labelFileProcessingAborted:"Opplasting avbrutt",labelFileProcessingError:"Feil under opplasting",labelFileProcessingRevertError:"Feil under reversering",labelFileRemoveError:"Feil under flytting",labelTapToCancel:"klikk for å avbryte",labelTapToRetry:"klikk for å prøve på nytt",labelTapToUndo:"klikk for å angre",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"Prøv på nytt",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"Angre",labelButtonRetryItemProcessing:"Prøv på nytt",labelButtonProcessItem:"Last opp",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filstørrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal total størrelse oversteget",labelMaxTotalFileSize:"Maksimal total størrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildeformat ikke støttet",imageValidateSizeLabelImageSizeTooSmall:"Bildet er for lite",imageValidateSizeLabelImageSizeTooBig:"Bildet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimumsstørrelse er {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimumsstørrelse er {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Oppløsningen er for lav",imageValidateSizeLabelImageResolutionTooHigh:"Oppløsningen er for høy",imageValidateSizeLabelExpectedMinResolution:"Minimum oppløsning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal oppløsning er {maxResolution}"},pl_PL={labelIdle:'Przeciągnij i upuść lub wybierz pliki',labelInvalidField:"Nieprawidłowe pliki",labelFileWaitingForSize:"Pobieranie rozmiaru",labelFileSizeNotAvailable:"Nieznany rozmiar",labelFileLoading:"Wczytywanie",labelFileLoadError:"Błąd wczytywania",labelFileProcessing:"Przesyłanie",labelFileProcessingComplete:"Przesłano",labelFileProcessingAborted:"Przerwano",labelFileProcessingError:"Przesyłanie nie powiodło się",labelFileProcessingRevertError:"Coś poszło nie tak",labelFileRemoveError:"Nieudane usunięcie",labelTapToCancel:"Anuluj",labelTapToRetry:"Ponów",labelTapToUndo:"Cofnij",labelButtonRemoveItem:"Usuń",labelButtonAbortItemLoad:"Przerwij",labelButtonRetryItemLoad:"Ponów",labelButtonAbortItemProcessing:"Anuluj",labelButtonUndoItemProcessing:"Cofnij",labelButtonRetryItemProcessing:"Ponów",labelButtonProcessItem:"Prześlij",labelMaxFileSizeExceeded:"Plik jest zbyt duży",labelMaxFileSize:"Dopuszczalna wielkość pliku to {filesize}",labelMaxTotalFileSizeExceeded:"Przekroczono łączny rozmiar plików",labelMaxTotalFileSize:"Łączny rozmiar plików nie może przekroczyć {filesize}",labelFileTypeNotAllowed:"Niedozwolony rodzaj pliku",fileValidateTypeLabelExpectedTypes:"Oczekiwano {allButLastType} lub {lastType}",imageValidateSizeLabelFormatError:"Nieobsługiwany format obrazu",imageValidateSizeLabelImageSizeTooSmall:"Obraz jest zbyt mały",imageValidateSizeLabelImageSizeTooBig:"Obraz jest zbyt duży",imageValidateSizeLabelExpectedMinSize:"Minimalne wymiary obrazu to {minWidth}×{minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksymalna wymiary obrazu to {maxWidth}×{maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozdzielczość jest zbyt niska",imageValidateSizeLabelImageResolutionTooHigh:"Rozdzielczość jest zbyt wysoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rozdzielczość to {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksymalna rozdzielczość to {maxResolution}"},pt_BR={labelIdle:'Arraste e solte os arquivos ou Clique aqui ',labelInvalidField:"Arquivos inválidos",labelFileWaitingForSize:"Calculando o tamanho do arquivo",labelFileSizeNotAvailable:"Tamanho do arquivo indisponível",labelFileLoading:"Carregando",labelFileLoadError:"Erro durante o carregamento",labelFileProcessing:"Enviando",labelFileProcessingComplete:"Envio finalizado",labelFileProcessingAborted:"Envio cancelado",labelFileProcessingError:"Erro durante o envio",labelFileProcessingRevertError:"Erro ao reverter o envio",labelFileRemoveError:"Erro ao remover o arquivo",labelTapToCancel:"clique para cancelar",labelTapToRetry:"clique para reenviar",labelTapToUndo:"clique para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Reenviar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Reenviar",labelButtonProcessItem:"Enviar",labelMaxFileSizeExceeded:"Arquivo é muito grande",labelMaxFileSize:"O tamanho máximo permitido: {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho total dos arquivos excedido",labelMaxTotalFileSize:"Tamanho total permitido: {filesize}",labelFileTypeNotAllowed:"Tipo de arquivo inválido",fileValidateTypeLabelExpectedTypes:"Tipos de arquivo suportados são {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem inválida",imageValidateSizeLabelImageSizeTooSmall:"Imagem muito pequena",imageValidateSizeLabelImageSizeTooBig:"Imagem muito grande",imageValidateSizeLabelExpectedMinSize:"Tamanho mínimo permitida: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Tamanho máximo permitido: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolução muito baixa",imageValidateSizeLabelImageResolutionTooHigh:"Resolução muito alta",imageValidateSizeLabelExpectedMinResolution:"Resolução mínima permitida: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolução máxima permitida: {maxResolution}"},pt_PT={labelIdle:'Arraste & Largue os ficheiros ou Seleccione ',labelInvalidField:"O campo contém ficheiros inválidos",labelFileWaitingForSize:"A aguardar tamanho",labelFileSizeNotAvailable:"Tamanho não disponível",labelFileLoading:"A carregar",labelFileLoadError:"Erro ao carregar",labelFileProcessing:"A carregar",labelFileProcessingComplete:"Carregamento completo",labelFileProcessingAborted:"Carregamento cancelado",labelFileProcessingError:"Erro ao carregar",labelFileProcessingRevertError:"Erro ao reverter",labelFileRemoveError:"Erro ao remover",labelTapToCancel:"carregue para cancelar",labelTapToRetry:"carregue para tentar novamente",labelTapToUndo:"carregue para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Tentar novamente",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Tentar novamente",labelButtonProcessItem:"Carregar",labelMaxFileSizeExceeded:"Ficheiro demasiado grande",labelMaxFileSize:"O tamanho máximo do ficheiro é de {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho máximo total excedido",labelMaxTotalFileSize:"O tamanho máximo total do ficheiro é de {filesize}",labelFileTypeNotAllowed:"Tipo de ficheiro inválido",fileValidateTypeLabelExpectedTypes:"É esperado {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem não suportada",imageValidateSizeLabelImageSizeTooSmall:"A imagem é demasiado pequena",imageValidateSizeLabelImageSizeTooBig:"A imagem é demasiado grande",imageValidateSizeLabelExpectedMinSize:"O tamanho mínimo é de {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"O tamanho máximo é de {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"A resolução é demasiado baixa",imageValidateSizeLabelImageResolutionTooHigh:"A resolução é demasiado grande",imageValidateSizeLabelExpectedMinResolution:"A resolução mínima é de {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"A resolução máxima é de {maxResolution}"},ro_RO={labelIdle:'Trage și plasează fișiere sau Caută-le ',labelInvalidField:"Câmpul conține fișiere care nu sunt valide",labelFileWaitingForSize:"În așteptarea dimensiunii",labelFileSizeNotAvailable:"Dimensiunea nu este diponibilă",labelFileLoading:"Se încarcă",labelFileLoadError:"Eroare la încărcare",labelFileProcessing:"Se încarcă",labelFileProcessingComplete:"Încărcare finalizată",labelFileProcessingAborted:"Încărcare anulată",labelFileProcessingError:"Eroare la încărcare",labelFileProcessingRevertError:"Eroare la anulare",labelFileRemoveError:"Eroare la ştergere",labelTapToCancel:"apasă pentru a anula",labelTapToRetry:"apasă pentru a reîncerca",labelTapToUndo:"apasă pentru a anula",labelButtonRemoveItem:"Şterge",labelButtonAbortItemLoad:"Anulează",labelButtonRetryItemLoad:"Reîncearcă",labelButtonAbortItemProcessing:"Anulează",labelButtonUndoItemProcessing:"Anulează",labelButtonRetryItemProcessing:"Reîncearcă",labelButtonProcessItem:"Încarcă",labelMaxFileSizeExceeded:"Fișierul este prea mare",labelMaxFileSize:"Dimensiunea maximă a unui fișier este de {filesize}",labelMaxTotalFileSizeExceeded:"Dimensiunea totală maximă a fost depășită",labelMaxTotalFileSize:"Dimensiunea totală maximă a fișierelor este de {filesize}",labelFileTypeNotAllowed:"Tipul fișierului nu este valid",fileValidateTypeLabelExpectedTypes:"Se așteaptă {allButLastType} sau {lastType}",imageValidateSizeLabelFormatError:"Formatul imaginii nu este acceptat",imageValidateSizeLabelImageSizeTooSmall:"Imaginea este prea mică",imageValidateSizeLabelImageSizeTooBig:"Imaginea este prea mare",imageValidateSizeLabelExpectedMinSize:"Mărimea minimă este de {maxWidth} x {maxHeight}",imageValidateSizeLabelExpectedMaxSize:"Mărimea maximă este de {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezoluția este prea mică",imageValidateSizeLabelImageResolutionTooHigh:"Rezoluția este prea mare",imageValidateSizeLabelExpectedMinResolution:"Rezoluția minimă este de {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Rezoluția maximă este de {maxResolution}"},ru_RU={labelIdle:'Перетащите файлы или выберите ',labelInvalidField:"Поле содержит недопустимые файлы",labelFileWaitingForSize:"Укажите размер",labelFileSizeNotAvailable:"Размер не поддерживается",labelFileLoading:"Ожидание",labelFileLoadError:"Ошибка при ожидании",labelFileProcessing:"Загрузка",labelFileProcessingComplete:"Загрузка завершена",labelFileProcessingAborted:"Загрузка отменена",labelFileProcessingError:"Ошибка при загрузке",labelFileProcessingRevertError:"Ошибка при возврате",labelFileRemoveError:"Ошибка при удалении",labelTapToCancel:"нажмите для отмены",labelTapToRetry:"нажмите, чтобы повторить попытку",labelTapToUndo:"нажмите для отмены последнего действия",labelButtonRemoveItem:"Удалить",labelButtonAbortItemLoad:"Прекращено",labelButtonRetryItemLoad:"Повторите попытку",labelButtonAbortItemProcessing:"Отмена",labelButtonUndoItemProcessing:"Отмена последнего действия",labelButtonRetryItemProcessing:"Повторите попытку",labelButtonProcessItem:"Загрузка",labelMaxFileSizeExceeded:"Файл слишком большой",labelMaxFileSize:"Максимальный размер файла: {filesize}",labelMaxTotalFileSizeExceeded:"Превышен максимальный размер",labelMaxTotalFileSize:"Максимальный размер файла: {filesize}",labelFileTypeNotAllowed:"Файл неверного типа",fileValidateTypeLabelExpectedTypes:"Ожидается {allButLastType} или {lastType}",imageValidateSizeLabelFormatError:"Тип изображения не поддерживается",imageValidateSizeLabelImageSizeTooSmall:"Изображение слишком маленькое",imageValidateSizeLabelImageSizeTooBig:"Изображение слишком большое",imageValidateSizeLabelExpectedMinSize:"Минимальный размер: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Максимальный размер: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Разрешение слишком низкое",imageValidateSizeLabelImageResolutionTooHigh:"Разрешение слишком высокое",imageValidateSizeLabelExpectedMinResolution:"Минимальное разрешение: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Максимальное разрешение: {maxResolution}"},sk_SK={labelIdle:'Natiahnúť súbor (drag&drop) alebo Vyhľadať ',labelInvalidField:"Pole obsahuje chybné súbory",labelFileWaitingForSize:"Zisťuje sa veľkosť",labelFileSizeNotAvailable:"Neznáma veľkosť",labelFileLoading:"Prenáša sa",labelFileLoadError:"Chyba pri prenose",labelFileProcessing:"Prebieha upload",labelFileProcessingComplete:"Upload dokončený",labelFileProcessingAborted:"Upload stornovaný",labelFileProcessingError:"Chyba pri uploade",labelFileProcessingRevertError:"Chyba pri obnove",labelFileRemoveError:"Chyba pri odstránení",labelTapToCancel:"Kliknite pre storno",labelTapToRetry:"Kliknite pre opakovanie",labelTapToUndo:"Kliknite pre vrátenie",labelButtonRemoveItem:"Odstrániť",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakovať",labelButtonAbortItemProcessing:"Späť",labelButtonUndoItemProcessing:"Vrátiť",labelButtonRetryItemProcessing:"Opakovať",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Súbor je príliš veľký",labelMaxFileSize:"Najväčšia veľkosť súboru je {filesize}",labelMaxTotalFileSizeExceeded:"Prekročená maximálna celková veľkosť súboru",labelMaxTotalFileSize:"Maximálna celková veľkosť súboru je {filesize}",labelFileTypeNotAllowed:"Súbor je nesprávneho typu",fileValidateTypeLabelExpectedTypes:"Očakáva sa {allButLastType} alebo {lastType}",imageValidateSizeLabelFormatError:"Obrázok tohto typu nie je podporovaný",imageValidateSizeLabelImageSizeTooSmall:"Obrázok je príliš malý",imageValidateSizeLabelImageSizeTooBig:"Obrázok je príliš veľký",imageValidateSizeLabelExpectedMinSize:"Minimálny rozmer je {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximálny rozmer je {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozlíšenie je príliš malé",imageValidateSizeLabelImageResolutionTooHigh:"Rozlišenie je príliš veľké",imageValidateSizeLabelExpectedMinResolution:"Minimálne rozlíšenie je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximálne rozlíšenie je {maxResolution}"},sv_SE={labelIdle:'Drag och släpp dina filer eller Bläddra ',labelInvalidField:"Fältet innehåller felaktiga filer",labelFileWaitingForSize:"Väntar på storlek",labelFileSizeNotAvailable:"Storleken finns inte tillgänglig",labelFileLoading:"Laddar",labelFileLoadError:"Fel under laddning",labelFileProcessing:"Laddar upp",labelFileProcessingComplete:"Uppladdning klar",labelFileProcessingAborted:"Uppladdning avbruten",labelFileProcessingError:"Fel under uppladdning",labelFileProcessingRevertError:"Fel under återställning",labelFileRemoveError:"Fel under borttagning",labelTapToCancel:"tryck för att avbryta",labelTapToRetry:"tryck för att försöka igen",labelTapToUndo:"tryck för att ångra",labelButtonRemoveItem:"Tabort",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"Försök igen",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"Ångra",labelButtonRetryItemProcessing:"Försök igen",labelButtonProcessItem:"Ladda upp",labelMaxFileSizeExceeded:"Filen är för stor",labelMaxFileSize:"Största tillåtna filstorlek är {filesize}",labelMaxTotalFileSizeExceeded:"Maximal uppladdningsstorlek uppnåd",labelMaxTotalFileSize:"Maximal uppladdningsstorlek är {filesize}",labelFileTypeNotAllowed:"Felaktig filtyp",fileValidateTypeLabelExpectedTypes:"Godkända filtyper {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildtypen saknar stöd",imageValidateSizeLabelImageSizeTooSmall:"Bilden är för liten",imageValidateSizeLabelImageSizeTooBig:"Bilden är för stor",imageValidateSizeLabelExpectedMinSize:"Minimal storlek är {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximal storlek är {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Upplösningen är för låg",imageValidateSizeLabelImageResolutionTooHigh:"Upplösningen är för hög",imageValidateSizeLabelExpectedMinResolution:"Minsta tillåtna upplösning är {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Högsta tillåtna upplösning är {maxResolution}"},tr_TR={labelIdle:'Dosyanızı Sürükleyin & Bırakın ya da Seçin ',labelInvalidField:"Alan geçersiz dosyalar içeriyor",labelFileWaitingForSize:"Boyut hesaplanıyor",labelFileSizeNotAvailable:"Boyut mevcut değil",labelFileLoading:"Yükleniyor",labelFileLoadError:"Yükleme sırasında hata oluştu",labelFileProcessing:"Yükleniyor",labelFileProcessingComplete:"Yükleme tamamlandı",labelFileProcessingAborted:"Yükleme iptal edildi",labelFileProcessingError:"Yüklerken hata oluştu",labelFileProcessingRevertError:"Geri çekerken hata oluştu",labelFileRemoveError:"Kaldırırken hata oluştu",labelTapToCancel:"İptal etmek için tıklayın",labelTapToRetry:"Tekrar denemek için tıklayın",labelTapToUndo:"Geri almak için tıklayın",labelButtonRemoveItem:"Kaldır",labelButtonAbortItemLoad:"İptal Et",labelButtonRetryItemLoad:"Tekrar dene",labelButtonAbortItemProcessing:"İptal et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"Tekrar dene",labelButtonProcessItem:"Yükle",labelMaxFileSizeExceeded:"Dosya çok büyük",labelMaxFileSize:"En fazla dosya boyutu: {filesize}",labelMaxTotalFileSizeExceeded:"Maximum boyut aşıldı",labelMaxTotalFileSize:"Maximum dosya boyutu :{filesize}",labelFileTypeNotAllowed:"Geçersiz dosya tipi",fileValidateTypeLabelExpectedTypes:"Şu {allButLastType} ya da şu dosya olması gerekir: {lastType}",imageValidateSizeLabelFormatError:"Resim tipi desteklenmiyor",imageValidateSizeLabelImageSizeTooSmall:"Resim çok küçük",imageValidateSizeLabelImageSizeTooBig:"Resim çok büyük",imageValidateSizeLabelExpectedMinSize:"Minimum boyut {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum boyut {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Çözünürlük çok düşük",imageValidateSizeLabelImageResolutionTooHigh:"Çözünürlük çok yüksek",imageValidateSizeLabelExpectedMinResolution:"Minimum çözünürlük {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum çözünürlük {maxResolution}"},uk_UA={labelIdle:'Перетягніть файли або виберіть ',labelInvalidField:"Поле містить недопустимі файли",labelFileWaitingForSize:"Вкажіть розмір",labelFileSizeNotAvailable:"Розмір не доступний",labelFileLoading:"Очікування",labelFileLoadError:"Помилка при очікуванні",labelFileProcessing:"Завантаження",labelFileProcessingComplete:"Завантаження завершено",labelFileProcessingAborted:"Завантаження скасовано",labelFileProcessingError:"Помилка при завантаженні",labelFileProcessingRevertError:"Помилка при відновленні",labelFileRemoveError:"Помилка при видаленні",labelTapToCancel:"Відмінити",labelTapToRetry:"Натисніть, щоб повторити спробу",labelTapToUndo:"Натисніть, щоб відмінити останню дію",labelButtonRemoveItem:"Видалити",labelButtonAbortItemLoad:"Відмінити",labelButtonRetryItemLoad:"Повторити спробу",labelButtonAbortItemProcessing:"Відмінити",labelButtonUndoItemProcessing:"Відмінити останню дію",labelButtonRetryItemProcessing:"Повторити спробу",labelButtonProcessItem:"Завантаження",labelMaxFileSizeExceeded:"Файл занадто великий",labelMaxFileSize:"Максимальний розмір файлу: {filesize}",labelMaxTotalFileSizeExceeded:"Перевищено максимальний загальний розмір",labelMaxTotalFileSize:"Максимальний загальний розмір: {filesize}",labelFileTypeNotAllowed:"Формат файлу не підтримується",fileValidateTypeLabelExpectedTypes:"Очікується {allButLastType} або {lastType}",imageValidateSizeLabelFormatError:"Формат зображення не підтримується",imageValidateSizeLabelImageSizeTooSmall:"Зображення занадто маленьке",imageValidateSizeLabelImageSizeTooBig:"Зображення занадто велике",imageValidateSizeLabelExpectedMinSize:"Мінімальний розмір: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Максимальний розмір: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Розміри зображення занадто маленькі",imageValidateSizeLabelImageResolutionTooHigh:"Розміри зображення занадто великі",imageValidateSizeLabelExpectedMinResolution:"Мінімальні розміри: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Максимальні розміри: {maxResolution}"},vi_VI={labelIdle:'Kéo thả tệp của bạn hoặc Tìm kiếm ',labelInvalidField:"Trường chứa các tệp không hợp lệ",labelFileWaitingForSize:"Đang chờ kích thước",labelFileSizeNotAvailable:"Kích thước không có sẵn",labelFileLoading:"Đang tải",labelFileLoadError:"Lỗi khi tải",labelFileProcessing:"Đang tải lên",labelFileProcessingComplete:"Tải lên thành công",labelFileProcessingAborted:"Đã huỷ tải lên",labelFileProcessingError:"Lỗi khi tải lên",labelFileProcessingRevertError:"Lỗi khi hoàn nguyên",labelFileRemoveError:"Lỗi khi xóa",labelTapToCancel:"nhấn để hủy",labelTapToRetry:"nhấn để thử lại",labelTapToUndo:"nhấn để hoàn tác",labelButtonRemoveItem:"Xoá",labelButtonAbortItemLoad:"Huỷ bỏ",labelButtonRetryItemLoad:"Thử lại",labelButtonAbortItemProcessing:"Hủy bỏ",labelButtonUndoItemProcessing:"Hoàn tác",labelButtonRetryItemProcessing:"Thử lại",labelButtonProcessItem:"Tải lên",labelMaxFileSizeExceeded:"Tập tin quá lớn",labelMaxFileSize:"Kích thước tệp tối đa là {filesize}",labelMaxTotalFileSizeExceeded:"Đã vượt quá tổng kích thước tối đa",labelMaxTotalFileSize:"Tổng kích thước tệp tối đa là {filesize}",labelFileTypeNotAllowed:"Tệp thuộc loại không hợp lệ",fileValidateTypeLabelExpectedTypes:"Kiểu tệp hợp lệ là {allButLastType} hoặc {lastType}",imageValidateSizeLabelFormatError:"Loại hình ảnh không được hỗ trợ",imageValidateSizeLabelImageSizeTooSmall:"Hình ảnh quá nhỏ",imageValidateSizeLabelImageSizeTooBig:"Hình ảnh quá lớn",imageValidateSizeLabelExpectedMinSize:"Kích thước tối thiểu là {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Kích thước tối đa là {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Độ phân giải quá thấp",imageValidateSizeLabelImageResolutionTooHigh:"Độ phân giải quá cao",imageValidateSizeLabelExpectedMinResolution:"Độ phân giải tối thiểu là {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Độ phân giải tối đa là {maxResolution}"},zh_CN={labelIdle:'拖放文件,或者 浏览 ',labelInvalidField:"字段包含无效文件",labelFileWaitingForSize:"计算文件大小",labelFileSizeNotAvailable:"文件大小不可用",labelFileLoading:"加载",labelFileLoadError:"加载错误",labelFileProcessing:"上传",labelFileProcessingComplete:"已上传",labelFileProcessingAborted:"上传已取消",labelFileProcessingError:"上传出错",labelFileProcessingRevertError:"还原出错",labelFileRemoveError:"删除出错",labelTapToCancel:"点击取消",labelTapToRetry:"点击重试",labelTapToUndo:"点击撤消",labelButtonRemoveItem:"删除",labelButtonAbortItemLoad:"中止",labelButtonRetryItemLoad:"重试",labelButtonAbortItemProcessing:"取消",labelButtonUndoItemProcessing:"撤消",labelButtonRetryItemProcessing:"重试",labelButtonProcessItem:"上传",labelMaxFileSizeExceeded:"文件太大",labelMaxFileSize:"最大值: {filesize}",labelMaxTotalFileSizeExceeded:"超过最大文件大小",labelMaxTotalFileSize:"最大文件大小:{filesize}",labelFileTypeNotAllowed:"文件类型无效",fileValidateTypeLabelExpectedTypes:"应为 {allButLastType} 或 {lastType}",imageValidateSizeLabelFormatError:"不支持图像类型",imageValidateSizeLabelImageSizeTooSmall:"图像太小",imageValidateSizeLabelImageSizeTooBig:"图像太大",imageValidateSizeLabelExpectedMinSize:"最小值: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"最大值: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"分辨率太低",imageValidateSizeLabelImageResolutionTooHigh:"分辨率太高",imageValidateSizeLabelExpectedMinResolution:"最小分辨率:{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"最大分辨率:{maxResolution}"},zh_TW={labelIdle:'拖放檔案,或者 瀏覽 ',labelInvalidField:"不支援此檔案",labelFileWaitingForSize:"正在計算檔案大小",labelFileSizeNotAvailable:"檔案大小不符",labelFileLoading:"讀取中",labelFileLoadError:"讀取錯誤",labelFileProcessing:"上傳",labelFileProcessingComplete:"已上傳",labelFileProcessingAborted:"上傳已取消",labelFileProcessingError:"上傳發生錯誤",labelFileProcessingRevertError:"還原錯誤",labelFileRemoveError:"刪除錯誤",labelTapToCancel:"點擊取消",labelTapToRetry:"點擊重試",labelTapToUndo:"點擊還原",labelButtonRemoveItem:"刪除",labelButtonAbortItemLoad:"停止",labelButtonRetryItemLoad:"重試",labelButtonAbortItemProcessing:"取消",labelButtonUndoItemProcessing:"取消",labelButtonRetryItemProcessing:"重試",labelButtonProcessItem:"上傳",labelMaxFileSizeExceeded:"檔案過大",labelMaxFileSize:"最大值:{filesize}",labelMaxTotalFileSizeExceeded:"超過最大可上傳大小",labelMaxTotalFileSize:"最大可上傳大小:{filesize}",labelFileTypeNotAllowed:"不支援此類型檔案",fileValidateTypeLabelExpectedTypes:"應為 {allButLastType} 或 {lastType}",imageValidateSizeLabelFormatError:"不支持此類圖片類型",imageValidateSizeLabelImageSizeTooSmall:"圖片過小",imageValidateSizeLabelImageSizeTooBig:"圖片過大",imageValidateSizeLabelExpectedMinSize:"最小尺寸:{minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"最大尺寸:{maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"解析度過低",imageValidateSizeLabelImageResolutionTooHigh:"解析度過高",imageValidateSizeLabelExpectedMinResolution:"最低解析度:{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"最高解析度:{maxResolution}"},locales={"ar-ar":ar_AR,"az-az":az_AZ,"cs-cz":cs_CZ,"da-dk":da_DK,"de-de":de_DE,"el-el":el_EL,"en-en":en_EN,"es-es":es_ES,"fa-ir":fa_IR,"fi-fi":fi_FI,"fr-fr":fr_FR,"he-he":he_HE,"hr-hr":hr_HR,"hu-hu":hu_HU,"id-id":id_ID,"it-it":it_IT,"ja-ja":ja_JA,"km-km":km_KM,"lt-lt":lt_LT,"nl-nl":nl_NL,"no-nb":no_NB,"pl-pl":pl_PL,"pt-br":pt_BR,"pt-pt":pt_PT,"ro-ro":ro_RO,"ru-ru":ru_RU,"sk-sk":sk_SK,"sv-se":sv_SE,"tr-tr":tr_TR,"uk-ua":uk_UA,"vi-vi":vi_VI,"zh-cn":zh_CN,"zh-tw":zh_TW},filepond=e=>({init(){registerPlugin(plugin$3),registerPlugin(plugin$2),registerPlugin(plugin$1),registerPlugin(plugin);const t=this.$wire.fields[e.field].properties;create$f(this.$refs.input,{allowMultiple:t.multiple,minFileSize:t.file_size.min?`${t.file_size.min}KB`:null,maxFileSize:t.file_size.max?`${t.file_size.max}KB`:null,acceptedFileTypes:t.file_types,imageValidateSizeMinWidth:t.dimensions.min_width??1,imageValidateSizeMinHeight:t.dimensions.min_height??1,imageValidateSizeMaxWidth:t.dimensions.max_width??65535,imageValidateSizeMaxHeight:t.dimensions.max_height??65535,credits:!1,server:{process:(a,n,l,r,s,o,c,u,d)=>{this.$wire.upload(t.key,n,r,s,o)},revert:(a,n)=>{this.$wire.removeUpload(t.key,a,n)}},...locales[e.locale]})},reset(t){t===this.$wire.id&&find(this.$el.querySelector(".filepond--root")).removeFiles()}}),KEYS=["if","if_any","show_when","show_when_any","unless","unless_any","hide_when","hide_when_any"],OPERATORS=["equals","not","contains","contains_any","===","!==",">",">=","<","<=","custom"],ALIASES={is:"equals","==":"equals",isnt:"not","!=":"not",includes:"contains",includes_any:"contains_any"};var VERSION="1.13.6",root=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},ArrayProto=Array.prototype,ObjProto=Object.prototype,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeIsArray=Array.isArray,nativeKeys=Object.keys,_isNaN=isNaN,hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],MAX_ARRAY_INDEX=Math.pow(2,53)-1;function _(e){if(e instanceof _)return e;if(!(this instanceof _))return new _(e);this._wrapped=e}_.VERSION=VERSION,_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return String(this._wrapped)};function identity(e){return e}function tagTester(e){var t="[object "+e+"]";return function(a){return toString.call(a)===t}}var isFunction=tagTester("Function"),nodelist=root.document&&root.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof nodelist!="function"&&(isFunction=function(e){return typeof e=="function"||!1});const isFunction$1=isFunction;function isObject(e){var t=typeof e;return t==="function"||t==="object"&&!!e}const isArray=nativeIsArray||tagTester("Array");function createAssigner(e,t){return function(a){var n=arguments.length;if(t&&(a=Object(a)),n<2||a==null)return a;for(var l=1;l=0&&a<=MAX_ARRAY_INDEX}}function shallowProperty(e){return function(t){return t==null?void 0:t[e]}}const getLength=shallowProperty("length"),isArrayLike=createSizePropertyCheck(getLength);function map(e,t,a){t=cb(t,a);for(var n=!isArrayLike(e)&&keys(e),l=(n||e).length,r=Array(l),s=0;sthis.splitRhs(l,n,a))}toBlueprint(t){let a={};return each(t,n=>{a[n.field]=this.combineRhs(n)}),a}splitRhs(t,a,n=null){return{field:this.getScopedFieldHandle(t,n),operator:this.getOperatorFromRhs(a),value:this.getValueFromRhs(a)}}getScopedFieldHandle(t,a){return t.startsWith("root.")||!a?t:a+t}getOperatorFromRhs(t){let a="==";return chain(this.getOperatorsAndAliases()).filter(n=>new RegExp(`^${n} [^=]`).test(this.normalizeConditionString(t))).each(n=>a=n),this.normalizeOperator(a)}normalizeOperator(t){return ALIASES[t]?ALIASES[t]:t}getValueFromRhs(t){let a=this.normalizeConditionString(t);return chain(this.getOperatorsAndAliases()).filter(n=>new RegExp(`^${n} [^=]`).test(a)).each(n=>a=a.replace(new RegExp(`^${n}[ ]*`),"")),a}combineRhs(t){let a=t.operator?t.operator.trim():"",n=t.value.trim();return`${a} ${n}`.trim()}getOperatorsAndAliases(){return OPERATORS.concat(Object.keys(ALIASES))}normalizeConditionString(t){return t===null?"null":t===""?"empty":t.toString()}}function getDefaults(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let defaults=getDefaults();function changeDefaults(e){defaults=e}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=e=>escapeReplacements[e];function escape(e,t){if(t){if(escapeTest.test(e))return e.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(e))return e.replace(escapeReplaceNoEncode,getEscapeReplacement);return e}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(e){return e.replace(unescapeTest,(t,a)=>(a=a.toLowerCase(),a==="colon"?":":a.charAt(0)==="#"?a.charAt(1)==="x"?String.fromCharCode(parseInt(a.substring(2),16)):String.fromCharCode(+a.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit(e,t){e=typeof e=="string"?e:e.source,t=t||"";const a={replace:(n,l)=>(l=l.source||l,l=l.replace(caret,"$1"),e=e.replace(n,l),a),getRegex:()=>new RegExp(e,t)};return a}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(e,t,a){if(e){let n;try{n=decodeURIComponent(unescape$1(a)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}t&&!originIndependentUrl.test(a)&&(a=resolveUrl(t,a));try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(e,t){baseUrls[" "+e]||(justDomain.test(e)?baseUrls[" "+e]=e+"/":baseUrls[" "+e]=rtrim(e,"/",!0)),e=baseUrls[" "+e];const a=e.indexOf(":")===-1;return t.substring(0,2)==="//"?a?t:e.replace(protocol,"$1")+t:t.charAt(0)==="/"?a?t:e.replace(domain,"$1")+t:e+t}const noopTest={exec:function(){}};function splitCells(e,t){const a=e.replace(/\|/g,(r,s,o)=>{let c=!1,u=s;for(;--u>=0&&o[u]==="\\";)c=!c;return c?"|":" |"}),n=a.split(/ \|/);let l=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)t&1&&(a+=e),t>>=1,e+=e;return a+e}function outputLink(e,t,a,n){const l=t.href,r=t.title?escape(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){n.state.inLink=!0;const o={type:"link",raw:a,href:l,title:r,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,o}return{type:"image",raw:a,href:l,title:r,text:escape(s)}}function indentCodeCompensation(e,t){const a=e.match(/^(\s+)(?:```)/);if(a===null)return t;const n=a[1];return t.split(` -`).map(l=>{const r=l.match(/^\s+/);if(r===null)return l;const[s]=r;return s.length>=n.length?l.slice(n.length):l}).join(` -`)}class Tokenizer{constructor(t){this.options=t||defaults}space(t){const a=this.rules.block.newline.exec(t);if(a&&a[0].length>0)return{type:"space",raw:a[0]}}code(t){const a=this.rules.block.code.exec(t);if(a){const n=a[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:a[0],codeBlockStyle:"indented",text:this.options.pedantic?n:rtrim(n,` -`)}}}fences(t){const a=this.rules.block.fences.exec(t);if(a){const n=a[0],l=indentCodeCompensation(n,a[3]||"");return{type:"code",raw:n,lang:a[2]?a[2].trim().replace(this.rules.inline._escapes,"$1"):a[2],text:l}}}heading(t){const a=this.rules.block.heading.exec(t);if(a){let n=a[2].trim();if(/#$/.test(n)){const l=rtrim(n,"#");(this.options.pedantic||!l||/ $/.test(l))&&(n=l.trim())}return{type:"heading",raw:a[0],depth:a[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const a=this.rules.block.hr.exec(t);if(a)return{type:"hr",raw:a[0]}}blockquote(t){const a=this.rules.block.blockquote.exec(t);if(a){const n=a[0].replace(/^ *>[ \t]?/gm,""),l=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=l,{type:"blockquote",raw:a[0],tokens:r,text:n}}}list(t){let a=this.rules.block.list.exec(t);if(a){let n,l,r,s,o,c,u,d,p,h,m,g,E=a[1].trim();const T=E.length>1,I={type:"list",raw:"",ordered:T,start:T?+E.slice(0,-1):"",loose:!1,items:[]};E=T?`\\d{1,9}\\${E.slice(-1)}`:`\\${E}`,this.options.pedantic&&(E=T?E:"[*+-]");const f=new RegExp(`^( {0,3}${E})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(g=!1,!(!(a=f.exec(t))||this.rules.block.hr.test(t)));){if(n=a[0],t=t.substring(n.length),d=a[2].split(` -`,1)[0].replace(/^\t+/,S=>" ".repeat(3*S.length)),p=t.split(` -`,1)[0],this.options.pedantic?(s=2,m=d.trimLeft()):(s=a[2].search(/[^ ]/),s=s>4?1:s,m=d.slice(s),s+=a[1].length),c=!1,!d&&/^ *$/.test(p)&&(n+=p+` -`,t=t.substring(p.length+1),g=!0),!g){const S=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),R=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),A=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),O=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);for(;t&&(h=t.split(` -`,1)[0],p=h,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(A.test(p)||O.test(p)||S.test(p)||R.test(t)));){if(p.search(/[^ ]/)>=s||!p.trim())m+=` -`+p.slice(s);else{if(c||d.search(/[^ ]/)>=4||A.test(d)||O.test(d)||R.test(d))break;m+=` -`+p}!c&&!p.trim()&&(c=!0),n+=h+` -`,t=t.substring(h.length+1),d=p.slice(s)}}I.loose||(u?I.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(l=/^\[[ xX]\] /.exec(m),l&&(r=l[0]!=="[ ] ",m=m.replace(/^\[[ xX]\] +/,""))),I.items.push({type:"list_item",raw:n,task:!!l,checked:r,loose:!1,text:m}),I.raw+=n}I.items[I.items.length-1].raw=n.trimRight(),I.items[I.items.length-1].text=m.trimRight(),I.raw=I.raw.trimRight();const b=I.items.length;for(o=0;oA.type==="space"),R=S.length>0&&S.some(A=>/\n.*\n/.test(A.raw));I.loose=R}if(I.loose)for(o=0;o$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=a[3]?a[3].substring(1,a[3].length-1).replace(this.rules.inline._escapes,"$1"):a[3];return{type:"def",tag:n,raw:a[0],href:l,title:r}}}table(t){const a=this.rules.block.table.exec(t);if(a){const n={type:"table",header:splitCells(a[1]).map(l=>({text:l})),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:a[3]&&a[3].trim()?a[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(n.header.length===n.align.length){n.raw=a[0];let l=n.align.length,r,s,o,c;for(r=0;r({text:u}));for(l=n.header.length,s=0;s/i.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):escape(a[0]):a[0]}}link(t){const a=this.rules.inline.link.exec(t);if(a){const n=a[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=rtrim(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=findClosingBracket(a[2],"()");if(s>-1){const c=(a[0].indexOf("!")===0?5:4)+a[1].length+s;a[2]=a[2].substring(0,s),a[0]=a[0].substring(0,c).trim(),a[3]=""}}let l=a[2],r="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);s&&(l=s[1],r=s[3])}else r=a[3]?a[3].slice(1,-1):"";return l=l.trim(),/^$/.test(n)?l=l.slice(1):l=l.slice(1,-1)),outputLink(a,{href:l&&l.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},a[0],this.lexer)}}reflink(t,a){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let l=(n[2]||n[1]).replace(/\s+/g," ");if(l=a[l.toLowerCase()],!l){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return outputLink(n,l,n[0],this.lexer)}}emStrong(t,a,n=""){let l=this.rules.inline.emStrong.lDelim.exec(t);if(!l||l[3]&&n.match(/[\p{L}\p{N}]/u))return;const r=l[1]||l[2]||"";if(!r||r&&(n===""||this.rules.inline.punctuation.exec(n))){const s=l[0].length-1;let o,c,u=s,d=0;const p=l[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,a=a.slice(-1*t.length+s);(l=p.exec(a))!=null;){if(o=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!o)continue;if(c=o.length,l[3]||l[4]){u+=c;continue}else if((l[5]||l[6])&&s%3&&!((s+c)%3)){d+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+d);const h=t.slice(0,s+l.index+(l[0].length-o.length)+c);if(Math.min(s,c)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const a=this.rules.inline.code.exec(t);if(a){let n=a[2].replace(/\n/g," ");const l=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return l&&r&&(n=n.substring(1,n.length-1)),n=escape(n,!0),{type:"codespan",raw:a[0],text:n}}}br(t){const a=this.rules.inline.br.exec(t);if(a)return{type:"br",raw:a[0]}}del(t){const a=this.rules.inline.del.exec(t);if(a)return{type:"del",raw:a[0],text:a[2],tokens:this.lexer.inlineTokens(a[2])}}autolink(t,a){const n=this.rules.inline.autolink.exec(t);if(n){let l,r;return n[2]==="@"?(l=escape(this.options.mangle?a(n[1]):n[1]),r="mailto:"+l):(l=escape(n[1]),r=l),{type:"link",raw:n[0],text:l,href:r,tokens:[{type:"text",raw:l,text:l}]}}}url(t,a){let n;if(n=this.rules.inline.url.exec(t)){let l,r;if(n[2]==="@")l=escape(this.options.mangle?a(n[0]):n[0]),r="mailto:"+l;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(s!==n[0]);l=escape(n[0]),n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:l,href:r,tokens:[{type:"text",raw:l,text:l}]}}}inlineText(t,a){const n=this.rules.inline.text.exec(t);if(n){let l;return this.lexer.state.inRawBlock?l=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):escape(n[0]):n[0]:l=escape(this.options.smartypants?a(n[0]):n[0]),{type:"text",raw:n[0],text:l}}}}const block={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};block._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,block._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,block.def=edit(block.def).replace("label",block._label).replace("title",block._title).getRegex(),block.bullet=/(?:[*+-]|\d{1,9}[.)])/,block.listItemStart=edit(/^( *)(bull) */).replace("bull",block.bullet).getRegex(),block.list=edit(block.list).replace(/bull/g,block.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block.def.source+")").getRegex(),block._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",block._comment=/|$)/,block.html=edit(block.html,"i").replace("comment",block._comment).replace("tag",block._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),block.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.blockquote=edit(block.blockquote).replace("paragraph",block.paragraph).getRegex(),block.normal={...block},block.gfm={...block.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},block.gfm.table=edit(block.gfm.table).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.gfm.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.pedantic={...block.normal,html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",block._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(block.normal._paragraph).replace("hr",block.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",block.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const inline={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",inline.punctuation=edit(inline.punctuation).replace(/punctuation/g,inline._punctuation).getRegex(),inline.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,inline.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,inline._comment=edit(block._comment).replace("(?:-->|$)","-->").getRegex(),inline.emStrong.lDelim=edit(inline.emStrong.lDelim).replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"g").replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"g").replace(/punct/g,inline._punctuation).getRegex(),inline._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,inline._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex(),inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex(),inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex(),inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block._label).getRegex(),inline.nolink=edit(inline.nolink).replace("ref",block._label).getRegex(),inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex(),inline.normal={...inline},inline.pedantic={...inline.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()},inline.gfm={...inline.normal,escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),t+="&#"+n+";";return t}class Lexer{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||defaults,this.options.tokenizer=this.options.tokenizer||new Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={block:block.normal,inline:inline.normal};this.options.pedantic?(a.block=block.pedantic,a.inline=inline.pedantic):this.options.gfm&&(a.block=block.gfm,this.options.breaks?a.inline=inline.breaks:a.inline=inline.gfm),this.tokenizer.rules=a}static get rules(){return{block,inline}}static lex(t,a){return new Lexer(a).lex(t)}static lexInline(t,a){return new Lexer(a).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` -`),this.blockTokens(t,this.tokens);let a;for(;a=this.inlineQueue.shift();)this.inlineTokens(a.src,a.tokens);return this.tokens}blockTokens(t,a=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(o,c,u)=>c+" ".repeat(u.length));let n,l,r,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(n=o.call({lexer:this},t,a))?(t=t.substring(n.raw.length),a.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&a.length>0?a[a.length-1].raw+=` -`:a.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),l=a[a.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=` -`+n.raw,l.text+=` -`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text):a.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),l=a[a.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=` -`+n.raw,l.text+=` -`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),a.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const c=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(d){u=d.call({lexer:this},c),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(r=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){l=a[a.length-1],s&&l.type==="paragraph"?(l.raw+=` -`+n.raw,l.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):a.push(n),s=r.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),l=a[a.length-1],l&&l.type==="text"?(l.raw+=` -`+n.raw,l.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):a.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}inlineTokens(t,a=[]){let n,l,r,s=t,o,c,u;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+repeatString("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+repeatString("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,o.index+o[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(c||(u=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(n=d.call({lexer:this},t,a))?(t=t.substring(n.raw.length),a.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),l=a[a.length-1],l&&n.type==="text"&&l.type==="text"?(l.raw+=n.raw,l.text+=n.text):a.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),l=a[a.length-1],l&&n.type==="text"&&l.type==="text"?(l.raw+=n.raw,l.text+=n.text):a.push(n);continue}if(n=this.tokenizer.emStrong(t,s,u)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.autolink(t,mangle)){t=t.substring(n.raw.length),a.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t,mangle))){t=t.substring(n.raw.length),a.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const p=t.slice(1);let h;this.options.extensions.startInline.forEach(function(m){h=m.call({lexer:this},p),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(r=t.substring(0,d+1))}if(n=this.tokenizer.inlineText(r,smartypants)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),c=!0,l=a[a.length-1],l&&l.type==="text"?(l.raw+=n.raw,l.text+=n.text):a.push(n);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return a}}class Renderer{constructor(t){this.options=t||defaults}code(t,a,n){const l=(a||"").match(/\S*/)[0];if(this.options.highlight){const r=this.options.highlight(t,l);r!=null&&r!==t&&(n=!0,t=r)}return t=t.replace(/\n$/,"")+` -`,l?'
'+(n?t:escape(t,!0))+`
-`:"
"+(n?t:escape(t,!0))+`
-`}blockquote(t){return`
+ */ +const isImage = (e) => /^image/.test(e.type), getImageSize = (e) => new Promise((t, i) => { + const a = document.createElement("img"); + a.src = URL.createObjectURL(e), a.onerror = (l) => { + clearInterval(n), i(l); + }; + const n = setInterval(() => { + a.naturalWidth && a.naturalHeight && (clearInterval(n), URL.revokeObjectURL(a.src), t({ + width: a.naturalWidth, + height: a.naturalHeight + })); + }, 1); +}), plugin = ({ addFilter: e, utils: t }) => { + const { Type: i, replaceInString: a, isFile: n } = t, l = (r, s, o) => new Promise((d, c) => { + const u = ({ width: f, height: p }) => { + const { + minWidth: m, + minHeight: h, + maxWidth: I, + maxHeight: b, + minResolution: g, + maxResolution: E + } = s, T = f * p; + f < m || p < h ? c("TOO_SMALL") : f > I || p > b ? c("TOO_BIG") : g !== null && T < g ? c("TOO_LOW_RES") : E !== null && T > E && c("TOO_HIGH_RES"), d(); + }; + getImageSize(r).then(u).catch(() => { + if (!o) { + c(); + return; + } + o(r, s).then(u).catch(() => c()); + }); + }); + return e( + "LOAD_FILE", + (r, { query: s }) => new Promise((o, d) => { + if (!n(r) || !isImage(r) || !s("GET_ALLOW_IMAGE_VALIDATE_SIZE")) { + o(r); + return; + } + const c = { + minWidth: s("GET_IMAGE_VALIDATE_SIZE_MIN_WIDTH"), + minHeight: s("GET_IMAGE_VALIDATE_SIZE_MIN_HEIGHT"), + maxWidth: s("GET_IMAGE_VALIDATE_SIZE_MAX_WIDTH"), + maxHeight: s("GET_IMAGE_VALIDATE_SIZE_MAX_HEIGHT"), + minResolution: s("GET_IMAGE_VALIDATE_SIZE_MIN_RESOLUTION"), + maxResolution: s("GET_IMAGE_VALIDATE_SIZE_MAX_RESOLUTION") + }, u = s("GET_IMAGE_VALIDATE_SIZE_MEASURE"); + l(r, c, u).then(() => { + o(r); + }).catch((f) => { + const p = f ? { + TOO_SMALL: { + label: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_SMALL" + ), + details: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_SIZE" + ) + }, + TOO_BIG: { + label: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_BIG" + ), + details: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_SIZE" + ) + }, + TOO_LOW_RES: { + label: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_LOW" + ), + details: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_RESOLUTION" + ) + }, + TOO_HIGH_RES: { + label: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_HIGH" + ), + details: s( + "GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_RESOLUTION" + ) + } + }[f] : { + label: s("GET_IMAGE_VALIDATE_SIZE_LABEL_FORMAT_ERROR"), + details: r.type + }; + d({ + status: { + main: p.label, + sub: f ? a(p.details, c) : p.details + } + }); + }); + }) + ), { + // default options + options: { + // Enable or disable file type validation + allowImageValidateSize: [!0, i.BOOLEAN], + // Error thrown when image can not be loaded + imageValidateSizeLabelFormatError: [ + "Image type not supported", + i.STRING + ], + // Custom function to use as image measure + imageValidateSizeMeasure: [null, i.FUNCTION], + // Required amount of pixels in the image + imageValidateSizeMinResolution: [null, i.INT], + imageValidateSizeMaxResolution: [null, i.INT], + imageValidateSizeLabelImageResolutionTooLow: [ + "Resolution is too low", + i.STRING + ], + imageValidateSizeLabelImageResolutionTooHigh: [ + "Resolution is too high", + i.STRING + ], + imageValidateSizeLabelExpectedMinResolution: [ + "Minimum resolution is {minResolution}", + i.STRING + ], + imageValidateSizeLabelExpectedMaxResolution: [ + "Maximum resolution is {maxResolution}", + i.STRING + ], + // Required dimensions + imageValidateSizeMinWidth: [1, i.INT], + // needs to be at least one pixel + imageValidateSizeMinHeight: [1, i.INT], + imageValidateSizeMaxWidth: [65535, i.INT], + // maximum size of JPEG, fine for now I guess + imageValidateSizeMaxHeight: [65535, i.INT], + // Label to show when an image is too small or image is too big + imageValidateSizeLabelImageSizeTooSmall: [ + "Image is too small", + i.STRING + ], + imageValidateSizeLabelImageSizeTooBig: ["Image is too big", i.STRING], + imageValidateSizeLabelExpectedMinSize: [ + "Minimum size is {minWidth} × {minHeight}", + i.STRING + ], + imageValidateSizeLabelExpectedMaxSize: [ + "Maximum size is {maxWidth} × {maxHeight}", + i.STRING + ] + } + }; +}, isBrowser = typeof window < "u" && typeof window.document < "u"; +isBrowser && document.dispatchEvent( + new CustomEvent("FilePond:pluginloaded", { detail: plugin }) +); +const ar_AR = { + labelIdle: 'اسحب و ادرج ملفاتك أو تصفح ', + labelInvalidField: "الحقل يحتوي على ملفات غير صالحة", + labelFileWaitingForSize: "بانتظار الحجم", + labelFileSizeNotAvailable: "الحجم غير متاح", + labelFileLoading: "بالإنتظار", + labelFileLoadError: "حدث خطأ أثناء التحميل", + labelFileProcessing: "يتم الرفع", + labelFileProcessingComplete: "تم الرفع", + labelFileProcessingAborted: "تم إلغاء الرفع", + labelFileProcessingError: "حدث خطأ أثناء الرفع", + labelFileProcessingRevertError: "حدث خطأ أثناء التراجع", + labelFileRemoveError: "حدث خطأ أثناء الحذف", + labelTapToCancel: "انقر للإلغاء", + labelTapToRetry: "انقر لإعادة المحاولة", + labelTapToUndo: "انقر للتراجع", + labelButtonRemoveItem: "مسح", + labelButtonAbortItemLoad: "إلغاء", + labelButtonRetryItemLoad: "إعادة", + labelButtonAbortItemProcessing: "إلغاء", + labelButtonUndoItemProcessing: "تراجع", + labelButtonRetryItemProcessing: "إعادة", + labelButtonProcessItem: "رفع", + labelMaxFileSizeExceeded: "الملف كبير جدا", + labelMaxFileSize: "حجم الملف الأقصى: {filesize}", + labelMaxTotalFileSizeExceeded: "تم تجاوز الحد الأقصى للحجم الإجمالي", + labelMaxTotalFileSize: "الحد الأقصى لحجم الملف: {filesize}", + labelFileTypeNotAllowed: "ملف من نوع غير صالح", + fileValidateTypeLabelExpectedTypes: "تتوقع {allButLastType} من {lastType}", + imageValidateSizeLabelFormatError: "نوع الصورة غير مدعوم", + imageValidateSizeLabelImageSizeTooSmall: "الصورة صغير جدا", + imageValidateSizeLabelImageSizeTooBig: "الصورة كبيرة جدا", + imageValidateSizeLabelExpectedMinSize: "الحد الأدنى للأبعاد هو: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "الحد الأقصى للأبعاد هو: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "الدقة ضعيفة جدا", + imageValidateSizeLabelImageResolutionTooHigh: "الدقة مرتفعة جدا", + imageValidateSizeLabelExpectedMinResolution: "أقل دقة: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "أقصى دقة: {maxResolution}" +}, az_AZ = { + labelIdle: 'Faylınızı Sürüşdürün & Buraxın ya da Seçin ', + labelInvalidField: "Sahədə etibarsız fayllar var", + labelFileWaitingForSize: "Ölçü hesablanır", + labelFileSizeNotAvailable: "Ölçü mövcud deyil", + labelFileLoading: "Yüklənir", + labelFileLoadError: "Yükləmə əsnasında xəta baş verdi", + labelFileProcessing: "Yüklənir", + labelFileProcessingComplete: "Yükləmə tamamlandı", + labelFileProcessingAborted: "Yükləmə ləğv edildi", + labelFileProcessingError: "Yükəyərkən xəta baş verdi", + labelFileProcessingRevertError: "Geri çəkərkən xəta baş verdi", + labelFileRemoveError: "Çıxararkən xəta baş verdi", + labelTapToCancel: "İmtina etmək üçün klikləyin", + labelTapToRetry: "Təkrar yoxlamaq üçün klikləyin", + labelTapToUndo: "Geri almaq üçün klikləyin", + labelButtonRemoveItem: "Çıxar", + labelButtonAbortItemLoad: "İmtina Et", + labelButtonRetryItemLoad: "Təkrar yoxla", + labelButtonAbortItemProcessing: "İmtina et", + labelButtonUndoItemProcessing: "Geri Al", + labelButtonRetryItemProcessing: "Təkrar yoxla", + labelButtonProcessItem: "Yüklə", + labelMaxFileSizeExceeded: "Fayl çox böyükdür", + labelMaxFileSize: "Ən böyük fayl ölçüsü: {filesize}", + labelMaxTotalFileSizeExceeded: "Maksimum ölçü keçildi", + labelMaxTotalFileSize: "Maksimum fayl ölçüsü :{filesize}", + labelFileTypeNotAllowed: "Etibarsız fayl tipi", + fileValidateTypeLabelExpectedTypes: "Bu {allButLastType} ya da bu fayl olması lazımdır: {lastType}", + imageValidateSizeLabelFormatError: "Şəkil tipi dəstəklənmir", + imageValidateSizeLabelImageSizeTooSmall: "Şəkil çox kiçik", + imageValidateSizeLabelImageSizeTooBig: "Şəkil çox böyük", + imageValidateSizeLabelExpectedMinSize: "Minimum ölçü {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksimum ölçü {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Görüntü imkanı çox aşağı", + imageValidateSizeLabelImageResolutionTooHigh: "Görüntü imkanı çox yüksək", + imageValidateSizeLabelExpectedMinResolution: "Minimum görüntü imkanı {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximum görüntü imkanı {maxResolution}" +}, cs_CZ = { + labelIdle: 'Přetáhněte soubor sem (drag&drop) nebo Vyhledat ', + labelInvalidField: "Pole obsahuje chybné soubory", + labelFileWaitingForSize: "Zjišťuje se velikost", + labelFileSizeNotAvailable: "Velikost není známá", + labelFileLoading: "Přenáší se", + labelFileLoadError: "Chyba při přenosu", + labelFileProcessing: "Probíhá upload", + labelFileProcessingComplete: "Upload dokončen", + labelFileProcessingAborted: "Upload stornován", + labelFileProcessingError: "Chyba při uploadu", + labelFileProcessingRevertError: "Chyba při obnově", + labelFileRemoveError: "Chyba při odstranění", + labelTapToCancel: "klepněte pro storno", + labelTapToRetry: "klepněte pro opakování", + labelTapToUndo: "klepněte pro vrácení", + labelButtonRemoveItem: "Odstranit", + labelButtonAbortItemLoad: "Storno", + labelButtonRetryItemLoad: "Opakovat", + labelButtonAbortItemProcessing: "Zpět", + labelButtonUndoItemProcessing: "Vrátit", + labelButtonRetryItemProcessing: "Opakovat", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Soubor je příliš velký", + labelMaxFileSize: "Největší velikost souboru je {filesize}", + labelMaxTotalFileSizeExceeded: "Překročena maximální celková velikost souboru", + labelMaxTotalFileSize: "Maximální celková velikost souboru je {filesize}", + labelFileTypeNotAllowed: "Soubor je nesprávného typu", + fileValidateTypeLabelExpectedTypes: "Očekává se {allButLastType} nebo {lastType}", + imageValidateSizeLabelFormatError: "Obrázek tohoto typu není podporován", + imageValidateSizeLabelImageSizeTooSmall: "Obrázek je příliš malý", + imageValidateSizeLabelImageSizeTooBig: "Obrázek je příliš velký", + imageValidateSizeLabelExpectedMinSize: "Minimální rozměr je {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximální rozměr je {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rozlišení je příliš malé", + imageValidateSizeLabelImageResolutionTooHigh: "Rozlišení je příliš velké", + imageValidateSizeLabelExpectedMinResolution: "Minimální rozlišení je {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximální rozlišení je {maxResolution}" +}, da_DK = { + labelIdle: 'Træk & slip filer eller Gennemse ', + labelInvalidField: "Felt indeholder ugyldige filer", + labelFileWaitingForSize: "Venter på størrelse", + labelFileSizeNotAvailable: "Størrelse ikke tilgængelig", + labelFileLoading: "Loader", + labelFileLoadError: "Load fejlede", + labelFileProcessing: "Uploader", + labelFileProcessingComplete: "Upload færdig", + labelFileProcessingAborted: "Upload annulleret", + labelFileProcessingError: "Upload fejlede", + labelFileProcessingRevertError: "Fortryd fejlede", + labelFileRemoveError: "Fjern fejlede", + labelTapToCancel: "tryk for at annullere", + labelTapToRetry: "tryk for at prøve igen", + labelTapToUndo: "tryk for at fortryde", + labelButtonRemoveItem: "Fjern", + labelButtonAbortItemLoad: "Annuller", + labelButtonRetryItemLoad: "Forsøg igen", + labelButtonAbortItemProcessing: "Annuller", + labelButtonUndoItemProcessing: "Fortryd", + labelButtonRetryItemProcessing: "Prøv igen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Filen er for stor", + labelMaxFileSize: "Maksimal filstørrelse er {filesize}", + labelMaxTotalFileSizeExceeded: "Maksimal totalstørrelse overskredet", + labelMaxTotalFileSize: "Maksimal total filstørrelse er {filesize}", + labelFileTypeNotAllowed: "Ugyldig filtype", + fileValidateTypeLabelExpectedTypes: "Forventer {allButLastType} eller {lastType}", + imageValidateSizeLabelFormatError: "Ugyldigt format", + imageValidateSizeLabelImageSizeTooSmall: "Billedet er for lille", + imageValidateSizeLabelImageSizeTooBig: "Billedet er for stort", + imageValidateSizeLabelExpectedMinSize: "Minimum størrelse er {minBredde} × {minHøjde}", + imageValidateSizeLabelExpectedMaxSize: "Maksimal størrelse er {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "For lav opløsning", + imageValidateSizeLabelImageResolutionTooHigh: "For høj opløsning", + imageValidateSizeLabelExpectedMinResolution: "Minimum opløsning er {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimal opløsning er {maxResolution}" +}, de_DE = { + labelIdle: 'Dateien ablegen oder auswählen ', + labelInvalidField: "Feld beinhaltet ungültige Dateien", + labelFileWaitingForSize: "Dateigröße berechnen", + labelFileSizeNotAvailable: "Dateigröße nicht verfügbar", + labelFileLoading: "Laden", + labelFileLoadError: "Fehler beim Laden", + labelFileProcessing: "Upload läuft", + labelFileProcessingComplete: "Upload abgeschlossen", + labelFileProcessingAborted: "Upload abgebrochen", + labelFileProcessingError: "Fehler beim Upload", + labelFileProcessingRevertError: "Fehler beim Wiederherstellen", + labelFileRemoveError: "Fehler beim Löschen", + labelTapToCancel: "abbrechen", + labelTapToRetry: "erneut versuchen", + labelTapToUndo: "rückgängig", + labelButtonRemoveItem: "Entfernen", + labelButtonAbortItemLoad: "Verwerfen", + labelButtonRetryItemLoad: "Erneut versuchen", + labelButtonAbortItemProcessing: "Abbrechen", + labelButtonUndoItemProcessing: "Rückgängig", + labelButtonRetryItemProcessing: "Erneut versuchen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Datei ist zu groß", + labelMaxFileSize: "Maximale Dateigröße: {filesize}", + labelMaxTotalFileSizeExceeded: "Maximale gesamte Dateigröße überschritten", + labelMaxTotalFileSize: "Maximale gesamte Dateigröße: {filesize}", + labelFileTypeNotAllowed: "Dateityp ungültig", + fileValidateTypeLabelExpectedTypes: "Erwartet {allButLastType} oder {lastType}", + imageValidateSizeLabelFormatError: "Bildtyp nicht unterstützt", + imageValidateSizeLabelImageSizeTooSmall: "Bild ist zu klein", + imageValidateSizeLabelImageSizeTooBig: "Bild ist zu groß", + imageValidateSizeLabelExpectedMinSize: "Mindestgröße: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximale Größe: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Auflösung ist zu niedrig", + imageValidateSizeLabelImageResolutionTooHigh: "Auflösung ist zu hoch", + imageValidateSizeLabelExpectedMinResolution: "Mindestauflösung: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximale Auflösung: {maxResolution}" +}, el_EL = { + labelIdle: 'Σύρετε τα αρχεία σας στο πλαίσιο ή Επιλέξτε ', + labelInvalidField: "Το πεδίο περιέχει μη έγκυρα αρχεία", + labelFileWaitingForSize: "Σε αναμονή για το μέγεθος", + labelFileSizeNotAvailable: "Μέγεθος μη διαθέσιμο", + labelFileLoading: "Φόρτωση σε εξέλιξη", + labelFileLoadError: "Σφάλμα κατά τη φόρτωση", + labelFileProcessing: "Επεξεργασία", + labelFileProcessingComplete: "Η επεξεργασία ολοκληρώθηκε", + labelFileProcessingAborted: "Η επεξεργασία ακυρώθηκε", + labelFileProcessingError: "Σφάλμα κατά την επεξεργασία", + labelFileProcessingRevertError: "Σφάλμα κατά την επαναφορά", + labelFileRemoveError: "Σφάλμα κατά την διαγραφή", + labelTapToCancel: "πατήστε για ακύρωση", + labelTapToRetry: "πατήστε για επανάληψη", + labelTapToUndo: "πατήστε για αναίρεση", + labelButtonRemoveItem: "Αφαίρεση", + labelButtonAbortItemLoad: "Ακύρωση", + labelButtonRetryItemLoad: "Επανάληψη", + labelButtonAbortItemProcessing: "Ακύρωση", + labelButtonUndoItemProcessing: "Αναίρεση", + labelButtonRetryItemProcessing: "Επανάληψη", + labelButtonProcessItem: "Μεταφόρτωση", + labelMaxFileSizeExceeded: "Το αρχείο είναι πολύ μεγάλο", + labelMaxFileSize: "Το μέγιστο μέγεθος αρχείου είναι {filesize}", + labelMaxTotalFileSizeExceeded: "Υπέρβαση του μέγιστου συνολικού μεγέθους", + labelMaxTotalFileSize: "Το μέγιστο συνολικό μέγεθος αρχείων είναι {filesize}", + labelFileTypeNotAllowed: "Μη έγκυρος τύπος αρχείου", + fileValidateTypeLabelExpectedTypes: "Τα αποδεκτά αρχεία είναι {allButLastType} ή {lastType}", + imageValidateSizeLabelFormatError: "Ο τύπος της εικόνας δεν υποστηρίζεται", + imageValidateSizeLabelImageSizeTooSmall: "Η εικόνα είναι πολύ μικρή", + imageValidateSizeLabelImageSizeTooBig: "Η εικόνα είναι πολύ μεγάλη", + imageValidateSizeLabelExpectedMinSize: "Το ελάχιστο αποδεκτό μέγεθος είναι {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Το μέγιστο αποδεκτό μέγεθος είναι {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Η ανάλυση της εικόνας είναι πολύ χαμηλή", + imageValidateSizeLabelImageResolutionTooHigh: "Η ανάλυση της εικόνας είναι πολύ υψηλή", + imageValidateSizeLabelExpectedMinResolution: "Η ελάχιστη αποδεκτή ανάλυση είναι {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Η μέγιστη αποδεκτή ανάλυση είναι {maxResolution}" +}, en_EN = { + labelIdle: 'Drag & Drop your files or Browse ', + labelInvalidField: "Field contains invalid files", + labelFileWaitingForSize: "Waiting for size", + labelFileSizeNotAvailable: "Size not available", + labelFileLoading: "Loading", + labelFileLoadError: "Error during load", + labelFileProcessing: "Uploading", + labelFileProcessingComplete: "Upload complete", + labelFileProcessingAborted: "Upload cancelled", + labelFileProcessingError: "Error during upload", + labelFileProcessingRevertError: "Error during revert", + labelFileRemoveError: "Error during remove", + labelTapToCancel: "tap to cancel", + labelTapToRetry: "tap to retry", + labelTapToUndo: "tap to undo", + labelButtonRemoveItem: "Remove", + labelButtonAbortItemLoad: "Abort", + labelButtonRetryItemLoad: "Retry", + labelButtonAbortItemProcessing: "Cancel", + labelButtonUndoItemProcessing: "Undo", + labelButtonRetryItemProcessing: "Retry", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "File is too large", + labelMaxFileSize: "Maximum file size is {filesize}", + labelMaxTotalFileSizeExceeded: "Maximum total size exceeded", + labelMaxTotalFileSize: "Maximum total file size is {filesize}", + labelFileTypeNotAllowed: "File of invalid type", + fileValidateTypeLabelExpectedTypes: "Expects {allButLastType} or {lastType}", + imageValidateSizeLabelFormatError: "Image type not supported", + imageValidateSizeLabelImageSizeTooSmall: "Image is too small", + imageValidateSizeLabelImageSizeTooBig: "Image is too big", + imageValidateSizeLabelExpectedMinSize: "Minimum size is {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum size is {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolution is too low", + imageValidateSizeLabelImageResolutionTooHigh: "Resolution is too high", + imageValidateSizeLabelExpectedMinResolution: "Minimum resolution is {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximum resolution is {maxResolution}" +}, es_ES = { + labelIdle: 'Arrastra y suelta tus archivos o Examina ', + labelInvalidField: "El campo contiene archivos inválidos", + labelFileWaitingForSize: "Esperando tamaño", + labelFileSizeNotAvailable: "Tamaño no disponible", + labelFileLoading: "Cargando", + labelFileLoadError: "Error durante la carga", + labelFileProcessing: "Subiendo", + labelFileProcessingComplete: "Subida completa", + labelFileProcessingAborted: "Subida cancelada", + labelFileProcessingError: "Error durante la subida", + labelFileProcessingRevertError: "Error durante la reversión", + labelFileRemoveError: "Error durante la eliminación", + labelTapToCancel: "toca para cancelar", + labelTapToRetry: "tocar para reintentar", + labelTapToUndo: "tocar para deshacer", + labelButtonRemoveItem: "Eliminar", + labelButtonAbortItemLoad: "Cancelar", + labelButtonRetryItemLoad: "Reintentar", + labelButtonAbortItemProcessing: "Cancelar", + labelButtonUndoItemProcessing: "Deshacer", + labelButtonRetryItemProcessing: "Reintentar", + labelButtonProcessItem: "Subir", + labelMaxFileSizeExceeded: "El archivo es demasiado grande", + labelMaxFileSize: "El tamaño máximo del archivo es {filesize}", + labelMaxTotalFileSizeExceeded: "Tamaño total máximo excedido", + labelMaxTotalFileSize: "El tamaño total máximo del archivo es {filesize}", + labelFileTypeNotAllowed: "Archivo de tipo inválido", + fileValidateTypeLabelExpectedTypes: "Espera {allButLastType} o {lastType}", + imageValidateSizeLabelFormatError: "Tipo de imagen no soportada", + imageValidateSizeLabelImageSizeTooSmall: "La imagen es demasiado pequeña", + imageValidateSizeLabelImageSizeTooBig: "La imagen es demasiado grande", + imageValidateSizeLabelExpectedMinSize: "El tamaño mínimo es {minWidth} x {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "El tamaño máximo es {maxWidth} x {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La resolución es demasiado baja", + imageValidateSizeLabelImageResolutionTooHigh: "La resolución es demasiado alta", + imageValidateSizeLabelExpectedMinResolution: "La resolución mínima es {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La resolución máxima es {maxResolution}" +}, fa_IR = { + labelIdle: 'فایل را اینجا بکشید و رها کنید، یا جستجو کنید ', + labelInvalidField: "فیلد دارای فایل های نامعتبر است", + labelFileWaitingForSize: "Waiting for size", + labelFileSizeNotAvailable: "حجم فایل مجاز نیست", + labelFileLoading: "درحال بارگذاری", + labelFileLoadError: "خطا در زمان اجرا", + labelFileProcessing: "درحال بارگذاری", + labelFileProcessingComplete: "بارگذاری کامل شد", + labelFileProcessingAborted: "بارگذاری لغو شد", + labelFileProcessingError: "خطا در زمان بارگذاری", + labelFileProcessingRevertError: "خطا در زمان حذف", + labelFileRemoveError: "خطا در زمان حذف", + labelTapToCancel: "برای لغو ضربه بزنید", + labelTapToRetry: "برای تکرار کلیک کنید", + labelTapToUndo: "برای برگشت کلیک کنید", + labelButtonRemoveItem: "حذف", + labelButtonAbortItemLoad: "لغو", + labelButtonRetryItemLoad: "تکرار", + labelButtonAbortItemProcessing: "لغو", + labelButtonUndoItemProcessing: "برگشت", + labelButtonRetryItemProcessing: "تکرار", + labelButtonProcessItem: "بارگذاری", + labelMaxFileSizeExceeded: "فایل بسیار حجیم است", + labelMaxFileSize: "حداکثر مجاز فایل {filesize} است", + labelMaxTotalFileSizeExceeded: "از حداکثر حجم فایل بیشتر شد", + labelMaxTotalFileSize: "حداکثر حجم فایل {filesize} است", + labelFileTypeNotAllowed: "نوع فایل نامعتبر است", + fileValidateTypeLabelExpectedTypes: "در انتظار {allButLastType} یا {lastType}", + imageValidateSizeLabelFormatError: "فرمت تصویر پشتیبانی نمی شود", + imageValidateSizeLabelImageSizeTooSmall: "تصویر بسیار کوچک است", + imageValidateSizeLabelImageSizeTooBig: "تصویر بسیار بزرگ است", + imageValidateSizeLabelExpectedMinSize: "حداقل اندازه {minWidth} × {minHeight} است", + imageValidateSizeLabelExpectedMaxSize: "حداکثر اندازه {maxWidth} × {maxHeight} است", + imageValidateSizeLabelImageResolutionTooLow: "وضوح تصویر بسیار کم است", + imageValidateSizeLabelImageResolutionTooHigh: "وضوع تصویر بسیار زیاد است", + imageValidateSizeLabelExpectedMinResolution: "حداقل وضوح تصویر {minResolution} است", + imageValidateSizeLabelExpectedMaxResolution: "حداکثر وضوح تصویر {maxResolution} است" +}, fi_FI = { + labelIdle: 'Vedä ja pudota tiedostoja tai Selaa ', + labelInvalidField: "Kentässä on virheellisiä tiedostoja", + labelFileWaitingForSize: "Odotetaan kokoa", + labelFileSizeNotAvailable: "Kokoa ei saatavilla", + labelFileLoading: "Ladataan", + labelFileLoadError: "Virhe latauksessa", + labelFileProcessing: "Lähetetään", + labelFileProcessingComplete: "Lähetys valmis", + labelFileProcessingAborted: "Lähetys peruttu", + labelFileProcessingError: "Virhe lähetyksessä", + labelFileProcessingRevertError: "Virhe palautuksessa", + labelFileRemoveError: "Virhe poistamisessa", + labelTapToCancel: "peruuta napauttamalla", + labelTapToRetry: "yritä uudelleen napauttamalla", + labelTapToUndo: "kumoa napauttamalla", + labelButtonRemoveItem: "Poista", + labelButtonAbortItemLoad: "Keskeytä", + labelButtonRetryItemLoad: "Yritä uudelleen", + labelButtonAbortItemProcessing: "Peruuta", + labelButtonUndoItemProcessing: "Kumoa", + labelButtonRetryItemProcessing: "Yritä uudelleen", + labelButtonProcessItem: "Lähetä", + labelMaxFileSizeExceeded: "Tiedoston koko on liian suuri", + labelMaxFileSize: "Tiedoston maksimikoko on {filesize}", + labelMaxTotalFileSizeExceeded: "Tiedostojen yhdistetty maksimikoko ylitetty", + labelMaxTotalFileSize: "Tiedostojen yhdistetty maksimikoko on {filesize}", + labelFileTypeNotAllowed: "Tiedostotyyppiä ei sallita", + fileValidateTypeLabelExpectedTypes: "Sallitaan {allButLastType} tai {lastType}", + imageValidateSizeLabelFormatError: "Kuvatyyppiä ei tueta", + imageValidateSizeLabelImageSizeTooSmall: "Kuva on liian pieni", + imageValidateSizeLabelImageSizeTooBig: "Kuva on liian suuri", + imageValidateSizeLabelExpectedMinSize: "Minimikoko on {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksimikoko on {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resoluutio on liian pieni", + imageValidateSizeLabelImageResolutionTooHigh: "Resoluutio on liian suuri", + imageValidateSizeLabelExpectedMinResolution: "Minimiresoluutio on {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimiresoluutio on {maxResolution}" +}, fr_FR = { + labelIdle: 'Faites glisser vos fichiers ou Parcourir ', + labelInvalidField: "Le champ contient des fichiers invalides", + labelFileWaitingForSize: "En attente de taille", + labelFileSizeNotAvailable: "Taille non disponible", + labelFileLoading: "Chargement", + labelFileLoadError: "Erreur durant le chargement", + labelFileProcessing: "Traitement", + labelFileProcessingComplete: "Traitement effectué", + labelFileProcessingAborted: "Traitement interrompu", + labelFileProcessingError: "Erreur durant le traitement", + labelFileProcessingRevertError: "Erreur durant la restauration", + labelFileRemoveError: "Erreur durant la suppression", + labelTapToCancel: "appuyer pour annuler", + labelTapToRetry: "appuyer pour réessayer", + labelTapToUndo: "appuyer pour revenir en arrière", + labelButtonRemoveItem: "Retirer", + labelButtonAbortItemLoad: "Annuler", + labelButtonRetryItemLoad: "Recommencer", + labelButtonAbortItemProcessing: "Annuler", + labelButtonUndoItemProcessing: "Revenir en arrière", + labelButtonRetryItemProcessing: "Recommencer", + labelButtonProcessItem: "Transférer", + labelMaxFileSizeExceeded: "Le fichier est trop volumineux", + labelMaxFileSize: "La taille maximale de fichier est {filesize}", + labelMaxTotalFileSizeExceeded: "Taille totale maximale dépassée", + labelMaxTotalFileSize: "La taille totale maximale des fichiers est {filesize}", + labelFileTypeNotAllowed: "Fichier non valide", + fileValidateTypeLabelExpectedTypes: "Attendu {allButLastType} ou {lastType}", + imageValidateSizeLabelFormatError: "Type d'image non pris en charge", + imageValidateSizeLabelImageSizeTooSmall: "L'image est trop petite", + imageValidateSizeLabelImageSizeTooBig: "L'image est trop grande", + imageValidateSizeLabelExpectedMinSize: "La taille minimale est {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "La taille maximale est {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La résolution est trop faible", + imageValidateSizeLabelImageResolutionTooHigh: "La résolution est trop élevée", + imageValidateSizeLabelExpectedMinResolution: "La résolution minimale est {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La résolution maximale est {maxResolution}" +}, he_HE = { + labelIdle: 'גרור ושחרר את הקבצים כאן או לחץ כאן לבחירה ', + labelInvalidField: "קובץ לא חוקי", + labelFileWaitingForSize: "מחשב את גודל הקבצים", + labelFileSizeNotAvailable: "לא ניתן לקבוע את גודל הקבצים", + labelFileLoading: "טוען...", + labelFileLoadError: "שגיאה ארעה בעת טעינת הקבצים", + labelFileProcessing: "מעלה את הקבצים", + labelFileProcessingComplete: "העלאת הקבצים הסתיימה", + labelFileProcessingAborted: "העלאת הקבצים בוטלה", + labelFileProcessingError: "שגיאה ארעה בעת העלאת הקבצים", + labelFileProcessingRevertError: "שגיאה ארעה בעת שחזור הקבצים", + labelFileRemoveError: "שגיאה ארעה בעת הסרת הקובץ", + labelTapToCancel: "הקלק לביטול", + labelTapToRetry: "הקלק לנסות שנית", + labelTapToUndo: "הקלק לשחזר", + labelButtonRemoveItem: "הסר", + labelButtonAbortItemLoad: "בטל", + labelButtonRetryItemLoad: "טען שנית", + labelButtonAbortItemProcessing: "בטל", + labelButtonUndoItemProcessing: "שחזר", + labelButtonRetryItemProcessing: "נסה שנית", + labelButtonProcessItem: "העלה קובץ", + labelMaxFileSizeExceeded: "הקובץ גדול מדי", + labelMaxFileSize: "גודל המירבי המותר הוא: {filesize}", + labelMaxTotalFileSizeExceeded: "גודל הקבצים חורג מהכמות המותרת", + labelMaxTotalFileSize: "הגודל המירבי של סך הקבצים: {filesize}", + labelFileTypeNotAllowed: "קובץ מסוג זה אינו מותר", + fileValidateTypeLabelExpectedTypes: "הקבצים המותרים הם {allButLastType} או {lastType}", + imageValidateSizeLabelFormatError: "תמונה בפורמט זה אינה נתמכת", + imageValidateSizeLabelImageSizeTooSmall: "תמונה זו קטנה מדי", + imageValidateSizeLabelImageSizeTooBig: "תמונה זו גדולה מדי", + imageValidateSizeLabelExpectedMinSize: "הגודל צריך להיות לפחות: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "הגודל המרבי המותר: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "הרזולוציה של תמונה זו נמוכה מדי", + imageValidateSizeLabelImageResolutionTooHigh: "הרזולוציה של תמונה זו גבוהה מדי", + imageValidateSizeLabelExpectedMinResolution: "הרזולוציה צריכה להיות לפחות: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "הרזולוציה המירבית המותרת היא: {maxResolution}" +}, hr_HR = { + labelIdle: 'Ovdje "ispusti" datoteku ili Pretraži ', + labelInvalidField: "Polje sadrži neispravne datoteke", + labelFileWaitingForSize: "Čekanje na veličinu datoteke", + labelFileSizeNotAvailable: "Veličina datoteke nije dostupna", + labelFileLoading: "Učitavanje", + labelFileLoadError: "Greška tijekom učitavanja", + labelFileProcessing: "Prijenos", + labelFileProcessingComplete: "Prijenos završen", + labelFileProcessingAborted: "Prijenos otkazan", + labelFileProcessingError: "Greška tijekom prijenosa", + labelFileProcessingRevertError: "Greška tijekom vraćanja", + labelFileRemoveError: "Greška tijekom uklananja datoteke", + labelTapToCancel: "Dodirni za prekid", + labelTapToRetry: "Dodirni za ponovno", + labelTapToUndo: "Dodirni za vraćanje", + labelButtonRemoveItem: "Ukloni", + labelButtonAbortItemLoad: "Odbaci", + labelButtonRetryItemLoad: "Ponovi", + labelButtonAbortItemProcessing: "Prekini", + labelButtonUndoItemProcessing: "Vrati", + labelButtonRetryItemProcessing: "Ponovi", + labelButtonProcessItem: "Prijenos", + labelMaxFileSizeExceeded: "Datoteka je prevelika", + labelMaxFileSize: "Maksimalna veličina datoteke je {filesize}", + labelMaxTotalFileSizeExceeded: "Maksimalna ukupna veličina datoteke prekoračena", + labelMaxTotalFileSize: "Maksimalna ukupna veličina datoteke je {filesize}", + labelFileTypeNotAllowed: "Tip datoteke nije podržan", + fileValidateTypeLabelExpectedTypes: "Očekivan {allButLastType} ili {lastType}", + imageValidateSizeLabelFormatError: "Tip slike nije podržan", + imageValidateSizeLabelImageSizeTooSmall: "Slika je premala", + imageValidateSizeLabelImageSizeTooBig: "Slika je prevelika", + imageValidateSizeLabelExpectedMinSize: "Minimalna veličina je {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksimalna veličina je {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rezolucija je preniska", + imageValidateSizeLabelImageResolutionTooHigh: "Rezolucija je previsoka", + imageValidateSizeLabelExpectedMinResolution: "Minimalna rezolucija je {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimalna rezolucija je {maxResolution}" +}, hu_HU = { + labelIdle: 'Mozgasd ide a fájlt a feltöltéshez, vagy tallózás ', + labelInvalidField: "A mező érvénytelen fájlokat tartalmaz", + labelFileWaitingForSize: "Fáljméret kiszámolása", + labelFileSizeNotAvailable: "A fájlméret nem elérhető", + labelFileLoading: "Töltés", + labelFileLoadError: "Hiba a betöltés során", + labelFileProcessing: "Feltöltés", + labelFileProcessingComplete: "Sikeres feltöltés", + labelFileProcessingAborted: "A feltöltés megszakítva", + labelFileProcessingError: "Hiba történt a feltöltés során", + labelFileProcessingRevertError: "Hiba a visszaállítás során", + labelFileRemoveError: "Hiba történt az eltávolítás során", + labelTapToCancel: "koppints a törléshez", + labelTapToRetry: "koppints az újrakezdéshez", + labelTapToUndo: "koppints a visszavonáshoz", + labelButtonRemoveItem: "Eltávolítás", + labelButtonAbortItemLoad: "Megszakítás", + labelButtonRetryItemLoad: "Újrapróbálkozás", + labelButtonAbortItemProcessing: "Megszakítás", + labelButtonUndoItemProcessing: "Visszavonás", + labelButtonRetryItemProcessing: "Újrapróbálkozás", + labelButtonProcessItem: "Feltöltés", + labelMaxFileSizeExceeded: "A fájl túllépte a maximális méretet", + labelMaxFileSize: "Maximális fájlméret: {filesize}", + labelMaxTotalFileSizeExceeded: "Túllépte a maximális teljes méretet", + labelMaxTotalFileSize: "A maximáis teljes fájlméret: {filesize}", + labelFileTypeNotAllowed: "Érvénytelen típusú fájl", + fileValidateTypeLabelExpectedTypes: "Engedélyezett típusok {allButLastType} vagy {lastType}", + imageValidateSizeLabelFormatError: "A képtípus nem támogatott", + imageValidateSizeLabelImageSizeTooSmall: "A kép túl kicsi", + imageValidateSizeLabelImageSizeTooBig: "A kép túl nagy", + imageValidateSizeLabelExpectedMinSize: "Minimum méret: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum méret: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "A felbontás túl alacsony", + imageValidateSizeLabelImageResolutionTooHigh: "A felbontás túl magas", + imageValidateSizeLabelExpectedMinResolution: "Minimáis felbontás: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximális felbontás: {maxResolution}" +}, id_ID = { + labelIdle: 'Seret & Jatuhkan berkas Anda atau Jelajahi', + labelInvalidField: "Isian berisi berkas yang tidak valid", + labelFileWaitingForSize: "Menunggu ukuran berkas", + labelFileSizeNotAvailable: "Ukuran berkas tidak tersedia", + labelFileLoading: "Memuat", + labelFileLoadError: "Kesalahan saat memuat", + labelFileProcessing: "Mengunggah", + labelFileProcessingComplete: "Pengunggahan selesai", + labelFileProcessingAborted: "Pengunggahan dibatalkan", + labelFileProcessingError: "Kesalahan saat pengunggahan", + labelFileProcessingRevertError: "Kesalahan saat pemulihan", + labelFileRemoveError: "Kesalahan saat penghapusan", + labelTapToCancel: "ketuk untuk membatalkan", + labelTapToRetry: "ketuk untuk mencoba lagi", + labelTapToUndo: "ketuk untuk mengurungkan", + labelButtonRemoveItem: "Hapus", + labelButtonAbortItemLoad: "Batalkan", + labelButtonRetryItemLoad: "Coba Kembali", + labelButtonAbortItemProcessing: "Batalkan", + labelButtonUndoItemProcessing: "Urungkan", + labelButtonRetryItemProcessing: "Coba Kembali", + labelButtonProcessItem: "Unggah", + labelMaxFileSizeExceeded: "Berkas terlalu besar", + labelMaxFileSize: "Ukuran berkas maksimum adalah {filesize}", + labelMaxTotalFileSizeExceeded: "Jumlah berkas maksimum terlampaui", + labelMaxTotalFileSize: "Jumlah berkas maksimum adalah {filesize}", + labelFileTypeNotAllowed: "Jenis berkas tidak valid", + fileValidateTypeLabelExpectedTypes: "Mengharapkan {allButLastType} atau {lastType}", + imageValidateSizeLabelFormatError: "Jenis citra tidak didukung", + imageValidateSizeLabelImageSizeTooSmall: "Citra terlalu kecil", + imageValidateSizeLabelImageSizeTooBig: "Citra terlalu besar", + imageValidateSizeLabelExpectedMinSize: "Ukuran minimum adalah {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Ukuran maksimum adalah {minWidth} × {minHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolusi terlalu rendah", + imageValidateSizeLabelImageResolutionTooHigh: "Resolusi terlalu tinggi", + imageValidateSizeLabelExpectedMinResolution: "Resolusi minimum adalah {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Resolusi maksimum adalah {maxResolution}" +}, it_IT = { + labelIdle: 'Trascina e rilascia i tuoi file oppure Carica ', + labelInvalidField: "Il campo contiene dei file non validi", + labelFileWaitingForSize: "Aspettando le dimensioni", + labelFileSizeNotAvailable: "Dimensioni non disponibili", + labelFileLoading: "Caricamento", + labelFileLoadError: "Errore durante il caricamento", + labelFileProcessing: "Caricamento", + labelFileProcessingComplete: "Caricamento completato", + labelFileProcessingAborted: "Caricamento cancellato", + labelFileProcessingError: "Errore durante il caricamento", + labelFileProcessingRevertError: "Errore durante il ripristino", + labelFileRemoveError: "Errore durante l'eliminazione", + labelTapToCancel: "tocca per cancellare", + labelTapToRetry: "tocca per riprovare", + labelTapToUndo: "tocca per ripristinare", + labelButtonRemoveItem: "Elimina", + labelButtonAbortItemLoad: "Cancella", + labelButtonRetryItemLoad: "Ritenta", + labelButtonAbortItemProcessing: "Camcella", + labelButtonUndoItemProcessing: "Indietro", + labelButtonRetryItemProcessing: "Ritenta", + labelButtonProcessItem: "Carica", + labelMaxFileSizeExceeded: "Il peso del file è eccessivo", + labelMaxFileSize: "Il peso massimo del file è {filesize}", + labelMaxTotalFileSizeExceeded: "Dimensione totale massima superata", + labelMaxTotalFileSize: "La dimensione massima totale del file è {filesize}", + labelFileTypeNotAllowed: "File non supportato", + fileValidateTypeLabelExpectedTypes: "Aspetta {allButLastType} o {lastType}", + imageValidateSizeLabelFormatError: "Tipo di immagine non compatibile", + imageValidateSizeLabelImageSizeTooSmall: "L'immagine è troppo piccola", + imageValidateSizeLabelImageSizeTooBig: "L'immagine è troppo grande", + imageValidateSizeLabelExpectedMinSize: "La dimensione minima è {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "La dimensione massima è {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La risoluzione è troppo bassa", + imageValidateSizeLabelImageResolutionTooHigh: "La risoluzione è troppo alta", + imageValidateSizeLabelExpectedMinResolution: "La risoluzione minima è {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La risoluzione massima è {maxResolution}" +}, ja_JA = { + labelIdle: 'ファイルをドラッグ&ドロップ又はファイル選択', + labelInvalidField: "アップロードできないファイルが含まれています", + labelFileWaitingForSize: "ファイルサイズを待っています", + labelFileSizeNotAvailable: "ファイルサイズがみつかりません", + labelFileLoading: "読込中...", + labelFileLoadError: "読込中にエラーが発生", + labelFileProcessing: "読込中...", + labelFileProcessingComplete: "アップロード完了", + labelFileProcessingAborted: "アップロードがキャンセルされました", + labelFileProcessingError: "アップロード中にエラーが発生", + labelFileProcessingRevertError: "ロールバック中にエラーが発生", + labelFileRemoveError: "削除中にエラーが発生", + labelTapToCancel: "クリックしてキャンセル", + labelTapToRetry: "クリックしてもう一度お試し下さい", + labelTapToUndo: "元に戻すにはタップします", + labelButtonRemoveItem: "削除", + labelButtonAbortItemLoad: "中断", + labelButtonRetryItemLoad: "もう一度実行", + labelButtonAbortItemProcessing: "キャンセル", + labelButtonUndoItemProcessing: "元に戻す", + labelButtonRetryItemProcessing: "もう一度実行", + labelButtonProcessItem: "アップロード", + labelMaxFileSizeExceeded: "ファイルサイズが大きすぎます", + labelMaxFileSize: "最大ファイルサイズは {filesize} です", + labelMaxTotalFileSizeExceeded: "最大合計サイズを超えました", + labelMaxTotalFileSize: "最大合計ファイルサイズは {filesize} です", + labelFileTypeNotAllowed: "無効なファイルです", + fileValidateTypeLabelExpectedTypes: "サポートしているファイルは {allButLastType} 又は {lastType} です", + imageValidateSizeLabelFormatError: "サポートしていない画像です", + imageValidateSizeLabelImageSizeTooSmall: "画像が小さすぎます", + imageValidateSizeLabelImageSizeTooBig: "画像が大きすぎます", + imageValidateSizeLabelExpectedMinSize: "画像の最小サイズは{minWidth}×{minHeight}です", + imageValidateSizeLabelExpectedMaxSize: "画像の最大サイズは{maxWidth} × {maxHeight}です", + imageValidateSizeLabelImageResolutionTooLow: "画像の解像度が低すぎます", + imageValidateSizeLabelImageResolutionTooHigh: "画像の解像度が高すぎます", + imageValidateSizeLabelExpectedMinResolution: "画像の最小解像度は{minResolution}です", + imageValidateSizeLabelExpectedMaxResolution: "画像の最大解像度は{maxResolution}です" +}, km_KM = { + labelIdle: 'ទាញ&ដាក់ហ្វាល់ឯកសាររបស់អ្នក ឬ ស្វែងរក ', + labelInvalidField: "ចន្លោះមានឯកសារមិនត្រឹមត្រូវ", + labelFileWaitingForSize: "កំពុងរង់ចាំទំហំ", + labelFileSizeNotAvailable: "ទំហំមិនអាចប្រើបាន", + labelFileLoading: "កំពុងដំណើរការ", + labelFileLoadError: "មានបញ្ហាកំឡុងពេលដំណើរការ", + labelFileProcessing: "កំពុងផ្ទុកឡើង", + labelFileProcessingComplete: "ការផ្ទុកឡើងពេញលេញ", + labelFileProcessingAborted: "ការបង្ហោះត្រូវបានបោះបង់", + labelFileProcessingError: "មានបញ្ហាកំឡុងពេលកំពុងផ្ទុកឡើង", + labelFileProcessingRevertError: "មានបញ្ហាកំឡុងពេលត្រឡប់", + labelFileRemoveError: "មានបញ្ហាកំឡុងពេលដកចេញ", + labelTapToCancel: "ចុចដើម្បីបោះបង់", + labelTapToRetry: "ចុចដើម្បីព្យាយាមម្តងទៀត", + labelTapToUndo: "ចុចដើម្បីមិនធ្វើវិញ", + labelButtonRemoveItem: "យកចេញ", + labelButtonAbortItemLoad: "បោះបង់", + labelButtonRetryItemLoad: "ព្យាយាមម្តងទៀត", + labelButtonAbortItemProcessing: "បោះបង់", + labelButtonUndoItemProcessing: "មិនធ្វើវិញ", + labelButtonRetryItemProcessing: "ព្យាយាមម្តងទៀត", + labelButtonProcessItem: "ផ្ទុកឡើង", + labelMaxFileSizeExceeded: "ឯកសារធំពេក", + labelMaxFileSize: "ទំហំឯកសារអតិបរមាគឺ {filesize}", + labelMaxTotalFileSizeExceeded: "លើសទំហំសរុបអតិបរមា", + labelMaxTotalFileSize: "ទំហំឯកសារសរុបអតិបរមាគឺ {filesize}", + labelFileTypeNotAllowed: "ប្រភេទឯកសារមិនត្រឹមត្រូវ", + fileValidateTypeLabelExpectedTypes: "រំពឹងថា {allButLastType} ឬ {lastType}", + imageValidateSizeLabelFormatError: "ប្រភេទរូបភាពមិនត្រឹមត្រូវ", + imageValidateSizeLabelImageSizeTooSmall: "រូបភាពតូចពេក", + imageValidateSizeLabelImageSizeTooBig: "រូបភាពធំពេក", + imageValidateSizeLabelExpectedMinSize: "ទំហំអប្បបរមាគឺ {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "ទំហំអតិបរមាគឺ {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "គុណភាពបង្ហាញទាបពេក", + imageValidateSizeLabelImageResolutionTooHigh: "គុណភាពបង្ហាញខ្ពស់ពេក", + imageValidateSizeLabelExpectedMinResolution: "គុណភាពបង្ហាញអប្បបរមាគឺ {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "គុណភាពបង្ហាញអតិបរមាគឺ {maxResolution}" +}, lt_LT = { + labelIdle: 'Įdėkite failus čia arba Ieškokite ', + labelInvalidField: "Laukelis talpina netinkamus failus", + labelFileWaitingForSize: "Laukiama dydžio", + labelFileSizeNotAvailable: "Dydis nežinomas", + labelFileLoading: "Kraunama", + labelFileLoadError: "Klaida įkeliant", + labelFileProcessing: "Įkeliama", + labelFileProcessingComplete: "Įkėlimas sėkmingas", + labelFileProcessingAborted: "Įkėlimas atšauktas", + labelFileProcessingError: "Įkeliant įvyko klaida", + labelFileProcessingRevertError: "Atšaukiant įvyko klaida", + labelFileRemoveError: "Ištrinant įvyko klaida", + labelTapToCancel: "Palieskite norėdami atšaukti", + labelTapToRetry: "Palieskite norėdami pakartoti", + labelTapToUndo: "Palieskite norėdami atšaukti", + labelButtonRemoveItem: "Ištrinti", + labelButtonAbortItemLoad: "Sustabdyti", + labelButtonRetryItemLoad: "Pakartoti", + labelButtonAbortItemProcessing: "Atšaukti", + labelButtonUndoItemProcessing: "Atšaukti", + labelButtonRetryItemProcessing: "Pakartoti", + labelButtonProcessItem: "Įkelti", + labelMaxFileSizeExceeded: "Failas per didelis", + labelMaxFileSize: "Maksimalus failo dydis yra {filesize}", + labelMaxTotalFileSizeExceeded: "Viršijote maksimalų leistiną dydį", + labelMaxTotalFileSize: "Maksimalus leistinas dydis yra {filesize}", + labelFileTypeNotAllowed: "Netinkamas failas", + fileValidateTypeLabelExpectedTypes: "Tikisi {allButLastType} arba {lastType}", + imageValidateSizeLabelFormatError: "Nuotraukos formatas nepalaikomas", + imageValidateSizeLabelImageSizeTooSmall: "Nuotrauka per maža", + imageValidateSizeLabelImageSizeTooBig: "Nuotrauka per didelė", + imageValidateSizeLabelExpectedMinSize: "Minimalus dydis yra {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksimalus dydis yra {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rezoliucija per maža", + imageValidateSizeLabelImageResolutionTooHigh: "Rezoliucija per didelė", + imageValidateSizeLabelExpectedMinResolution: "Minimali rezoliucija yra {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimali rezoliucija yra {maxResolution}" +}, nl_NL = { + labelIdle: 'Drag & Drop je bestanden of Bladeren ', + labelInvalidField: "Veld bevat ongeldige bestanden", + labelFileWaitingForSize: "Wachten op grootte", + labelFileSizeNotAvailable: "Grootte niet beschikbaar", + labelFileLoading: "Laden", + labelFileLoadError: "Fout tijdens laden", + labelFileProcessing: "Uploaden", + labelFileProcessingComplete: "Upload afgerond", + labelFileProcessingAborted: "Upload geannuleerd", + labelFileProcessingError: "Fout tijdens upload", + labelFileProcessingRevertError: "Fout bij herstellen", + labelFileRemoveError: "Fout bij verwijderen", + labelTapToCancel: "tik om te annuleren", + labelTapToRetry: "tik om opnieuw te proberen", + labelTapToUndo: "tik om ongedaan te maken", + labelButtonRemoveItem: "Verwijderen", + labelButtonAbortItemLoad: "Afbreken", + labelButtonRetryItemLoad: "Opnieuw proberen", + labelButtonAbortItemProcessing: "Annuleren", + labelButtonUndoItemProcessing: "Ongedaan maken", + labelButtonRetryItemProcessing: "Opnieuw proberen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Bestand is te groot", + labelMaxFileSize: "Maximale bestandsgrootte is {filesize}", + labelMaxTotalFileSizeExceeded: "Maximale totale grootte overschreden", + labelMaxTotalFileSize: "Maximale totale bestandsgrootte is {filesize}", + labelFileTypeNotAllowed: "Ongeldig bestandstype", + fileValidateTypeLabelExpectedTypes: "Verwacht {allButLastType} of {lastType}", + imageValidateSizeLabelFormatError: "Afbeeldingstype niet ondersteund", + imageValidateSizeLabelImageSizeTooSmall: "Afbeelding is te klein", + imageValidateSizeLabelImageSizeTooBig: "Afbeelding is te groot", + imageValidateSizeLabelExpectedMinSize: "Minimale afmeting is {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximale afmeting is {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolutie is te laag", + imageValidateSizeLabelImageResolutionTooHigh: "Resolution is too high", + imageValidateSizeLabelExpectedMinResolution: "Minimale resolutie is {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximale resolutie is {maxResolution}" +}, no_NB = { + labelIdle: 'Dra og slipp filene dine, eller Bla gjennom... ', + labelInvalidField: "Feltet inneholder ugyldige filer", + labelFileWaitingForSize: "Venter på størrelse", + labelFileSizeNotAvailable: "Størrelse ikke tilgjengelig", + labelFileLoading: "Laster", + labelFileLoadError: "Feil under lasting", + labelFileProcessing: "Laster opp", + labelFileProcessingComplete: "Opplasting ferdig", + labelFileProcessingAborted: "Opplasting avbrutt", + labelFileProcessingError: "Feil under opplasting", + labelFileProcessingRevertError: "Feil under reversering", + labelFileRemoveError: "Feil under flytting", + labelTapToCancel: "klikk for å avbryte", + labelTapToRetry: "klikk for å prøve på nytt", + labelTapToUndo: "klikk for å angre", + labelButtonRemoveItem: "Fjern", + labelButtonAbortItemLoad: "Avbryt", + labelButtonRetryItemLoad: "Prøv på nytt", + labelButtonAbortItemProcessing: "Avbryt", + labelButtonUndoItemProcessing: "Angre", + labelButtonRetryItemProcessing: "Prøv på nytt", + labelButtonProcessItem: "Last opp", + labelMaxFileSizeExceeded: "Filen er for stor", + labelMaxFileSize: "Maksimal filstørrelse er {filesize}", + labelMaxTotalFileSizeExceeded: "Maksimal total størrelse oversteget", + labelMaxTotalFileSize: "Maksimal total størrelse er {filesize}", + labelFileTypeNotAllowed: "Ugyldig filtype", + fileValidateTypeLabelExpectedTypes: "Forventer {allButLastType} eller {lastType}", + imageValidateSizeLabelFormatError: "Bildeformat ikke støttet", + imageValidateSizeLabelImageSizeTooSmall: "Bildet er for lite", + imageValidateSizeLabelImageSizeTooBig: "Bildet er for stort", + imageValidateSizeLabelExpectedMinSize: "Minimumsstørrelse er {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksimumsstørrelse er {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Oppløsningen er for lav", + imageValidateSizeLabelImageResolutionTooHigh: "Oppløsningen er for høy", + imageValidateSizeLabelExpectedMinResolution: "Minimum oppløsning er {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimal oppløsning er {maxResolution}" +}, pl_PL = { + labelIdle: 'Przeciągnij i upuść lub wybierz pliki', + labelInvalidField: "Nieprawidłowe pliki", + labelFileWaitingForSize: "Pobieranie rozmiaru", + labelFileSizeNotAvailable: "Nieznany rozmiar", + labelFileLoading: "Wczytywanie", + labelFileLoadError: "Błąd wczytywania", + labelFileProcessing: "Przesyłanie", + labelFileProcessingComplete: "Przesłano", + labelFileProcessingAborted: "Przerwano", + labelFileProcessingError: "Przesyłanie nie powiodło się", + labelFileProcessingRevertError: "Coś poszło nie tak", + labelFileRemoveError: "Nieudane usunięcie", + labelTapToCancel: "Anuluj", + labelTapToRetry: "Ponów", + labelTapToUndo: "Cofnij", + labelButtonRemoveItem: "Usuń", + labelButtonAbortItemLoad: "Przerwij", + labelButtonRetryItemLoad: "Ponów", + labelButtonAbortItemProcessing: "Anuluj", + labelButtonUndoItemProcessing: "Cofnij", + labelButtonRetryItemProcessing: "Ponów", + labelButtonProcessItem: "Prześlij", + labelMaxFileSizeExceeded: "Plik jest zbyt duży", + labelMaxFileSize: "Dopuszczalna wielkość pliku to {filesize}", + labelMaxTotalFileSizeExceeded: "Przekroczono łączny rozmiar plików", + labelMaxTotalFileSize: "Łączny rozmiar plików nie może przekroczyć {filesize}", + labelFileTypeNotAllowed: "Niedozwolony rodzaj pliku", + fileValidateTypeLabelExpectedTypes: "Oczekiwano {allButLastType} lub {lastType}", + imageValidateSizeLabelFormatError: "Nieobsługiwany format obrazu", + imageValidateSizeLabelImageSizeTooSmall: "Obraz jest zbyt mały", + imageValidateSizeLabelImageSizeTooBig: "Obraz jest zbyt duży", + imageValidateSizeLabelExpectedMinSize: "Minimalne wymiary obrazu to {minWidth}×{minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksymalna wymiary obrazu to {maxWidth}×{maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rozdzielczość jest zbyt niska", + imageValidateSizeLabelImageResolutionTooHigh: "Rozdzielczość jest zbyt wysoka", + imageValidateSizeLabelExpectedMinResolution: "Minimalna rozdzielczość to {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksymalna rozdzielczość to {maxResolution}" +}, pt_BR = { + labelIdle: 'Arraste e solte os arquivos ou Clique aqui ', + labelInvalidField: "Arquivos inválidos", + labelFileWaitingForSize: "Calculando o tamanho do arquivo", + labelFileSizeNotAvailable: "Tamanho do arquivo indisponível", + labelFileLoading: "Carregando", + labelFileLoadError: "Erro durante o carregamento", + labelFileProcessing: "Enviando", + labelFileProcessingComplete: "Envio finalizado", + labelFileProcessingAborted: "Envio cancelado", + labelFileProcessingError: "Erro durante o envio", + labelFileProcessingRevertError: "Erro ao reverter o envio", + labelFileRemoveError: "Erro ao remover o arquivo", + labelTapToCancel: "clique para cancelar", + labelTapToRetry: "clique para reenviar", + labelTapToUndo: "clique para desfazer", + labelButtonRemoveItem: "Remover", + labelButtonAbortItemLoad: "Abortar", + labelButtonRetryItemLoad: "Reenviar", + labelButtonAbortItemProcessing: "Cancelar", + labelButtonUndoItemProcessing: "Desfazer", + labelButtonRetryItemProcessing: "Reenviar", + labelButtonProcessItem: "Enviar", + labelMaxFileSizeExceeded: "Arquivo é muito grande", + labelMaxFileSize: "O tamanho máximo permitido: {filesize}", + labelMaxTotalFileSizeExceeded: "Tamanho total dos arquivos excedido", + labelMaxTotalFileSize: "Tamanho total permitido: {filesize}", + labelFileTypeNotAllowed: "Tipo de arquivo inválido", + fileValidateTypeLabelExpectedTypes: "Tipos de arquivo suportados são {allButLastType} ou {lastType}", + imageValidateSizeLabelFormatError: "Tipo de imagem inválida", + imageValidateSizeLabelImageSizeTooSmall: "Imagem muito pequena", + imageValidateSizeLabelImageSizeTooBig: "Imagem muito grande", + imageValidateSizeLabelExpectedMinSize: "Tamanho mínimo permitida: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Tamanho máximo permitido: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolução muito baixa", + imageValidateSizeLabelImageResolutionTooHigh: "Resolução muito alta", + imageValidateSizeLabelExpectedMinResolution: "Resolução mínima permitida: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Resolução máxima permitida: {maxResolution}" +}, pt_PT = { + labelIdle: 'Arraste & Largue os ficheiros ou Seleccione ', + labelInvalidField: "O campo contém ficheiros inválidos", + labelFileWaitingForSize: "A aguardar tamanho", + labelFileSizeNotAvailable: "Tamanho não disponível", + labelFileLoading: "A carregar", + labelFileLoadError: "Erro ao carregar", + labelFileProcessing: "A carregar", + labelFileProcessingComplete: "Carregamento completo", + labelFileProcessingAborted: "Carregamento cancelado", + labelFileProcessingError: "Erro ao carregar", + labelFileProcessingRevertError: "Erro ao reverter", + labelFileRemoveError: "Erro ao remover", + labelTapToCancel: "carregue para cancelar", + labelTapToRetry: "carregue para tentar novamente", + labelTapToUndo: "carregue para desfazer", + labelButtonRemoveItem: "Remover", + labelButtonAbortItemLoad: "Abortar", + labelButtonRetryItemLoad: "Tentar novamente", + labelButtonAbortItemProcessing: "Cancelar", + labelButtonUndoItemProcessing: "Desfazer", + labelButtonRetryItemProcessing: "Tentar novamente", + labelButtonProcessItem: "Carregar", + labelMaxFileSizeExceeded: "Ficheiro demasiado grande", + labelMaxFileSize: "O tamanho máximo do ficheiro é de {filesize}", + labelMaxTotalFileSizeExceeded: "Tamanho máximo total excedido", + labelMaxTotalFileSize: "O tamanho máximo total do ficheiro é de {filesize}", + labelFileTypeNotAllowed: "Tipo de ficheiro inválido", + fileValidateTypeLabelExpectedTypes: "É esperado {allButLastType} ou {lastType}", + imageValidateSizeLabelFormatError: "Tipo de imagem não suportada", + imageValidateSizeLabelImageSizeTooSmall: "A imagem é demasiado pequena", + imageValidateSizeLabelImageSizeTooBig: "A imagem é demasiado grande", + imageValidateSizeLabelExpectedMinSize: "O tamanho mínimo é de {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "O tamanho máximo é de {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "A resolução é demasiado baixa", + imageValidateSizeLabelImageResolutionTooHigh: "A resolução é demasiado grande", + imageValidateSizeLabelExpectedMinResolution: "A resolução mínima é de {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "A resolução máxima é de {maxResolution}" +}, ro_RO = { + labelIdle: 'Trage și plasează fișiere sau Caută-le ', + labelInvalidField: "Câmpul conține fișiere care nu sunt valide", + labelFileWaitingForSize: "În așteptarea dimensiunii", + labelFileSizeNotAvailable: "Dimensiunea nu este diponibilă", + labelFileLoading: "Se încarcă", + labelFileLoadError: "Eroare la încărcare", + labelFileProcessing: "Se încarcă", + labelFileProcessingComplete: "Încărcare finalizată", + labelFileProcessingAborted: "Încărcare anulată", + labelFileProcessingError: "Eroare la încărcare", + labelFileProcessingRevertError: "Eroare la anulare", + labelFileRemoveError: "Eroare la ştergere", + labelTapToCancel: "apasă pentru a anula", + labelTapToRetry: "apasă pentru a reîncerca", + labelTapToUndo: "apasă pentru a anula", + labelButtonRemoveItem: "Şterge", + labelButtonAbortItemLoad: "Anulează", + labelButtonRetryItemLoad: "Reîncearcă", + labelButtonAbortItemProcessing: "Anulează", + labelButtonUndoItemProcessing: "Anulează", + labelButtonRetryItemProcessing: "Reîncearcă", + labelButtonProcessItem: "Încarcă", + labelMaxFileSizeExceeded: "Fișierul este prea mare", + labelMaxFileSize: "Dimensiunea maximă a unui fișier este de {filesize}", + labelMaxTotalFileSizeExceeded: "Dimensiunea totală maximă a fost depășită", + labelMaxTotalFileSize: "Dimensiunea totală maximă a fișierelor este de {filesize}", + labelFileTypeNotAllowed: "Tipul fișierului nu este valid", + fileValidateTypeLabelExpectedTypes: "Se așteaptă {allButLastType} sau {lastType}", + imageValidateSizeLabelFormatError: "Formatul imaginii nu este acceptat", + imageValidateSizeLabelImageSizeTooSmall: "Imaginea este prea mică", + imageValidateSizeLabelImageSizeTooBig: "Imaginea este prea mare", + imageValidateSizeLabelExpectedMinSize: "Mărimea minimă este de {maxWidth} x {maxHeight}", + imageValidateSizeLabelExpectedMaxSize: "Mărimea maximă este de {maxWidth} x {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rezoluția este prea mică", + imageValidateSizeLabelImageResolutionTooHigh: "Rezoluția este prea mare", + imageValidateSizeLabelExpectedMinResolution: "Rezoluția minimă este de {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Rezoluția maximă este de {maxResolution}" +}, ru_RU = { + labelIdle: 'Перетащите файлы или выберите ', + labelInvalidField: "Поле содержит недопустимые файлы", + labelFileWaitingForSize: "Укажите размер", + labelFileSizeNotAvailable: "Размер не поддерживается", + labelFileLoading: "Ожидание", + labelFileLoadError: "Ошибка при ожидании", + labelFileProcessing: "Загрузка", + labelFileProcessingComplete: "Загрузка завершена", + labelFileProcessingAborted: "Загрузка отменена", + labelFileProcessingError: "Ошибка при загрузке", + labelFileProcessingRevertError: "Ошибка при возврате", + labelFileRemoveError: "Ошибка при удалении", + labelTapToCancel: "нажмите для отмены", + labelTapToRetry: "нажмите, чтобы повторить попытку", + labelTapToUndo: "нажмите для отмены последнего действия", + labelButtonRemoveItem: "Удалить", + labelButtonAbortItemLoad: "Прекращено", + labelButtonRetryItemLoad: "Повторите попытку", + labelButtonAbortItemProcessing: "Отмена", + labelButtonUndoItemProcessing: "Отмена последнего действия", + labelButtonRetryItemProcessing: "Повторите попытку", + labelButtonProcessItem: "Загрузка", + labelMaxFileSizeExceeded: "Файл слишком большой", + labelMaxFileSize: "Максимальный размер файла: {filesize}", + labelMaxTotalFileSizeExceeded: "Превышен максимальный размер", + labelMaxTotalFileSize: "Максимальный размер файла: {filesize}", + labelFileTypeNotAllowed: "Файл неверного типа", + fileValidateTypeLabelExpectedTypes: "Ожидается {allButLastType} или {lastType}", + imageValidateSizeLabelFormatError: "Тип изображения не поддерживается", + imageValidateSizeLabelImageSizeTooSmall: "Изображение слишком маленькое", + imageValidateSizeLabelImageSizeTooBig: "Изображение слишком большое", + imageValidateSizeLabelExpectedMinSize: "Минимальный размер: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Максимальный размер: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Разрешение слишком низкое", + imageValidateSizeLabelImageResolutionTooHigh: "Разрешение слишком высокое", + imageValidateSizeLabelExpectedMinResolution: "Минимальное разрешение: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Максимальное разрешение: {maxResolution}" +}, sk_SK = { + labelIdle: 'Natiahnúť súbor (drag&drop) alebo Vyhľadať ', + labelInvalidField: "Pole obsahuje chybné súbory", + labelFileWaitingForSize: "Zisťuje sa veľkosť", + labelFileSizeNotAvailable: "Neznáma veľkosť", + labelFileLoading: "Prenáša sa", + labelFileLoadError: "Chyba pri prenose", + labelFileProcessing: "Prebieha upload", + labelFileProcessingComplete: "Upload dokončený", + labelFileProcessingAborted: "Upload stornovaný", + labelFileProcessingError: "Chyba pri uploade", + labelFileProcessingRevertError: "Chyba pri obnove", + labelFileRemoveError: "Chyba pri odstránení", + labelTapToCancel: "Kliknite pre storno", + labelTapToRetry: "Kliknite pre opakovanie", + labelTapToUndo: "Kliknite pre vrátenie", + labelButtonRemoveItem: "Odstrániť", + labelButtonAbortItemLoad: "Storno", + labelButtonRetryItemLoad: "Opakovať", + labelButtonAbortItemProcessing: "Späť", + labelButtonUndoItemProcessing: "Vrátiť", + labelButtonRetryItemProcessing: "Opakovať", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Súbor je príliš veľký", + labelMaxFileSize: "Najväčšia veľkosť súboru je {filesize}", + labelMaxTotalFileSizeExceeded: "Prekročená maximálna celková veľkosť súboru", + labelMaxTotalFileSize: "Maximálna celková veľkosť súboru je {filesize}", + labelFileTypeNotAllowed: "Súbor je nesprávneho typu", + fileValidateTypeLabelExpectedTypes: "Očakáva sa {allButLastType} alebo {lastType}", + imageValidateSizeLabelFormatError: "Obrázok tohto typu nie je podporovaný", + imageValidateSizeLabelImageSizeTooSmall: "Obrázok je príliš malý", + imageValidateSizeLabelImageSizeTooBig: "Obrázok je príliš veľký", + imageValidateSizeLabelExpectedMinSize: "Minimálny rozmer je {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximálny rozmer je {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rozlíšenie je príliš malé", + imageValidateSizeLabelImageResolutionTooHigh: "Rozlišenie je príliš veľké", + imageValidateSizeLabelExpectedMinResolution: "Minimálne rozlíšenie je {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximálne rozlíšenie je {maxResolution}" +}, sv_SE = { + labelIdle: 'Drag och släpp dina filer eller Bläddra ', + labelInvalidField: "Fältet innehåller felaktiga filer", + labelFileWaitingForSize: "Väntar på storlek", + labelFileSizeNotAvailable: "Storleken finns inte tillgänglig", + labelFileLoading: "Laddar", + labelFileLoadError: "Fel under laddning", + labelFileProcessing: "Laddar upp", + labelFileProcessingComplete: "Uppladdning klar", + labelFileProcessingAborted: "Uppladdning avbruten", + labelFileProcessingError: "Fel under uppladdning", + labelFileProcessingRevertError: "Fel under återställning", + labelFileRemoveError: "Fel under borttagning", + labelTapToCancel: "tryck för att avbryta", + labelTapToRetry: "tryck för att försöka igen", + labelTapToUndo: "tryck för att ångra", + labelButtonRemoveItem: "Tabort", + labelButtonAbortItemLoad: "Avbryt", + labelButtonRetryItemLoad: "Försök igen", + labelButtonAbortItemProcessing: "Avbryt", + labelButtonUndoItemProcessing: "Ångra", + labelButtonRetryItemProcessing: "Försök igen", + labelButtonProcessItem: "Ladda upp", + labelMaxFileSizeExceeded: "Filen är för stor", + labelMaxFileSize: "Största tillåtna filstorlek är {filesize}", + labelMaxTotalFileSizeExceeded: "Maximal uppladdningsstorlek uppnåd", + labelMaxTotalFileSize: "Maximal uppladdningsstorlek är {filesize}", + labelFileTypeNotAllowed: "Felaktig filtyp", + fileValidateTypeLabelExpectedTypes: "Godkända filtyper {allButLastType} eller {lastType}", + imageValidateSizeLabelFormatError: "Bildtypen saknar stöd", + imageValidateSizeLabelImageSizeTooSmall: "Bilden är för liten", + imageValidateSizeLabelImageSizeTooBig: "Bilden är för stor", + imageValidateSizeLabelExpectedMinSize: "Minimal storlek är {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximal storlek är {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Upplösningen är för låg", + imageValidateSizeLabelImageResolutionTooHigh: "Upplösningen är för hög", + imageValidateSizeLabelExpectedMinResolution: "Minsta tillåtna upplösning är {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Högsta tillåtna upplösning är {maxResolution}" +}, tr_TR = { + labelIdle: 'Dosyanızı Sürükleyin & Bırakın ya da Seçin ', + labelInvalidField: "Alan geçersiz dosyalar içeriyor", + labelFileWaitingForSize: "Boyut hesaplanıyor", + labelFileSizeNotAvailable: "Boyut mevcut değil", + labelFileLoading: "Yükleniyor", + labelFileLoadError: "Yükleme sırasında hata oluştu", + labelFileProcessing: "Yükleniyor", + labelFileProcessingComplete: "Yükleme tamamlandı", + labelFileProcessingAborted: "Yükleme iptal edildi", + labelFileProcessingError: "Yüklerken hata oluştu", + labelFileProcessingRevertError: "Geri çekerken hata oluştu", + labelFileRemoveError: "Kaldırırken hata oluştu", + labelTapToCancel: "İptal etmek için tıklayın", + labelTapToRetry: "Tekrar denemek için tıklayın", + labelTapToUndo: "Geri almak için tıklayın", + labelButtonRemoveItem: "Kaldır", + labelButtonAbortItemLoad: "İptal Et", + labelButtonRetryItemLoad: "Tekrar dene", + labelButtonAbortItemProcessing: "İptal et", + labelButtonUndoItemProcessing: "Geri Al", + labelButtonRetryItemProcessing: "Tekrar dene", + labelButtonProcessItem: "Yükle", + labelMaxFileSizeExceeded: "Dosya çok büyük", + labelMaxFileSize: "En fazla dosya boyutu: {filesize}", + labelMaxTotalFileSizeExceeded: "Maximum boyut aşıldı", + labelMaxTotalFileSize: "Maximum dosya boyutu :{filesize}", + labelFileTypeNotAllowed: "Geçersiz dosya tipi", + fileValidateTypeLabelExpectedTypes: "Şu {allButLastType} ya da şu dosya olması gerekir: {lastType}", + imageValidateSizeLabelFormatError: "Resim tipi desteklenmiyor", + imageValidateSizeLabelImageSizeTooSmall: "Resim çok küçük", + imageValidateSizeLabelImageSizeTooBig: "Resim çok büyük", + imageValidateSizeLabelExpectedMinSize: "Minimum boyut {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum boyut {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Çözünürlük çok düşük", + imageValidateSizeLabelImageResolutionTooHigh: "Çözünürlük çok yüksek", + imageValidateSizeLabelExpectedMinResolution: "Minimum çözünürlük {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximum çözünürlük {maxResolution}" +}, uk_UA = { + labelIdle: 'Перетягніть файли або виберіть ', + labelInvalidField: "Поле містить недопустимі файли", + labelFileWaitingForSize: "Вкажіть розмір", + labelFileSizeNotAvailable: "Розмір не доступний", + labelFileLoading: "Очікування", + labelFileLoadError: "Помилка при очікуванні", + labelFileProcessing: "Завантаження", + labelFileProcessingComplete: "Завантаження завершено", + labelFileProcessingAborted: "Завантаження скасовано", + labelFileProcessingError: "Помилка при завантаженні", + labelFileProcessingRevertError: "Помилка при відновленні", + labelFileRemoveError: "Помилка при видаленні", + labelTapToCancel: "Відмінити", + labelTapToRetry: "Натисніть, щоб повторити спробу", + labelTapToUndo: "Натисніть, щоб відмінити останню дію", + labelButtonRemoveItem: "Видалити", + labelButtonAbortItemLoad: "Відмінити", + labelButtonRetryItemLoad: "Повторити спробу", + labelButtonAbortItemProcessing: "Відмінити", + labelButtonUndoItemProcessing: "Відмінити останню дію", + labelButtonRetryItemProcessing: "Повторити спробу", + labelButtonProcessItem: "Завантаження", + labelMaxFileSizeExceeded: "Файл занадто великий", + labelMaxFileSize: "Максимальний розмір файлу: {filesize}", + labelMaxTotalFileSizeExceeded: "Перевищено максимальний загальний розмір", + labelMaxTotalFileSize: "Максимальний загальний розмір: {filesize}", + labelFileTypeNotAllowed: "Формат файлу не підтримується", + fileValidateTypeLabelExpectedTypes: "Очікується {allButLastType} або {lastType}", + imageValidateSizeLabelFormatError: "Формат зображення не підтримується", + imageValidateSizeLabelImageSizeTooSmall: "Зображення занадто маленьке", + imageValidateSizeLabelImageSizeTooBig: "Зображення занадто велике", + imageValidateSizeLabelExpectedMinSize: "Мінімальний розмір: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Максимальний розмір: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Розміри зображення занадто маленькі", + imageValidateSizeLabelImageResolutionTooHigh: "Розміри зображення занадто великі", + imageValidateSizeLabelExpectedMinResolution: "Мінімальні розміри: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Максимальні розміри: {maxResolution}" +}, vi_VI = { + labelIdle: 'Kéo thả tệp của bạn hoặc Tìm kiếm ', + labelInvalidField: "Trường chứa các tệp không hợp lệ", + labelFileWaitingForSize: "Đang chờ kích thước", + labelFileSizeNotAvailable: "Kích thước không có sẵn", + labelFileLoading: "Đang tải", + labelFileLoadError: "Lỗi khi tải", + labelFileProcessing: "Đang tải lên", + labelFileProcessingComplete: "Tải lên thành công", + labelFileProcessingAborted: "Đã huỷ tải lên", + labelFileProcessingError: "Lỗi khi tải lên", + labelFileProcessingRevertError: "Lỗi khi hoàn nguyên", + labelFileRemoveError: "Lỗi khi xóa", + labelTapToCancel: "nhấn để hủy", + labelTapToRetry: "nhấn để thử lại", + labelTapToUndo: "nhấn để hoàn tác", + labelButtonRemoveItem: "Xoá", + labelButtonAbortItemLoad: "Huỷ bỏ", + labelButtonRetryItemLoad: "Thử lại", + labelButtonAbortItemProcessing: "Hủy bỏ", + labelButtonUndoItemProcessing: "Hoàn tác", + labelButtonRetryItemProcessing: "Thử lại", + labelButtonProcessItem: "Tải lên", + labelMaxFileSizeExceeded: "Tập tin quá lớn", + labelMaxFileSize: "Kích thước tệp tối đa là {filesize}", + labelMaxTotalFileSizeExceeded: "Đã vượt quá tổng kích thước tối đa", + labelMaxTotalFileSize: "Tổng kích thước tệp tối đa là {filesize}", + labelFileTypeNotAllowed: "Tệp thuộc loại không hợp lệ", + fileValidateTypeLabelExpectedTypes: "Kiểu tệp hợp lệ là {allButLastType} hoặc {lastType}", + imageValidateSizeLabelFormatError: "Loại hình ảnh không được hỗ trợ", + imageValidateSizeLabelImageSizeTooSmall: "Hình ảnh quá nhỏ", + imageValidateSizeLabelImageSizeTooBig: "Hình ảnh quá lớn", + imageValidateSizeLabelExpectedMinSize: "Kích thước tối thiểu là {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Kích thước tối đa là {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Độ phân giải quá thấp", + imageValidateSizeLabelImageResolutionTooHigh: "Độ phân giải quá cao", + imageValidateSizeLabelExpectedMinResolution: "Độ phân giải tối thiểu là {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Độ phân giải tối đa là {maxResolution}" +}, zh_CN = { + labelIdle: '拖放文件,或者 浏览 ', + labelInvalidField: "字段包含无效文件", + labelFileWaitingForSize: "计算文件大小", + labelFileSizeNotAvailable: "文件大小不可用", + labelFileLoading: "加载", + labelFileLoadError: "加载错误", + labelFileProcessing: "上传", + labelFileProcessingComplete: "已上传", + labelFileProcessingAborted: "上传已取消", + labelFileProcessingError: "上传出错", + labelFileProcessingRevertError: "还原出错", + labelFileRemoveError: "删除出错", + labelTapToCancel: "点击取消", + labelTapToRetry: "点击重试", + labelTapToUndo: "点击撤消", + labelButtonRemoveItem: "删除", + labelButtonAbortItemLoad: "中止", + labelButtonRetryItemLoad: "重试", + labelButtonAbortItemProcessing: "取消", + labelButtonUndoItemProcessing: "撤消", + labelButtonRetryItemProcessing: "重试", + labelButtonProcessItem: "上传", + labelMaxFileSizeExceeded: "文件太大", + labelMaxFileSize: "最大值: {filesize}", + labelMaxTotalFileSizeExceeded: "超过最大文件大小", + labelMaxTotalFileSize: "最大文件大小:{filesize}", + labelFileTypeNotAllowed: "文件类型无效", + fileValidateTypeLabelExpectedTypes: "应为 {allButLastType} 或 {lastType}", + imageValidateSizeLabelFormatError: "不支持图像类型", + imageValidateSizeLabelImageSizeTooSmall: "图像太小", + imageValidateSizeLabelImageSizeTooBig: "图像太大", + imageValidateSizeLabelExpectedMinSize: "最小值: {minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "最大值: {maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "分辨率太低", + imageValidateSizeLabelImageResolutionTooHigh: "分辨率太高", + imageValidateSizeLabelExpectedMinResolution: "最小分辨率:{minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "最大分辨率:{maxResolution}" +}, zh_TW = { + labelIdle: '拖放檔案,或者 瀏覽 ', + labelInvalidField: "不支援此檔案", + labelFileWaitingForSize: "正在計算檔案大小", + labelFileSizeNotAvailable: "檔案大小不符", + labelFileLoading: "讀取中", + labelFileLoadError: "讀取錯誤", + labelFileProcessing: "上傳", + labelFileProcessingComplete: "已上傳", + labelFileProcessingAborted: "上傳已取消", + labelFileProcessingError: "上傳發生錯誤", + labelFileProcessingRevertError: "還原錯誤", + labelFileRemoveError: "刪除錯誤", + labelTapToCancel: "點擊取消", + labelTapToRetry: "點擊重試", + labelTapToUndo: "點擊還原", + labelButtonRemoveItem: "刪除", + labelButtonAbortItemLoad: "停止", + labelButtonRetryItemLoad: "重試", + labelButtonAbortItemProcessing: "取消", + labelButtonUndoItemProcessing: "取消", + labelButtonRetryItemProcessing: "重試", + labelButtonProcessItem: "上傳", + labelMaxFileSizeExceeded: "檔案過大", + labelMaxFileSize: "最大值:{filesize}", + labelMaxTotalFileSizeExceeded: "超過最大可上傳大小", + labelMaxTotalFileSize: "最大可上傳大小:{filesize}", + labelFileTypeNotAllowed: "不支援此類型檔案", + fileValidateTypeLabelExpectedTypes: "應為 {allButLastType} 或 {lastType}", + imageValidateSizeLabelFormatError: "不支持此類圖片類型", + imageValidateSizeLabelImageSizeTooSmall: "圖片過小", + imageValidateSizeLabelImageSizeTooBig: "圖片過大", + imageValidateSizeLabelExpectedMinSize: "最小尺寸:{minWidth} × {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "最大尺寸:{maxWidth} × {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "解析度過低", + imageValidateSizeLabelImageResolutionTooHigh: "解析度過高", + imageValidateSizeLabelExpectedMinResolution: "最低解析度:{minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "最高解析度:{maxResolution}" +}, locales = { + "ar-ar": ar_AR, + "az-az": az_AZ, + "cs-cz": cs_CZ, + "da-dk": da_DK, + "de-de": de_DE, + "el-el": el_EL, + "en-en": en_EN, + "es-es": es_ES, + "fa-ir": fa_IR, + "fi-fi": fi_FI, + "fr-fr": fr_FR, + "he-he": he_HE, + "hr-hr": hr_HR, + "hu-hu": hu_HU, + "id-id": id_ID, + "it-it": it_IT, + "ja-ja": ja_JA, + "km-km": km_KM, + "lt-lt": lt_LT, + "nl-nl": nl_NL, + "no-nb": no_NB, + "pl-pl": pl_PL, + "pt-br": pt_BR, + "pt-pt": pt_PT, + "ro-ro": ro_RO, + "ru-ru": ru_RU, + "sk-sk": sk_SK, + "sv-se": sv_SE, + "tr-tr": tr_TR, + "uk-ua": uk_UA, + "vi-vi": vi_VI, + "zh-cn": zh_CN, + "zh-tw": zh_TW +}, filepond = (e) => ({ + init() { + registerPlugin(plugin$3), registerPlugin(plugin$2), registerPlugin(plugin$1), registerPlugin(plugin); + const t = this.$wire.fields[e.field].properties; + create$f(this.$refs.input, { + allowMultiple: t.multiple, + minFileSize: t.file_size.min ? `${t.file_size.min}KB` : null, + maxFileSize: t.file_size.max ? `${t.file_size.max}KB` : null, + acceptedFileTypes: t.file_types, + imageValidateSizeMinWidth: t.dimensions.min_width ?? 1, + imageValidateSizeMinHeight: t.dimensions.min_height ?? 1, + imageValidateSizeMaxWidth: t.dimensions.max_width ?? 65535, + imageValidateSizeMaxHeight: t.dimensions.max_height ?? 65535, + credits: !1, + server: { + process: (i, a, n, l, r, s, o, d, c) => { + this.$wire.upload(t.key, a, l, r, s); + }, + revert: (i, a) => { + this.$wire.removeUpload(t.key, i, a); + } + }, + ...locales[e.locale] + }); + }, + reset(t) { + t === this.$wire.id && find(this.$el.querySelector(".filepond--root")).removeFiles(); + } +}), KEYS = [ + "if", + "if_any", + "show_when", + "show_when_any", + "unless", + "unless_any", + "hide_when", + "hide_when_any" +], OPERATORS = [ + "equals", + "not", + "contains", + "contains_any", + "===", + "!==", + ">", + ">=", + "<", + "<=", + "custom" +], ALIASES = { + is: "equals", + "==": "equals", + isnt: "not", + "!=": "not", + includes: "contains", + includes_any: "contains_any" +}; +var VERSION = "1.13.6", root = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {}, ArrayProto = Array.prototype, ObjProto = Object.prototype, push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty, nativeIsArray = Array.isArray, nativeKeys = Object.keys, _isNaN = isNaN, hasEnumBug = !{ toString: null }.propertyIsEnumerable("toString"), nonEnumerableProps = [ + "valueOf", + "isPrototypeOf", + "toString", + "propertyIsEnumerable", + "hasOwnProperty", + "toLocaleString" +], MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; +function _(e) { + if (e instanceof _) return e; + if (!(this instanceof _)) return new _(e); + this._wrapped = e; +} +_.VERSION = VERSION; +_.prototype.value = function() { + return this._wrapped; +}; +_.prototype.valueOf = _.prototype.toJSON = _.prototype.value; +_.prototype.toString = function() { + return String(this._wrapped); +}; +function identity(e) { + return e; +} +function tagTester(e) { + var t = "[object " + e + "]"; + return function(i) { + return toString.call(i) === t; + }; +} +var isFunction = tagTester("Function"), nodelist = root.document && root.document.childNodes; +typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function" && (isFunction = function(e) { + return typeof e == "function" || !1; +}); +const isFunction$1 = isFunction; +function isObject(e) { + var t = typeof e; + return t === "function" || t === "object" && !!e; +} +const isArray = nativeIsArray || tagTester("Array"); +function createAssigner(e, t) { + return function(i) { + var a = arguments.length; + if (a < 2 || i == null) return i; + for (var n = 1; n < a; n++) + for (var l = arguments[n], r = e(l), s = r.length, o = 0; o < s; o++) { + var d = r[o]; + i[d] = l[d]; + } + return i; + }; +} +function has(e, t) { + return e != null && hasOwnProperty.call(e, t); +} +function emulatedSet(e) { + for (var t = {}, i = e.length, a = 0; a < i; ++a) t[e[a]] = !0; + return { + contains: function(n) { + return t[n] === !0; + }, + push: function(n) { + return t[n] = !0, e.push(n); + } + }; +} +function collectNonEnumProps(e, t) { + t = emulatedSet(t); + var i = nonEnumerableProps.length, a = e.constructor, n = isFunction$1(a) && a.prototype || ObjProto, l = "constructor"; + for (has(e, l) && !t.contains(l) && t.push(l); i--; ) + l = nonEnumerableProps[i], l in e && e[l] !== n[l] && !t.contains(l) && t.push(l); +} +function keys(e) { + if (!isObject(e)) return []; + if (nativeKeys) return nativeKeys(e); + var t = []; + for (var i in e) has(e, i) && t.push(i); + return hasEnumBug && collectNonEnumProps(e, t), t; +} +const extendOwn = createAssigner(keys); +function isMatch(e, t) { + var i = keys(t), a = i.length; + if (e == null) return !a; + for (var n = Object(e), l = 0; l < a; l++) { + var r = i[l]; + if (t[r] !== n[r] || !(r in n)) return !1; + } + return !0; +} +function matcher(e) { + return e = extendOwn({}, e), function(t) { + return isMatch(t, e); + }; +} +function deepGet(e, t) { + for (var i = t.length, a = 0; a < i; a++) { + if (e == null) return; + e = e[t[a]]; + } + return i ? e : void 0; +} +function toPath$1(e) { + return isArray(e) ? e : [e]; +} +_.toPath = toPath$1; +function toPath(e) { + return _.toPath(e); +} +function property(e) { + return e = toPath(e), function(t) { + return deepGet(t, e); + }; +} +function optimizeCb(e, t, i) { + if (t === void 0) return e; + switch (i ?? 3) { + case 1: + return function(a) { + return e.call(t, a); + }; + // The 2-argument case is omitted because we’re not using it. + case 3: + return function(a, n, l) { + return e.call(t, a, n, l); + }; + case 4: + return function(a, n, l, r) { + return e.call(t, a, n, l, r); + }; + } + return function() { + return e.apply(t, arguments); + }; +} +function baseIteratee(e, t, i) { + return e == null ? identity : isFunction$1(e) ? optimizeCb(e, t, i) : isObject(e) && !isArray(e) ? matcher(e) : property(e); +} +function iteratee(e, t) { + return baseIteratee(e, t, 1 / 0); +} +_.iteratee = iteratee; +function cb(e, t, i) { + return _.iteratee !== iteratee ? _.iteratee(e, t) : baseIteratee(e, t, i); +} +function createSizePropertyCheck(e) { + return function(t) { + var i = e(t); + return typeof i == "number" && i >= 0 && i <= MAX_ARRAY_INDEX; + }; +} +function shallowProperty(e) { + return function(t) { + return t == null ? void 0 : t[e]; + }; +} +const getLength = shallowProperty("length"), isArrayLike = createSizePropertyCheck(getLength); +function map(e, t, i) { + t = cb(t, i); + for (var a = !isArrayLike(e) && keys(e), n = (a || e).length, l = Array(n), r = 0; r < n; r++) { + var s = a ? a[r] : r; + l[r] = t(e[s], s, e); + } + return l; +} +function each(e, t, i) { + t = optimizeCb(t, i); + var a, n; + if (isArrayLike(e)) + for (a = 0, n = e.length; a < n; a++) + t(e[a], a, e); + else { + var l = keys(e); + for (a = 0, n = l.length; a < n; a++) + t(e[l[a]], l[a], e); + } + return e; +} +function filter(e, t, i) { + var a = []; + return t = cb(t, i), each(e, function(n, l, r) { + t(n, l, r) && a.push(n); + }), a; +} +function chain(e) { + var t = _(e); + return t._chain = !0, t; +} +function functions(e) { + var t = []; + for (var i in e) + isFunction$1(e[i]) && t.push(i); + return t.sort(); +} +function chainResult(e, t) { + return e._chain ? _(t).chain() : t; +} +function mixin(e) { + return each(functions(e), function(t) { + var i = _[t] = e[t]; + _.prototype[t] = function() { + var a = [this._wrapped]; + return push.apply(a, arguments), chainResult(this, i.apply(_, a)); + }; + }), _; +} +mixin({ chain, filter, each }); +class Converter { + fromBlueprint(t, i = null) { + return map(t, (a, n) => this.splitRhs(n, a, i)); + } + toBlueprint(t) { + let i = {}; + return each(t, (a) => { + i[a.field] = this.combineRhs(a); + }), i; + } + splitRhs(t, i, a = null) { + return { + field: this.getScopedFieldHandle(t, a), + operator: this.getOperatorFromRhs(i), + value: this.getValueFromRhs(i) + }; + } + getScopedFieldHandle(t, i) { + return t.startsWith("$root.") || t.startsWith("root.") || t.startsWith("$parent.") ? t : i ? i + t : t; + } + getOperatorFromRhs(t) { + let i = "=="; + return chain(this.getOperatorsAndAliases()).filter((a) => new RegExp(`^${a} [^=]`).test(this.normalizeConditionString(t))).each((a) => i = a), this.normalizeOperator(i); + } + normalizeOperator(t) { + return ALIASES[t] ? ALIASES[t] : t; + } + getValueFromRhs(t) { + let i = this.normalizeConditionString(t); + return chain(this.getOperatorsAndAliases()).filter((a) => new RegExp(`^${a} [^=]`).test(i)).each((a) => i = i.replace(new RegExp(`^${a}[ ]*`), "")), i; + } + combineRhs(t) { + let i = t.operator ? t.operator.trim() : "", a = t.value.trim(); + return `${i} ${a}`.trim(); + } + getOperatorsAndAliases() { + return OPERATORS.concat(Object.keys(ALIASES)); + } + normalizeConditionString(t) { + return t === null ? "null" : t === "" ? "empty" : t.toString(); + } +} +class ParentResolver { + constructor(t) { + this.currentFieldPath = t; + } + resolve(t) { + let i = this.getParentFieldPath(this.currentFieldPath, !0), a = this.removeOneParentKeyword(t); + for (; a.startsWith("$parent."); ) + i = this.getParentFieldPath(i), a = this.removeOneParentKeyword(a); + return `$root.${i ? `${i}.${a}` : a}`; + } + getParentFieldPath(t, i) { + const a = new RegExp("(.*?[^\\.]+)(\\.[0-9]+)*\\.[^\\.]*$"); + return (i || this.isAtSetLevel(t)) && (t = t.replace(a, "$1")), t.includes(".") ? t.replace(a, "$1$2") : ""; + } + isAtSetLevel(t) { + return t.match(new RegExp("(\\.[0-9]+)$")); + } + removeOneParentKeyword(t) { + return t.replace(new RegExp("^\\$parent."), ""); + } +} +function getDefaults() { + return { + async: !1, + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !0, + headerPrefix: "", + highlight: null, + hooks: null, + langPrefix: "language-", + mangle: !0, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + }; +} +let defaults = getDefaults(); +function changeDefaults(e) { + defaults = e; +} +const escapeTest = /[&<>"']/, escapeReplace = new RegExp(escapeTest.source, "g"), escapeTestNoEncode = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, "g"), escapeReplacements = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}, getEscapeReplacement = (e) => escapeReplacements[e]; +function escape(e, t) { + if (t) { + if (escapeTest.test(e)) + return e.replace(escapeReplace, getEscapeReplacement); + } else if (escapeTestNoEncode.test(e)) + return e.replace(escapeReplaceNoEncode, getEscapeReplacement); + return e; +} +const unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; +function unescape$1(e) { + return e.replace(unescapeTest, (t, i) => (i = i.toLowerCase(), i === "colon" ? ":" : i.charAt(0) === "#" ? i.charAt(1) === "x" ? String.fromCharCode(parseInt(i.substring(2), 16)) : String.fromCharCode(+i.substring(1)) : "")); +} +const caret = /(^|[^\[])\^/g; +function edit(e, t) { + e = typeof e == "string" ? e : e.source, t = t || ""; + const i = { + replace: (a, n) => (n = n.source || n, n = n.replace(caret, "$1"), e = e.replace(a, n), i), + getRegex: () => new RegExp(e, t) + }; + return i; +} +const nonWordAndColonTest = /[^\w:]/g, originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; +function cleanUrl(e, t, i) { + if (e) { + let a; + try { + a = decodeURIComponent(unescape$1(i)).replace(nonWordAndColonTest, "").toLowerCase(); + } catch { + return null; + } + if (a.indexOf("javascript:") === 0 || a.indexOf("vbscript:") === 0 || a.indexOf("data:") === 0) + return null; + } + t && !originIndependentUrl.test(i) && (i = resolveUrl(t, i)); + try { + i = encodeURI(i).replace(/%25/g, "%"); + } catch { + return null; + } + return i; +} +const baseUrls = {}, justDomain = /^[^:]+:\/*[^/]*$/, protocol = /^([^:]+:)[\s\S]*$/, domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; +function resolveUrl(e, t) { + baseUrls[" " + e] || (justDomain.test(e) ? baseUrls[" " + e] = e + "/" : baseUrls[" " + e] = rtrim(e, "/", !0)), e = baseUrls[" " + e]; + const i = e.indexOf(":") === -1; + return t.substring(0, 2) === "//" ? i ? t : e.replace(protocol, "$1") + t : t.charAt(0) === "/" ? i ? t : e.replace(domain, "$1") + t : e + t; +} +const noopTest = { exec: function() { +} }; +function splitCells(e, t) { + const i = e.replace(/\|/g, (l, r, s) => { + let o = !1, d = r; + for (; --d >= 0 && s[d] === "\\"; ) o = !o; + return o ? "|" : " |"; + }), a = i.split(/ \|/); + let n = 0; + if (a[0].trim() || a.shift(), a.length > 0 && !a[a.length - 1].trim() && a.pop(), a.length > t) + a.splice(t); + else + for (; a.length < t; ) a.push(""); + for (; n < a.length; n++) + a[n] = a[n].trim().replace(/\\\|/g, "|"); + return a; +} +function rtrim(e, t, i) { + const a = e.length; + if (a === 0) + return ""; + let n = 0; + for (; n < a; ) { + const l = e.charAt(a - n - 1); + if (l === t && !i) + n++; + else if (l !== t && i) + n++; + else + break; + } + return e.slice(0, a - n); +} +function findClosingBracket(e, t) { + if (e.indexOf(t[1]) === -1) + return -1; + const i = e.length; + let a = 0, n = 0; + for (; n < i; n++) + if (e[n] === "\\") + n++; + else if (e[n] === t[0]) + a++; + else if (e[n] === t[1] && (a--, a < 0)) + return n; + return -1; +} +function checkSanitizeDeprecation(e) { + e && e.sanitize && !e.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"); +} +function repeatString(e, t) { + if (t < 1) + return ""; + let i = ""; + for (; t > 1; ) + t & 1 && (i += e), t >>= 1, e += e; + return i + e; +} +function outputLink(e, t, i, a) { + const n = t.href, l = t.title ? escape(t.title) : null, r = e[1].replace(/\\([\[\]])/g, "$1"); + if (e[0].charAt(0) !== "!") { + a.state.inLink = !0; + const s = { + type: "link", + raw: i, + href: n, + title: l, + text: r, + tokens: a.inlineTokens(r) + }; + return a.state.inLink = !1, s; + } + return { + type: "image", + raw: i, + href: n, + title: l, + text: escape(r) + }; +} +function indentCodeCompensation(e, t) { + const i = e.match(/^(\s+)(?:```)/); + if (i === null) + return t; + const a = i[1]; + return t.split(` +`).map((n) => { + const l = n.match(/^\s+/); + if (l === null) + return n; + const [r] = l; + return r.length >= a.length ? n.slice(a.length) : n; + }).join(` +`); +} +class Tokenizer { + constructor(t) { + this.options = t || defaults; + } + space(t) { + const i = this.rules.block.newline.exec(t); + if (i && i[0].length > 0) + return { + type: "space", + raw: i[0] + }; + } + code(t) { + const i = this.rules.block.code.exec(t); + if (i) { + const a = i[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: i[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? a : rtrim(a, ` +`) + }; + } + } + fences(t) { + const i = this.rules.block.fences.exec(t); + if (i) { + const a = i[0], n = indentCodeCompensation(a, i[3] || ""); + return { + type: "code", + raw: a, + lang: i[2] ? i[2].trim().replace(this.rules.inline._escapes, "$1") : i[2], + text: n + }; + } + } + heading(t) { + const i = this.rules.block.heading.exec(t); + if (i) { + let a = i[2].trim(); + if (/#$/.test(a)) { + const n = rtrim(a, "#"); + (this.options.pedantic || !n || / $/.test(n)) && (a = n.trim()); + } + return { + type: "heading", + raw: i[0], + depth: i[1].length, + text: a, + tokens: this.lexer.inline(a) + }; + } + } + hr(t) { + const i = this.rules.block.hr.exec(t); + if (i) + return { + type: "hr", + raw: i[0] + }; + } + blockquote(t) { + const i = this.rules.block.blockquote.exec(t); + if (i) { + const a = i[0].replace(/^ *>[ \t]?/gm, ""), n = this.lexer.state.top; + this.lexer.state.top = !0; + const l = this.lexer.blockTokens(a); + return this.lexer.state.top = n, { + type: "blockquote", + raw: i[0], + tokens: l, + text: a + }; + } + } + list(t) { + let i = this.rules.block.list.exec(t); + if (i) { + let a, n, l, r, s, o, d, c, u, f, p, m, h = i[1].trim(); + const I = h.length > 1, b = { + type: "list", + raw: "", + ordered: I, + start: I ? +h.slice(0, -1) : "", + loose: !1, + items: [] + }; + h = I ? `\\d{1,9}\\${h.slice(-1)}` : `\\${h}`, this.options.pedantic && (h = I ? h : "[*+-]"); + const g = new RegExp(`^( {0,3}${h})((?:[ ][^\\n]*)?(?:\\n|$))`); + for (; t && (m = !1, !(!(i = g.exec(t)) || this.rules.block.hr.test(t))); ) { + if (a = i[0], t = t.substring(a.length), c = i[2].split(` +`, 1)[0].replace(/^\t+/, (T) => " ".repeat(3 * T.length)), u = t.split(` +`, 1)[0], this.options.pedantic ? (r = 2, p = c.trimLeft()) : (r = i[2].search(/[^ ]/), r = r > 4 ? 1 : r, p = c.slice(r), r += i[1].length), o = !1, !c && /^ *$/.test(u) && (a += u + ` +`, t = t.substring(u.length + 1), m = !0), !m) { + const T = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), S = new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), L = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), M = new RegExp(`^ {0,${Math.min(3, r - 1)}}#`); + for (; t && (f = t.split(` +`, 1)[0], u = f, this.options.pedantic && (u = u.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(L.test(u) || M.test(u) || T.test(u) || S.test(t))); ) { + if (u.search(/[^ ]/) >= r || !u.trim()) + p += ` +` + u.slice(r); + else { + if (o || c.search(/[^ ]/) >= 4 || L.test(c) || M.test(c) || S.test(c)) + break; + p += ` +` + u; + } + !o && !u.trim() && (o = !0), a += f + ` +`, t = t.substring(f.length + 1), c = u.slice(r); + } + } + b.loose || (d ? b.loose = !0 : /\n *\n *$/.test(a) && (d = !0)), this.options.gfm && (n = /^\[[ xX]\] /.exec(p), n && (l = n[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), b.items.push({ + type: "list_item", + raw: a, + task: !!n, + checked: l, + loose: !1, + text: p + }), b.raw += a; + } + b.items[b.items.length - 1].raw = a.trimRight(), b.items[b.items.length - 1].text = p.trimRight(), b.raw = b.raw.trimRight(); + const E = b.items.length; + for (s = 0; s < E; s++) + if (this.lexer.state.top = !1, b.items[s].tokens = this.lexer.blockTokens(b.items[s].text, []), !b.loose) { + const T = b.items[s].tokens.filter((L) => L.type === "space"), S = T.length > 0 && T.some((L) => /\n.*\n/.test(L.raw)); + b.loose = S; + } + if (b.loose) + for (s = 0; s < E; s++) + b.items[s].loose = !0; + return b; + } + } + html(t) { + const i = this.rules.block.html.exec(t); + if (i) { + const a = { + type: "html", + raw: i[0], + pre: !this.options.sanitizer && (i[1] === "pre" || i[1] === "script" || i[1] === "style"), + text: i[0] + }; + if (this.options.sanitize) { + const n = this.options.sanitizer ? this.options.sanitizer(i[0]) : escape(i[0]); + a.type = "paragraph", a.text = n, a.tokens = this.lexer.inline(n); + } + return a; + } + } + def(t) { + const i = this.rules.block.def.exec(t); + if (i) { + const a = i[1].toLowerCase().replace(/\s+/g, " "), n = i[2] ? i[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", l = i[3] ? i[3].substring(1, i[3].length - 1).replace(this.rules.inline._escapes, "$1") : i[3]; + return { + type: "def", + tag: a, + raw: i[0], + href: n, + title: l + }; + } + } + table(t) { + const i = this.rules.block.table.exec(t); + if (i) { + const a = { + type: "table", + header: splitCells(i[1]).map((n) => ({ text: n })), + align: i[2].replace(/^ *|\| *$/g, "").split(/ *\| */), + rows: i[3] && i[3].trim() ? i[3].replace(/\n[ \t]*$/, "").split(` +`) : [] + }; + if (a.header.length === a.align.length) { + a.raw = i[0]; + let n = a.align.length, l, r, s, o; + for (l = 0; l < n; l++) + /^ *-+: *$/.test(a.align[l]) ? a.align[l] = "right" : /^ *:-+: *$/.test(a.align[l]) ? a.align[l] = "center" : /^ *:-+ *$/.test(a.align[l]) ? a.align[l] = "left" : a.align[l] = null; + for (n = a.rows.length, l = 0; l < n; l++) + a.rows[l] = splitCells(a.rows[l], a.header.length).map((d) => ({ text: d })); + for (n = a.header.length, r = 0; r < n; r++) + a.header[r].tokens = this.lexer.inline(a.header[r].text); + for (n = a.rows.length, r = 0; r < n; r++) + for (o = a.rows[r], s = 0; s < o.length; s++) + o[s].tokens = this.lexer.inline(o[s].text); + return a; + } + } + } + lheading(t) { + const i = this.rules.block.lheading.exec(t); + if (i) + return { + type: "heading", + raw: i[0], + depth: i[2].charAt(0) === "=" ? 1 : 2, + text: i[1], + tokens: this.lexer.inline(i[1]) + }; + } + paragraph(t) { + const i = this.rules.block.paragraph.exec(t); + if (i) { + const a = i[1].charAt(i[1].length - 1) === ` +` ? i[1].slice(0, -1) : i[1]; + return { + type: "paragraph", + raw: i[0], + text: a, + tokens: this.lexer.inline(a) + }; + } + } + text(t) { + const i = this.rules.block.text.exec(t); + if (i) + return { + type: "text", + raw: i[0], + text: i[0], + tokens: this.lexer.inline(i[0]) + }; + } + escape(t) { + const i = this.rules.inline.escape.exec(t); + if (i) + return { + type: "escape", + raw: i[0], + text: escape(i[1]) + }; + } + tag(t) { + const i = this.rules.inline.tag.exec(t); + if (i) + return !this.lexer.state.inLink && /^/i.test(i[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(i[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0]) && (this.lexer.state.inRawBlock = !1), { + type: this.options.sanitize ? "text" : "html", + raw: i[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(i[0]) : escape(i[0]) : i[0] + }; + } + link(t) { + const i = this.rules.inline.link.exec(t); + if (i) { + const a = i[2].trim(); + if (!this.options.pedantic && /^$/.test(a)) + return; + const r = rtrim(a.slice(0, -1), "\\"); + if ((a.length - r.length) % 2 === 0) + return; + } else { + const r = findClosingBracket(i[2], "()"); + if (r > -1) { + const o = (i[0].indexOf("!") === 0 ? 5 : 4) + i[1].length + r; + i[2] = i[2].substring(0, r), i[0] = i[0].substring(0, o).trim(), i[3] = ""; + } + } + let n = i[2], l = ""; + if (this.options.pedantic) { + const r = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n); + r && (n = r[1], l = r[3]); + } else + l = i[3] ? i[3].slice(1, -1) : ""; + return n = n.trim(), /^$/.test(a) ? n = n.slice(1) : n = n.slice(1, -1)), outputLink(i, { + href: n && n.replace(this.rules.inline._escapes, "$1"), + title: l && l.replace(this.rules.inline._escapes, "$1") + }, i[0], this.lexer); + } + } + reflink(t, i) { + let a; + if ((a = this.rules.inline.reflink.exec(t)) || (a = this.rules.inline.nolink.exec(t))) { + let n = (a[2] || a[1]).replace(/\s+/g, " "); + if (n = i[n.toLowerCase()], !n) { + const l = a[0].charAt(0); + return { + type: "text", + raw: l, + text: l + }; + } + return outputLink(a, n, a[0], this.lexer); + } + } + emStrong(t, i, a = "") { + let n = this.rules.inline.emStrong.lDelim.exec(t); + if (!n || n[3] && a.match(/[\p{L}\p{N}]/u)) return; + const l = n[1] || n[2] || ""; + if (!l || l && (a === "" || this.rules.inline.punctuation.exec(a))) { + const r = n[0].length - 1; + let s, o, d = r, c = 0; + const u = n[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; + for (u.lastIndex = 0, i = i.slice(-1 * t.length + r); (n = u.exec(i)) != null; ) { + if (s = n[1] || n[2] || n[3] || n[4] || n[5] || n[6], !s) continue; + if (o = s.length, n[3] || n[4]) { + d += o; + continue; + } else if ((n[5] || n[6]) && r % 3 && !((r + o) % 3)) { + c += o; + continue; + } + if (d -= o, d > 0) continue; + o = Math.min(o, o + d + c); + const f = t.slice(0, r + n.index + (n[0].length - s.length) + o); + if (Math.min(r, o) % 2) { + const m = f.slice(1, -1); + return { + type: "em", + raw: f, + text: m, + tokens: this.lexer.inlineTokens(m) + }; + } + const p = f.slice(2, -2); + return { + type: "strong", + raw: f, + text: p, + tokens: this.lexer.inlineTokens(p) + }; + } + } + } + codespan(t) { + const i = this.rules.inline.code.exec(t); + if (i) { + let a = i[2].replace(/\n/g, " "); + const n = /[^ ]/.test(a), l = /^ /.test(a) && / $/.test(a); + return n && l && (a = a.substring(1, a.length - 1)), a = escape(a, !0), { + type: "codespan", + raw: i[0], + text: a + }; + } + } + br(t) { + const i = this.rules.inline.br.exec(t); + if (i) + return { + type: "br", + raw: i[0] + }; + } + del(t) { + const i = this.rules.inline.del.exec(t); + if (i) + return { + type: "del", + raw: i[0], + text: i[2], + tokens: this.lexer.inlineTokens(i[2]) + }; + } + autolink(t, i) { + const a = this.rules.inline.autolink.exec(t); + if (a) { + let n, l; + return a[2] === "@" ? (n = escape(this.options.mangle ? i(a[1]) : a[1]), l = "mailto:" + n) : (n = escape(a[1]), l = n), { + type: "link", + raw: a[0], + text: n, + href: l, + tokens: [ + { + type: "text", + raw: n, + text: n + } + ] + }; + } + } + url(t, i) { + let a; + if (a = this.rules.inline.url.exec(t)) { + let n, l; + if (a[2] === "@") + n = escape(this.options.mangle ? i(a[0]) : a[0]), l = "mailto:" + n; + else { + let r; + do + r = a[0], a[0] = this.rules.inline._backpedal.exec(a[0])[0]; + while (r !== a[0]); + n = escape(a[0]), a[1] === "www." ? l = "http://" + a[0] : l = a[0]; + } + return { + type: "link", + raw: a[0], + text: n, + href: l, + tokens: [ + { + type: "text", + raw: n, + text: n + } + ] + }; + } + } + inlineText(t, i) { + const a = this.rules.inline.text.exec(t); + if (a) { + let n; + return this.lexer.state.inRawBlock ? n = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(a[0]) : escape(a[0]) : a[0] : n = escape(this.options.smartypants ? i(a[0]) : a[0]), { + type: "text", + raw: a[0], + text: n + }; + } + } +} +const block = { + newline: /^(?: *(?:\n|$))+/, + code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, + hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/, + html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", + def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/, + table: noopTest, + lheading: /^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + // regex template, placeholders will be replaced according to different paragraph + // interruption rules of commonmark and the original markdown spec: + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, + text: /^[^\n]+/ +}; +block._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/; +block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; +block.def = edit(block.def).replace("label", block._label).replace("title", block._title).getRegex(); +block.bullet = /(?:[*+-]|\d{1,9}[.)])/; +block.listItemStart = edit(/^( *)(bull) */).replace("bull", block.bullet).getRegex(); +block.list = edit(block.list).replace(/bull/g, block.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + block.def.source + ")").getRegex(); +block._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul"; +block._comment = /|$)/; +block.html = edit(block.html, "i").replace("comment", block._comment).replace("tag", block._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); +block.paragraph = edit(block._paragraph).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex(); +block.blockquote = edit(block.blockquote).replace("paragraph", block.paragraph).getRegex(); +block.normal = { ...block }; +block.gfm = { + ...block.normal, + table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" + // Cells +}; +block.gfm.table = edit(block.gfm.table).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex(); +block.gfm.paragraph = edit(block._paragraph).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", block.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex(); +block.pedantic = { + ...block.normal, + html: edit( + `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))` + ).replace("comment", block._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: noopTest, + // fences not supported + lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + paragraph: edit(block.normal._paragraph).replace("hr", block.hr).replace("heading", ` *#{1,6} *[^ +]`).replace("lheading", block.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() +}; +const inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noopTest, + tag: "^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", + // CDATA section + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(ref)\]/, + nolink: /^!?\[(ref)\](?:\[\])?/, + reflinkSearch: "reflink|nolink(?!\\()", + emStrong: { + lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/, + // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right. + // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a + rDelimAst: /^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/, + rDelimUnd: /^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ + // ^- Not allowed for _ + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: noopTest, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"; +inline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); +inline.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g; +inline.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g; +inline._comment = edit(block._comment).replace("(?:-->|$)", "-->").getRegex(); +inline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex(); +inline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, "g").replace(/punct/g, inline._punctuation).getRegex(); +inline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, "g").replace(/punct/g, inline._punctuation).getRegex(); +inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; +inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; +inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; +inline.autolink = edit(inline.autolink).replace("scheme", inline._scheme).replace("email", inline._email).getRegex(); +inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; +inline.tag = edit(inline.tag).replace("comment", inline._comment).replace("attribute", inline._attribute).getRegex(); +inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; +inline._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/; +inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; +inline.link = edit(inline.link).replace("label", inline._label).replace("href", inline._href).replace("title", inline._title).getRegex(); +inline.reflink = edit(inline.reflink).replace("label", inline._label).replace("ref", block._label).getRegex(); +inline.nolink = edit(inline.nolink).replace("ref", block._label).getRegex(); +inline.reflinkSearch = edit(inline.reflinkSearch, "g").replace("reflink", inline.reflink).replace("nolink", inline.nolink).getRegex(); +inline.normal = { ...inline }; +inline.pedantic = { + ...inline.normal, + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", inline._label).getRegex(), + reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", inline._label).getRegex() +}; +inline.gfm = { + ...inline.normal, + escape: edit(inline.escape).replace("])", "~|])").getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ 0.5 && (a = "x" + a.toString(16)), t += "&#" + a + ";"; + return t; +} +class Lexer { + constructor(t) { + this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || defaults, this.options.tokenizer = this.options.tokenizer || new Tokenizer(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { + inLink: !1, + inRawBlock: !1, + top: !0 + }; + const i = { + block: block.normal, + inline: inline.normal + }; + this.options.pedantic ? (i.block = block.pedantic, i.inline = inline.pedantic) : this.options.gfm && (i.block = block.gfm, this.options.breaks ? i.inline = inline.breaks : i.inline = inline.gfm), this.tokenizer.rules = i; + } + /** + * Expose Rules + */ + static get rules() { + return { + block, + inline + }; + } + /** + * Static Lex Method + */ + static lex(t, i) { + return new Lexer(i).lex(t); + } + /** + * Static Lex Inline Method + */ + static lexInline(t, i) { + return new Lexer(i).inlineTokens(t); + } + /** + * Preprocessing + */ + lex(t) { + t = t.replace(/\r\n|\r/g, ` +`), this.blockTokens(t, this.tokens); + let i; + for (; i = this.inlineQueue.shift(); ) + this.inlineTokens(i.src, i.tokens); + return this.tokens; + } + /** + * Lexing + */ + blockTokens(t, i = []) { + this.options.pedantic ? t = t.replace(/\t/g, " ").replace(/^ +$/gm, "") : t = t.replace(/^( *)(\t+)/gm, (s, o, d) => o + " ".repeat(d.length)); + let a, n, l, r; + for (; t; ) + if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((s) => (a = s.call({ lexer: this }, t, i)) ? (t = t.substring(a.raw.length), i.push(a), !0) : !1))) { + if (a = this.tokenizer.space(t)) { + t = t.substring(a.raw.length), a.raw.length === 1 && i.length > 0 ? i[i.length - 1].raw += ` +` : i.push(a); + continue; + } + if (a = this.tokenizer.code(t)) { + t = t.substring(a.raw.length), n = i[i.length - 1], n && (n.type === "paragraph" || n.type === "text") ? (n.raw += ` +` + a.raw, n.text += ` +` + a.text, this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : i.push(a); + continue; + } + if (a = this.tokenizer.fences(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.heading(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.hr(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.blockquote(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.list(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.html(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.def(t)) { + t = t.substring(a.raw.length), n = i[i.length - 1], n && (n.type === "paragraph" || n.type === "text") ? (n.raw += ` +` + a.raw, n.text += ` +` + a.raw, this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : this.tokens.links[a.tag] || (this.tokens.links[a.tag] = { + href: a.href, + title: a.title + }); + continue; + } + if (a = this.tokenizer.table(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.lheading(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (l = t, this.options.extensions && this.options.extensions.startBlock) { + let s = 1 / 0; + const o = t.slice(1); + let d; + this.options.extensions.startBlock.forEach(function(c) { + d = c.call({ lexer: this }, o), typeof d == "number" && d >= 0 && (s = Math.min(s, d)); + }), s < 1 / 0 && s >= 0 && (l = t.substring(0, s + 1)); + } + if (this.state.top && (a = this.tokenizer.paragraph(l))) { + n = i[i.length - 1], r && n.type === "paragraph" ? (n.raw += ` +` + a.raw, n.text += ` +` + a.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : i.push(a), r = l.length !== t.length, t = t.substring(a.raw.length); + continue; + } + if (a = this.tokenizer.text(t)) { + t = t.substring(a.raw.length), n = i[i.length - 1], n && n.type === "text" ? (n.raw += ` +` + a.raw, n.text += ` +` + a.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : i.push(a); + continue; + } + if (t) { + const s = "Infinite loop on byte: " + t.charCodeAt(0); + if (this.options.silent) { + console.error(s); + break; + } else + throw new Error(s); + } + } + return this.state.top = !0, i; + } + inline(t, i = []) { + return this.inlineQueue.push({ src: t, tokens: i }), i; + } + /** + * Lexing/Compiling + */ + inlineTokens(t, i = []) { + let a, n, l, r = t, s, o, d; + if (this.tokens.links) { + const c = Object.keys(this.tokens.links); + if (c.length > 0) + for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(r)) != null; ) + c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (r = r.slice(0, s.index) + "[" + repeatString("a", s[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); + } + for (; (s = this.tokenizer.rules.inline.blockSkip.exec(r)) != null; ) + r = r.slice(0, s.index) + "[" + repeatString("a", s[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + for (; (s = this.tokenizer.rules.inline.escapedEmSt.exec(r)) != null; ) + r = r.slice(0, s.index + s[0].length - 2) + "++" + r.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex), this.tokenizer.rules.inline.escapedEmSt.lastIndex--; + for (; t; ) + if (o || (d = ""), o = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (a = c.call({ lexer: this }, t, i)) ? (t = t.substring(a.raw.length), i.push(a), !0) : !1))) { + if (a = this.tokenizer.escape(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.tag(t)) { + t = t.substring(a.raw.length), n = i[i.length - 1], n && a.type === "text" && n.type === "text" ? (n.raw += a.raw, n.text += a.text) : i.push(a); + continue; + } + if (a = this.tokenizer.link(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.reflink(t, this.tokens.links)) { + t = t.substring(a.raw.length), n = i[i.length - 1], n && a.type === "text" && n.type === "text" ? (n.raw += a.raw, n.text += a.text) : i.push(a); + continue; + } + if (a = this.tokenizer.emStrong(t, r, d)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.codespan(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.br(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.del(t)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (a = this.tokenizer.autolink(t, mangle)) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (!this.state.inLink && (a = this.tokenizer.url(t, mangle))) { + t = t.substring(a.raw.length), i.push(a); + continue; + } + if (l = t, this.options.extensions && this.options.extensions.startInline) { + let c = 1 / 0; + const u = t.slice(1); + let f; + this.options.extensions.startInline.forEach(function(p) { + f = p.call({ lexer: this }, u), typeof f == "number" && f >= 0 && (c = Math.min(c, f)); + }), c < 1 / 0 && c >= 0 && (l = t.substring(0, c + 1)); + } + if (a = this.tokenizer.inlineText(l, smartypants)) { + t = t.substring(a.raw.length), a.raw.slice(-1) !== "_" && (d = a.raw.slice(-1)), o = !0, n = i[i.length - 1], n && n.type === "text" ? (n.raw += a.raw, n.text += a.text) : i.push(a); + continue; + } + if (t) { + const c = "Infinite loop on byte: " + t.charCodeAt(0); + if (this.options.silent) { + console.error(c); + break; + } else + throw new Error(c); + } + } + return i; + } +} +class Renderer { + constructor(t) { + this.options = t || defaults; + } + code(t, i, a) { + const n = (i || "").match(/\S*/)[0]; + if (this.options.highlight) { + const l = this.options.highlight(t, n); + l != null && l !== t && (a = !0, t = l); + } + return t = t.replace(/\n$/, "") + ` +`, n ? '
' + (a ? t : escape(t, !0)) + `
+` : "
" + (a ? t : escape(t, !0)) + `
+`; + } + /** + * @param {string} quote + */ + blockquote(t) { + return `
${t}
-`}html(t){return t}heading(t,a,n,l){if(this.options.headerIds){const r=this.options.headerPrefix+l.slug(n);return`${t} -`}return`${t} -`}hr(){return this.options.xhtml?`
-`:`
-`}list(t,a,n){const l=a?"ol":"ul",r=a&&n!==1?' start="'+n+'"':"";return"<"+l+r+`> -`+t+" -`}listitem(t){return`
  • ${t}
  • -`}checkbox(t){return" "}paragraph(t){return`

    ${t}

    -`}table(t,a){return a&&(a=`${a}`),` +`; + } + html(t) { + return t; + } + /** + * @param {string} text + * @param {string} level + * @param {string} raw + * @param {any} slugger + */ + heading(t, i, a, n) { + if (this.options.headerIds) { + const l = this.options.headerPrefix + n.slug(a); + return `${t} +`; + } + return `${t} +`; + } + hr() { + return this.options.xhtml ? `
    +` : `
    +`; + } + list(t, i, a) { + const n = i ? "ol" : "ul", l = i && a !== 1 ? ' start="' + a + '"' : ""; + return "<" + n + l + `> +` + t + " +`; + } + /** + * @param {string} text + */ + listitem(t) { + return `
  • ${t}
  • +`; + } + checkbox(t) { + return " "; + } + /** + * @param {string} text + */ + paragraph(t) { + return `

    ${t}

    +`; + } + /** + * @param {string} header + * @param {string} body + */ + table(t, i) { + return i && (i = `${i}`), `
    -`+t+` -`+a+`
    -`}tablerow(t){return` +` + t + ` +` + i + ` +`; + } + /** + * @param {string} content + */ + tablerow(t) { + return ` ${t} -`}tablecell(t,a){const n=a.header?"th":"td";return(a.align?`<${n} align="${a.align}">`:`<${n}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
    ":"
    "}del(t){return`${t}`}link(t,a,n){if(t=cleanUrl(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let l='
    ",l}image(t,a,n){if(t=cleanUrl(this.options.sanitize,this.options.baseUrl,t),t===null)return n;let l=`${n}":">",l}text(t){return t}}class TextRenderer{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,a,n){return""+n}image(t,a,n){return""+n}br(){return""}}class Slugger{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,a){let n=t,l=0;if(this.seen.hasOwnProperty(n)){l=this.seen[t];do l++,n=t+"-"+l;while(this.seen.hasOwnProperty(n))}return a||(this.seen[t]=l,this.seen[n]=0),n}slug(t,a={}){const n=this.serialize(t);return this.getNextSafeSlug(n,a.dryrun)}}class Parser{constructor(t){this.options=t||defaults,this.options.renderer=this.options.renderer||new Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new TextRenderer,this.slugger=new Slugger}static parse(t,a){return new Parser(a).parse(t)}static parseInline(t,a){return new Parser(a).parseInline(t)}parse(t,a=!0){let n="",l,r,s,o,c,u,d,p,h,m,g,E,T,I,f,b,S,R,A;const O=t.length;for(l=0;l0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=R+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=R+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:R}):I+=R),I+=this.parse(f.tokens,T),h+=this.renderer.listitem(I,S,b);n+=this.renderer.list(h,g,E);continue}case"html":{n+=this.renderer.html(m.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(m.tokens));continue}case"text":{for(h=m.tokens?this.parseInline(m.tokens):m.text;l+1{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const l="

    An error occurred:

    "+escape(n.message+"",!0)+"
    ";if(t)return Promise.resolve(l);if(a){a(null,l);return}return l}if(t)return Promise.reject(n);if(a){a(n);return}throw n}}function parseMarkdown(e,t){return(a,n,l)=>{typeof n=="function"&&(l=n,n=null);const r={...n};n={...marked.defaults,...r};const s=onError(n.silent,n.async,l);if(typeof a>"u"||a===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof a!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(a)+", string expected"));if(checkSanitizeDeprecation(n),n.hooks&&(n.hooks.options=n),l){const o=n.highlight;let c;try{n.hooks&&(a=n.hooks.preprocess(a)),c=e(a,n)}catch(p){return s(p)}const u=function(p){let h;if(!p)try{n.walkTokens&&marked.walkTokens(c,n.walkTokens),h=t(c,n),n.hooks&&(h=n.hooks.postprocess(h))}catch(m){p=m}return n.highlight=o,p?s(p):l(null,h)};if(!o||o.length<3||(delete n.highlight,!c.length))return u();let d=0;marked.walkTokens(c,function(p){p.type==="code"&&(d++,setTimeout(()=>{o(p.text,p.lang,function(h,m){if(h)return u(h);m!=null&&m!==p.text&&(p.text=m,p.escaped=!0),d--,d===0&&u()})},0))}),d===0&&u();return}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(a):a).then(o=>e(o,n)).then(o=>n.walkTokens?Promise.all(marked.walkTokens(o,n.walkTokens)).then(()=>o):o).then(o=>t(o,n)).then(o=>n.hooks?n.hooks.postprocess(o):o).catch(s);try{n.hooks&&(a=n.hooks.preprocess(a));const o=e(a,n);n.walkTokens&&marked.walkTokens(o,n.walkTokens);let c=t(o,n);return n.hooks&&(c=n.hooks.postprocess(c)),c}catch(o){return s(o)}}}function marked(e,t,a){return parseMarkdown(Lexer.lex,Parser.parse)(e,t,a)}marked.options=marked.setOptions=function(e){return marked.defaults={...marked.defaults,...e},changeDefaults(marked.defaults),marked},marked.getDefaults=getDefaults,marked.defaults=defaults,marked.use=function(...e){const t=marked.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(a=>{const n={...a};if(n.async=marked.defaults.async||n.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if(l.renderer){const r=t.renderers[l.name];r?t.renderers[l.name]=function(...s){let o=l.renderer.apply(this,s);return o===!1&&(o=r.apply(this,s)),o}:t.renderers[l.name]=l.renderer}if(l.tokenizer){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[l.level]?t[l.level].unshift(l.tokenizer):t[l.level]=[l.tokenizer],l.start&&(l.level==="block"?t.startBlock?t.startBlock.push(l.start):t.startBlock=[l.start]:l.level==="inline"&&(t.startInline?t.startInline.push(l.start):t.startInline=[l.start]))}l.childTokens&&(t.childTokens[l.name]=l.childTokens)}),n.extensions=t),a.renderer){const l=marked.defaults.renderer||new Renderer;for(const r in a.renderer){const s=l[r];l[r]=(...o)=>{let c=a.renderer[r].apply(l,o);return c===!1&&(c=s.apply(l,o)),c}}n.renderer=l}if(a.tokenizer){const l=marked.defaults.tokenizer||new Tokenizer;for(const r in a.tokenizer){const s=l[r];l[r]=(...o)=>{let c=a.tokenizer[r].apply(l,o);return c===!1&&(c=s.apply(l,o)),c}}n.tokenizer=l}if(a.hooks){const l=marked.defaults.hooks||new Hooks;for(const r in a.hooks){const s=l[r];Hooks.passThroughHooks.has(r)?l[r]=o=>{if(marked.defaults.async)return Promise.resolve(a.hooks[r].call(l,o)).then(u=>s.call(l,u));const c=a.hooks[r].call(l,o);return s.call(l,c)}:l[r]=(...o)=>{let c=a.hooks[r].apply(l,o);return c===!1&&(c=s.apply(l,o)),c}}n.hooks=l}if(a.walkTokens){const l=marked.defaults.walkTokens;n.walkTokens=function(r){let s=[];return s.push(a.walkTokens.call(this,r)),l&&(s=s.concat(l.call(this,r))),s}}marked.setOptions(n)})},marked.walkTokens=function(e,t){let a=[];for(const n of e)switch(a=a.concat(t.call(marked,n)),n.type){case"table":{for(const l of n.header)a=a.concat(marked.walkTokens(l.tokens,t));for(const l of n.rows)for(const r of l)a=a.concat(marked.walkTokens(r.tokens,t));break}case"list":{a=a.concat(marked.walkTokens(n.items,t));break}default:marked.defaults.extensions&&marked.defaults.extensions.childTokens&&marked.defaults.extensions.childTokens[n.type]?marked.defaults.extensions.childTokens[n.type].forEach(function(l){a=a.concat(marked.walkTokens(n[l],t))}):n.tokens&&(a=a.concat(marked.walkTokens(n.tokens,t)))}return a},marked.parseInline=parseMarkdown(Lexer.lexInline,Parser.parseInline),marked.Parser=Parser,marked.parser=Parser.parse,marked.Renderer=Renderer,marked.TextRenderer=TextRenderer,marked.Lexer=Lexer,marked.lexer=Lexer.lex,marked.Tokenizer=Tokenizer,marked.Slugger=Slugger,marked.Hooks=Hooks,marked.parse=marked,marked.options,marked.setOptions,marked.use,marked.walkTokens,marked.parseInline,Parser.parse,Lexer.lex;function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var a=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),a}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uniqid={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var pid=typeof process<"u"&&process.pid?process.pid.toString(36):"",address="";if(typeof __webpack_require__!="function"&&typeof commonjsRequire<"u"){var mac="",os=require$$0;if(os.networkInterfaces)var networkInterfaces=os.networkInterfaces();if(networkInterfaces){e:for(let e in networkInterfaces){const t=networkInterfaces[e],a=t.length;for(var i=0;it?e:t+1}function data_get(e,t,a=null){var n=Array.isArray(t)?t:t.split("."),l=n.reduce((r,s)=>r&&r[s],e);return l!==void 0?l:a}const isString=tagTester("String");var isArguments=tagTester("Arguments");(function(){isArguments(arguments)||(isArguments=function(e){return has(e,"callee")})})();const isArguments$1=isArguments;function isEmpty(e){if(e==null)return!0;var t=getLength(e);return typeof t=="number"&&(isArray(e)||isString(e)||isArguments$1(e))?t===0:getLength(keys(e))===0}function values(e){for(var t=keys(e),a=t.length,n=Array(a),l=0;l0?0:l-1;r>=0&&r0?s=r>=0?r:Math.max(r+o,s):o=r>=0?Math.min(r+1,o):r+o+1;else if(a&&r&&o)return r=a(n,l),n[r]===l?r:-1;if(l!==l)return r=t(slice.call(n,s,o),isNaN$1),r>=0?r+s:-1;for(r=e>0?s:o-1;r>=0&&r=0}function intersection(e){for(var t=[],a=arguments.length,n=0,l=getLength(e);n",">=","<","<="];class Validator{constructor(e,t,a,n){this.field=e,this.values=t,this.rootValues=a?a.state.publish[n].values:!1,this.store=a,this.storeName=n,this.passOnAny=!1,this.showOnPass=!0,this.converter=new Converter}passesConditions(e){let t=e||this.getConditions();if(t===void 0)return!0;if(this.isCustomConditionWithoutTarget(t))return this.passesCustomCondition(this.prepareCondition(t));let a=this.passOnAny?this.passesAnyConditions(t):this.passesAllConditions(t);return this.showOnPass?a:!a}getConditions(){let e=chain(KEYS).filter(a=>this.field[a]).first().value();if(!e)return;e.includes("any")&&(this.passOnAny=!0),(e.includes("unless")||e.includes("hide_when"))&&(this.showOnPass=!1);let t=this.field[e];return this.isCustomConditionWithoutTarget(t)?t:this.converter.fromBlueprint(t,this.field.prefix)}isCustomConditionWithoutTarget(e){return isString(e)}passesAllConditions(e){return chain(e).map(t=>this.prepareCondition(t)).reject(t=>this.passesCondition(t)).isEmpty().value()}passesAnyConditions(e){return!chain(e).map(t=>this.prepareCondition(t)).filter(t=>this.passesCondition(t)).isEmpty().value()}prepareCondition(e){if(isString(e)||e.operator==="custom")return this.prepareCustomCondition(e);let t=this.prepareOperator(e.operator),a=this.prepareLhs(e.field,t),n=this.prepareRhs(e.value,t);return{lhs:a,operator:t,rhs:n}}prepareOperator(e){switch(e){case null:case"":case"is":case"equals":return"==";case"isnt":case"not":case"¯\\_(ツ)_/¯":return"!=";case"includes":case"contains":return"includes";case"includes_any":case"contains_any":return"includes_any"}return e}prepareLhs(e,t){let a=this.getFieldValue(e);return NUMBER_SPECIFIC_COMPARISONS.includes(t)?Number(a):t==="includes"&&!isObject(a)?a?a.toString():"":(isString(a)&&isEmpty(a)&&(a=null),isString(a)?JSON.stringify(a.trim()):a)}prepareRhs(e,t){switch(e){case"null":return null;case"true":return!0;case"false":return!1}return NUMBER_SPECIFIC_COMPARISONS.includes(t)?Number(e):e==="empty"||t==="includes"||t==="includes_any"?e:isString(e)?JSON.stringify(e.trim()):e}prepareCustomCondition(e){let t=this.prepareFunctionName(e.value||e),a=this.prepareParams(e.value||e),n=e.field?this.getFieldValue(e.field):null,l=e.field;return{functionName:t,params:a,target:n,targetHandle:l}}prepareFunctionName(e){return e.replace(new RegExp("^custom "),"").split(":")[0]}prepareParams(e){let t=e.split(":")[1];return t?t.split(",").map(a=>a.trim()):[]}getFieldValue(e){return e.startsWith("root.")?data_get(this.rootValues,e.replace(new RegExp("^root."),"")):data_get(this.values,e)}passesCondition(condition){return condition.functionName?this.passesCustomCondition(condition):condition.operator==="includes"?this.passesIncludesCondition(condition):condition.operator==="includes_any"?this.passesIncludesAnyCondition(condition):(condition.rhs==="empty"&&(condition.lhs=isEmpty(condition.lhs),condition.rhs=!0),isObject(condition.lhs)?!1:eval(`${condition.lhs} ${condition.operator} ${condition.rhs}`))}passesIncludesCondition(e){return e.lhs.includes(e.rhs)}passesIncludesAnyCondition(e){let t=e.rhs.split(",").map(a=>a.trim());return Array.isArray(e.lhs)?intersection(e.lhs,t).length:new RegExp(t.join("|")).test(e.lhs)}passesCustomCondition(e){let t=data_get(this.store.state.statamic.conditions,e.functionName);if(typeof t!="function")return console.error(`Statamic field condition [${e.functionName}] was not properly defined.`),!1;let a=t({params:e.params,target:e.target,targetHandle:e.targetHandle,values:this.values,root:this.rootValues,store:this.store,storeName:this.storeName});return this.showOnPass?a:!a}passesNonRevealerConditions(e){let t=this.getConditions();if(this.isCustomConditionWithoutTarget(t))return this.passesConditions(t);let a=data_get(this.store.state.publish[this.storeName],"revealerFields",[]),n=chain(this.getConditions()).reject(l=>a.includes(this.relativeLhsToAbsoluteFieldPath(l.field,e))).value();return this.passesConditions(n)}relativeLhsToAbsoluteFieldPath(e,t){return t?e.startsWith("root.")?e.replace(/^root\./,""):t+"."+e:e}}class FieldConditions{showField(t,a){return new Validator(t,a).passesConditions()}}const form=()=>({fields:{},sections:{},processForm(){this.fields=this.processFields(this.$wire.fields),this.sections=this.processSections(this.fields)},processFields(e){const t=Object.entries(e).reduce((a,[n,l])=>(a[n]=l.value,a),{});return Object.entries(e).reduce((a,[n,l])=>{const r=new FieldConditions().showField(l.properties.conditions,t);return a[n]={visible:r&&!l.properties.hidden,submittable:l.properties.always_save||r,section:l.section},this.$wire.submittableFields[n]=a[n].submittable,a},{})},processSections(e){const t=Object.entries(e).reduce((n,[l,r])=>(r.section&&(n[r.section]=n[r.section]||[],n[r.section].push(r.visible)),n),{}),a=Object.fromEntries(Object.entries(t).map(([n,l])=>[n,l.some(Boolean)]));return JSON.stringify(a)!==JSON.stringify(this.$wire.stepVisibility)&&(this.$wire.stepVisibility=a,this.$wire.$refresh()),a},showField(e){return this.fields[e].visible},showSection(e){return this.sections[e]},showStep(e){return this.sections[e]}}),grecaptcha=e=>({init(){if(typeof window.grecaptchaIsReady>"u")return setTimeout(()=>this.init(),100);window.grecaptcha.render(this.$el,{sitekey:e.siteKey,callback:t=>this.$wire.set(e.field,t),"expired-callback":()=>this.$wire.set(e.field,null)})}});Alpine.data("filepond",filepond),Alpine.data("form",form),Alpine.data("grecaptcha",grecaptcha)}); +`; + } + tablecell(t, i) { + const a = i.header ? "th" : "td"; + return (i.align ? `<${a} align="${i.align}">` : `<${a}>`) + t + ` +`; + } + /** + * span level renderer + * @param {string} text + */ + strong(t) { + return `${t}`; + } + /** + * @param {string} text + */ + em(t) { + return `${t}`; + } + /** + * @param {string} text + */ + codespan(t) { + return `${t}`; + } + br() { + return this.options.xhtml ? "
    " : "
    "; + } + /** + * @param {string} text + */ + del(t) { + return `${t}`; + } + /** + * @param {string} href + * @param {string} title + * @param {string} text + */ + link(t, i, a) { + if (t = cleanUrl(this.options.sanitize, this.options.baseUrl, t), t === null) + return a; + let n = '
    ", n; + } + /** + * @param {string} href + * @param {string} title + * @param {string} text + */ + image(t, i, a) { + if (t = cleanUrl(this.options.sanitize, this.options.baseUrl, t), t === null) + return a; + let n = `${a}" : ">", n; + } + text(t) { + return t; + } +} +class TextRenderer { + // no need for block level renderers + strong(t) { + return t; + } + em(t) { + return t; + } + codespan(t) { + return t; + } + del(t) { + return t; + } + html(t) { + return t; + } + text(t) { + return t; + } + link(t, i, a) { + return "" + a; + } + image(t, i, a) { + return "" + a; + } + br() { + return ""; + } +} +class Slugger { + constructor() { + this.seen = {}; + } + /** + * @param {string} value + */ + serialize(t) { + return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig, "").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-"); + } + /** + * Finds the next safe (unique) slug to use + * @param {string} originalSlug + * @param {boolean} isDryRun + */ + getNextSafeSlug(t, i) { + let a = t, n = 0; + if (this.seen.hasOwnProperty(a)) { + n = this.seen[t]; + do + n++, a = t + "-" + n; + while (this.seen.hasOwnProperty(a)); + } + return i || (this.seen[t] = n, this.seen[a] = 0), a; + } + /** + * Convert string to unique id + * @param {object} [options] + * @param {boolean} [options.dryrun] Generates the next unique slug without + * updating the internal accumulator. + */ + slug(t, i = {}) { + const a = this.serialize(t); + return this.getNextSafeSlug(a, i.dryrun); + } +} +class Parser { + constructor(t) { + this.options = t || defaults, this.options.renderer = this.options.renderer || new Renderer(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new TextRenderer(), this.slugger = new Slugger(); + } + /** + * Static Parse Method + */ + static parse(t, i) { + return new Parser(i).parse(t); + } + /** + * Static Parse Inline Method + */ + static parseInline(t, i) { + return new Parser(i).parseInline(t); + } + /** + * Parse Loop + */ + parse(t, i = !0) { + let a = "", n, l, r, s, o, d, c, u, f, p, m, h, I, b, g, E, T, S, L; + const M = t.length; + for (n = 0; n < M; n++) { + if (p = t[n], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[p.type] && (L = this.options.extensions.renderers[p.type].call({ parser: this }, p), L !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(p.type))) { + a += L || ""; + continue; + } + switch (p.type) { + case "space": + continue; + case "hr": { + a += this.renderer.hr(); + continue; + } + case "heading": { + a += this.renderer.heading( + this.parseInline(p.tokens), + p.depth, + unescape$1(this.parseInline(p.tokens, this.textRenderer)), + this.slugger + ); + continue; + } + case "code": { + a += this.renderer.code( + p.text, + p.lang, + p.escaped + ); + continue; + } + case "table": { + for (u = "", c = "", s = p.header.length, l = 0; l < s; l++) + c += this.renderer.tablecell( + this.parseInline(p.header[l].tokens), + { header: !0, align: p.align[l] } + ); + for (u += this.renderer.tablerow(c), f = "", s = p.rows.length, l = 0; l < s; l++) { + for (d = p.rows[l], c = "", o = d.length, r = 0; r < o; r++) + c += this.renderer.tablecell( + this.parseInline(d[r].tokens), + { header: !1, align: p.align[r] } + ); + f += this.renderer.tablerow(c); + } + a += this.renderer.table(u, f); + continue; + } + case "blockquote": { + f = this.parse(p.tokens), a += this.renderer.blockquote(f); + continue; + } + case "list": { + for (m = p.ordered, h = p.start, I = p.loose, s = p.items.length, f = "", l = 0; l < s; l++) + g = p.items[l], E = g.checked, T = g.task, b = "", g.task && (S = this.renderer.checkbox(E), I ? g.tokens.length > 0 && g.tokens[0].type === "paragraph" ? (g.tokens[0].text = S + " " + g.tokens[0].text, g.tokens[0].tokens && g.tokens[0].tokens.length > 0 && g.tokens[0].tokens[0].type === "text" && (g.tokens[0].tokens[0].text = S + " " + g.tokens[0].tokens[0].text)) : g.tokens.unshift({ + type: "text", + text: S + }) : b += S), b += this.parse(g.tokens, I), f += this.renderer.listitem(b, T, E); + a += this.renderer.list(f, m, h); + continue; + } + case "html": { + a += this.renderer.html(p.text); + continue; + } + case "paragraph": { + a += this.renderer.paragraph(this.parseInline(p.tokens)); + continue; + } + case "text": { + for (f = p.tokens ? this.parseInline(p.tokens) : p.text; n + 1 < M && t[n + 1].type === "text"; ) + p = t[++n], f += ` +` + (p.tokens ? this.parseInline(p.tokens) : p.text); + a += i ? this.renderer.paragraph(f) : f; + continue; + } + default: { + const y = 'Token with "' + p.type + '" type was not found.'; + if (this.options.silent) { + console.error(y); + return; + } else + throw new Error(y); + } + } + } + return a; + } + /** + * Parse Inline Tokens + */ + parseInline(t, i) { + i = i || this.renderer; + let a = "", n, l, r; + const s = t.length; + for (n = 0; n < s; n++) { + if (l = t[n], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[l.type] && (r = this.options.extensions.renderers[l.type].call({ parser: this }, l), r !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(l.type))) { + a += r || ""; + continue; + } + switch (l.type) { + case "escape": { + a += i.text(l.text); + break; + } + case "html": { + a += i.html(l.text); + break; + } + case "link": { + a += i.link(l.href, l.title, this.parseInline(l.tokens, i)); + break; + } + case "image": { + a += i.image(l.href, l.title, l.text); + break; + } + case "strong": { + a += i.strong(this.parseInline(l.tokens, i)); + break; + } + case "em": { + a += i.em(this.parseInline(l.tokens, i)); + break; + } + case "codespan": { + a += i.codespan(l.text); + break; + } + case "br": { + a += i.br(); + break; + } + case "del": { + a += i.del(this.parseInline(l.tokens, i)); + break; + } + case "text": { + a += i.text(l.text); + break; + } + default: { + const o = 'Token with "' + l.type + '" type was not found.'; + if (this.options.silent) { + console.error(o); + return; + } else + throw new Error(o); + } + } + } + return a; + } +} +class Hooks { + constructor(t) { + this.options = t || defaults; + } + /** + * Process markdown before marked + */ + preprocess(t) { + return t; + } + /** + * Process HTML after marked is finished + */ + postprocess(t) { + return t; + } +} +X(Hooks, "passThroughHooks", /* @__PURE__ */ new Set([ + "preprocess", + "postprocess" +])); +function onError(e, t, i) { + return (a) => { + if (a.message += ` +Please report this to https://github.com/markedjs/marked.`, e) { + const n = "

    An error occurred:

    " + escape(a.message + "", !0) + "
    "; + if (t) + return Promise.resolve(n); + if (i) { + i(null, n); + return; + } + return n; + } + if (t) + return Promise.reject(a); + if (i) { + i(a); + return; + } + throw a; + }; +} +function parseMarkdown(e, t) { + return (i, a, n) => { + typeof a == "function" && (n = a, a = null); + const l = { ...a }; + a = { ...marked.defaults, ...l }; + const r = onError(a.silent, a.async, n); + if (typeof i > "u" || i === null) + return r(new Error("marked(): input parameter is undefined or null")); + if (typeof i != "string") + return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(i) + ", string expected")); + if (checkSanitizeDeprecation(a), a.hooks && (a.hooks.options = a), n) { + const s = a.highlight; + let o; + try { + a.hooks && (i = a.hooks.preprocess(i)), o = e(i, a); + } catch (u) { + return r(u); + } + const d = function(u) { + let f; + if (!u) + try { + a.walkTokens && marked.walkTokens(o, a.walkTokens), f = t(o, a), a.hooks && (f = a.hooks.postprocess(f)); + } catch (p) { + u = p; + } + return a.highlight = s, u ? r(u) : n(null, f); + }; + if (!s || s.length < 3 || (delete a.highlight, !o.length)) return d(); + let c = 0; + marked.walkTokens(o, function(u) { + u.type === "code" && (c++, setTimeout(() => { + s(u.text, u.lang, function(f, p) { + if (f) + return d(f); + p != null && p !== u.text && (u.text = p, u.escaped = !0), c--, c === 0 && d(); + }); + }, 0)); + }), c === 0 && d(); + return; + } + if (a.async) + return Promise.resolve(a.hooks ? a.hooks.preprocess(i) : i).then((s) => e(s, a)).then((s) => a.walkTokens ? Promise.all(marked.walkTokens(s, a.walkTokens)).then(() => s) : s).then((s) => t(s, a)).then((s) => a.hooks ? a.hooks.postprocess(s) : s).catch(r); + try { + a.hooks && (i = a.hooks.preprocess(i)); + const s = e(i, a); + a.walkTokens && marked.walkTokens(s, a.walkTokens); + let o = t(s, a); + return a.hooks && (o = a.hooks.postprocess(o)), o; + } catch (s) { + return r(s); + } + }; +} +function marked(e, t, i) { + return parseMarkdown(Lexer.lex, Parser.parse)(e, t, i); +} +marked.options = marked.setOptions = function(e) { + return marked.defaults = { ...marked.defaults, ...e }, changeDefaults(marked.defaults), marked; +}; +marked.getDefaults = getDefaults; +marked.defaults = defaults; +marked.use = function(...e) { + const t = marked.defaults.extensions || { renderers: {}, childTokens: {} }; + e.forEach((i) => { + const a = { ...i }; + if (a.async = marked.defaults.async || a.async || !1, i.extensions && (i.extensions.forEach((n) => { + if (!n.name) + throw new Error("extension name required"); + if (n.renderer) { + const l = t.renderers[n.name]; + l ? t.renderers[n.name] = function(...r) { + let s = n.renderer.apply(this, r); + return s === !1 && (s = l.apply(this, r)), s; + } : t.renderers[n.name] = n.renderer; + } + if (n.tokenizer) { + if (!n.level || n.level !== "block" && n.level !== "inline") + throw new Error("extension level must be 'block' or 'inline'"); + t[n.level] ? t[n.level].unshift(n.tokenizer) : t[n.level] = [n.tokenizer], n.start && (n.level === "block" ? t.startBlock ? t.startBlock.push(n.start) : t.startBlock = [n.start] : n.level === "inline" && (t.startInline ? t.startInline.push(n.start) : t.startInline = [n.start])); + } + n.childTokens && (t.childTokens[n.name] = n.childTokens); + }), a.extensions = t), i.renderer) { + const n = marked.defaults.renderer || new Renderer(); + for (const l in i.renderer) { + const r = n[l]; + n[l] = (...s) => { + let o = i.renderer[l].apply(n, s); + return o === !1 && (o = r.apply(n, s)), o; + }; + } + a.renderer = n; + } + if (i.tokenizer) { + const n = marked.defaults.tokenizer || new Tokenizer(); + for (const l in i.tokenizer) { + const r = n[l]; + n[l] = (...s) => { + let o = i.tokenizer[l].apply(n, s); + return o === !1 && (o = r.apply(n, s)), o; + }; + } + a.tokenizer = n; + } + if (i.hooks) { + const n = marked.defaults.hooks || new Hooks(); + for (const l in i.hooks) { + const r = n[l]; + Hooks.passThroughHooks.has(l) ? n[l] = (s) => { + if (marked.defaults.async) + return Promise.resolve(i.hooks[l].call(n, s)).then((d) => r.call(n, d)); + const o = i.hooks[l].call(n, s); + return r.call(n, o); + } : n[l] = (...s) => { + let o = i.hooks[l].apply(n, s); + return o === !1 && (o = r.apply(n, s)), o; + }; + } + a.hooks = n; + } + if (i.walkTokens) { + const n = marked.defaults.walkTokens; + a.walkTokens = function(l) { + let r = []; + return r.push(i.walkTokens.call(this, l)), n && (r = r.concat(n.call(this, l))), r; + }; + } + marked.setOptions(a); + }); +}; +marked.walkTokens = function(e, t) { + let i = []; + for (const a of e) + switch (i = i.concat(t.call(marked, a)), a.type) { + case "table": { + for (const n of a.header) + i = i.concat(marked.walkTokens(n.tokens, t)); + for (const n of a.rows) + for (const l of n) + i = i.concat(marked.walkTokens(l.tokens, t)); + break; + } + case "list": { + i = i.concat(marked.walkTokens(a.items, t)); + break; + } + default: + marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[a.type] ? marked.defaults.extensions.childTokens[a.type].forEach(function(n) { + i = i.concat(marked.walkTokens(a[n], t)); + }) : a.tokens && (i = i.concat(marked.walkTokens(a.tokens, t))); + } + return i; +}; +marked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline); +marked.Parser = Parser; +marked.parser = Parser.parse; +marked.Renderer = Renderer; +marked.TextRenderer = TextRenderer; +marked.Lexer = Lexer; +marked.lexer = Lexer.lex; +marked.Tokenizer = Tokenizer; +marked.Slugger = Slugger; +marked.Hooks = Hooks; +marked.parse = marked; +marked.options; +marked.setOptions; +marked.use; +marked.walkTokens; +marked.parseInline; +Parser.parse; +Lexer.lex; +function getAugmentedNamespace(e) { + if (e.__esModule) return e; + var t = e.default; + if (typeof t == "function") { + var i = function a() { + return this instanceof a ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); + }; + i.prototype = t.prototype; + } else i = {}; + return Object.defineProperty(i, "__esModule", { value: !0 }), Object.keys(e).forEach(function(a) { + var n = Object.getOwnPropertyDescriptor(e, a); + Object.defineProperty(i, a, n.get ? n : { + enumerable: !0, + get: function() { + return e[a]; + } + }); + }), i; +} +function commonjsRequire(e) { + throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var uniqid = { exports: {} }; +const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + default: __viteBrowserExternal +}, Symbol.toStringTag, { value: "Module" })), require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1); +var hasRequiredUniqid; +function requireUniqid() { + if (hasRequiredUniqid) return uniqid.exports; + hasRequiredUniqid = 1; + var e = typeof process < "u" && process.pid ? process.pid.toString(36) : "", t = ""; + if (typeof __webpack_require__ != "function" && typeof commonjsRequire < "u") { + var i = "", a = require$$0; + if (a.networkInterfaces) var n = a.networkInterfaces(); + if (n) { + e: + for (let s in n) { + const o = n[s], d = o.length; + for (var l = 0; l < d; l++) + if (o[l] !== void 0 && o[l].mac && o[l].mac != "00:00:00:00:00:00") { + i = o[l].mac; + break e; + } + } + t = i ? parseInt(i.replace(/\:|\D+/gi, "")).toString(36) : ""; + } + } + uniqid.exports = uniqid.exports.default = function(s, o) { + return (s || "") + t + e + r().toString(36) + (o || ""); + }, uniqid.exports.process = function(s, o) { + return (s || "") + e + r().toString(36) + (o || ""); + }, uniqid.exports.time = function(s, o) { + return (s || "") + r().toString(36) + (o || ""); + }; + function r() { + var s = Date.now(), o = r.last || s; + return r.last = s > o ? s : o + 1; + } + return uniqid.exports; +} +requireUniqid(); +function data_get(e, t, i = null) { + var a = Array.isArray(t) ? t : t.split("."), n = a.reduce((l, r) => l && l[r], e); + return n !== void 0 ? n : i; +} +const isString = tagTester("String"); +var isArguments = tagTester("Arguments"); +(function() { + isArguments(arguments) || (isArguments = function(e) { + return has(e, "callee"); + }); +})(); +const isArguments$1 = isArguments; +function isEmpty(e) { + if (e == null) return !0; + var t = getLength(e); + return typeof t == "number" && (isArray(e) || isString(e) || isArguments$1(e)) ? t === 0 : getLength(keys(e)) === 0; +} +function values(e) { + for (var t = keys(e), i = t.length, a = Array(i), n = 0; n < i; n++) + a[n] = e[t[n]]; + return a; +} +function sortedIndex(e, t, i, a) { + i = cb(i, a, 1); + for (var n = i(t), l = 0, r = getLength(e); l < r; ) { + var s = Math.floor((l + r) / 2); + i(e[s]) < n ? l = s + 1 : r = s; + } + return l; +} +function createPredicateIndexFinder(e) { + return function(t, i, a) { + i = cb(i, a); + for (var n = getLength(t), l = 0; l >= 0 && l < n; l += e) + if (i(t[l], l, t)) return l; + return -1; + }; +} +const findIndex = createPredicateIndexFinder(1), isNumber = tagTester("Number"); +function isNaN$1(e) { + return isNumber(e) && _isNaN(e); +} +function createIndexFinder(e, t, i) { + return function(a, n, l) { + var r = 0, s = getLength(a); + if (typeof l == "number") + r = l >= 0 ? l : Math.max(l + s, r); + else if (i && l && s) + return l = i(a, n), a[l] === n ? l : -1; + if (n !== n) + return l = t(slice.call(a, r, s), isNaN$1), l >= 0 ? l + r : -1; + for (l = r; l >= 0 && l < s; l += e) + if (a[l] === n) return l; + return -1; + }; +} +const indexOf = createIndexFinder(1, findIndex, sortedIndex); +function contains(e, t, i, a) { + return isArrayLike(e) || (e = values(e)), (typeof i != "number" || a) && (i = 0), indexOf(e, t, i) >= 0; +} +function intersection(e) { + for (var t = [], i = arguments.length, a = 0, n = getLength(e); a < n; a++) { + var l = e[a]; + if (!contains(t, l)) { + var r; + for (r = 1; r < i && contains(arguments[r], l); r++) + ; + r === i && t.push(l); + } + } + return t; +} +function negate(e) { + return function() { + return !e.apply(this, arguments); + }; +} +function reject(e, t, i) { + return filter(e, negate(cb(t)), i); +} +function initial(e, t, i) { + return slice.call(e, 0, Math.max(0, e.length - (t == null || i ? 1 : t))); +} +function first(e, t, i) { + return e == null || e.length < 1 ? t == null || i ? void 0 : [] : t == null || i ? e[0] : initial(e, e.length - t); +} +mixin({ chain, map, each, filter, reject, first, isEmpty }); +const NUMBER_SPECIFIC_COMPARISONS = [ + ">", + ">=", + "<", + "<=" +]; +class Validator { + constructor(e, t, i, a, n) { + this.field = e, this.values = t, this.dottedFieldPath = i, this.store = a, this.storeName = n, this.rootValues = a ? a.state.publish[n].values : !1, this.passOnAny = !1, this.showOnPass = !0, this.converter = new Converter(); + } + passesConditions(e) { + let t = e || this.getConditions(); + if (t === void 0) + return !0; + if (this.isCustomConditionWithoutTarget(t)) + return this.passesCustomCondition(this.prepareCondition(t)); + let i = this.passOnAny ? this.passesAnyConditions(t) : this.passesAllConditions(t); + return this.showOnPass ? i : !i; + } + getConditions() { + let e = chain(KEYS).filter((i) => this.field[i]).first().value(); + if (!e) + return; + e.includes("any") && (this.passOnAny = !0), (e.includes("unless") || e.includes("hide_when")) && (this.showOnPass = !1); + let t = this.field[e]; + return this.isCustomConditionWithoutTarget(t) ? t : this.converter.fromBlueprint(t, this.field.prefix); + } + isCustomConditionWithoutTarget(e) { + return isString(e); + } + passesAllConditions(e) { + return chain(e).map((t) => this.prepareCondition(t)).reject((t) => this.passesCondition(t)).isEmpty().value(); + } + passesAnyConditions(e) { + return !chain(e).map((t) => this.prepareCondition(t)).filter((t) => this.passesCondition(t)).isEmpty().value(); + } + prepareCondition(e) { + if (isString(e) || e.operator === "custom") + return this.prepareCustomCondition(e); + let t = this.prepareOperator(e.operator), i = this.prepareLhs(e.field, t), a = this.prepareRhs(e.value, t); + return { lhs: i, operator: t, rhs: a }; + } + prepareOperator(e) { + switch (e) { + case null: + case "": + case "is": + case "equals": + return "=="; + case "isnt": + case "not": + case "¯\\_(ツ)_/¯": + return "!="; + case "includes": + case "contains": + return "includes"; + case "includes_any": + case "contains_any": + return "includes_any"; + } + return e; + } + prepareLhs(e, t) { + let i = this.getFieldValue(e); + return NUMBER_SPECIFIC_COMPARISONS.includes(t) ? Number(i) : t === "includes" && !isObject(i) ? i ? i.toString() : "" : (isString(i) && isEmpty(i) && (i = null), isString(i) ? JSON.stringify(i.trim()) : i); + } + prepareRhs(e, t) { + switch (e) { + case "null": + return null; + case "true": + return !0; + case "false": + return !1; + } + return NUMBER_SPECIFIC_COMPARISONS.includes(t) ? Number(e) : e === "empty" || t === "includes" || t === "includes_any" ? e : isString(e) ? JSON.stringify(e.trim()) : e; + } + prepareCustomCondition(e) { + let t = this.prepareFunctionName(e.value || e), i = this.prepareParams(e.value || e), a = e.field ? this.getFieldValue(e.field) : null, n = e.field; + return { functionName: t, params: i, target: a, targetHandle: n }; + } + prepareFunctionName(e) { + return e.replace(new RegExp("^custom "), "").split(":")[0]; + } + prepareParams(e) { + let t = e.split(":")[1]; + return t ? t.split(",").map((i) => i.trim()) : []; + } + getFieldValue(e) { + return e.startsWith("$parent.") && (e = new ParentResolver(this.dottedFieldPath).resolve(e)), e.startsWith("$root.") || e.startsWith("root.") ? data_get(this.rootValues, e.replace(new RegExp("^\\$?root\\."), "")) : data_get(this.values, e); + } + passesCondition(condition) { + return condition.functionName ? this.passesCustomCondition(condition) : condition.operator === "includes" ? this.passesIncludesCondition(condition) : condition.operator === "includes_any" ? this.passesIncludesAnyCondition(condition) : (condition.rhs === "empty" && (condition.lhs = isEmpty(condition.lhs), condition.rhs = !0), isObject(condition.lhs) ? !1 : eval(`${condition.lhs} ${condition.operator} ${condition.rhs}`)); + } + passesIncludesCondition(e) { + return e.lhs.includes(e.rhs); + } + passesIncludesAnyCondition(e) { + let t = e.rhs.split(",").map((i) => i.trim()); + return Array.isArray(e.lhs) ? intersection(e.lhs, t).length : new RegExp(t.join("|")).test(e.lhs); + } + passesCustomCondition(e) { + let t = data_get(this.store.state.statamic.conditions, e.functionName); + if (typeof t != "function") + return console.error(`Statamic field condition [${e.functionName}] was not properly defined.`), !1; + let i = t({ + params: e.params, + target: e.target, + targetHandle: e.targetHandle, + values: this.values, + root: this.rootValues, + store: this.store, + storeName: this.storeName, + fieldPath: this.dottedFieldPath + }); + return this.showOnPass ? i : !i; + } + passesNonRevealerConditions(e) { + let t = this.getConditions(); + if (this.isCustomConditionWithoutTarget(t)) + return this.passesConditions(t); + let i = data_get(this.store.state.publish[this.storeName], "revealerFields", []), a = chain(this.getConditions()).reject((n) => i.includes(this.relativeLhsToAbsoluteFieldPath(n.field, e))).value(); + return this.passesConditions(a); + } + relativeLhsToAbsoluteFieldPath(e, t) { + return e.startsWith("$parent.") && (e = new ParentResolver(this.dottedFieldPath).resolve(e)), e.startsWith("$root.") || e.startsWith("root.") ? e.replace(new RegExp("^\\$?root\\."), "") : t ? t + "." + e : e; + } +} +class FieldConditions { + showField(t, i) { + return new Validator(t, i).passesConditions(); + } +} +const form = () => ({ + fields: {}, + sections: {}, + processForm() { + this.fields = this.processFields(this.$wire.fields), this.sections = this.processSections(this.fields); + }, + processFields(e) { + const t = Object.entries(e).reduce((i, [a, n]) => (i[a] = n.value, i), {}); + return Object.entries(e).reduce((i, [a, n]) => { + const l = new FieldConditions().showField(n.properties.conditions, t); + return i[a] = { + visible: l && !n.properties.hidden, + submittable: n.properties.always_save || l, + section: n.section + }, this.$wire.submittableFields[a] = i[a].submittable, i; + }, {}); + }, + processSections(e) { + const t = Object.entries(e).reduce((a, [n, l]) => (l.section && (a[l.section] = a[l.section] || [], a[l.section].push(l.visible)), a), {}), i = Object.fromEntries( + Object.entries(t).map(([a, n]) => [ + a, + n.some(Boolean) + ]) + ); + return JSON.stringify(i) !== JSON.stringify(this.$wire.stepVisibility) && (this.$wire.stepVisibility = i, this.$wire.$refresh()), i; + }, + showField(e) { + return this.fields[e].visible; + }, + showSection(e) { + return this.sections[e]; + }, + showStep(e) { + return this.sections[e]; + } +}), grecaptcha = (e) => ({ + init() { + if (typeof window.grecaptchaIsReady > "u") + return setTimeout(() => this.init(), 100); + window.grecaptcha.render(this.$el, { + sitekey: e.siteKey, + callback: (t) => this.$wire.set(e.field, t), + "expired-callback": () => this.$wire.set(e.field, null) + }); + } +}); +Alpine.data("filepond", filepond); +Alpine.data("form", form); +Alpine.data("grecaptcha", grecaptcha); diff --git a/resources/js/alpine/filepond.js b/resources/js/alpine/filepond.js index a3c60ad1..5eb7bce5 100644 --- a/resources/js/alpine/filepond.js +++ b/resources/js/alpine/filepond.js @@ -36,6 +36,8 @@ import uk_UA from 'filepond/locale/uk-ua'; import vi_VI from 'filepond/locale/vi-vi'; import zh_CN from 'filepond/locale/zh-cn'; import zh_TW from 'filepond/locale/zh-tw'; +import 'filepond/dist/filepond.min.css'; +import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css'; const locales = { 'ar-ar': ar_AR, diff --git a/resources/views/default.blade.php b/resources/views/default.blade.php index 95293720..d9244965 100644 --- a/resources/views/default.blade.php +++ b/resources/views/default.blade.php @@ -7,6 +7,4 @@ @formView("forms.{$this->type}") -@assets - -@endassets +@formAssets diff --git a/resources/views/default/fields/assets.blade.php b/resources/views/default/fields/assets.blade.php index 749591e6..dcf3bb02 100644 --- a/resources/views/default/fields/assets.blade.php +++ b/resources/views/default/fields/assets.blade.php @@ -32,8 +32,3 @@ @elseif($field->instructions && $field->instructions_position === 'below') @formView('messages.instructions') @endif - -@assets - - -@endassets diff --git a/src/BladeDirectives.php b/src/BladeDirectives.php index 60ecdb74..0a0c15ed 100644 --- a/src/BladeDirectives.php +++ b/src/BladeDirectives.php @@ -70,4 +70,17 @@ public static function formField(string $expression): string echo view(\Aerni\LivewireForms\Facades\ViewManager::themeViewPath(\$this->theme, 'layouts.field'), ['field' => \$field]); ?>"; } + + /** + * Push the Livewire Form assets into the head. + */ + public static function formAssets(): string + { + return Blade::compileString(" + @assets + + + @endassets + "); + } } diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index ae0f6111..8e7b563b 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -31,6 +31,10 @@ class ServiceProvider extends AddonServiceProvider __DIR__.'/../resources/dist/js/livewire-forms.js', ]; + protected $stylesheets = [ + __DIR__.'/../resources/dist/css/livewire-forms.css', + ]; + public function bootAddon() { $this diff --git a/vite.config.js b/vite.config.js index 99d36e2e..d1c8eeef 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,11 +2,13 @@ import { defineConfig } from 'vite'; export default defineConfig({ build: { - outDir: 'resources/dist/js', + outDir: 'resources/dist', lib: { entry: 'resources/js/livewire-forms.js', name: 'livewire-forms', - fileName: () => 'livewire-forms.js', + fileName: 'js/livewire-forms', + cssFileName: 'css/livewire-forms', + formats: ['es'], } } });