PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.3
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.3
1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 All 178 releases
disco / assets / build / plugin-analytics.js

plugin-analytics.js in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.3, at assets/build/plugin-analytics.js

1 lines 781.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{var e={606(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTE3NykiPgo8cGF0aCBkPSJNMC4yNSAwLjI1SDE1Ljc1VjE1Ljc1SDAuMjVWMC4yNVoiIGZpbGw9IiNGMUYyRjIiLz4KPHBhdGggZD0iTTAuMzc1IDEyLjM3NUgxNS4zNzVWMTIuNjI1SDAuMzc1VjEyLjM3NVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTAuMzc1IDkuMjVIMTUuMzc1VjkuNUgwLjM3NVY5LjI1WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMC4zNzUgNi4xMjVIMTUuMzc1VjYuMzc1SDAuMzc1VjYuMTI1WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMC4zNzUgM0gxNS4zNzVWMy4yNUgwLjM3NVYzWiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNMTIuNzUgMC41SDEzVjE1LjUwMDRIMTIuNzVWMC41WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNOS42MjUgMC41SDkuODc1VjE1LjUwMDRIOS42MjVWMC41WiIgZmlsbD0iI0U2RTdFOCIvPgo8cGF0aCBkPSJNNi41IDAuNUg2Ljc1VjE1LjUwMDRINi41VjAuNVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTMuMzc1IDAuNUgzLjYyNVYxNS41MDA0SDMuMzc1VjAuNVoiIGZpbGw9IiNFNkU3RTgiLz4KPHBhdGggZD0iTTAuNzI0MzkxIDE1LjYxMDFMMC4yNzUzOTEgMTUuMzkwMUwzLjQzMjUyIDguOTQ0MzRMNi42NzU1MiAxMi4zMTdMOS42ODg3NyAxMC43NTAxSDEzLjQ5OTlWMTEuMjUwMUg5LjgxMTAyTDYuNTc0MjcgMTIuOTMzMkwzLjU2NzI3IDkuODA1ODRMMC43MjQzOTEgMTUuNjEwMVoiIGZpbGw9IiNCRTFFMkQiLz4KPHBhdGggZD0iTTAuNjc2NzQyIDE1LjY3NjlMMC4zMjMyNDIgMTUuMzIzNEwzLjMwNTEyIDEyLjM0MTRMNi40OTczNyA3LjQ4OTExTDkuNjIwNDkgNy43Mzg5OEwxMi42NjQ1IDIuOTkwMjNMMTMuMDg1NSAzLjI1OTk4TDkuODc5NDkgOC4yNjEyM0w2Ljc1MjYyIDguMDExMTFMMy42OTQ4NyAxMi42NTg5TDMuNjc2NzQgMTIuNjc2OUwwLjY3Njc0MiAxNS42NzY5WiIgZmlsbD0iIzAwQUVFRiIvPgo8cGF0aCBkPSJNMTUuNzUgMTUuNzVIMC4yNVYwLjI1SDAuNzVWMTUuMjVIMTUuNzVWMTUuNzVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik0wLjM3NSAxMi4zNzVIMS4zNzVWMTIuNjI1SDAuMzc1VjEyLjM3NVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTAuMzc1IDkuMjVIMS4zNzVWOS41SDAuMzc1VjkuMjVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik0wLjM3NSA2LjEyNUgxLjM3NVY2LjM3NUgwLjM3NVY2LjEyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTAuMzc1IDNIMS4zNzVWMy4yNUgwLjM3NVYzWiIgZmlsbD0iIzQzNEE1NCIvPgo8cGF0aCBkPSJNMTIuNzUgMTQuNjI1SDEzVjE1LjYyNUgxMi43NVYxNC42MjVaIiBmaWxsPSIjNDM0QTU0Ii8+CjxwYXRoIGQ9Ik05LjYyNSAxNC42MjVIOS44NzVWMTUuNjI1SDkuNjI1VjE0LjYyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTYuNSAxNC42MjVINi43NVYxNS42MjVINi41VjE0LjYyNVoiIGZpbGw9IiM0MzRBNTQiLz4KPHBhdGggZD0iTTMuMzc1IDE0LjYyNUgzLjYyNVYxNS42MjVIMy4zNzVWMTQuNjI1WiIgZmlsbD0iIzQzNEE1NCIvPgo8cGF0aCBkPSJNMTUuMTI1IDExTDEzLjM3NSAxMFYxMkwxNS4xMjUgMTFaIiBmaWxsPSIjQkUxRTJEIi8+CjxwYXRoIGQ9Ik0xMy43NSAxLjc1TDEyIDIuNzEyMzdMMTMuNzA2NiAzLjc1TDEzLjc1IDEuNzVaIiBmaWxsPSIjMDBBRUVGIi8+CjxwYXRoIGQ9Ik05Ljc1IDguNTYyNUMxMC4wNjA3IDguNTYyNSAxMC4zMTI1IDguMzEwNjYgMTAuMzEyNSA4QzEwLjMxMjUgNy42ODkzNCAxMC4wNjA3IDcuNDM3NSA5Ljc1IDcuNDM3NUM5LjQzOTM0IDcuNDM3NSA5LjE4NzUgNy42ODkzNCA5LjE4NzUgOEM5LjE4NzUgOC4zMTA2NiA5LjQzOTM0IDguNTYyNSA5Ljc1IDguNTYyNVoiIGZpbGw9InVybCgjcGFpbnQwX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik05Ljc1IDExLjU2MjVDMTAuMDYwNyAxMS41NjI1IDEwLjMxMjUgMTEuMzEwNyAxMC4zMTI1IDExQzEwLjMxMjUgMTAuNjg5MyAxMC4wNjA3IDEwLjQzNzUgOS43NSAxMC40Mzc1QzkuNDM5MzQgMTAuNDM3NSA5LjE4NzUgMTAuNjg5MyA5LjE4NzUgMTFDOS4xODc1IDExLjMxMDcgOS40MzkzNCAxMS41NjI1IDkuNzUgMTEuNTYyNVoiIGZpbGw9InVybCgjcGFpbnQxX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik02LjYyNSA4LjMxMjVDNi45MzU2NiA4LjMxMjUgNy4xODc1IDguMDYwNjYgNy4xODc1IDcuNzVDNy4xODc1IDcuNDM5MzQgNi45MzU2NiA3LjE4NzUgNi42MjUgNy4xODc1QzYuMzE0MzQgNy4xODc1IDYuMDYyNSA3LjQzOTM0IDYuMDYyNSA3Ljc1QzYuMDYyNSA4LjA2MDY2IDYuMzE0MzQgOC4zMTI1IDYuNjI1IDguMzEyNVoiIGZpbGw9InVybCgjcGFpbnQyX3JhZGlhbF83NzM3XzExNzcpIi8+CjxwYXRoIGQ9Ik02LjYyNSAxMy4wNjI1QzYuOTM1NjYgMTMuMDYyNSA3LjE4NzUgMTIuODEwNyA3LjE4NzUgMTIuNUM3LjE4NzUgMTIuMTg5MyA2LjkzNTY2IDExLjkzNzUgNi42MjUgMTEuOTM3NUM2LjMxNDM0IDExLjkzNzUgNi4wNjI1IDEyLjE4OTMgNi4wNjI1IDEyLjVDNi4wNjI1IDEyLjgxMDcgNi4zMTQzNCAxMy4wNjI1IDYuNjI1IDEzLjA2MjVaIiBmaWxsPSJ1cmwoI3BhaW50M19yYWRpYWxfNzczN18xMTc3KSIvPgo8cGF0aCBkPSJNMy41IDEzLjA2MjVDMy44MTA2NiAxMy4wNjI1IDQuMDYyNSAxMi44MTA3IDQuMDYyNSAxMi41QzQuMDYyNSAxMi4xODkzIDMuODEwNjYgMTEuOTM3NSAzLjUgMTEuOTM3NUMzLjE4OTM0IDExLjkzNzUgMi45Mzc1IDEyLjE4OTMgMi45Mzc1IDEyLjVDMi45Mzc1IDEyLjgxMDcgMy4xODkzNCAxMy4wNjI1IDMuNSAxMy4wNjI1WiIgZmlsbD0idXJsKCNwYWludDRfcmFkaWFsXzc3MzdfMTE3NykiLz4KPHBhdGggZD0iTTMuNSA5LjkzNzVDMy44MTA2NiA5LjkzNzUgNC4wNjI1IDkuNjg1NjYgNC4wNjI1IDkuMzc1QzQuMDYyNSA5LjA2NDM0IDMuODEwNjYgOC44MTI1IDMuNSA4LjgxMjVDMy4xODkzNCA4LjgxMjUgMi45Mzc1IDkuMDY0MzQgMi45Mzc1IDkuMzc1QzIuOTM3NSA5LjY4NTY2IDMuMTg5MzQgOS45Mzc1IDMuNSA5LjkzNzVaIiBmaWxsPSJ1cmwoI3BhaW50NV9yYWRpYWxfNzczN18xMTc3KSIvPgo8L2c+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNzczN18xMTc3IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDkuNzUgOCkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiM2MTlGRDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNEE5MUM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoOS43NSAxMSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQyX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi42MjUgNy43NSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiM2MTlGRDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNEE5MUM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQzX3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi42MjUgMTIuNSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF83NzM3XzExNzciIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMy41IDEyLjUpIHNjYWxlKDAuNTYyNSkiPgo8c3RvcCBzdG9wLWNvbG9yPSIjNjE5RkQwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzRBOTFDOSIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50NV9yYWRpYWxfNzczN18xMTc3IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDMuNSA5LjM3NSkgc2NhbGUoMC41NjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFNDU1NkQiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQ0Y0MzU3Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfNzczN18xMTc3Ij4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="])},146(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzZfMTE0MikiPgo8cGF0aCBkPSJNMTYgMS44MzMzN0MxNiAwLjgyMjAyMSAxNS4xNzggMCAxNC4xNjY2IDBIMS44MzMzN0MwLjgyMjAyMSAwIDAgMC44MjIwMjEgMCAxLjgzMzM3VjE0LjE2NjZDMCAxNS4xNzggMC44MjIwMjEgMTYgMS44MzMzNyAxNkgxNC4xNjY2QzE1LjE3OCAxNiAxNiAxNS4xNzggMTYgMTQuMTY2NlYxLjgzMzM3WiIgZmlsbD0iIzRDQUY1MCIvPgo8cGF0aCBkPSJNMTIuMDU0NyA1LjM2MTU3QzEyLjMxNTMgNS42MjIxOSAxMi4zMTUzIDYuMDQzNDYgMTIuMDU0NyA2LjMwNDJMNy43MjEzMSAxMC42Mzc1QzcuNTkxMzEgMTAuNzY3NSA3LjQyMDY1IDEwLjgzMjkgNy4yNSAxMC44MzI5QzcuMDc5MzUgMTAuODMyOSA2LjkwODY5IDEwLjc2NzUgNi43Nzg2OSAxMC42Mzc1TDQuNjEyMDYgOC40NzA4M0M0LjM1MTMyIDguMjEwMjEgNC4zNTEzMiA3Ljc4ODgyIDQuNjEyMDYgNy41MjgyQzQuODcyNjggNy4yNjc0NiA1LjI5Mzk1IDcuMjY3NDYgNS41NTQ2OSA3LjUyODJMNy4yNSA5LjIyMzUxTDExLjExMjEgNS4zNjE1N0MxMS4zNzI3IDUuMTAwODMgMTEuNzkzOSA1LjEwMDgzIDEyLjA1NDcgNS4zNjE1N1oiIGZpbGw9IiNGQUZBRkEiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83NzM2XzExNDIiPgo8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="])},530(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjUgNi40Njg3NUMxNC40NDkyIDYuNDY4NzUgMTUuMjE4OCA1LjY5OTI0IDE1LjIxODggNC43NUMxNS4yMTg4IDMuODAwNzYgMTQuNDQ5MiAzLjAzMTI1IDEzLjUgMy4wMzEyNUMxMi41NTA4IDMuMDMxMjUgMTEuNzgxMiAzLjgwMDc2IDExLjc4MTIgNC43NUMxMS43ODEyIDUuNjk5MjQgMTIuNTUwOCA2LjQ2ODc1IDEzLjUgNi40Njg3NVoiIGZpbGw9IiMwMDM1N0IiLz4KPHBhdGggZD0iTTEzLjUgNi40Njg3NVYzLjAzMTI1QzE0LjQ0NzggMy4wMzEyNSAxNS4yMTg4IDMuODAyMTkgMTUuMjE4OCA0Ljc1QzE1LjIxODggNS42OTc4MSAxNC40NDc4IDYuNDY4NzUgMTMuNSA2LjQ2ODc1WiIgZmlsbD0iIzAwMTczNyIvPgo8cGF0aCBkPSJNMTYgOS42NDAzMVYxMy4wMjA2QzE2IDEzLjU0MzQgMTUuNTczMSAxMy45Njg4IDE1LjA0ODEgMTMuOTY4OEgxMS43NTE5QzExLjQ5MzEgMTMuOTY4OCAxMS4yODMxIDEzLjc1ODcgMTEuMjgzMSAxMy41QzExLjI4MzEgMTMuMDQ0MyAxMS4wMzEyIDEwLjczNTMgMTEuMDMxMiA5LjY0MDMxQzExLjAzMTIgOC40Nzc1IDExLjk4MzEgNy41MzEyNSAxMy4xNTMxIDcuNTMxMjVIMTMuODc4MUMxNS4wNDgxIDcuNTMxMjUgMTYgOC40Nzc1IDE2IDkuNjQwMzFaIiBmaWxsPSIjMDAzNTdCIi8+CjxwYXRoIGQ9Ik0xNiA5LjY0MDMxVjEzLjAyMDZDMTYgMTMuNTQzNCAxNS41NzMxIDEzLjk2ODggMTUuMDQ4MSAxMy45Njg4SDEzLjVWNy41MzEyNUgxMy44NzgxQzE1LjA0ODEgNy41MzEyNSAxNiA4LjQ3NzUgMTYgOS42NDAzMVoiIGZpbGw9IiMwMDE3MzciLz4KPHBhdGggZD0iTTIuNSA2LjQ2ODc1QzMuNDQ5MjQgNi40Njg3NSA0LjIxODc1IDUuNjk5MjQgNC4yMTg3NSA0Ljc1QzQuMjE4NzUgMy44MDA3NiAzLjQ0OTI0IDMuMDMxMjUgMi41IDMuMDMxMjVDMS41NTA3NiAzLjAzMTI1IDAuNzgxMjUgMy44MDA3NiAwLjc4MTI1IDQuNzVDMC43ODEyNSA1LjY5OTI0IDEuNTUwNzYgNi40Njg3NSAyLjUgNi40Njg3NVoiIGZpbGw9IiMwMDM1N0IiLz4KPHBhdGggZD0iTTIuNSA2LjQ2ODc1VjMuMDMxMjVDMy40NDc4MSAzLjAzMTI1IDQuMjE4NzUgMy44MDIxOSA0LjIxODc1IDQuNzVDNC4yMTg3NSA1LjY5NzgxIDMuNDQ3ODEgNi40Njg3NSAyLjUgNi40Njg3NVoiIGZpbGw9IiMwMDE3MzciLz4KPHBhdGggZD0iTTQuOTY4NzUgOS42NDAzMUM0Ljk2ODc1IDEwLjc3MDQgNC43MTY4OCAxMy4wMjM2IDQuNzE2ODggMTMuNUM0LjcxNjg4IDEzLjc1ODcgNC41MDY4OCAxMy45Njg4IDQuMjQ4MTMgMTMuOTY4OEgwLjkxOTA2MkMwLjQxMjE4OCAxMy45Njg4IDAgMTMuNTU4MSAwIDEzLjA1MzFWOS42NDAzMUMwIDguNDc3NSAwLjk1MTg3NSA3LjUzMTI1IDIuMTIxODggNy41MzEyNUgyLjg0Njg3QzQuMDE2ODcgNy41MzEyNSA0Ljk2ODc1IDguNDc3NSA0Ljk2ODc1IDkuNjQwMzFaIiBmaWxsPSIjMDAzNTdCIi8+CjxwYXRoIGQ9Ik00Ljk2ODc1IDkuNjQwMzFDNC45Njg3NSAxMC43NzA0IDQuNzE2ODggMTMuMDIzNiA0LjcxNjg4IDEzLjVDNC43MTY4OCAxMy43NTg3IDQuNTA2ODggMTMuOTY4OCA0LjI0ODEzIDEzLjk2ODhIMi41VjcuNTMxMjVIMi44NDY4N0M0LjAxNjg3IDcuNTMxMjUgNC45Njg3NSA4LjQ3NzUgNC45Njg3NSA5LjY0MDMxWiIgZmlsbD0iIzAwMTczNyIvPgo8cGF0aCBkPSJNOCA2LjQ2ODc1QzkuNTAxNTIgNi40Njg3NSAxMC43MTg4IDUuMjUxNTIgMTAuNzE4OCAzLjc1QzEwLjcxODggMi4yNDg0OCA5LjUwMTUyIDEuMDMxMjUgOCAxLjAzMTI1QzYuNDk4NDggMS4wMzEyNSA1LjI4MTI1IDIuMjQ4NDggNS4yODEyNSAzLjc1QzUuMjgxMjUgNS4yNTE1MiA2LjQ5ODQ4IDYuNDY4NzUgOCA2LjQ2ODc1WiIgZmlsbD0iIzU4QjM1NCIvPgo8cGF0aCBkPSJNOCA2LjQ2ODc1VjEuMDMxMjVDOS40OTkwNiAxLjAzMTI1IDEwLjcxODggMi4yNTA5NCAxMC43MTg4IDMuNzVDMTAuNzE4OCA1LjI0OTA2IDkuNDk5MDYgNi40Njg3NSA4IDYuNDY4NzVaIiBmaWxsPSIjMDBBOTYzIi8+CjxwYXRoIGQ9Ik0xMi4yMTg4IDExLjMxMzFWMTMuODc0NEMxMi4yMTg4IDE0LjQ3NzggMTEuNzI3OCAxNC45Njg4IDExLjEyNDQgMTQuOTY4OEg0Ljg3NTYzQzQuMjcyMTkgMTQuOTY4OCAzLjc4MTI1IDE0LjQ3NzggMy43ODEyNSAxMy44NzQ0VjExLjMxMzFDMy43ODEyNSA5LjIyNzgxIDUuNDc3ODEgNy41MzEyNSA3LjU2MzEzIDcuNTMxMjVIOC40MzY4OEMxMC41MjIyIDcuNTMxMjUgMTIuMjE4OCA5LjIyNzgxIDEyLjIxODggMTEuMzEzMVoiIGZpbGw9IiM1OEIzNTQiLz4KPHBhdGggZD0iTTEyLjIxODggMTEuMzEzMVYxMy44NzQ0QzEyLjIxODggMTQuNDc3OCAxMS43Mjc4IDE0Ljk2ODggMTEuMTI0NCAxNC45Njg4SDhWNy41MzEyNUg4LjQzNjg4QzEwLjUyMjIgNy41MzEyNSAxMi4yMTg4IDkuMjI3ODEgMTIuMjE4OCAxMS4zMTMxWiIgZmlsbD0iIzAwQTk2MyIvPgo8L3N2Zz4K"])},675(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTIyMykiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMzMzNDMgNS4zMzM2NkM0Ljg2Njc2IDUuMzMzNjYgNS4zMzM0MyA0Ljg2Njk5IDUuMzMzNDMgNC4zMzM2NkM1LjMzMzQzIDMuODAwMzMgNC44NjY3NiAzLjMzMzY2IDQuMzMzNDMgMy4zMzM2NkMzLjgwMDEgMy4zMzM2NiAzLjMzMzQzIDMuODAwMzMgMy4zMzM0MyA0LjMzMzY2QzMuMzMzNDMgNC44NjY5OSAzLjgwMDEgNS4zMzM2NiA0LjMzMzQzIDUuMzMzNjZaTTYuMzMzNDMgMC42NjY5OTJDNi45MzM0MyAwLjY2Njk5MiA3LjMzMzQzIDAuNjY2OTkyIDcuNjY2NzYgMC43MzM2NTlDOC4wMDAxIDAuODAwMzI2IDguMzMzNDMgMC45MzM2NTkgOC42MDAxIDEuMTMzNjZDOC45MzM0MyAxLjMzMzY2IDkuMjAwMSAxLjYwMDMzIDkuNjAwMSAyLjA2Njk5TDkuNjY2NzcgMi4xMzM2NkwxNC40MDAxIDYuODY2OTlDMTUuMDAwMSA3LjQ2Njk5IDE1LjMzMzQgOC4yMDAzMyAxNS4zMzM0IDkuMDY2OTlDMTUuMzMzNCA5Ljg2Njk5IDE1LjAwMDEgMTAuNjY3IDE0LjQwMDEgMTEuMjY3TDExLjEzMzQgMTQuNTMzN0MxMC41MzM0IDE1LjEzMzcgOS44MDAxIDE1LjQ2NyA4LjkzMzQzIDE1LjQ2N0M4LjA2Njc2IDE1LjQ2NyA3LjMzMzQzIDE1LjEzMzcgNi43MzM0MyAxNC41MzM3TDIuMDAwMSA5LjgwMDMzTDEuOTMzNDMgOS43MzM2NkMxLjUzMzQzIDkuMzMzNjYgMS4yNjY3NiA5LjA2Njk5IDEuMDAwMSA4LjczMzY2QzAuODAwMDk4IDguNDY2OTkgMC42NjY3NjQgOC4xMzM2NiAwLjYwMDA5OCA3LjgwMDMzQzAuNjY2NzY0IDcuMjY2OTkgMC42NjY3NjQgNi44NjY5OSAwLjY2Njc2NCA2LjMzMzY2VjYuMjY2OTlWNS42MDAzM0MwLjY2Njc2NCA0Ljg2Njk5IDAuNjY2NzY0IDQuMjY2OTkgMC43MzM0MzEgMy44MDAzM0MwLjgwMDA5OCAzLjMzMzY2IDAuODY2NzY0IDIuODY2OTkgMS4wNjY3NiAyLjQ2Njk5QzEuMzMzNDMgMS44NjY5OSAxLjg2Njc2IDEuMzMzNjYgMi40NjY3NiAxLjAwMDMzQzIuODY2NzYgMC44MDAzMjYgMy4yNjY3NiAwLjczMzY1OSAzLjgwMDEgMC42NjY5OTJINS42MDAxSDYuMjY2NzZINi4zMzM0M1oiIGZpbGw9IiMxMDg5RkYiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF83NzM3XzEyMjMiPgo8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="])},149(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzdfMTIyNikiPgo8cGF0aCBkPSJNMSAwLjVIMTJDMTIuNTUyMiAwLjUgMTMgMC45NDc3NTQgMTMgMS41VjE1QzEzIDE1LjU1MjIgMTIuNTUyMiAxNiAxMiAxNkgxQzAuNDQ3NzU0IDE2IDAgMTUuNTUyMiAwIDE1VjEuNUMwIDAuOTQ3NzU0IDAuNDQ3NzU0IDAuNSAxIDAuNVoiIGZpbGw9IiNFQ0NFOTMiLz4KPHBhdGggZD0iTTEgMTEuNzA3VjEuNUgxMlYxNUg0LjI5Mjk3TDEgMTEuNzA3WiIgZmlsbD0iI0VGRUZFRiIvPgo8cGF0aCBkPSJNNC4yOTI5NyAxMS43MDdWMTVMMSAxMS43MDdINC4yOTI5N1oiIGZpbGw9IiNFNzZFNTQiLz4KPHBhdGggZD0iTTQgMlYwSDlWMkM5IDIuNTUyMjUgOC41NTIyNSAzIDggM0g1QzQuNDQ3NzUgMyA0IDIuNTUyMjUgNCAyWiIgZmlsbD0iI0U3NkU1NCIvPgo8cGF0aCBkPSJNMTYgMTEuNUMxNiAxMy45ODUyIDEzLjk4NTIgMTYgMTEuNSAxNkM5LjAxNDc3IDE2IDcgMTMuOTg1MiA3IDExLjVDNyA5LjAxNDc3IDkuMDE0NzcgNyAxMS41IDdDMTMuOTg1MiA3IDE2IDkuMDE0NzcgMTYgMTEuNVoiIGZpbGw9IiM0OEM4RUYiLz4KPHBhdGggZD0iTTEwLjQ2ODkgMTMuNDI2OUw5LjQ5OTkxIDEyLjQ1NzRDOS4zMDQ3MiAxMi4yNjIxIDkuMzA0NzIgMTEuOTQ1NSA5LjQ5OTkxIDExLjc1MDNDOS42OTUxIDExLjU1NTEgMTAuMDExNiAxMS41NTUxIDEwLjIwNjkgMTEuNzUwM0wxMC41MzA5IDEyLjA3MzhMMTIuNzk1NCAxMC4xODY0QzEzLjAwNzYgMTAuMDA5NCAxMy4zMjMyIDEwLjAzODEgMTMuNDk5OSAxMC4yNTAzQzEzLjY3NjkgMTAuNDYyNSAxMy42NDgyIDEwLjc3OCAxMy40MzU5IDEwLjk1NDhMMTAuNDY4OSAxMy40MjY5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTUuNSA0SDkuNUM5Ljc3NjEyIDQgMTAgNC4yMjM4OCAxMCA0LjVDMTAgNC43NzYxMiA5Ljc3NjEyIDUgOS41IDVINS41QzUuMjIzODggNSA1IDQuNzc2MTIgNSA0LjVDNSA0LjIyMzg4IDUuMjIzODggNCA1LjUgNFoiIGZpbGw9IiM3Nzk1OUUiLz4KPHBhdGggZD0iTTMgNEg0VjVIM1Y0WiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNMyA2SDRWN0gzVjZaIiBmaWxsPSIjNzc5NTlFIi8+CjxwYXRoIGQ9Ik0zIDhINFY5SDNWOFoiIGZpbGw9IiM3Nzk1OUUiLz4KPHBhdGggZD0iTTMgMTBINFYxMUgzVjEwWiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNNS41IDZIOC41QzguNzc2MTIgNiA5IDYuMjIzODggOSA2LjVDOSA2Ljc3NjEyIDguNzc2MTIgNyA4LjUgN0g1LjVDNS4yMjM4OCA3IDUgNi43NzYxMiA1IDYuNUM1IDYuMjIzODggNS4yMjM4OCA2IDUuNSA2WiIgZmlsbD0iIzc3OTU5RSIvPgo8cGF0aCBkPSJNNS41IDhINi41QzYuNzc2MTIgOCA3IDguMjIzODggNyA4LjVDNyA4Ljc3NjEyIDYuNzc2MTIgOSA2LjUgOUg1LjVDNS4yMjM4OCA5IDUgOC43NzYxMiA1IDguNUM1IDguMjIzODggNS4yMjM4OCA4IDUuNSA4WiIgZmlsbD0iIzc3OTU5RSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzc3MzdfMTIyNiI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"])},789(e,t,n){"use strict";n(609),n.d(t,["A",0,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc3MzZfMTExMCkiPgo8cGF0aCBkPSJNMTEuMjcwNiAxNC4wNzEyQzkuMjQ3MDggMTYuMDk0NyA1LjUyOTQ0IDE1LjYyNDEgMi45NDEyIDEzLjA1OTRDMC4zNzY0OTYgMTAuNDcxMiAtMC4wNzA1NjMxIDYuNzMwMDIgMS45NTI5NyA0LjczMDAyTDIuNTg4MjYgNC4wOTQ3M0wxMS45Mjk0IDEzLjQxMjRMMTEuMjcwNiAxNC4wNzEyWiIgZmlsbD0iI0NDMTA0QSIvPgo8cGF0aCBkPSJNMTEuODgyMiAxMy40NTlDOS44NTg2OSAxNS40ODI1IDYuMTQxMDQgMTUuMDExOSAzLjU1MjgxIDEyLjQ0NzJDMC45NjQ1NzQgOS44NTg5NyAwLjUxNzUxNSA2LjE0MTMyIDIuNTQxMDQgNC4xMTc3OUM0LjU2NDU3IDIuMDk0MjYgOC4yODIyMiAyLjU2NDg1IDEwLjg0NjkgNS4xMjk1NkMxMS42MjM0IDUuOTA2MDMgMTIuMjExNiA2LjgwMDE1IDEyLjU4ODEgNy42OTQyNkMxMi43MDU4IDguMDAwMTUgMTIuODIzNCA4LjI4MjUgMTIuODk0IDguNTg4MzhDMTMuNDExNiAxMC40MjM3IDEzLjA4MjIgMTIuMjU5IDExLjg4MjIgMTMuNDU5WiIgZmlsbD0iI0YzNEI1OCIvPgo8cGF0aCBkPSJNMTAuMjM1MiA1Ljc2NDU4QzEyLjIzNTIgNy43NjQ1OCAxMi41ODgyIDEwLjY1ODcgMTEuMDM1MiAxMi4yMzUyQzkuNDgyMyAxMy44MTE2IDYuNTY0NjUgMTMuNDM1MiA0LjU2NDY1IDExLjQzNTJDMi41NjQ2NSA5LjQzNTE3IDIuMjExNzEgNi41NDEwNSAzLjc2NDY1IDQuOTY0NThDNS4zMTc2IDMuMzg4MTEgOC4yMzUyNCAzLjc2NDU4IDEwLjIzNTIgNS43NjQ1OFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik05LjYyMzU3IDYuMzc2NTNDMTEuMDgyNCA3LjgzNTM1IDExLjM0MTIgOS45NTMgMTAuMjExOCAxMS4wODI0QzkuMDgyNCAxMi4yMTE4IDYuOTY0NzUgMTEuOTc2NSA1LjUwNTkzIDEwLjQ5NDJDNC4wNDcxIDkuMDM1MzUgMy43ODgyOCA2LjkxNzcxIDQuOTE3NjkgNS43ODgzQzYuMDQ3MSA0LjY1ODg4IDguMTY0NzUgNC45MTc3MSA5LjYyMzU3IDYuMzc2NTNaIiBmaWxsPSIjRjM0QjU4Ii8+CjxwYXRoIGQ9Ik04Ljk2NDkxIDcuMDM1MThDOS45MDYwOSA3Ljk3NjM2IDEwLjA3MDggOS4zMTc1MyA5LjM0MTM4IDEwLjA0NjlDOC42MTE5NyAxMC43NzY0IDcuMjcwNzkgMTAuNjExNyA2LjMyOTYxIDkuNjcwNDdDNS4zODg0NCA4LjcyOTMgNS4yMjM3MyA3LjM4ODEyIDUuOTUzMTQgNi42NTg3MUM2LjY4MjU2IDUuOTI5MyA4LjA0NzI2IDYuMDk0IDguOTY0OTEgNy4wMzUxOFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik04LjM1Mjc5IDcuNjQ3NjFDOC43OTk4NSA4LjA5NDY3IDguODkzOTYgOC43NTM0OSA4LjU0MTAyIDkuMTI5OTZDOC4xNjQ1NSA5LjQ4MjkxIDcuNTA1NzMgOS40MTIzMiA3LjA1ODY3IDguOTQxNzNDNi42MTE2MSA4LjQ5NDY3IDYuNTE3NDkgNy44MzU4NSA2Ljg3MDQzIDcuNDgyOTFDNy4yMjMzOCA3LjEyOTk2IDcuODgyMiA3LjIwMDU1IDguMzUyNzkgNy42NDc2MVoiIGZpbGw9IiNGMzRCNTgiLz4KPGcgb3BhY2l0eT0iMC4yIj4KPHBhdGggZD0iTTEyLjkxNzcgOC42MTE4OUw3LjgxMTg2IDguNjM1NDJDNy4yMjM2MiA4LjYzNTQyIDcuMjAwMDkgNy43NDEzIDcuODExODYgNy43NDEzTDEyLjYxMTkgNy43MTc3N0MxMi43Mjk1IDguMDIzNjYgMTIuODIzNiA4LjMwNjAxIDEyLjkxNzcgOC42MTE4OVoiIGZpbGw9IiMxRDI5NDMiLz4KPC9nPgo8cGF0aCBkPSJNNC4wOTQwNiAxMS45MDU5QzMuNDgyMyAxMS40NTg4IDIuOTg4MTggMTAuODQ3MSAyLjYzNTI0IDEwLjE4ODJDMi4yODIzIDkuNTA1ODggMi4wNzA1MyA4Ljc1Mjk0IDIuMDk0MDYgOEMyLjMwNTgzIDguNzI5NDEgMi41NjQ2NSA5LjQxMTc2IDIuOTE3NTkgMTAuMDQ3MUMzLjI0NyAxMC42ODI0IDMuNjQ3IDExLjI5NDEgNC4wOTQwNiAxMS45MDU5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTE0LjE0MTIgMS44NTg5NUMxNC4zMjk1IDIuMDQ3MTkgMTQuMzI5NSAyLjMyOTU0IDE0LjE0MTIgMi40OTQyNEw4LjExNzcxIDguNDk0MjRDNy45NTMgOC42NTg5NSA3LjY3MDY1IDguNjU4OTUgNy40ODI0MiA4LjQ5NDI0QzcuMzE3NzEgOC4zMjk1NCA3LjMxNzcxIDguMDQ3MTkgNy40ODI0MiA3Ljg1ODk1TDEzLjUwNTkgMS44NTg5NUMxMy42OTQyIDEuNjcwNzEgMTMuOTc2NSAxLjY3MDcxIDE0LjE0MTIgMS44NTg5NVoiIGZpbGw9IiMxRDI5NDMiLz4KPHBhdGggZD0iTTE0LjA0NjkgMi41NjU0M0wxNS4xMDU4IDIuODcxMzFDMTUuMjk0IDIuOTE4MzcgMTUuMzY0NiAzLjE1MzY3IDE1LjIyMzQgMy4yOTQ4NEwxNC45NDExIDMuNTc3MTlDMTQuODIzNCAzLjY5NDg0IDE0LjYzNTIgMy43NDE5IDE0LjQ3MDUgMy42OTQ4NEwxNC4xMTc1IDMuNjAwNzJMMTQuMTg4MSAzLjY3MTMxQzE0LjM3NjQgMy44NTk1NSAxNC4zNzY0IDQuMTY1NDMgMTQuMTg4MSA0LjM1MzY3TDEzLjU5OTkgNC45NDE5QzEzLjQ4MjIgNS4wNTk1NSAxMy4yOTQgNS4xMDY2MSAxMy4xMjkzIDUuMDU5NTVMMTEuOTA1OCA0LjcwNjYxTDE0LjA0NjkgMi41NjU0M1oiIGZpbGw9IiNGRkQwNkMiLz4KPHBhdGggZD0iTTEzLjQzNTUgMS45Mjk3MUwxMy4xMjk2IDAuODcwODg5QzEzLjA4MjUgMC42ODI2NTQgMTIuODQ3MyAwLjYxMjA2NiAxMi43MDYxIDAuNzUzMjQyTDExLjg1OSAxLjYwMDNDMTEuNzQxNCAxLjcxNzk1IDExLjY5NDMgMS45MDYxOCAxMS43NDE0IDIuMDcwODlMMTEuODM1NSAyLjQyMzgzTDExLjYwMDIgMi4xODg1NEMxMS41MDYxIDIuMDk0NDIgMTEuMzQxNCAyLjA5NDQyIDExLjI0NzMgMi4xODg1NEwxMS4wNTkgMi40MDAzQzEwLjk0MTQgMi41MTc5NSAxMC44OTQzIDIuNzA2MTggMTAuOTQxNCAyLjg3MDg5TDExLjI5NDMgNC4wNzA4OUwxMy40MzU1IDEuOTI5NzFaIiBmaWxsPSIjRkZEMDZDIi8+CjxwYXRoIGQ9Ik0xMS44MTIgMy45NTMzM0MxMi4wMjM4IDMuNjcwOTggMTIuMjgyNiAzLjM4ODYzIDEyLjU0MTQgMy4xMjk4QzEyLjY4MjYgMy4wMTIxNiAxMy4xMDYxIDIuNTg4NjMgMTIuOTQxNCAyLjc1MzMzQzEzLjA4MjYgMi42MzU2OCAxMy4yMjM4IDIuNTE4MDQgMTMuMzY1IDIuNDAwMzlDMTMuMjQ3MyAyLjU0MTU3IDEzLjEyOTcgMi42ODI3NCAxMy4wMTIgMi44MjM5MkMxMi44OTQ0IDIuOTY1MSAxMi43NTMyIDMuMDgyNzQgMTIuNjM1NSAzLjIyMzkyQzEyLjM3NjcgMy40ODI3NCAxMi4xMTc5IDMuNzE4MDQgMTEuODEyIDMuOTUzMzNaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzc3MzZfMTExMCI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"])},351(e,t,n){var r;!function(){"use strict";var i,o=1e9,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,c="[DecimalError] ",l=c+"Invalid argument: ",u=c+"Exponent out of range: ",d=Math.floor,f=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=1e7,m=d(1286742750677284.5),g={};function y(e,t){var n,r,i,o,a,c,l,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),s?E(t,f):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i){for(o<0?(r=l,o=-o,c=u.length):(r=u,i=a,c=l.length),o>(c=(a=Math.ceil(f/7))>c?a+1:c+1)&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((c=l.length)-(o=u.length)<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/h|0,l[o]%=h;for(n&&(l.unshift(n),++i),c=l.length;0==l[--c];)l.pop();return t.d=l,t.e=i,s?E(t,f):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(l+e)}function b(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=O(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=O(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},g.comparedTo=g.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return x(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return E(x(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return M(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(c+"NaN");if(n.s<1)throw Error(c+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(s=!1,t=x(N(n,a),N(e,a),a),s=!0,E(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?k(t,e):y(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(c+"NaN");return n.s?(s=!1,t=x(n,e,0,1).times(e),s=!0,n.minus(t)):E(new r(n),i)},g.naturalExponential=g.exp=function(){return w(this)},g.naturalLogarithm=g.ln=function(){return N(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):k(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(l+e);if(t=M(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,i,o,a,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(c+"NaN")}for(e=M(l),s=!1,0==(i=Math.sqrt(+l))||i==1/0?(((t=b(l.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new u(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(i.toString()),i=a=(n=u.precision)+3;;)if(r=(o=r).plus(x(l,o,a+2)).times(.5),b(o.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(E(o,n+1,0),o.times(o).eq(l)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,E(r,n)},g.times=g.mul=function(e){var t,n,r,i,o,a,c,l,u,d=this,f=d.constructor,p=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,(l=p.length)<(u=m.length)&&(o=p,p=m,m=o,a=l,l=u,u=a),o=[],r=a=l+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)c=o[i]+m[r]*p[i-r-1]+t,o[i--]=c%h|0,t=c/h|0;o[i]=(o[i]+t)%h|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,s?E(e,f.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(v(e,0,o),void 0===t?t=r.rounding:v(t,0,8),E(n,e+M(n)+1,t))},g.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=D(r,!0):(v(e,0,o),void 0===t?t=i.rounding:v(t,0,8),n=D(r=E(new i(r),e+1,t),!0,e+1)),n},g.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?D(i):(v(e,0,o),void 0===t?t=a.rounding:v(t,0,8),n=D((r=E(new a(i),e+M(i)+1,t)).abs(),!1,e+M(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return E(new t(e),M(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,a,l,u=this,f=u.constructor,p=+(e=new f(e));if(!e.s)return new f(i);if(!(u=new f(u)).s){if(e.s<1)throw Error(c+"Infinity");return u}if(u.eq(i))return u;if(r=f.precision,e.eq(i))return E(u,r);if(l=(t=e.e)>=(n=e.d.length-1),a=u.s,l){if((n=p<0?-p:p)<=9007199254740991){for(o=new f(i),t=Math.ceil(r/7+4),s=!1;n%2&&I((o=o.times(u)).d,t),0!==(n=d(n/2));)I((u=u.times(u)).d,t);return s=!0,e.s<0?new f(i).div(o):E(o,r)}}else if(a<0)throw Error(c+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,o=e.times(N(u,r+12)),s=!0,(o=w(o)).s=a,o},g.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=D(i,(n=M(i))<=a.toExpNeg||n>=a.toExpPos):(v(e,1,o),void 0===t?t=a.rounding:v(t,0,8),r=D(i=E(new a(i),e,t),e<=(n=M(i))||n<=a.toExpNeg,e)),r},g.toSignificantDigits=g.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,o),void 0===t?t=n.rounding:v(t,0,8)),E(new n(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=M(e),n=e.constructor;return D(e,t<=n.toExpNeg||t>=n.toExpPos)};var x=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%h|0,r=n/h|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*h+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a){var s,l,u,d,f,p,m,g,y,v,b,x,w,j,O,N,S,k,D=r.constructor,I=r.s==i.s?1:-1,A=r.d,T=i.d;if(!r.s)return new D(r);if(!i.s)throw Error(c+"Division by zero");for(l=r.e-i.e,S=T.length,O=A.length,g=(m=new D(I)).d=[],u=0;T[u]==(A[u]||0);)++u;if(T[u]>(A[u]||0)&&--l,(x=null==o?o=D.precision:a?o+(M(r)-M(i))+1:o)<0)return new D(0);if(x=x/7+2|0,u=0,1==S)for(d=0,T=T[0],x++;(u<O||d)&&x--;u++)w=d*h+(A[u]||0),g[u]=w/T|0,d=w%T|0;else{for((d=h/(T[0]+1)|0)>1&&(T=e(T,d),A=e(A,d),S=T.length,O=A.length),j=S,v=(y=A.slice(0,S)).length;v<S;)y[v++]=0;(k=T.slice()).unshift(0),N=T[0],T[1]>=h/2&&++N;do{d=0,(s=t(T,y,S,v))<0?(b=y[0],S!=v&&(b=b*h+(y[1]||0)),(d=b/N|0)>1?(d>=h&&(d=h-1),1==(s=t(f=e(T,d),y,p=f.length,v=y.length))&&(d--,n(f,S<p?k:T,p))):(0==d&&(s=d=1),f=T.slice()),(p=f.length)<v&&f.unshift(0),n(y,f,v),-1==s&&(s=t(T,y,S,v=y.length))<1&&(d++,n(y,S<v?k:T,v)),v=y.length):0===s&&(d++,y=[0]),g[u++]=d,s&&y[0]?y[v++]=A[j]||0:(y=[A[j]],v=1)}while((j++<O||void 0!==y[0])&&x--)}return g[0]||g.shift(),m.e=l,E(m,a?o+M(m)+1:o)}}();function w(e,t){var n,r,o,a,c,l=0,d=0,p=e.constructor,h=p.precision;if(M(e)>16)throw Error(u+M(e));if(!e.s)return new p(i);for(null==t?(s=!1,c=h):c=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(c+=Math.log(f(2,d))/Math.LN10*2+5|0,n=r=o=new p(i),p.precision=c;;){if(r=E(r.times(e),c),n=n.times(++l),b((a=o.plus(x(r,n,c))).d).slice(0,c)===b(o.d).slice(0,c)){for(;d--;)o=E(o.times(o),c);return p.precision=h,null==t?(s=!0,E(o,h)):o}o=a}}function M(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function j(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(c+"LN10 precision limit exceeded");return E(new e(e.LN10),t)}function O(e){for(var t="";e--;)t+="0";return t}function N(e,t){var n,r,o,a,l,u,d,f,p,h=1,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(c+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new y(0);if(null==t?(s=!1,f=v):f=t,m.eq(10))return null==t&&(s=!0),j(y,f);if(f+=10,y.precision=f,r=(n=b(g)).charAt(0),a=M(m),!(Math.abs(a)<15e14))return d=j(y,f+2,v).times(a+""),m=N(new y(r+"."+n.slice(1)),f-10).plus(d),y.precision=v,null==t?(s=!0,E(m,v)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((m=m.times(e)).d)).charAt(0),h++;for(a=M(m),r>1?(m=new y("0."+n),a++):m=new y(r+"."+n.slice(1)),u=l=m=x(m.minus(i),m.plus(i),f),p=E(m.times(m),f),o=3;;){if(l=E(l.times(p),f),b((d=u.plus(x(l,new y(o),f))).d).slice(0,f)===b(u.d).slice(0,f))return u=u.times(2),0!==a&&(u=u.plus(j(y,f+2,v).times(a+""))),u=x(u,new y(h),f),y.precision=v,null==t?(s=!0,E(u,v)):u;u=d,o+=2}}function S(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),s&&(e.e>m||e.e<-m))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function E(e,t,n){var r,i,o,a,c,l,p,g,y=e.d;for(a=1,o=y[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,p=y[g=0];else{if((g=Math.ceil((r+1)/7))>=(o=y.length))return e;for(p=o=y[g],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(c=p/(o=f(10,a-i-1))%10|0,l=t<0||void 0!==y[g+1]||p%o,l=n<4?(c||l)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||l||6==n&&(r>0?i>0?p/f(10,a-i):0:y[g-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return l?(o=M(e),y.length=1,t=t-o-1,y[0]=f(10,(7-t%7)%7),e.e=d(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=g,o=1,g--):(y.length=g+1,o=f(10,7-r),y[g]=i>0?(p/f(10,a-i)%f(10,i)|0)*o:0),l)for(;;){if(0==g){(y[0]+=o)==h&&(y[0]=1,++e.e);break}if(y[g]+=o,y[g]!=h)break;y[g--]=0,o=1}for(r=y.length;0===y[--r];)y.pop();if(s&&(e.e>m||e.e<-m))throw Error(u+M(e));return e}function k(e,t){var n,r,i,o,a,c,l,u,d,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),s?E(t,m):t;if(l=e.d,f=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r){for((d=a<0)?(n=l,a=-a,c=f.length):(n=f,r=u,c=l.length),a>(i=Math.max(Math.ceil(m/7),c)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=l.length)<(c=f.length))&&(c=i),i=0;i<c;i++)if(l[i]!=f[i]){d=l[i]<f[i];break}a=0}for(d&&(n=l,l=f,f=n,t.s=-t.s),c=l.length,i=f.length-c;i>0;--i)l[c++]=0;for(i=f.length;i>a;){if(l[--i]<f[i]){for(o=i;o&&0===l[--o];)l[o]=h-1;--l[o],l[i]+=h}l[i]-=f[i]}for(;0===l[--c];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,s?E(t,m):t):new p(0)}function D(e,t,n){var r,i=M(e),o=b(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+O(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+O(-i-1)+o,n&&(r=n-a)>0&&(o+=O(r))):i>=a?(o+=O(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+O(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=O(r))),e.s<0?"-"+o:o}function I(e,t){if(e.length>t)return e.length=t,!0}function A(e){if(!e||"object"!=typeof e)throw Error(c+"Object expected");var t,n,r,i=["precision",1,o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(d(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(l+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(l+n+": "+r);this[n]=new this(r)}return this}(a=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(l+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):S(t,e.toString())}if("string"!=typeof e)throw Error(l+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!p.test(e))throw Error(l+e);S(t,e)}if(o.prototype=g,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=A,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(a)).default=a.Decimal=a,i=new a(1),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},228(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var c,l,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==t||i&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},405(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition");Symbol.for("react.client.reference");t.zv=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case u:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case p:case f:case s:return e;default:return t}}case r:return t}}}(e)===i}},493(e,t,n){"use strict";var r=n(609),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s(function(){i.value=n,i.getSnapshot=t,l(i)&&u({inst:i})},[e,n,t]),a(function(){return l(i)&&u({inst:i}),e(function(){l(i)&&u({inst:i})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},162(e,t,n){"use strict";var r=n(609),i=n(888),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,c=r.useEffect,l=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,i]);var p=a(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},160(e,t,n){"use strict";var r=n(609),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!s){if(s=!0,o=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return a=t}return a=e}if(t=a,i(o,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,a=n)}var o,a,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,u]);var p=o(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}},888(e,t,n){"use strict";e.exports=n(493)},242(e,t,n){"use strict";e.exports=n(162)},418(e,t,n){"use strict";e.exports=n(160)},609(e){"use strict";e.exports=window.React}};const t={};function n(r){const i=t[r];if(void 0!==i)return i.exports;const o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"==typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"==typeof r.then)return r}const o=Object.create(null);n.r(o);const a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&i&&r;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],o=t[r++];n.o(e,i)?0===o&&r++:0===o?Object.defineProperty(e,i,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,i,{enumerable:!0,get:o})}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.hasOwn(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{Button:()=>zm,CaptionLabel:()=>_m,Chevron:()=>Rm,Day:()=>Lm,DayButton:()=>Um,Dropdown:()=>Ym,DropdownNav:()=>Fm,Footer:()=>Wm,Month:()=>Bm,MonthCaption:()=>Qm,MonthGrid:()=>qm,Months:()=>Gm,MonthsDropdown:()=>Vm,Nav:()=>Km,NextMonthButton:()=>Zm,Option:()=>Xm,PreviousMonthButton:()=>Jm,Root:()=>eg,Select:()=>tg,Week:()=>ng,WeekNumber:()=>og,WeekNumberHeader:()=>ag,Weekday:()=>rg,Weekdays:()=>ig,Weeks:()=>sg,YearsDropdown:()=>cg});var t={};n.r(t),n.d(t,{formatCaption:()=>ug,formatDay:()=>fg,formatMonthCaption:()=>dg,formatMonthDropdown:()=>pg,formatWeekNumber:()=>mg,formatWeekNumberHeader:()=>gg,formatWeekdayName:()=>hg,formatYearCaption:()=>vg,formatYearDropdown:()=>yg});var r={};n.r(r),n.d(r,{labelCaption:()=>Mg,labelDay:()=>xg,labelDayButton:()=>bg,labelGrid:()=>wg,labelGridcell:()=>jg,labelMonthDropdown:()=>Og,labelNav:()=>Ng,labelNext:()=>Eg,labelPrevious:()=>kg,labelWeekNumber:()=>Ig,labelWeekNumberHeader:()=>Ag,labelWeekday:()=>Dg,labelYearDropdown:()=>Tg});var i={};n.r(i),n.d(i,{scaleBand:()=>QO,scaleDiverging:()=>FD,scaleDivergingLog:()=>WD,scaleDivergingPow:()=>QD,scaleDivergingSqrt:()=>qD,scaleDivergingSymlog:()=>BD,scaleIdentity:()=>YS,scaleImplicit:()=>WO,scaleLinear:()=>US,scaleLog:()=>VS,scaleOrdinal:()=>BO,scalePoint:()=>GO,scalePow:()=>iE,scaleQuantile:()=>hE,scaleQuantize:()=>mE,scaleRadial:()=>sE,scaleSequential:()=>PD,scaleSequentialLog:()=>zD,scaleSequentialPow:()=>RD,scaleSequentialQuantile:()=>UD,scaleSequentialSqrt:()=>LD,scaleSequentialSymlog:()=>_D,scaleSqrt:()=>oE,scaleSymlog:()=>JS,scaleThreshold:()=>gE,scaleTime:()=>ID,scaleUtc:()=>AD,tickFormat:()=>RS});const o=window.ReactDOM;var a=n(609),s=n.t(a,2),c=n(418);function l(e){e()}var u={notify(){},get:()=>[]};var d=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),f=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),p=(()=>d||f?a.useLayoutEffect:a.useEffect)();function h(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(h(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!h(e[n[r]],t[n[r]]))return!1;return!0}Object.defineProperty,Object.getOwnPropertyNames,Object.getOwnPropertySymbols,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.prototype;var g=Symbol.for("react-redux-context"),y="undefined"!=typeof globalThis?globalThis:{};function v(){if(!a.createContext)return{};const e=y[g]??=new Map;let t=e.get(a.createContext);return t||(t=a.createContext(null),e.set(a.createContext,t)),t}var b=v(),x=function(e){const{children:t,context:n,serverState:r,store:i}=e,o=a.useMemo(()=>{const e=function(e,t){let n,r=u,i=0,o=!1;function a(){d.onStateChange&&d.onStateChange()}function s(){i++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){l(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function c(){i--,n&&0===i&&(n(),n=void 0,r.clear(),r=u)}const d={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,s())},tryUnsubscribe:function(){o&&(o=!1,c())},getListeners:()=>r};return d}(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),s=a.useMemo(()=>i.getState(),[i]);p(()=>{const{subscription:e}=o;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[o,s]);const c=n||b;return a.createElement(c.Provider,{value:o},t)};function w(e=b){return function(){return a.useContext(e)}}var M=w();function j(e=b){const t=e===b?M:w(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var O=j();function N(e=b){const t=e===b?O:j(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var S=N(),E=(e,t)=>e===t;function k(e=b){const t=e===b?M:w(e),n=(e,n={})=>{const{equalityFn:r=E}="function"==typeof n?{equalityFn:n}:n,i=t(),{store:o,subscription:s,getServerState:l}=i,u=(a.useRef(!0),a.useCallback({[e.name]:t=>e(t)}[e.name],[e])),d=(0,c.useSyncExternalStoreWithSelector)(s.addNestedSub,o.getState,l||o.getState,u,r);return a.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var D=k(),I=l,A=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,T=/^[\\/]{2}/;var C="popstate";function P(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function z(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",c=null,l=u();function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-l;l=e,c&&c({action:s,location:p.location,delta:t})}function f(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),_(r,"No window.location.(origin|href) available to create URL");let i="string"==typeof t?t:Y(t);return i=i.replace(/ $/,"%20"),!n&&T.test(i)&&(i=r+i),new URL(i,r)}(i,e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let p={get action(){return s},get location(){return e(i,a)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=P(e)?e:U(p.location,e,t);n&&n(r,e),l=u()+1;let d=L(r,l),f=p.createHref(r.mask||r);try{a.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(f)}o&&c&&c({action:s,location:p.location,delta:1})},replace:function(e,t){s="REPLACE";let r=P(e)?e:U(p.location,e,t);n&&n(r,e),l=u();let i=L(r,l),d=p.createHref(r.mask||r);a.replaceState(i,"",d),o&&c&&c({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}(function(e,t){let{pathname:n="/",search:r="",hash:i=""}=F(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),U("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:Y(t))},function(e,t){R("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function _(e,t){if(!1===e||null==e)throw new Error(t)}function R(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function L(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function U(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?F(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function Y({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function F(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function W(e,t,n="/"){return B(e,t,n,!1)}function B(e,t,n,r,i){let o=ie(("string"==typeof t?F(t):t).pathname||"/",n);if(null==o)return null;let a=i??function(e){let t=Q(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,c=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return R(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(o);for(let e=0;null==s&&e<a.length;++e)s=ee(a[e],c,r);return s}function Q(e,t=[],n=[],r="",i=!1){let o=(e,o,a=i,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;_(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ue([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(_(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Q(e.children,t,u,l,a)),(null!=e.path||e.index)&&t.push({path:l,score:J(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=re(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of q(e.path))o(e,t,!0,n);else o(e,t)}),t}function q(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=q(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var G=/^:[\w-]+$/,$=3,H=2,V=1,K=10,Z=-2,X=e=>"*"===e;function J(e,t){let n=e.split("/"),r=n.length;return n.some(X)&&(r+=Z),t&&(r+=H),n.filter(e=>!X(e)).reduce((e,t)=>e+(G.test(t)?$:""===t?V:K),r)}function ee(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l="/"===o?t:t.slice(o.length)||"/",u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ne(u,l,s.matcher,s.compiledParams):te(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=te({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:ue([o,d.pathname]),pathnameBase:fe(ue([o,d.pathnameBase])),route:f}),"/"!==d.pathnameBase&&(o=ue([o,d.pathnameBase]))}return a}function te(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=re(e.path,e.caseSensitive,e.end);return ne(e,t,n,r)}function ne(e,t,n,r){let i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1),c=r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{});return{params:c,pathname:o,pathnameBase:a,pattern:e}}function re(e,t=!1,n=!0){R("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ie(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function oe(e,t){let n=de(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function ae(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function se(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ce(e,t,n,r=!1){let i;"string"==typeof e?i=F(e):(i={...e},_(!i.pathname||!i.pathname.includes("?"),ae("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),ae("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),ae("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?F(e):e;return r?(r=le(r),n=r.startsWith("/")?oe(r.substring(1),"/"):oe(r,t)):n=t,{pathname:n,search:pe(i),hash:he(o)}}(i,o),l=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!l&&!u||(c.pathname+="/"),c}var le=e=>e.replace(/[\\/]{2,}/g,"/"),ue=e=>le(e.join("/")),de=e=>e.replace(/\/+$/,""),fe=e=>de(e).replace(/^\/*/,"/"),pe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",he=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",me=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ye(e){let t=e.map(e=>e.route.path).filter(Boolean);return ue(t)||"/"}var ve="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function be(e,t){let n=e;if("string"!=typeof n||!A.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ve)try{let e=new URL(window.location.href),r=T.test(n)?new URL((o=n,e.protocol+o.replace(/\\/g,"/"))):new URL(n),a=ie(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:i=!0}catch(e){R(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var o;return{absoluteURL:r,isExternal:i,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xe=["POST","PUT","PATCH","DELETE"],we=(new Set(xe),["GET",...xe]);new Set(we),Symbol("ResetLoaderData"),new WeakMap,new WeakMap,new WeakMap,new WeakMap;var Me=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];var je=a.createContext(null);je.displayName="DataRouter";var Oe=a.createContext(null);Oe.displayName="DataRouterState";var Ne=a.createContext(!1);function Se(){return a.useContext(Ne)}var Ee=a.createContext({isTransitioning:!1});Ee.displayName="ViewTransition",a.createContext(new Map).displayName="Fetchers",a.createContext(null).displayName="Await";var ke=a.createContext(null);ke.displayName="Navigation";var De=a.createContext(null);De.displayName="Location";var Ie=a.createContext({outlet:null,matches:[],isDataRoute:!1});Ie.displayName="Route";var Ae=a.createContext(null);Ae.displayName="RouteError";var Te="REACT_ROUTER_ERROR";function Ce(){return null!=a.useContext(De)}function Pe(){return _(Ce(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(De).location}var ze="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _e(e){a.useContext(ke).static||a.useLayoutEffect(e)}function Re(){let{isDataRoute:e}=a.useContext(Ie);return e?function(){let{router:e}=function(e){let t=a.useContext(je);return _(t,He(e)),t}("useNavigate"),t=Ve("useNavigate"),n=a.useRef(!1);return _e(()=>{n.current=!0}),a.useCallback(async(r,i={})=>{R(n.current,ze),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}():function(){_(Ce(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(je),{basename:t,navigator:n}=a.useContext(ke),{matches:r}=a.useContext(Ie),{pathname:i}=Pe(),o=JSON.stringify(se(r)),s=a.useRef(!1);return _e(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(R(s.current,ze),!s.current)return;if("number"==typeof r)return void n.go(r);let c=ce(r,JSON.parse(o),i,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:ue([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,o,i,e])}()}var Le=a.createContext(null);function Ue(){let{matches:e}=a.useContext(Ie),t=e[e.length-1];return t?.params??{}}function Ye(e,{relative:t}={}){let{matches:n}=a.useContext(Ie),{pathname:r}=Pe(),i=JSON.stringify(se(n));return a.useMemo(()=>ce(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function Fe(e,t,n){_(Ce(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=a.useContext(ke),{matches:i}=a.useContext(Ie),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:"/",l=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";Ze(c,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,f=Pe();if(t){let e="string"==typeof t?F(t):t;_("/"===l||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=f;let p=d.pathname||"/",h=p;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):W(e,{pathname:h});R(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),R(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let i=e,o=r?.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);_(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:o}=r,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||a){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ye(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,h=null;r&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||Be,s&&(c<0&&0===l?(Ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):c===l&&(f=!0,h=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?h:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement($e,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===l)?a.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ue([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ue([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),i,n);return t&&g?a.createElement(De.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function We(){let e=function(){let e=a.useContext(Ae),t=function(e){let t=a.useContext(Oe);return _(t,He(e)),t}("useRouteError"),n=Ve("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=ge(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:o},"ErrorBoundary")," or"," ",a.createElement("code",{style:o},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),n?a.createElement("pre",{style:i},n):null,s)}var Be=a.createElement(We,null),Qe=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Te}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new me(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?a.createElement(Ie.Provider,{value:this.props.routeContext},a.createElement(Ae.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?a.createElement(Ge,{error:e},t):t}};Qe.contextType=Ne;var qe=new WeakMap;function Ge({children:e,error:t}){let{basename:n}=a.useContext(ke);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Te}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=qe.get(t);if(r)throw r;let i=be(e.location,n),o=i.absoluteURL||i.to;if(function(e){try{return Me.includes(new URL(e).protocol)}catch{return!1}}(o))throw new Error("Invalid redirect location");if(ve&&!qe.get(t)){if(!i.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw qe.set(t,n),n}window.location.href=o}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function $e({routeContext:e,match:t,children:n}){let r=a.useContext(je);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(Ie.Provider,{value:e},n)}function He(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ve(e){let t=function(e){let t=a.useContext(Ie);return _(t,He(e)),t}(e),n=t.matches[t.matches.length-1];return _(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var Ke={};function Ze(e,t,n){t||Ke[e]||(Ke[e]=!0,R(!1,n))}function Xe(e){return function(e){let t=a.useContext(Ie).outlet;return a.useMemo(()=>t&&a.createElement(Le.Provider,{value:e},t),[t,e])}(e.context)}function Je(e){_(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function et({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,useTransitions:s}){_(!Ce(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),l=a.useMemo(()=>({basename:c,navigator:i,static:o,useTransitions:s,future:{}}),[c,i,o,s]);"string"==typeof n&&(n=F(n));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:h="default",mask:m}=n,g=a.useMemo(()=>{let e=ie(u,c);return null==e?null:{location:{pathname:e,search:d,hash:f,state:p,key:h,mask:m},navigationType:r}},[c,u,d,f,p,h,r,m]);return R(null!=g,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:a.createElement(ke.Provider,{value:l},a.createElement(De.Provider,{children:t,value:g}))}function tt({children:e,location:t}){return Fe(nt(e),t)}function nt(e,t=[]){let n=[];return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let i=[...t,r];if(e.type===a.Fragment)return void n.push.apply(n,nt(e.props.children,i));_(e.type===Je,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=nt(e.props.children,i)),n.push(o)}),n}s.useOptimistic,a.memo(function({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:o}){return Fe(e,void 0,{manifest:t,state:r,isStatic:i,onError:o,future:n})}),a.Component;var rt="get",it="application/x-www-form-urlencoded";function ot(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var at=null,st=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ct(e){return null==e||st.has(e)?e:(R(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${it}"`),null)}function lt(e,t){if(!1===e||null==e)throw new Error(t)}function ut(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===ie(i.pathname,t)?i.pathname=`${de(t)}/_root.${r}`:i.pathname=`${de(i.pathname)}.${r}`,i}function dt(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function ft(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function pt(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function ht(){let e=a.useContext(je);return lt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function mt(){let e=a.useContext(Oe);return lt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Symbol("SingleFetchRedirect");var gt=a.createContext(void 0);function yt(){let e=a.useContext(gt);return lt(e,"You must render this element inside a <HydratedRouter> element"),e}function vt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bt({page:e,...t}){let n=Se(),{nonce:r}=yt(),{router:i}=ht(),o=a.useMemo(()=>W(i.routes,e,i.basename),[i.routes,e,i.basename]);return o?(null==t.nonce&&r&&(t={...t,nonce:r}),n?a.createElement(wt,{page:e,matches:o,...t}):a.createElement(Mt,{page:e,matches:o,...t})):null}function xt(e){let{manifest:t,routeModules:n}=yt(),[r,i]=a.useState([]);return a.useEffect(()=>{let r=!1;return async function(e,t,n){let r=await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}));return function(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!function(e){return null!=e&&"string"==typeof e.page}(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let o=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(o)||(n.add(o),e.push({key:o,link:i})),e},[])}(r.flat(1).filter(dt).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function wt({page:e,matches:t,...n}){let r=Pe(),{future:i}=yt(),{basename:o}=ht(),s=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ut(e,o,i.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,s=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?a=!0:s.push(e.route.id);return a&&s.length>0&&n.searchParams.set("_routes",s.join(",")),[n.pathname+n.search]},[o,i.v8_trailingSlashAwareDataRequests,e,r,t]);return a.createElement(a.Fragment,null,s.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})))}function Mt({page:e,matches:t,...n}){let r=Pe(),{future:i,manifest:o,routeModules:s}=yt(),{basename:c}=ht(),{loaderData:l,matches:u}=mt(),d=a.useMemo(()=>ft(e,t,u,o,r,"data"),[e,t,u,o,r]),f=a.useMemo(()=>ft(e,t,u,o,r,"assets"),[e,t,u,o,r]),p=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))}),0===n.size)return[];let u=ut(e,c,i.v8_trailingSlashAwareDataRequests,"data");return a&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,o,d,t,e,s]),h=a.useMemo(()=>pt(f,o),[f,o]),m=xt(f);return a.createElement(a.Fragment,null,p.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),h.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),m.map(({key:e,link:t})=>a.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}gt.displayName="FrameworkContext";function jt(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}a.Component;var Ot="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ot&&(window.__reactRouterVersion="7.18.1")}catch(e){}function Nt({basename:e,children:t,useTransitions:n,window:r}){let i=a.useRef();null==i.current&&(i.current=z({window:r,v5Compat:!0}));let o=i.current,[s,c]=a.useState({action:o.action,location:o.location}),l=a.useCallback(e=>{!1===n?c(e):a.startTransition(()=>c(e))},[n]);return a.useLayoutEffect(()=>o.listen(l),[o,l]),a.createElement(et,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:n})}var St=a.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},m){let{basename:g,navigator:y,useTransitions:v}=a.useContext(ke),b="string"==typeof u&&A.test(u),x=be(u,g),w=function(e,{relative:t}={}){_(Ce(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=a.useContext(ke),{hash:i,pathname:o,search:s}=Ye(e,{relative:t}),c=o;return"/"!==n&&(c="/"===o?n:ue([n,o])),r.createHref({pathname:c,search:s,hash:i})}(u=x.to,{relative:r}),M=Pe(),j=null;if(s){let e=ce(s,[],M.mask?M.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:ue([g,e.pathname])),j=y.createHref(e)}let[O,N,S]=function(e,t){let n=a.useContext(gt),[r,i]=a.useState(!1),[o,s]=a.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=a.useRef(null);a.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{i(!0)},m=()=>{i(!1),s(!1)};return n?"intent"!==e?[o,p,{}]:[o,p,{onFocus:vt(c,h),onBlur:vt(l,m),onMouseEnter:vt(u,h),onMouseLeave:vt(d,m),onTouchStart:vt(f,h)}]:[!1,p,{}]}(n,h),E=function(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Re(),f=Pe(),p=Ye(e,{relative:s});return a.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,t)){h.preventDefault();let t=void 0!==n?n:Y(f)===Y(p),m=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?a.startTransition(()=>m()):m()}},[f,d,p,n,r,i,t,e,o,s,c,l,u])}(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v}),k=!(x.isExternal||i),D=a.createElement("a",{...h,...S,href:(k?j:void 0)||x.absoluteURL||w,onClick:k?function(t){e&&e(t),t.defaultPrevented||E(t)}:e,ref:jt(m,N),target:l,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?a.createElement(a.Fragment,null,D,a.createElement(bt,{page:w})):D});St.displayName="Link";var Et=a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:i,to:o,viewTransition:s,children:c,...l},u){let d=Ye(o,{relative:l.relative}),f=Pe(),p=a.useContext(Oe),{navigator:h,basename:m}=a.useContext(ke),g=null!=p&&function(e,{relative:t}={}){let n=a.useContext(Ee);_(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Dt("useViewTransitionState"),i=Ye(e,{relative:t});if(!n.isTransitioning)return!1;let o=ie(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=ie(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=te(i.pathname,s)||null!=te(i.pathname,o)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,v=f.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=ie(b,m)||b);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,M=v===y||!r&&v.startsWith(y)&&"/"===v.charAt(x),j=null!=b&&(b===y||!r&&b.startsWith(y)&&"/"===b.charAt(y.length)),O={isActive:M,isPending:j,isTransitioning:g},N=M?e:void 0;w="function"==typeof n?n(O):[n,M?"active":null,j?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let S="function"==typeof i?i(O):i;return a.createElement(St,{...l,"aria-current":N,className:w,ref:u,style:S,to:o,viewTransition:s},"function"==typeof c?c(O):c)});Et.displayName="NavLink";var kt=a.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=rt,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},m)=>{let{useTransitions:g}=a.useContext(ke),y=function(){let{router:e}=Dt("useSubmit"),{basename:t}=a.useContext(ke),n=Ve("useRouteId"),r=e.fetch,i=e.navigate;return a.useCallback(async(e,o={})=>{let{action:a,method:s,encType:c,formData:l,body:u}=function(e,t){let n,r,i,o,a;if(function(e){return ot(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?ie(a,t):null,n=e.getAttribute("method")||rt,i=ct(e.getAttribute("enctype"))||it,o=new FormData(e)}else if(function(e){return ot(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ot(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?ie(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||rt,i=ct(e.getAttribute("formenctype"))||ct(a.getAttribute("enctype"))||it,o=new FormData(a,e),!function(){if(null===at)try{new FormData(document.createElement("form"),0),at=!1}catch(e){at=!0}return at}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=rt,r=null,i=it,a=e}return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}(e,t);if(!1===o.navigate){let e=o.fetcherKey||At();await r(e,n,o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:l,body:u,formMethod:o.method||s,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}(),v=function(e,{relative:t}={}){let{basename:n}=a.useContext(ke),r=a.useContext(Ie);_(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Ye(e||".",{relative:t})},s=Pe();if(null==e){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(o.pathname="/"===o.pathname?n:ue([n,o.pathname])),Y(o)}(c,{relative:u}),b="get"===s.toLowerCase()?"get":"post",x="string"==typeof c&&A.test(c);return a.createElement("form",{ref:m,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,h=()=>y(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&!1!==n?a.startTransition(()=>h()):h()},...h,"data-discover":x||"render"!==e?void 0:"true"})});function Dt(e){let t=a.useContext(je);return _(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}kt.displayName="Form";var It=0,At=()=>`__${String(++It)}__`;const Tt=()=>{const{pathname:e}=Pe();return(0,a.useEffect)(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[e]),null};function Ct(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Pt=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),zt=()=>Math.random().toString(36).substring(7).split("").join("."),_t={INIT:`@@redux/INIT${zt()}`,REPLACE:`@@redux/REPLACE${zt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zt()}`};function Rt(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Lt(e,t,n){if("function"!=typeof e)throw new Error(Ct(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ct(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ct(1));return n(Lt)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,c=!1;function l(){a===o&&(a=new Map,o.forEach((e,t)=>{a.set(t,e)}))}function u(){if(c)throw new Error(Ct(3));return i}function d(e){if("function"!=typeof e)throw new Error(Ct(4));if(c)throw new Error(Ct(5));let t=!0;l();const n=s++;return a.set(n,e),function(){if(t){if(c)throw new Error(Ct(6));t=!1,l(),a.delete(n),o=null}}}function f(e){if(!Rt(e))throw new Error(Ct(7));if(void 0===e.type)throw new Error(Ct(8));if("string"!=typeof e.type)throw new Error(Ct(17));if(c)throw new Error(Ct(9));try{c=!0,i=r(i,e)}finally{c=!1}return(o=a).forEach(e=>{e()}),e}return f({type:_t.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Ct(10));r=e,f({type:_t.REPLACE})},[Pt]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Ct(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Pt](){return this}}}}}function Ut(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}const r=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:_t.INIT}))throw new Error(Ct(12));if(void 0===n(void 0,{type:_t.PROBE_UNKNOWN_ACTION()}))throw new Error(Ct(13))})}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let o=!1;const a={};for(let i=0;i<r.length;i++){const s=r[i],c=n[s],l=e[s],u=c(l,t);if(void 0===u)throw t&&t.type,new Error(Ct(14));a[s]=u,o=o||u!==l}return o=o||r.length!==Object.keys(e).length,o?a:e}}function Yt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Ft(e){return Rt(e)&&"type"in e&&"string"==typeof e.type}const Wt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(...e){if(0!==e.length)return"object"==typeof e[0]?Yt:Yt(...e)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Bt=Symbol.for("immer-nothing"),Qt=Symbol.for("immer-draftable"),qt=Symbol.for("immer-state");function Gt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var $t=Object,Ht=$t.getPrototypeOf,Vt="constructor",Kt="prototype",Zt="configurable",Xt="enumerable",Jt="writable",en="value",tn=e=>!!e&&!!e[qt];function nn(e){return!!e&&(an(e)||fn(e)||!!e[Qt]||!!e[Vt]?.[Qt]||pn(e)||hn(e))}var rn=$t[Kt][Vt].toString(),on=new WeakMap;function an(e){if(!e||!mn(e))return!1;const t=Ht(e);if(null===t||t===$t[Kt])return!0;const n=$t.hasOwnProperty.call(t,Vt)&&t[Vt];if(n===Object)return!0;if(!gn(n))return!1;let r=on.get(n);return void 0===r&&(r=Function.toString.call(n),on.set(n,r)),r===rn}function sn(e,t,n=!0){0===cn(e)?(n?Reflect.ownKeys(e):$t.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cn(e){const t=e[qt];return t?t.type_:fn(e)?1:pn(e)?2:hn(e)?3:0}var ln=(e,t,n=cn(e))=>2===n?e.has(t):$t[Kt].hasOwnProperty.call(e,t),un=(e,t,n=cn(e))=>2===n?e.get(t):e[t],dn=(e,t,n,r=cn(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},fn=Array.isArray,pn=e=>e instanceof Map,hn=e=>e instanceof Set,mn=e=>"object"==typeof e,gn=e=>"function"==typeof e,yn=e=>"boolean"==typeof e,vn=e=>e.copy_||e.base_,bn=e=>e.modified_?e.copy_:e.base_;function xn(e,t){if(pn(e))return new Map(e);if(hn(e))return new Set(e);if(fn(e))return Array[Kt].slice.call(e);const n=an(e);if(!0===t||"class_only"===t&&!n){const t=$t.getOwnPropertyDescriptors(e);delete t[qt];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o[Jt]&&(o[Jt]=!0,o[Zt]=!0),(o.get||o.set)&&(t[i]={[Zt]:!0,[Jt]:!0,[Xt]:o[Xt],[en]:e[i]})}return $t.create(Ht(e),t)}{const t=Ht(e);if(null!==t&&n)return{...e};const r=$t.create(t);return $t.assign(r,e)}}function wn(e,t=!1){return jn(e)||tn(e)||!nn(e)||(cn(e)>1&&$t.defineProperties(e,{set:Mn,add:Mn,clear:Mn,delete:Mn}),$t.freeze(e),t&&sn(e,(e,t)=>{wn(t,!0)},!1)),e}var Mn={[en]:function(){Gt(2)}};function jn(e){return null===e||!mn(e)||$t.isFrozen(e)}var On="MapSet",Nn="Patches",Sn="ArrayMethods",En={};function kn(e){const t=En[e];return t||Gt(0),t}var Dn,In=e=>!!En[e];var An=()=>Dn;function Tn(e,t){t&&(e.patchPlugin_=kn(Nn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cn(e){Pn(e),e.drafts_.forEach(Rn),e.drafts_=null}function Pn(e){e===Dn&&(Dn=e.parent_)}var zn=e=>Dn={drafts_:[],parent_:Dn,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:In(On)?kn(On):void 0,arrayMethodsPlugin_:In(Sn)?kn(Sn):void 0};function Rn(e){const t=e[qt];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Ln(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[qt].modified_&&(Cn(t),Gt(4)),nn(e)&&(e=Un(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[qt].base_,e,t)}else e=Un(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wn(t,n)}(t,e,!0),Cn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Bt?e:void 0}function Un(e,t){if(jn(t))return t;const n=t[qt];if(!n)return qn(t,e.handledSet_,e);if(!Fn(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Qn(n,e)}return n.copy_}function Yn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Fn=(e,t)=>e.scope_===t,Wn=[];function Bn(e,t,n,r){const i=vn(e),o=e.type_;if(void 0!==r&&un(i,r,o)===t)return void dn(i,r,n,o);if(!e.draftLocations_){const t=e.draftLocations_=new Map;sn(i,(e,n)=>{if(tn(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??Wn;for(const e of a)dn(i,e,n,o)}function Qn(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Yn(e)}}function qn(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||tn(e)||t.has(e)||!nn(e)||jn(e)||(t.add(e),sn(e,(r,i)=>{if(tn(i)){const t=i[qt];if(Fn(t,n)){const n=bn(t);dn(e,r,n,e.type_),Yn(t)}}else nn(i)&&qn(i,t,n)})),e}var Gn={get(e,t){if(t===qt)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=vn(e);if(!ln(i,t,e.type_))return function(e,t,n){const r=Vn(t,n);return r?en in r?r[en]:r.get?.call(e.draft_):void 0}(e,i,t);const o=i[t];if(e.finalized_||!nn(o))return o;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===Hn(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!nn(n)||n[qt])&&e.baseRefs_.has(n)}(e,t,o)){Zn(e);const n=1===e.type_?+t:t,r=Xn(e.scope_,o,e,n);return e.copy_[n]=r}return o},has:(e,t)=>t in vn(e),ownKeys:e=>Reflect.ownKeys(vn(e)),set(e,t,n){const r=Vn(vn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Hn(vn(e),t),a=r?.[qt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((i=n)===(o=r)?0!==i||1/i==1/o:i!=i&&o!=o)&&(void 0!==n||ln(e.base_,t,e.type_)))return!0;Zn(e),Kn(e)}var i,o;return e.copy_[t]===n&&(void 0!==n||ln(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(tn(n)){const i=n[qt];Fn(i,r)&&i.callbacks_.push(function(){Zn(e);const r=bn(i);Bn(e,n,r,t)})}else nn(n)&&e.callbacks_.push(function(){const i=vn(e);3===e.type_?i.has(n)&&qn(n,r.handledSet_,r):un(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&qn(un(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Zn(e),void 0!==Hn(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Kn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=vn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Jt]:!0,[Zt]:1!==e.type_||"length"!==t,[Xt]:r[Xt],[en]:n[t]}:r},defineProperty(){Gt(11)},getPrototypeOf:e=>Ht(e.base_),setPrototypeOf(){Gt(12)}},$n={};for(let e in Gn){let t=Gn[e];$n[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function Hn(e,t){const n=e[qt];return(n?vn(n):e)[t]}function Vn(e,t){if(!(t in e))return;let n=Ht(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ht(n)}}function Kn(e){e.modified_||(e.modified_=!0,e.parent_&&Kn(e.parent_))}function Zn(e){e.copy_||(e.assigned_=new Map,e.copy_=xn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Xn(e,t,n,r){const[i,o]=pn(t)?kn(On).proxyMap_(t,n):hn(t)?kn(On).proxySet_(t,n):function(e,t){const n=fn(e),r={type_:n?1:0,scope_:t?t.scope_:An(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Gn;n&&(i=[r],o=$n);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??An()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Fn(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const o=bn(i);Bn(e,i.draft_??i,o,n),Qn(i,r)})}(n,o,r):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function Jn(e){return tn(e)||Gt(10),er(e)}function er(e){if(!nn(e)||jn(e))return e;const t=e[qt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=xn(e,!0);return sn(n,(e,t)=>{dn(n,e,er(t))},r),t&&(t.finalized_=!1),n}function tr(){const e="replace",t="add",n="remove";function r(e){if(!nn(e))return e;if(fn(e))return e.map(r);if(pn(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(hn(e))return new Set(Array.from(e).map(r));const t=Object.create(Ht(e));for(const n in e)t[n]=r(e[n]);return ln(e,Qt)&&(t[Qt]=e[Qt]),t}function i(e){return tn(e)?r(e):e}var o,a;a={applyPatches_:function(i,o){return o.forEach(o=>{const{path:a,op:s}=o;let c=i;for(let e=0;e<a.length-1;e++){const t=cn(c);let n=a[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),0!==t&&1!==t||"__proto__"!==n&&n!==Vt||Gt(19),gn(c)&&n===Kt&&Gt(19),c=un(c,n),null!==c&&mn(c)||Gt(18,a.join("/"))}const l=cn(c),u=r(o.value),d=a[a.length-1];switch(s){case e:switch(l){case 2:return c.set(d,u);case 3:Gt(16);default:return c[d]=u}case t:switch(l){case 1:return"-"===d?c.push(u):c.splice(d,0,u);case 2:return c.set(d,u);case 3:return c.add(u);default:return c[d]=u}case n:switch(l){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(o.value);default:return delete c[d]}default:Gt(17)}}),i},generatePatches_:function(r,o,a){if(r.scope_.processedForPatches_.has(r))return;r.scope_.processedForPatches_.add(r);const{patches_:s,inversePatches_:c}=a;switch(r.type_){case 0:case 2:return function(r,o,a,s){const{base_:c,copy_:l,type_:u}=r;sn(r.assigned_,(r,d)=>{const f=un(c,r,u),p=un(l,r,u),h=d?ln(c,r)?e:t:n;if(f===p&&h===e)return;const m=o.concat(r);a.push(h===n?{op:h,path:m}:{op:h,path:m,value:i(p)}),s.push(h===t?{op:n,path:m}:h===n?{op:t,path:m,value:i(f)}:{op:e,path:m,value:i(f)})})}(r,o,s,c);case 1:return function(r,o,a,s){let{base_:c,assigned_:l}=r,u=r.copy_;u.length<c.length&&([c,u]=[u,c],[a,s]=[s,a]);const d=!0===r.allIndicesReassigned_;for(let t=0;t<c.length;t++){const n=u[t],r=c[t];if((d||l?.get(t.toString()))&&n!==r){const c=n?.[qt];if(c&&c.modified_)continue;const l=o.concat([t]);a.push({op:e,path:l,value:i(n)}),s.push({op:e,path:l,value:i(r)})}}for(let e=c.length;e<u.length;e++){const n=o.concat([e]);a.push({op:t,path:n,value:i(u[e])})}for(let e=u.length-1;c.length<=e;--e){const t=o.concat([e]);s.push({op:n,path:t})}}(r,o,s,c);case 3:return function(e,r,i,o){let{base_:a,copy_:s}=e,c=0;a.forEach(e=>{if(!s.has(e)){const a=r.concat([c]);i.push({op:n,path:a,value:e}),o.unshift({op:t,path:a,value:e})}c++}),c=0,s.forEach(e=>{if(!a.has(e)){const a=r.concat([c]);i.push({op:t,path:a,value:e}),o.unshift({op:n,path:a,value:e})}c++})}(r,o,s,c)}},generateReplacementPatches_:function(t,n,r){const{patches_:i,inversePatches_:o}=r;i.push({op:e,path:[],value:n===Bt?void 0:n}),o.push({op:e,path:[],value:t})},getPath:function e(t,n=[]){if(void 0!==t.key_){const e=t.parent_.copy_??t.parent_.base_,r=(e=>mn(e)?e?.[qt]:null)(un(e,t.key_)),i=un(e,t.key_);if(void 0===i)return null;if(i!==t.draft_&&i!==t.base_&&i!==t.copy_)return null;if(null!=r&&r.base_!==t.base_)return null;const o=3===t.parent_.type_;let a;if(o){const e=t.parent_;a=Array.from(e.drafts_.keys()).indexOf(t.key_)}else a=t.key_;if(!(o&&e.size>a||ln(e,a)))return null;n.push(a)}if(t.parent_)return e(t.parent_,n);n.reverse();try{!function(e,t){let n=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(n=un(n,r),!mn(n)||null===n)throw new Error(`Cannot resolve path at '${t.join("/")}'`)}}(t.copy_,n)}catch(e){return null}return n}},En[o=Nn]||(En[o]=a)}$n.deleteProperty=function(e,t){return $n.set.call(this,e,t,void 0)},$n.set=function(e,t,n){return Gn.set.call(this,e[0],t,n,e[0])};var nr=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(gn(e)&&!gn(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(gn(t)||Gt(6),void 0===n||gn(n)||Gt(7),nn(e)){const i=zn(this),o=Xn(0,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?Cn(i):Pn(i)}return Tn(i,n),Ln(r,i)}if(!e||!mn(e)){if(r=t(e),void 0===r&&(r=e),r===Bt&&(r=void 0),this.autoFreeze_&&wn(r,!0),n){const t=[],i=[];kn(Nn).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Gt(1)},this.produceWithPatches=(e,t)=>{if(gn(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},yn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),yn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),yn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nn(e)||Gt(8),tn(e)&&(e=Jn(e));const t=zn(this),n=Xn(0,e,void 0);return n[qt].isManual_=!0,Pn(t),n}finishDraft(e,t){const n=e&&e[qt];n&&n.isManual_||Gt(9);const{scope_:r}=n;return Tn(r,t),Ln(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=kn(Nn).applyPatches_;return tn(e)?r(e,t):this.produce(e,e=>r(e,t))}},rr=nr.produce,ir=nr.produceWithPatches.bind(nr),or=nr.applyPatches.bind(nr);function ar(e){return({dispatch:t,getState:n})=>r=>i=>"function"==typeof i?i(t,n,e):r(i)}var sr=ar(),cr=ar,lr="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Yt:Yt.apply(null,arguments)},ur=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function dr(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(wi(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ft(t)&&t.type===e,n}var fr=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function pr(e){return nn(e)?rr(e,()=>{}):e}function hr(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var mr="RTK_autoBatch",gr=()=>e=>({payload:e,meta:{[mr]:!0}}),yr=e=>t=>{setTimeout(t,e)},vr=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?(l=window.requestAnimationFrame,e=>{let t=!1;const n=()=>{t||(t=!0,cancelAnimationFrame(r),clearTimeout(i),e())},r=l(n),i=setTimeout(n,100)}):yr(10):"callback"===e.type?e.queueNotification:yr(e.timeout);var l;const u=()=>{a=!1,o&&(o=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[mr],o=!i,o&&(a||(a=!0,c(u))),r.dispatch(e)}finally{i=!0}}})};function br(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let o=new fr;return t&&("boolean"==typeof t?o.push(sr):o.push(cr(t.extraArgument))),o},{reducer:n,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a,enhancers:s}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!Rt(n))throw new Error(wi(1));c=Ut(n)}l="function"==typeof r?r(t):t();let u=Yt;i&&(u=lr({trace:!1,..."object"==typeof i&&i}));const d=function(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Ct(15))};const a={getState:i.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map(e=>e(a));return o=Yt(...s)(i.dispatch),{...i,dispatch:o}}}(...l),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new fr(e);return n&&r.push(vr("object"==typeof n?n:void 0)),r})(d);return Lt(c,a,u(..."function"==typeof s?s(f):f()))}function xr(e){const t={},n=[];let r;const i={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(wi(28));if(r in t)throw new Error(wi(29));return t[r]=n,i},addAsyncThunk:(e,r)=>(r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(r=e,i)};return e(i),[t,n,r]}var wr=(e,t)=>ur(e)?e.match(t):e(t);function Mr(...e){return t=>e.some(e=>wr(e,t))}function jr(...e){return t=>e.every(e=>wr(e,t))}function Or(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Nr(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Sr(...e){return 0===e.length?e=>Or(e,["pending"]):Nr(e)?Mr(...e.map(e=>e.pending)):Sr()(e[0])}function Er(...e){return 0===e.length?e=>Or(e,["rejected"]):Nr(e)?Mr(...e.map(e=>e.rejected)):Er()(e[0])}function kr(...e){return 0===e.length||Nr(e)?jr(Er(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):kr()(e[0])}function Dr(...e){return 0===e.length?e=>Or(e,["fulfilled"]):Nr(e)?Mr(...e.map(e=>e.fulfilled)):Dr()(e[0])}function Ir(...e){return 0===e.length?e=>Or(e,["pending","fulfilled","rejected"]):Nr(e)?Mr(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):Ir()(e[0])}var Ar=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Tr=["name","message","stack","code"],Cr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Pr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},zr=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Tr)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},_r="External signal was aborted",Rr=(()=>{function e(e,t,n){const r=dr(e+"/fulfilled",(e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),i=dr(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),o=dr(e+"/rejected",(e,t,r,i,o)=>({payload:i,error:(n&&n.serializeError||zr)(e||"Rejected"),meta:{...o||{},arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(s,c,l)=>{const u=n?.idGenerator?n.idGenerator(e):Ar(),d=new AbortController;let f,p;function h(e){p=e,d.abort()}a&&(a.aborted?h(_r):a.addEventListener("abort",()=>h(_r),{once:!0}));const m=async function(){let a;try{let o=n?.condition?.(e,{getState:c,extra:l});if(function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}(o)&&(o=await o),!1===o||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f,{once:!0})});s(i(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:c,extra:l}))),a=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:c,extra:l,requestId:u,signal:d.signal,abort:h,rejectWithValue:(e,t)=>new Cr(e,t),fulfillWithValue:(e,t)=>new Pr(e,t)})).then(t=>{if(t instanceof Cr)throw t;return t instanceof Pr?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof Cr?o(null,u,e,t.payload,t.meta):o(t,u,e)}finally{f&&d.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&o.match(a)&&a.meta.condition||s(a),a}();return Object.assign(m,{abort:h,requestId:u,arg:e,unwrap:()=>m.then(Lr)})}},{pending:i,rejected:o,fulfilled:r,settled:Mr(o,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Lr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ur=Symbol.for("rtk-slice-createasyncthunk");function Yr(e,t){return`${e}/${t}`}function Fr({creators:e}={}){const t=e?.asyncThunk?.[Ur];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error(wi(11));const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},o=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(wi(12));if(n in a.sliceCaseReducersByType)throw new Error(wi(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?xr(e.extraReducers):[e.extraReducers],i={...t,...a.sliceCaseReducersByType};return function(e){let t,[o,s,c]=xr(e=>{for(let t in i)e.addCase(t,i[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)});if("function"==typeof e)t=()=>pr(e());else{const n=pr(e);t=()=>n}function l(e=t(),n){let r=[o[n.type],...s.filter(({matcher:e})=>e(n)).map(({reducer:e})=>e)];return 0===r.filter(e=>!!e).length&&(r=[c]),r.reduce((e,t)=>{if(t){if(tn(e)){const r=t(e,n);return void 0===r?e:r}if(nn(e))return rr(e,e=>t(e,n));{const r=t(e,n);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return l.getInitialState=t,l}(e.initialState)}o.forEach(r=>{const o=i[r],a={reducerName:r,type:Yr(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(o)?function({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(wi(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?dr(e,a):dr(e))}(a,o,s):function({type:e,reducerName:t},n,r,i){if(!i)throw new Error(wi(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Qr,pending:s||Qr,rejected:c||Qr,settled:l||Qr})}(a,o,s,t)});const l=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=c()),f(e,t)}function h(){return f||(f=c()),f.getInitialState()}function m(t,n=!1){function r(e){let i=e[t];return void 0===i&&n&&(i=hr(d,r,h)),i}function i(t=l){const r=hr(u,n,()=>new WeakMap);return hr(r,t,()=>{const r={};for(const[i,o]of Object.entries(e.selectors??{}))r[i]=Wr(o,t,()=>hr(d,t,h),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const g={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...m(i,!0)}}};return g}}function Wr(e,t,n,r){function i(i,...o){let a=t(i);return void 0===a&&r&&(a=n()),e(a,...o)}return i.unwrapped=e,i}var Br=Fr();function Qr(){}var qr="listener",Gr="completed",$r="cancelled",Hr=`task-${$r}`,Vr=`task-${Gr}`,Kr=`${qr}-${$r}`,Zr=`${qr}-${Gr}`,Xr=class{constructor(e){this.code=e,this.message=`task ${$r} (reason: ${e})`}code;name="TaskAbortError";message},Jr=(e,t)=>{if("function"!=typeof e)throw new TypeError(wi(32))},ei=()=>{},ti=(e,t=ei)=>(e.catch(t),e),ni=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ri=e=>{if(e.aborted)throw new Xr(e.reason)};function ii(e,t){let n=ei;return new Promise((r,i)=>{const o=()=>i(new Xr(e.reason));e.aborted?o():(n=ni(e,o),t.finally(()=>n()).then(r,i))}).finally(()=>{n=ei})}var oi=e=>t=>ti(ii(e,t).then(t=>(ri(e),t))),ai=e=>{const t=oi(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:si}=Object,ci={},li="listenerMiddleware",ui=(e,t)=>(n,r)=>{Jr(n);const i=new AbortController;var o;o=i,ni(e,()=>o.abort(e.reason));const a=(async()=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{ri(e),ri(i.signal);const t=await n({pause:oi(i.signal),delay:ai(i.signal),signal:i.signal});return ri(i.signal),t})()}}catch(e){return{status:e instanceof Xr?"cancelled":"rejected",error:e}}finally{i.abort(Vr)}})();return r?.autoJoin&&t.push(a.catch(ei)),{result:oi(e)(a),cancel(){i.abort(Hr)}}},di=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=dr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(wi(21));return Jr(o),{predicate:i,type:t,effect:o}},fi=si(e=>{const{type:t,predicate:n,effect:r}=di(e);return{id:Ar(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(wi(22))}}},{withTypes:()=>fi}),pi=(e,t)=>{const{type:n,effect:r,predicate:i}=di(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===i)&&e.effect===r)},hi=e=>{e.pending.forEach(e=>{e.abort(Kr)})},mi=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},gi=si(dr(`${li}/add`),{withTypes:()=>gi}),yi=dr(`${li}/removeAll`),vi=si(dr(`${li}/remove`),{withTypes:()=>vi}),bi=(...e)=>{console.error(`${li}/error`,...e)},xi=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=bi}=e;Jr(i);const o=e=>{return(n=pi(t,e)??fi(e)).unsubscribe=()=>t.delete(n.id),t.set(n.id,n),e=>{n.unsubscribe(),e?.cancelActive&&hi(n)};var n};si(o,{withTypes:()=>o});const a=e=>{const n=pi(t,e);return n&&(n.unsubscribe(),e.cancelActive&&hi(n)),!!n};si(a,{withTypes:()=>a});const s=async(e,a,s,c)=>{const l=new AbortController,u=((e,t)=>(n,r)=>ti((async(n,r)=>{ri(t);let i=()=>{};const o=[new Promise((t,r)=>{let o=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{o(),r()}})];null!=r&&o.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await ii(t,Promise.race(o));return ri(t),e}finally{i()}})(n,r)))(o,l.signal),d=[];try{e.pending.add(l),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(a,si({},s,{getOriginalState:c,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:ai(l.signal),pause:oi(l.signal),extra:r,signal:l.signal,fork:ui(l.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==l&&(e.abort(Kr),n.delete(e))})},cancel:()=>{l.abort(Kr),e.pending.delete(l)},throwIfCancelled:()=>{ri(l.signal)}})))}catch(e){e instanceof Xr||mi(i,e,{raisedBy:"effect"})}finally{await Promise.all(d),l.abort(Zr),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(l)}},c=((e,t)=>()=>{for(const e of t.keys())hi(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!Ft(r))return n(r);if(gi.match(r))return o(r.payload);if(yi.match(r))return void c();if(vi.match(r))return a(r.payload);let l=e.getState();const u=()=>{if(l===ci)throw new Error(wi(23));return l};let d;try{if(d=n(r),t.size>0){const n=e.getState(),o=Array.from(t.values());for(const t of o){let o=!1;try{o=t.predicate(r,n,l)}catch(e){o=!1,mi(i,e,{raisedBy:"predicate"})}o&&s(t,r,e,u)}}}finally{l=ci}return d},startListening:o,stopListening:a,clearListeners:c}};function wi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mi=e=>Array.isArray(e)?e:[e];var ji=class{constructor(e){this.value=e}deref(){return this.value}},Oi=(()=>"undefined"==typeof WeakRef?ji:WeakRef)();function Ni(){return{s:0,v:void 0,o:null,p:null}}function Si(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,o=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=Ni(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=Ni(),e.set(n,t)):t=r}}const s=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),o++,r){const e=function(e){return e instanceof Oi?e.deref():e}(i);null!=e&&r(e,c)&&(c=e,0!==o&&o--),i="object"==typeof c&&null!==c||"function"==typeof c?new Oi(c):c}return s.s=1,s.v=c,c}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Ei(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,o={},a=e.pop();"object"==typeof a&&(o=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...o},{memoize:c,memoizeOptions:l=[],argsMemoize:u=Si,argsMemoizeOptions:d=[]}=s,f=Mi(l),p=Mi(d),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),m=c(function(){return r++,a.apply(null,arguments)},...f),g=u(function(){i++;const e=function(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}(h,arguments);return t=m.apply(null,e),t},...p);return Object.assign(g,{resultFunc:a,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var ki=Ei(Si),Di=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Ii=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ii||{}),Ai="uninitialized",Ti="pending",Ci="fulfilled",Pi="rejected";function zi(e){return{status:e,isUninitialized:e===Ai,isLoading:e===Ti,isSuccess:e===Ci,isError:e===Pi}}var _i=Rt;function Ri(e,t){if(e===t||!(_i(e)&&_i(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const r of n)o[r]=Ri(e[r],t[r]),i&&(i=e[r]===o[r]);return i?e:o}function Li(e,t,n){return e.reduce((e,r,i)=>(t(r,i)&&e.push(n(r,i)),e),[]).flat()}function Ui(e){return null!=e}function Yi(e){return[...e?.values()??[]].filter(Ui)}function Fi(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Wi=()=>new Map,Bi=e=>{const t=new AbortController;return setTimeout(()=>{const e="signal timed out",n="TimeoutError";t.abort("undefined"!=typeof DOMException?new DOMException(e,n):Object.assign(new Error(e),{name:n}))},e),t.signal},Qi=(...e)=>{for(const t of e)if(t.aborted)return AbortSignal.abort(t.reason);const t=new AbortController;for(const n of e)n.addEventListener("abort",()=>t.abort(n.reason),{signal:t.signal,once:!0});return t.signal},qi=(...e)=>fetch(...e),Gi=e=>e.status>=200&&e.status<=299,$i=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Hi(e){if(!Rt(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}var Vi=class{constructor(e,t=void 0){this.value=e,this.meta=t}value;meta},Ki="__rtkq/",Zi="focused",Xi=dr(`${Ki}${Zi}`),Ji=dr(`${Ki}un${Zi}`),eo=dr(`${Ki}online`),to=dr(`${Ki}offline`),no="query",ro="mutation",io="infinitequery";function oo(e){return e.type===no}function ao(e){return e.type===io}function so(e){return oo(e)||ao(e)}function co(e,t,n,r,i,o){const a="function"==typeof e?e(t,n,r,i):e;return a?Li(a,Ui,e=>o(lo(e))):[]}function lo(e){return"string"==typeof e?{type:e}:e}var uo=(e,t)=>e.endpointDefinitions[t],fo=Symbol("forceQueryFn"),po=e=>"function"==typeof e[fo],ho=class extends Di{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}value;schemaName;_bqMeta},mo=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function go(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new ho(i.issues,t,n,r);return i.value}function yo(e){return e}var vo=(e={})=>({...e,[mr]:!0});function bo(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function xo(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function wo(e,t,n,r){return co(n[e.meta.arg.endpointName][t],Dr(e)?e.payload:void 0,kr(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Mo(e){return tn(e)?Jn(e):e}function jo(e,t,n){const r=e[t];r&&n(r)}function Oo(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function No(e,t,n){const r=e[Oo(t)];r&&n(r)}var So={};var Eo=Symbol.for("RTKQ/skipToken"),ko={status:Ai},Do=rr(ko,()=>{}),Io=rr(ko,()=>{}),Ao=WeakMap?new WeakMap:void 0,To=({endpointName:e,queryArgs:t})=>{let n="";const r=Ao?.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,(e,t)=>t=Rt(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t);Rt(t)&&Ao?.set(t,e),n=e}return`${e}(${n})`};function Co(...e){return function(t){const n=Si(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=To;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:To({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:Ar(),extractRehydrationInfo:n,hasRehydrationInfo:Si(e=>null!=n(e))},o={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:no}),mutation:e=>({...e,type:ro}),infiniteQuery:e=>({...e,type:io})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in i.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(wi(39))}else{i.endpointDefinitions[n]=r;for(const e of a)e.injectEndpoint(n,r)}return o},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(uo(i,e)):Object.assign(uo(i,e)||{},n);return o}},a=e.map(e=>e.init(o,r,i));return o.injectEndpoints({endpoints:t.endpoints})}}function Po(e,...t){return Object.assign(e,...t)}var zo=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:a},getRunningQueryThunk:s,mwApi:c})=>{const{removeQueryResult:l,unsubscribeQueryResult:u,cacheEntriesUpserted:d}=t.internalActions,f=Mr(u.match,n.fulfilled,n.rejected,d.match);function p(e){const t=i.currentSubscriptions.get(e);return!!t&&t.size>0}const h={};function m(e){for(const t of e.values())t?.abort?.()}function g(e,t,n){const r=t.getState();for(const i of e){const e=o(r,i);e?.endpointName&&y(i,e.endpointName,t,n)}}function y(e,t,n,i){const a=uo(r,t),c=a?.keepUnusedDataFor??i.keepUnusedDataFor;if(c===1/0)return;const u=Math.max(0,Math.min(c,2147482.647));if(!p(e)){const t=h[e];t&&clearTimeout(t),h[e]=setTimeout(()=>{if(!p(e)){const t=o(n.getState(),e);if(t?.endpointName){const e=n.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}n.dispatch(l({queryCacheKey:e}))}delete h[e]},1e3*u)}}return(e,n)=>{const o=n.getState(),s=a(o);if(f(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:n}=u.match(e)?e.payload:e.meta.arg;t=[n]}g(t,n,s)}if(t.util.resetApiState.match(e)){for(const[e,t]of Object.entries(h))t&&clearTimeout(t),delete h[e];m(i.runningQueries),m(i.runningMutations)}if(r.hasRehydrationInfo(e)){const{queries:t}=r.extractRehydrationInfo(e);g(Object.keys(t),n,s)}}},_o=new Error("Promise never resolved before cacheEntryRemoved."),Ro=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:a,selectApiState:s}})=>{const c=Ir(r),l=Ir(i),u=Dr(r,i),d={},{removeQueryResult:f,removeMutationResult:p,cacheEntriesUpserted:h}=e.internalActions;function m(e,t,n){const r=d[e];r?.valueResolved&&(r.valueResolved({data:t,meta:n}),delete r.valueResolved)}function g(e){const t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function y(e){const{arg:t,requestId:n}=e.meta,{endpointName:r,originalArgs:i}=t;return[r,i,n]}function v(t,r,i,o,a){const s=uo(n,t),c=s?.onCacheEntryAdded;if(!c)return;const l={},u=new Promise(e=>{l.cacheEntryRemoved=e}),f=Promise.race([new Promise(e=>{l.valueResolved=e}),u.then(()=>{throw _o})]);f.catch(()=>{}),d[i]=l;const p=e.endpoints[t].select(so(s)?r:i),h=o.dispatch((e,__,t)=>t),m={...o,getCacheEntry:()=>p(o.getState()),requestId:a,extra:h,updateCachedData:so(s)?n=>o.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:u},g=c(r,m);Promise.resolve(g).catch(e=>{if(e!==_o)throw e})}return(n,o,s)=>{const b=function(e){return c(e)?e.meta.arg.queryCacheKey:l(e)?e.meta.arg.fixedCacheKey??e.meta.requestId:f.match(e)?e.payload.queryCacheKey:p.match(e)?Oo(e.payload):""}(n);function x(e,t,n,r){const i=a(s,t),c=a(o.getState(),t);!i&&c&&v(e,r,t,o,n)}if(r.pending.match(n)){const[e,t,r]=y(n);x(e,b,r,t)}else if(h.match(n))for(const{queryDescription:e,value:t}of n.payload){const{endpointName:r,originalArgs:i,queryCacheKey:o}=e;x(r,o,n.meta.requestId,i),m(o,t,{})}else if(i.pending.match(n)){if(o.getState()[t].mutations[b]){const[e,t,r]=y(n);v(e,t,b,o,r)}}else if(u(n))m(b,n.payload,n.meta.baseQueryMeta);else if(f.match(n)||p.match(n))g(b);else if(e.util.resetApiState.match(n))for(const e of Object.keys(d))g(e)}},Lo=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Uo=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:a,refetchQuery:s,internalState:c})=>{const{removeQueryResult:l}=o.internalActions,u=Mr(Dr(r),kr(r)),d=Mr(Dr(i,r),Er(i,r));let f=[],p=0;function h(n,r){const i=r.getState(),a=i[e];if(f.push(...n),"delayed"===a.config.invalidationBehavior&&p>0)return;const u=f;if(f=[],0===u.length)return;const d=o.util.selectInvalidatedBy(i,u);t.batch(()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=a.queries[t],n=Fi(c.currentSubscriptions,t,Wi);e&&(0===n.size?r.dispatch(l({queryCacheKey:t})):e.status!==Ai&&r.dispatch(s(e)))}})}return(e,t)=>{(i.pending.match(e)||r.pending.match(e))&&p++,d(e)&&(p=Math.max(0,p-1)),u(e)?h(wo(e,"invalidatesTags",n,a),t):d(e)?h([],t):o.util.invalidateTags.match(e)&&h(co(e.payload,void 0,void 0,void 0,void 0,a),t)}},Yo=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:o,currentSubscriptions:a}=i,s=new Set;let c=null;function l(e,t){s.add(e),c||(c=setTimeout(()=>{for(const e of s)d({queryCacheKey:e},t);s.clear(),c=null},0))}function u({queryCacheKey:t},n){const i=n.getState()[e],s=i.queries[t],c=a.get(t);if(!s||s.status===Ai)return;const{lowestPollingInterval:l,skipPollingIfUnfocused:d}=p(c);if(!Number.isFinite(l))return;const f=o.get(t);f?.timeout&&(clearTimeout(f.timeout),f.timeout=void 0);const h=Date.now()+l;o.set(t,{nextPollTimestamp:h,pollingInterval:l,timeout:setTimeout(()=>{!i.config.focused&&d||n.dispatch(r(s)),u({queryCacheKey:t},n)},l)})}function d({queryCacheKey:t},n){const r=n.getState()[e].queries[t],i=a.get(t);if(!r||r.status===Ai)return;const{lowestPollingInterval:s}=p(i);if(!Number.isFinite(s))return void f(t);const c=o.get(t),l=Date.now()+s;(!c||l<c.nextPollTimestamp)&&u({queryCacheKey:t},n)}function f(e){const t=o.get(e);t?.timeout&&clearTimeout(t.timeout),o.delete(e)}function p(e=new Map){let t=!1,n=Number.POSITIVE_INFINITY;for(const r of e.values())r.pollingInterval&&(n=Math.min(r.pollingInterval,n),t=r.skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&l(e.payload.queryCacheKey,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&l(e.meta.arg.queryCacheKey,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&u(e.meta.arg,r),n.util.resetApiState.match(e)&&(function(){for(const e of o.keys())f(e)}(),c&&(clearTimeout(c),c=null),s.clear())}},Fo=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Sr(n,r),o=Er(n,r),a=Dr(n,r),s={};return(n,r)=>{if(i(n)){const{requestId:i,arg:{endpointName:o,originalArgs:a}}=n.meta,c=uo(t,o),l=c?.onQueryStarted;if(l){const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});n.catch(()=>{}),s[i]=t;const u=e.endpoints[o].select(so(c)?a:i),d=r.dispatch((e,__,t)=>t),f={...r,getCacheEntry:()=>u(r.getState()),requestId:i,extra:d,updateCachedData:so(c)?t=>r.dispatch(e.util.updateQueryData(o,a,t)):void 0,queryFulfilled:n};l(a,f)}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;s[e]?.resolve({data:n.payload,meta:t}),delete s[e]}else if(o(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;s[e]?.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}};function Wo(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:o}=e,{apiUid:a}=i,s={invalidateTags:dr(`${t}/invalidateTags`)},c=e=>e.type.startsWith(`${t}/`),l=[Lo,zo,Uo,Yo,Ro,Fo];return{middleware:n=>{let s=!1;const d=o(n.dispatch),f={...e,internalState:d,refetchQuery:u,isThisApiSliceAction:c,mwApi:n},p=l.map(e=>e(f)),h=(({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let o=null,a=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:c}=e.internalActions,l=()=>n.currentSubscriptions,u={getSubscriptions:l,getSubscriptionCount:e=>{const t=l().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const n=l();return!!n?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(r,l)=>{if(o||(o=d(n.currentSubscriptions)),e.util.resetApiState.match(r))return o={},n.currentSubscriptions.clear(),a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(r))return[!1,u];const f=((n,r)=>{if(s.match(r)){const{queryCacheKey:e,requestId:t,options:i}=r.payload,o=n.get(e);return o?.has(t)&&o.set(t,i),!0}if(c.match(r)){const{queryCacheKey:e,requestId:t}=r.payload,i=n.get(e);return i&&i.delete(t),!0}if(e.internalActions.removeQueryResult.match(r))return n.delete(r.payload.queryCacheKey),!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,i=Fi(n,e.queryCacheKey,Wi);return e.subscribe&&i.set(t,e.subscriptionOptions??i.get(t)??{}),!0}let i=!1;if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:o}}=r;if(e&&t.subscribe){const e=Fi(n,t.queryCacheKey,Wi);e.set(o,t.subscriptionOptions??e.get(o)??{}),i=!0}}return i})(n.currentSubscriptions,r);let p=!0;if(f){a||(a=setTimeout(()=>{const t=d(n.currentSubscriptions),[,r]=ir(o,()=>t);l.next(e.internalActions.subscriptionsUpdated(r)),o=t,a=null},500));const s="string"==typeof r.type&&!!r.type.startsWith(i),c=t.rejected.match(r)&&r.meta.condition&&!!r.meta.arg.subscribe;p=!s&&!c}return[p,!1]}})(f),m=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions;function a(n,a){const s=n.getState()[e],c=s.queries,l=i.currentSubscriptions;t.batch(()=>{for(const e of l.keys()){const t=c[e],i=l.get(e);if(!i||!t)continue;const u=[...i.values()];(u.some(e=>!0===e[a])||u.every(e=>void 0===e[a])&&s.config[a])&&(0===i.size?n.dispatch(o({queryCacheKey:e})):t.status!==Ai&&n.dispatch(r(t)))}})}return(e,t)=>{Xi.match(e)&&a(t,"refetchOnFocus"),eo.match(e)&&a(t,"refetchOnReconnect")}})(f);return e=>o=>{if(!Ft(o))return e(o);s||(s=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const l={...n,next:e},u=n.getState(),[d,f]=h(o,l,u);let g;if(g=d?e(o):f,n.getState()[t]&&(m(o,l,u),c(o)||i.hasRehydrationInfo(o)))for(const e of p)e(o,l,u);return g}},actions:s};function u(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Bo=Symbol(),Qo=({createSelector:e=ki}={})=>({name:Bo,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:a,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:l,invalidationBehavior:u,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p},h){tr();const m=e=>e;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:eo,onOffline:to,onFocus:Xi,onFocusLost:Ji},util:{}});const g=function({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>Do,i=e=>Io;return{buildQuerySelector:function(e,t){return l(e,t,o)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:n}=t;return l(e,t,function(e){const t={...e,...zi(e.status)},{isLoading:r,isError:i,direction:o}=t,a="forward"===o,s="backward"===o;return{...t,hasNextPage:(c=n,l=t.data,d=t.originalArgs,!!l&&null!=bo(c,l,d)),hasPreviousPage:u(n,t.data,t.originalArgs),isFetchingNextPage:r&&a,isFetchingPreviousPage:r&&s,isFetchNextPageError:i&&a,isFetchPreviousPageError:i&&s};var c,l,d})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Oo(e)??Eo:e,n(t===Eo?i:e=>a(e)?.mutations?.[t]??Io,o)}},selectInvalidatedBy:function(e,n){const r=e[t],i=new Set,o=Li(n,Ui,lo);for(const e of o){const t=r.provided.tags[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:Object.values(t).flat())??[];for(const e of n)i.add(e)}return Array.from(i.values()).flatMap(e=>{const t=r.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return Li(Object.values(s(e)),e=>e?.endpointName===t&&e.status!==Ai,e=>e.originalArgs)},selectApiState:a,selectQueries:s,selectMutations:function(e){return a(e)?.mutations},selectQueryEntry:c,selectConfig:function(e){return a(e)?.config}};function o(e){return{...e,...zi(e.status)}}function a(e){return e[t]}function s(e){return a(e)?.queries}function c(e,t){return s(e)?.[t]}function l(t,i,o){return a=>{if(a===Eo)return n(r,o);const s=e({queryArgs:a,endpointDefinition:i,endpointName:t});return n(e=>c(e,s)??Do,o)}}function u(e,t,n){return!(!t||!e.getPreviousPageParam)&&null!=xo(e,t,n)}}({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:y,selectCachedArgsForQuery:v,buildQuerySelector:b,buildInfiniteQuerySelector:x,buildMutationSelector:w}=g;Po(t.util,{selectInvalidatedBy:y,selectCachedArgsForQuery:v});const{queryThunk:M,infiniteQueryThunk:j,mutationThunk:O,patchQueryData:N,updateQueryData:S,upsertQueryData:E,prefetch:k,buildMatchThunkActions:D}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:o,selectors:a,onSchemaFailure:s,catchSchemaFailure:c,skipSchemaValidation:l}){function u(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function d(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}const f=(e,t)=>e.query&&e[t]?e[t]:yo,p=async(e,{signal:r,abort:i,rejectWithValue:o,fulfillWithValue:p,dispatch:m,getState:g,extra:y})=>{const v=n[e.endpointName],{metaSchema:b,skipSchemaValidation:x=l}=v,w=e.type===no;try{let M=yo;const j={signal:r,abort:i,dispatch:m,getState:g,extra:y,endpoint:e.endpointName,type:e.type,forced:w?h(e,g()):void 0,queryCacheKey:w?e.queryCacheKey:void 0},O=w?e[fo]:void 0;let N;const S=async(t,n,r,i)=>{if(null==n&&t.pages.length)return Promise.resolve({data:t});const o={queryArg:e.originalArgs,pageParam:n},a=await E(o),s=i?u:d;return{data:{pages:s(t.pages,a.data,r),pageParams:s(t.pageParams,n,r)},meta:a.meta}};async function E(e){let n;const{extraOptions:r,argSchema:i,rawResponseSchema:o,responseSchema:a}=v;if(i&&!mo(x,"arg")&&(e=await go(i,e,"argSchema",{})),O?n=O():v.query?(M=f(v,"transformResponse"),n=await t(v.query(e),j,r)):n=await v.queryFn(e,j,r,e=>t(e,j,r)),n.error)throw new Vi(n.error,n.meta);let{data:s}=n;o&&!mo(x,"rawResponse")&&(s=await go(o,n.data,"rawResponseSchema",n.meta));let c=await M(s,n.meta,e);return a&&!mo(x,"response")&&(c=await go(a,c,"responseSchema",n.meta)),{...n,data:c}}if(w&&"infiniteQueryOptions"in v){const{infiniteQueryOptions:k}=v,{maxPages:D=1/0}=k,I=e.refetchCachedPages??k.refetchCachedPages??!0;let A;const T={pages:[],pageParams:[]},C=a.selectQueryEntry(g(),e.queryCacheKey)?.data,P=h(e,g())&&!e.direction||!C?T:C;if("direction"in e&&e.direction&&P.pages.length){const z="backward"===e.direction,_=(z?xo:bo)(k,P,e.originalArgs);A=await S(P,_,D,z)}else{const{initialPageParam:R=k.initialPageParam}=e,L=C?.pageParams??[],U=L[0]??R,Y=L.length;if(A=await S(P,U,D),O&&(A={data:A.data.pages[0]}),I)for(let F=1;F<Y;F++){const W=bo(k,A.data,e.originalArgs);A=await S(A.data,W,D)}}N=A}else N=await E(e.originalArgs);return b&&!mo(x,"meta")&&N.meta&&(N.meta=await go(b,N.meta,"metaSchema",N.meta)),p(N.data,vo({fulfilledTimeStamp:Date.now(),baseQueryMeta:N.meta}))}catch(B){let Q=B;if(Q instanceof Vi){let q=f(v,"transformErrorResponse");const{rawErrorResponseSchema:G,errorResponseSchema:$}=v;let{value:H,meta:V}=Q;try{G&&!mo(x,"rawErrorResponse")&&(H=await go(G,H,"rawErrorResponseSchema",V)),b&&!mo(x,"meta")&&(V=await go(b,V,"metaSchema",V));let K=await q(H,V,e.originalArgs);return $&&!mo(x,"errorResponse")&&(K=await go($,K,"errorResponseSchema",V)),o(K,vo({baseQueryMeta:V}))}catch(Z){Q=Z}}try{if(Q instanceof ho){const X={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:w?e.queryCacheKey:void 0};v.onSchemaFailure?.(Q,X),s?.(Q,X);const{catchSchemaFailure:J=c}=v;if(J)return o(J(Q,X),vo({baseQueryMeta:Q._bqMeta}))}}catch(ee){Q=ee}throw console.error(Q),Q}};function h(e,t){const n=a.selectQueryEntry(t,e.queryCacheKey),r=a.selectConfig(t).refetchOnMountOrArgChange,i=n?.fulfilledTimeStamp,o=e.forceRefetch??(e.subscribe&&r);return!!o&&(!0===o||(Number(new Date)-Number(i))/1e3>=o)}const m=()=>Rr(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){const t=n[e.endpointName];return vo({startedTimeStamp:Date.now(),...ao(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const r=t(),i=a.selectQueryEntry(r,e.queryCacheKey),o=i?.fulfilledTimeStamp,s=e.originalArgs,c=i?.originalArgs,l=n[e.endpointName],u=e.direction;return!(!po(e)&&("pending"===i?.status||!h(e,r)&&(!oo(l)||!l?.forceRefetch?.({currentArg:s,previousArg:c,endpointState:i,state:r}))&&o&&!u))},dispatchConditionRejection:!0}),g=m(),y=m();function v(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:g,mutationThunk:Rr(`${e}/executeMutation`,p,{getPendingMeta:()=>vo({startedTimeStamp:Date.now()})}),infiniteQueryThunk:y,prefetch:(e,t,n={})=>(r,o)=>{const a=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,c=(n=!0)=>{const r={forceRefetch:n,subscribe:!1};return i.endpoints[e].initiate(t,r)},l=i.endpoints[e].select(t)(o());if(a)r(c());else if(s){const e=l?.fulfilledTimeStamp;if(!e)return void r(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(c())}else r(c(!1))},updateQueryData:(e,t,n,r=!0)=>(o,a)=>{const s=i.endpoints[e].select(t)(a()),c={patches:[],inversePatches:[],undo:()=>o(i.util.patchQueryData(e,t,c.inversePatches,r))};if(s.status===Ai)return c;let l;if("data"in s)if(nn(s.data)){const[e,t,r]=ir(s.data,n);c.patches.push(...t),c.inversePatches.push(...r),l=e}else l=n(s.data),c.patches.push({op:"replace",path:[],value:l}),c.inversePatches.push({op:"replace",path:[],value:s.data});return 0===c.patches.length||o(i.util.patchQueryData(e,t,c.patches,r)),c},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[fo]:()=>({data:n})})),patchQueryData:(e,t,a,s)=>(c,l)=>{const u=n[e],d=r({queryArgs:t,endpointDefinition:u,endpointName:e});if(c(i.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!s)return;const f=i.endpoints[e].select(t)(l()),p=co(u.providesTags,f.data,void 0,t,{},o);c(i.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:jr(Sr(e),v(t)),matchFulfilled:jr(Dr(e),v(t)),matchRejected:jr(Er(e),v(t))}}}}({baseQuery:n,reducerPath:i,context:h,api:t,serializeQueryArgs:o,assertTagType:m,selectors:g,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:I,actions:A}=function({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:s},assertTagType:c,config:l}){const u=dr(`${e}/resetApiState`);function d(e,t,n,r){e[t.queryCacheKey]??={status:Ai,endpointName:t.endpointName},jo(e,t.queryCacheKey,e=>{e.status=Ti,e.requestId=n&&e.requestId?e.requestId:r.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=r.startedTimeStamp,ao(i[r.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function f(e,t,n,r){jo(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!r)return;const{merge:o}=i[t.arg.endpointName];if(e.status=Ci,o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:a,requestId:s}=t;let c=rr(e.data,e=>o(e,n,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:s}));e.data=c}else e.data=n;else e.data=i[t.arg.endpointName].structuralSharing??1?Ri(tn(e.data)?function(e){return tn(e)||Gt(15),e[qt].base_}(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const p=Br({name:`${e}/queries`,initialState:So,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:gr()},cacheEntriesUpserted:{reducer(e,t){for(const n of t.payload){const{queryDescription:r,value:i}=n;d(e,r,!0,{arg:r,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),f(e,{arg:r,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},i,!0)}},prepare:e=>{const t=e.map(e=>{const{endpointName:t,arg:n,value:o}=e,a=i[t];return{queryDescription:{type:no,endpointName:t,originalArgs:e.arg,queryCacheKey:r({queryArgs:n,endpointDefinition:a,endpointName:t})},value:o}});return{payload:t,meta:{[mr]:!0,requestId:Ar(),timestamp:Date.now()}}}},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){jo(e,t,e=>{e.data=or(e.data,n.concat())})},prepare:gr()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:n}})=>{d(e,n,po(n),t)}).addCase(t.fulfilled,(e,{meta:t,payload:n})=>{f(e,t,n,po(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:o})=>{jo(e,n.queryCacheKey,e=>{if(t);else{if(e.requestId!==r)return;e.status=Pi,e.error=o??i}})}).addMatcher(s,(e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))r?.status!==Ci&&r?.status!==Pi||(e[t]=r)})}}),h=Br({name:`${e}/mutations`,initialState:So,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Oo(t);n in e&&delete e[n]},prepare:gr()}},extraReducers(e){e.addCase(n.pending,(e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[Oo(t)]={requestId:n,status:Ti,endpointName:r.endpointName,startedTimeStamp:i})}).addCase(n.fulfilled,(e,{payload:t,meta:n})=>{n.arg.track&&No(e,n,e=>{e.requestId===n.requestId&&(e.status=Ci,e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)})}).addCase(n.rejected,(e,{payload:t,error:n,meta:r})=>{r.arg.track&&No(e,r,e=>{e.requestId===r.requestId&&(e.status=Pi,e.error=t??n)})}).addMatcher(s,(e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))r?.status!==Ci&&r?.status!==Pi||t===r?.requestId||(e[t]=r)})}}),m=Br({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:n,providedTags:r}of t.payload){g(e,n);for(const{type:t,id:i}of r){const r=(e.tags[t]??={})[i||"__internal_without_id"]??=[];r.includes(n)||r.push(n)}e.keys[n]=r}},prepare:gr()}},extraReducers(e){e.addCase(p.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{g(e,t)}).addMatcher(s,(e,t)=>{const{provided:n}=a(t);for(const[t,r]of Object.entries(n.tags??{}))for(const[i,o]of Object.entries(r)){const r=(e.tags[t]??={})[i||"__internal_without_id"]??=[];for(const t of o)r.includes(t)||r.push(t),e.keys[t]=n.keys[t]}}).addMatcher(Mr(Dr(t),kr(t)),(e,t)=>{y(e,[t])}).addMatcher(p.actions.cacheEntriesUpserted.match,(e,t)=>{const n=t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}}));y(e,n)})}});function g(e,t){const n=Mo(e.keys[t]??[]);for(const r of n){const n=r.type,i=r.id??"__internal_without_id",o=e.tags[n]?.[i];o&&(e.tags[n][i]=Mo(o).filter(e=>e!==t))}delete e.keys[t]}function y(e,t){const n=t.map(e=>{const t=wo(e,"providesTags",i,c),{queryCacheKey:n}=e.meta.arg;return{queryCacheKey:n,providedTags:t}});m.caseReducers.updateProvidedBy(e,m.actions.updateProvidedBy(n))}const v=Br({name:`${e}/subscriptions`,initialState:So,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),b=Br({name:`${e}/internalSubscriptions`,initialState:So,reducers:{subscriptionsUpdated:{reducer:(e,t)=>or(e,t.payload),prepare:gr()}}}),x=Br({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict"}},extraReducers:e=>{e.addCase(eo,e=>{e.online=!0}).addCase(to,e=>{e.online=!1}).addCase(Xi,e=>{e.focused=!0}).addCase(Ji,e=>{e.focused=!1}).addMatcher(s,e=>({...e}))}}),w=Ut({queries:p.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:b.reducer,config:x.reducer});return{reducer:(e,t)=>w(u.match(t)?void 0:e,t),actions:{...x.actions,...p.actions,...v.actions,...b.actions,...h.actions,...m.actions,resetApiState:u}}}({context:h,queryThunk:M,infiniteQueryThunk:j,mutationThunk:O,serializeQueryArgs:o,reducerPath:i,assertTagType:m,config:{refetchOnFocus:c,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:a,reducerPath:i,invalidationBehavior:u}});Po(t.util,{patchQueryData:N,updateQueryData:S,upsertQueryData:E,prefetch:k,resetApiState:A.resetApiState,upsertQueryEntries:A.cacheEntriesUpserted}),Po(t.internalActions,A);const T=new WeakMap,C=e=>Fi(T,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:P,buildInitiateInfiniteQuery:z,buildInitiateMutation:_,getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueriesThunk:U,getRunningQueryThunk:Y}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o,getInternalState:a}){const s=e=>a(e)?.runningQueries,c=e=>a(e)?.runningMutations,{unsubscribeQueryResult:l,removeMutationResult:u,updateSubscriptionOptions:d}=i.internalActions;return{buildInitiateQuery:function(e,t){return f(e,t)},buildInitiateInfiniteQuery:function(e,t){return f(e,t)},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:i}={})=>(o,a)=>{const s=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:i}),l=o(s),{requestId:d,abort:f,unwrap:p}=l,h=(m=e=>({error:e}),l.unwrap().then(e=>({data:e})).catch(m));var m;const g=Object.assign(h,{arg:l.arg,requestId:d,abort:f,unwrap:p,reset:()=>{o(u({requestId:d,fixedCacheKey:i}))}}),y=c(o);return y.set(d,g),g.then(()=>{y.delete(d)}),i&&(y.set(i,g),g.then(()=>{y.get(i)===g&&y.delete(i)})),g}},getRunningQueryThunk:function(t,n){return r=>{const i=uo(o,t),a=e({queryArgs:n,endpointDefinition:i,endpointName:t});return s(r)?.get(a)}},getRunningMutationThunk:function(e,t){return e=>c(e)?.get(t)},getRunningQueriesThunk:function(){return e=>Yi(s(e))},getRunningMutationsThunk:function(){return e=>Yi(c(e))}};function f(r,o){const a=(c,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:p,[fo]:h,...m}={})=>(g,y)=>{const v=e({queryArgs:c,endpointDefinition:o,endpointName:r});let b;const x={...m,type:no,subscribe:u,forceRefetch:f,subscriptionOptions:p,endpointName:r,originalArgs:c,queryCacheKey:v,[fo]:h};if(oo(o))b=t(x);else{const{direction:e,initialPageParam:t,refetchCachedPages:r}=m;b=n({...x,direction:e,initialPageParam:t,refetchCachedPages:r})}const w=i.endpoints[r].select(c),M=g(b),j=w(y()),{requestId:O,abort:N}=M,S=j.requestId!==O,E=s(g)?.get(v),k=()=>w(y()),D=Object.assign(h?M.then(k):S&&!E?Promise.resolve(j):Promise.all([E,M]).then(k),{arg:c,requestId:O,subscriptionOptions:p,queryCacheKey:v,abort:N,async unwrap(){const e=await D;if(e.isError)throw e.error;return e.data},refetch:e=>g(a(c,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){u&&g(l({queryCacheKey:v,requestId:O}))},updateSubscriptionOptions(e){D.subscriptionOptions=e,g(d({endpointName:r,requestId:O,queryCacheKey:v,options:e}))}});if(!E&&!S&&!h){const e=s(g);e.set(v,D),D.then(()=>{e.delete(v)})}return D};return a}}({queryThunk:M,mutationThunk:O,infiniteQueryThunk:j,api:t,serializeQueryArgs:o,context:h,getInternalState:C});Po(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueryThunk:Y,getRunningQueriesThunk:U});const{middleware:F,actions:W}=Wo({reducerPath:i,context:h,queryThunk:M,mutationThunk:O,infiniteQueryThunk:j,api:t,assertTagType:m,selectors:g,getRunningQueryThunk:Y,getInternalState:C});return Po(t.util,W),Po(t,{reducer:I,middleware:F}),{name:Bo,injectEndpoint(e,n){const r=t,i=r.endpoints[e]??={};oo(n)&&Po(i,{name:e,select:b(e,n),initiate:P(e,n)},D(M,e)),n.type===ro&&Po(i,{name:e,select:w(),initiate:_(e)},D(O,e)),ao(n)&&Po(i,{name:e,select:x(e,n),initiate:z(e,n)},D(M,e))}}}});function qo(e){return e.replace(e[0],e[0].toUpperCase())}function Go(e){return"infinitequery"===e.type}function $o(e,...t){return Object.assign(e,...t)}Qo();var Ho=Symbol();function Vo(e){const t=(0,a.useRef)(e),n=(0,a.useMemo)(()=>Ri(t.current,e),[e]);return(0,a.useEffect)(()=>{t.current!==n&&(t.current=n)},[n]),n}function Ko(e){const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{m(t.current,e)||(t.current=e)},[e]),m(t.current,e)?t.current:e}var Zo=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Xo=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Jo=(()=>Zo||Xo?a.useLayoutEffect:a.useEffect)(),ea=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:Ii.pending}:e;function ta(e,...t){const n={};return t.forEach(t=>{n[t]=e[t]}),n}var na=["data","status","isLoading","isSuccess","isError","error"];var ra=Symbol(),ia=Co(Qo(),(({batch:e=I,hooks:t={useDispatch:S,useSelector:D,useStore:O},createSelector:n=ki,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:ra,init(i,{serializeQueryArgs:o},s){const c=i,{buildQueryHooks:l,buildInfiniteQueryHooks:u,buildMutationHook:d,usePrefetch:f}=function({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:s},serializeQueryArgs:c,context:l}){const u=o?e=>e():a.useEffect,d=e=>e.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:function(r){const i=(e,t={})=>{const[n]=g(r,e,t);return v(n),(0,a.useMemo)(()=>({refetch:()=>function(e){if(!e.current)throw new Error(wi(38));return e.current.refetch()}(n)}),[n])},o=({refetchOnReconnect:i,refetchOnFocus:o,pollingInterval:s=0,skipPollingIfUnfocused:c=!1}={})=>{const{initiate:l}=e.endpoints[r],f=n(),[p,h]=(0,a.useState)(Ho),m=(0,a.useRef)(void 0),g=Ko({refetchOnReconnect:i,refetchOnFocus:o,pollingInterval:s,skipPollingIfUnfocused:c});u(()=>{const e=m.current?.subscriptionOptions;g!==e&&m.current?.updateSubscriptionOptions(g)},[g]);const y=(0,a.useRef)(g);u(()=>{y.current=g},[g]);const v=(0,a.useCallback)(function(e,n=!1){let r;return t(()=>{d(m),m.current=r=f(l(e,{subscriptionOptions:y.current,forceRefetch:!n})),h(e)}),r},[f,l]),b=(0,a.useCallback)(()=>{m.current?.queryCacheKey&&f(e.internalActions.removeQueryResult({queryCacheKey:m.current?.queryCacheKey}))},[f]);return(0,a.useEffect)(()=>()=>{d(m)},[]),(0,a.useEffect)(()=>{p===Ho||m.current||v(p,!0)},[p,v]),(0,a.useMemo)(()=>[v,p,{reset:b}],[v,p,b])},s=y(r,p);return{useQueryState:s,useQuerySubscription:i,useLazyQuerySubscription:o,useLazyQuery(e){const[t,n,{reset:r}]=o(e),i=s(n,{...e,skip:n===Ho}),c=(0,a.useMemo)(()=>({lastArg:n}),[n]);return(0,a.useMemo)(()=>[t,{...i,reset:r},c],[t,i,r,c])},useQuery(e,t){const n=i(e,t),r=s(e,{selectFromResult:e===Eo||t?.skip?void 0:ea,...t}),o=ta(r,...na);return(0,a.useDebugValue)(o),(0,a.useMemo)(()=>({...r,...n}),[r,n])}}},buildInfiniteQueryHooks:function(e){const n=(n,r={})=>{const[i,o,s,c]=g(e,n,r),l=(0,a.useRef)(c);u(()=>{l.current=c},[c]);const f=Ko(r.refetchCachedPages),p=(0,a.useCallback)(function(e,n){let r;return t(()=>{d(i),i.current=r=o(s(e,{subscriptionOptions:l.current,direction:n}))}),r},[i,o,s]);v(i);const h=Vo(r.skip?Eo:n),m=(0,a.useCallback)(e=>{if(!i.current)throw new Error(wi(38));const t={refetchCachedPages:e?.refetchCachedPages??f};return i.current.refetch(t)},[i,f]);return(0,a.useMemo)(()=>({trigger:p,refetch:m,fetchNextPage:()=>p(h,"forward"),fetchPreviousPage:()=>p(h,"backward")}),[m,p,h])},r=y(e,h);return{useInfiniteQueryState:r,useInfiniteQuerySubscription:n,useInfiniteQuery(e,t){const{refetch:i,fetchNextPage:o,fetchPreviousPage:s}=n(e,t),c=r(e,{selectFromResult:e===Eo||t?.skip?void 0:ea,...t}),l=ta(c,...na,"hasNextPage","hasPreviousPage");return(0,a.useDebugValue)(l),(0,a.useMemo)(()=>({...c,fetchNextPage:o,fetchPreviousPage:s,refetch:i}),[c,o,s,i])}}},buildMutationHook:function(i){return({selectFromResult:o,fixedCacheKey:c}={})=>{const{select:l,initiate:u}=e.endpoints[i],d=n(),[f,p]=(0,a.useState)();(0,a.useEffect)(()=>()=>{f?.arg.fixedCacheKey||f?.reset()},[f]);const h=(0,a.useCallback)(function(e){const t=d(u(e,{fixedCacheKey:c}));return p(t),t},[d,u,c]),{requestId:g}=f||{},y=(0,a.useMemo)(()=>l({fixedCacheKey:c,requestId:f?.requestId}),[c,f,l]),v=(0,a.useMemo)(()=>o?s([y],o):y,[o,y]),b=r(v,m),x=null==c?f?.arg.originalArgs:void 0,w=(0,a.useCallback)(()=>{t(()=>{f&&p(void 0),c&&d(e.internalActions.removeMutationResult({requestId:g,fixedCacheKey:c}))})},[d,c,f,g]),M=ta(b,...na,"endpointName");(0,a.useDebugValue)(M);const j=(0,a.useMemo)(()=>({...b,originalArgs:x,reset:w}),[b,x,w]);return(0,a.useMemo)(()=>[h,j],[h,j])}},usePrefetch:function(t,r){const i=n(),o=Ko(r);return(0,a.useCallback)((n,r)=>i(e.util.prefetch(t,n,{...o,...r})),[t,i,o])}};function p(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Eo&&c({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===c({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,o=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!i&&o,s=e.isSuccess||i&&(o&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:o,isLoading:a,isSuccess:s}}function h(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Eo&&c({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===c({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,o=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!i&&o,s=e.isSuccess||i&&(o&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:o,isLoading:a,isSuccess:s}}function g(t,r,{refetchOnReconnect:i,refetchOnFocus:o,refetchOnMountOrArgChange:s,skip:c=!1,pollingInterval:l=0,skipPollingIfUnfocused:d=!1,...p}={}){const{initiate:h}=e.endpoints[t],m=n(),g=(0,a.useRef)(void 0);if(!g.current){const t=m(e.internalActions.internal_getRTKQSubscriptions());g.current=t}const y=Vo(c?Eo:r),v=Ko({refetchOnReconnect:i,refetchOnFocus:o,pollingInterval:l,skipPollingIfUnfocused:d}),b=Ko(p.initialPageParam),x=Ko(p.refetchCachedPages),w=(0,a.useRef)(void 0);let{queryCacheKey:M,requestId:j}=w.current||{},O=!1;M&&j&&(O=g.current.isRequestSubscribed(M,j));const N=!O&&void 0!==w.current;return u(()=>{N&&(w.current=void 0)},[N]),u(()=>{const e=w.current;if(y===Eo)return e?.unsubscribe(),void(w.current=void 0);const n=w.current?.subscriptionOptions;if(e&&e.arg===y)v!==n&&e.updateSubscriptionOptions(v);else{e?.unsubscribe();const n=m(h(y,{subscriptionOptions:v,forceRefetch:s,...Go(f[t])?{initialPageParam:b,refetchCachedPages:x}:{}}));w.current=n}},[m,h,s,y,v,N,b,x,t]),[w,m,h,v]}function y(t,n){return(o,{skip:c=!1,selectFromResult:l}={})=>{const{select:u}=e.endpoints[t],d=Vo(c?Eo:o),f=(0,a.useRef)(void 0),p=(0,a.useMemo)(()=>s([u(d),(e,t)=>t,e=>d],n,{memoizeOptions:{resultEqualityCheck:m}}),[u,d]),h=(0,a.useMemo)(()=>l?s([p],l,{devModeChecks:{identityFunctionCheck:"never"}}):p,[p,l]),g=r(e=>h(e,f.current),m),y=i(),v=p(y.getState(),f.current);return Jo(()=>{f.current=v},[v]),g}}function v(e){(0,a.useEffect)(()=>()=>{d(e),e.current=void 0},[e])}}({api:i,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:o,context:s});return $o(c,{usePrefetch:f}),$o(s,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:a}=l(e);$o(c.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:a}),i[`use${qo(e)}Query`]=t,i[`useLazy${qo(e)}Query`]=n}if("mutation"===t.type){const t=d(e);$o(c.endpoints[e],{useMutation:t}),i[`use${qo(e)}Mutation`]=t}else if(Go(t)){const{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}=u(e);$o(c.endpoints[e],{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}),i[`use${qo(e)}InfiniteQuery`]=t}}}}}))());const oa=function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=qi,paramsSerializer:r,isJsonContentType:i=$i,jsonContentType:o="application/json",jsonReplacer:a,timeout:s,responseHandler:c,validateStatus:l,...u}={}){return"undefined"==typeof fetch&&n===qi&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p,h)=>{const{getState:m,extra:g,endpoint:y,forced:v,type:b}=p;let x,{url:w,headers:M=new Headers(u.headers),params:j,responseHandler:O=c??"json",validateStatus:N=l??Gi,timeout:S=s,...E}="string"==typeof f?{url:f}:f,k={...u,signal:S?Qi(p.signal,Bi(S)):p.signal,...E};M=new Headers(Hi(M)),k.headers=await t(M,{getState:m,arg:f,extra:g,endpoint:y,forced:v,type:b,extraOptions:h})||M;const D="object"==typeof(I=k.body)&&(Rt(I)||Array.isArray(I)||"function"==typeof I.toJSON);var I;if(null==k.body||D||"string"==typeof k.body||k.headers.delete("content-type"),!k.headers.has("content-type")&&D&&k.headers.set("content-type",o),D&&i(k.headers)&&(k.body=JSON.stringify(k.body,a)),k.headers.has("accept")||("json"===O?k.headers.set("accept","application/json"):"text"===O&&k.headers.set("accept","text/plain, text/html, */*")),j){const e=~w.indexOf("?")?"&":"?";w+=e+(r?r(j):new URLSearchParams(Hi(j)))}w=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}(e,w);const A=new Request(w,k);let T;x={request:new Request(w,k)};try{T=await n(A)}catch(e){return{error:{status:(e instanceof Error||"undefined"!=typeof DOMException&&e instanceof DOMException)&&"TimeoutError"===e.name?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:x}}const C=T.clone();let P;x.response=C;let z="";try{let e;if(await Promise.all([d(T,O).then(e=>P=e,t=>e=t),C.text().then(e=>z=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:T.status,data:z,error:String(e)},meta:x}}return N(T,P)?{data:P,meta:x}:{error:{status:T.status,data:P},meta:x}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}({baseUrl:DISCO.json_url+"/analytics",prepareHeaders:e=>{e.set("X-WP-Nonce",DISCO.rest_nonce)}}),aa=ia({reducerPath:"analyticsApi",baseQuery:(e,t,n)=>{if(e&&"object"==typeof e&&e.params){const{params:t,url:n,...r}=e,i=Object.fromEntries(Object.entries(t).filter(([,e])=>void 0!==e)),o=new URLSearchParams(i).toString(),a=DISCO.is_pretty_url?"?":"&";e={...r,url:o?`${n}${a}${o}`:n}}return oa(e,t,n)},endpoints:()=>({})}),sa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ca(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const la={date:ca({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ca({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ca({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ua={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function da(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const fa={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:da({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:da({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:da({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:da({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:da({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function pa(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let l;return l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l,{value:l,rest:t.slice(a.length)}}}const ha={ordinalNumber:(ma={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(ma.matchPattern);if(!n)return null;const r=n[0],i=e.match(ma.parsePattern);if(!i)return null;let o=ma.valueCallback?ma.valueCallback(i[0]):i[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:pa({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:pa({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:pa({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:pa({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:pa({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var ma;const ga={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=sa[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:la,formatRelative:(e,t,n,r)=>ua[e],localize:fa,match:ha,options:{weekStartsOn:0,firstWeekContainsDate:1}};let ya={};function va(){return ya}Math.pow(10,8);const ba=6048e5,xa=Symbol.for("constructDateFrom");function wa(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xa in e?e[xa](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ma(e,t){return wa(t||e,e)}function ja(e){const t=Ma(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Oa(e,...t){const n=wa.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Na(e,t){const n=Ma(e,t?.in);return n.setHours(0,0,0,0),n}function Sa(e,t,n){const[r,i]=Oa(n?.in,e,t),o=Na(r),a=Na(i),s=+o-ja(o),c=+a-ja(a);return Math.round((s-c)/864e5)}function Ea(e,t){const n=Ma(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ka(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ma(e,t?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Da(e,t){return ka(e,{...t,weekStartsOn:1})}function Ia(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),i=wa(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Da(i),a=wa(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Da(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Aa(e,t){const n=Ma(e,t?.in),r=+Da(n)-+function(e,t){const n=Ia(e,t),r=wa(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Da(r)}(n);return Math.round(r/ba)+1}function Ta(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),i=va(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=wa(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ka(a,t),c=wa(t?.in||e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const l=ka(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function Ca(e,t){const n=Ma(e,t?.in),r=+ka(n,t)-+function(e,t){const n=va(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ta(e,t),o=wa(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ka(o,t)}(n,t);return Math.round(r/ba)+1}function Pa(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const za={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Pa("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Pa(n+1,2)},d:(e,t)=>Pa(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Pa(e.getHours()%12||12,t.length),H:(e,t)=>Pa(e.getHours(),t.length),m:(e,t)=>Pa(e.getMinutes(),t.length),s:(e,t)=>Pa(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Pa(Math.trunc(r*Math.pow(10,n-3)),t.length)}},_a={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return za.y(e,t)},Y:function(e,t,n,r){const i=Ta(e,r),o=i>0?i:1-i;return"YY"===t?Pa(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Pa(o,t.length)},R:function(e,t){return Pa(Ia(e),t.length)},u:function(e,t){return Pa(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Pa(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Pa(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return za.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Pa(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Ca(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Pa(i,t.length)},I:function(e,t,n){const r=Aa(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Pa(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):za.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Ma(e,t?.in);return Sa(n,Ea(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Pa(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Pa(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Pa(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Pa(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return za.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):za.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Pa(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Pa(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):za.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):za.s(e,t)},S:function(e,t){return za.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return La(r);case"XXXX":case"XX":return Ua(r);default:return Ua(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return La(r);case"xxxx":case"xx":return Ua(r);default:return Ua(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ra(r,":");default:return"GMT"+Ua(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ra(r,":");default:return"GMT"+Ua(r,":")}},t:function(e,t,n){return Pa(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Pa(+e,t.length)}};function Ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+Pa(o,2)}function La(e,t){return e%60==0?(e>0?"-":"+")+Pa(Math.abs(e)/60,2):Ua(e,t)}function Ua(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Pa(Math.trunc(r/60),2)+t+Pa(r%60,2)}const Ya=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Fa=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Wa={p:Fa,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ya(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Ya(r,t)).replace("{{time}}",Fa(i,t))}},Ba=/^D+$/,Qa=/^Y+$/,qa=["D","DD","YY","YYYY"];function Ga(e){return Ba.test(e)}function $a(e){return Qa.test(e)}function Ha(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),qa.includes(e))throw new RangeError(r)}function Va(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Ka(e){return!(!Va(e)&&"number"!=typeof e||isNaN(+Ma(e)))}const Za=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ja=/^'([^]*?)'?$/,es=/''/g,ts=/[a-zA-Z]/;function ns(e,t,n){const r=va(),i=n?.locale??r.locale??ga,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ma(e,n?.in);if(!Ka(s))throw new RangeError("Invalid time value");let c=t.match(Xa).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Wa[t])(e,i.formatLong):e}).join("").match(Za).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:rs(e)};if(_a[t])return{isToken:!0,value:e};if(t.match(ts))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return c.map(r=>{if(!r.isToken)return r.value;const o=r.value;return(!n?.useAdditionalWeekYearTokens&&$a(o)||!n?.useAdditionalDayOfYearTokens&&Ga(o))&&Ha(o,t,String(e)),(0,_a[o[0]])(s,o,i.localize,l)}).join("")}function rs(e){const t=e.match(Ja);return t?t[1].replace(es,"'"):e}function is(e,t,n){const r=Ma(e,n?.in);return isNaN(t)?wa(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function os(e){return ns(e,"yyyy-MM-dd")}const as=new Date,ss={startDate:os(function(e,t,n){return is(e,-t,n)}(as,27)),endDate:os(as)},cs=Br({name:"dateRange",initialState:ss,reducers:{setDateRange(e,t){e.startDate=t.payload.startDate,e.endDate=t.payload.endDate}}}),{setDateRange:ls}=cs.actions,us=e=>e.dateRange,ds=ki([us],e=>({date_from:e.startDate,date_to:e.endDate})),fs=cs.reducer,ps=br({reducer:{[aa.reducerPath]:aa.reducer,dateRange:fs},middleware:e=>e().concat(aa.middleware)},Wt());function hs(){return"undefined"!=typeof window}function ms(e){return vs(e)?(e.nodeName||"").toLowerCase():"#document"}function gs(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ys(e){var t;return null==(t=(vs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function vs(e){return!!hs()&&(e instanceof Node||e instanceof gs(e).Node)}function bs(e){return!!hs()&&(e instanceof Element||e instanceof gs(e).Element)}function xs(e){return!!hs()&&(e instanceof HTMLElement||e instanceof gs(e).HTMLElement)}function ws(e){return!(!hs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gs(e).ShadowRoot)}function Ms(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function js(e){return/^(table|td|th)$/.test(ms(e))}function Os(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Ns=/transform|translate|scale|rotate|perspective|filter/,Ss=/paint|layout|strict|content/,Es=e=>!!e&&"none"!==e;let ks;function Ds(e){const t=bs(e)?Ts(e):e;return Es(t.transform)||Es(t.translate)||Es(t.scale)||Es(t.rotate)||Es(t.perspective)||!Is()&&(Es(t.backdropFilter)||Es(t.filter))||Ns.test(t.willChange||"")||Ss.test(t.contain||"")}function Is(){return null==ks&&(ks="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ks}function As(e){return/^(html|body|#document)$/.test(ms(e))}function Ts(e){return gs(e).getComputedStyle(e)}function Cs(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ps(e){if("html"===ms(e))return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||ys(e);return ws(t)?t.host:t}function zs(e){const t=Ps(e);return As(t)?(e.ownerDocument||e).body:xs(t)&&Ms(t)?t:zs(t)}function _s(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=zs(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=gs(i);if(o){const e=Rs(a);return t.concat(a,a.visualViewport||[],Ms(i)?i:[],e&&n?_s(e):[])}return t.concat(i,_s(i,[],n))}function Rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ls={...s},Us={};function Ys(e,t){const n=a.useRef(Us);return n.current===Us&&(n.current=e(t)),n}const Fs=Ls.useInsertionEffect,Ws=Fs&&Fs!==Ls.useLayoutEffect?Fs:e=>e();function Bs(e){const t=Ys(Qs).current;return t.next=e,Ws(t.effect),t.trampoline}function Qs(){const e={next:void 0,callback:qs,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function qs(){}const Gs="undefined"!=typeof document?a.useLayoutEffect:()=>{};function $s(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Hs={};function Vs(e,t,n,r,i){if(!(n||r||i||e))return Ks(t);let o=Ks(e);return t&&(o=Zs(o,t)),n&&(o=Zs(o,n)),r&&(o=Zs(o,r)),i&&(o=Zs(o,i)),o}function Ks(e){return Js(e)?{...ec(e,Hs)}:function(e){const t={...e};for(const e in t){const n=t[e];Xs(e,n)&&(t[e]=nc(n))}return t}(e)}function Zs(e,t){return Js(t)?ec(t,e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=$s(e.style,r);break;case"className":e[n]=ic(e.className,r);break;default:Xs(n,r)?e[n]=tc(e[n],r):e[n]=r}}return e}(e,t)}function Xs(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return 111===n&&110===r&&i>=65&&i<=90&&("function"==typeof t||void 0===t)}function Js(e){return"function"==typeof e}function ec(e,t){return Js(e)?e(t):e??Hs}function tc(e,t){return t?e?(...n)=>{const r=n[0];if(oc(r)){const i=r;rc(i);const o=t(...n);return i.baseUIHandlerPrevented||e?.(...n),o}const i=t(...n);return e?.(...n),i}:nc(t):e}function nc(e){return e?(...t)=>{const n=t[0];return oc(n)&&rc(n),e(...t)}:e}function rc(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ic(e,t){return t?e?t+" "+e:t:e}function oc(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}const ac=function(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`};const sc=ac,cc=a.createContext(void 0);function lc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:o}=e,s=a.useRef(null),c=function(e=!1){const t=a.useContext(cc);if(void 0===t&&!e)throw new Error(sc(16));return t}(!0),l=o??void 0!==c,{props:u}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,s=r&&!1!==t,c=r&&!1===t;return{props:a.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=i,!o&&n&&(e.tabIndex=t?i:-1)),(o&&(t||s)||!o&&n)&&(e["aria-disabled"]=n),!o||t&&!c||(e.disabled=n),e},[r,n,t,s,c,o,i])}}({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=a.useCallback(()=>{const e=s.current;uc(e)&&l&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return Gs(d,[d]),{getButtonProps:a.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:o,onKeyDown:a,onPointerDown:s,...c}=e;return Vs({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(rc(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,o=e.currentTarget,s=uc(o),c=!i&&(u=o,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(i?s:!c),f="Enter"===e.key,p=" "===e.key,h=o.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&l&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(c||i&&s?(o.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(i||!p&&!f||e.preventDefault(),!i&&f&&n?.(e))},onKeyUp(e){t||(rc(e),o?.(e),e.target===e.currentTarget&&i&&l&&uc(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||l||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:"button"}:{role:"button"},u,c)},[t,u,l,i]),buttonRef:Bs(e=>{s.current=e,d()})}}function uc(e){return xs(e)&&"BUTTON"===e.tagName}function dc(e,t,n,r){const i=Ys(fc).current;return function(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}(i,e,t,n,r)&&pc(i,[e,t,n,r]),i.callback}function fc(){return{callback:null,cleanup:null,refs:[]}}function pc(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const i=t[e];if(null!=i)switch(typeof i){case"function":{const t=i(n);"function"==typeof t&&(r[e]=t);break}case"object":i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const hc=parseInt(a.version,10);function mc(e){return hc>=e}function gc(e){if(!a.isValidElement(e))return null;const t=e,n=t.props;return(mc(19)?n?.ref:t.ref)??null}function yc(){}Object.freeze([]);const vc=Object.freeze({});function bc(e,t,n={}){const r=t.render,i=function(e,t={}){const{className:n,style:r,render:i}=e,{state:o=vc,ref:a,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?function(e,t){return"function"==typeof e?e(t):e}(n,o):void 0,d=l?function(e,t){return"function"==typeof e?e(t):e}(r,o):void 0,f=l?function(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const e=t[r](i);null!=e&&Object.assign(n,e);continue}!0===i?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}(o,c):vc,p=l&&s?function(e){return Array.isArray(e)?function(e){if(0===e.length)return Hs;if(1===e.length)return Ks(e[0]);let t=Ks(e[0]);for(let n=1;n<e.length;n+=1)t=Zs(t,e[n]);return t}(e):Vs(void 0,e)}(s):void 0,h=l?$s(f,p)??{}:vc;return"undefined"!=typeof document&&(l?Array.isArray(a)?h.ref=function(e){const t=Ys(fc).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&pc(t,e),t.callback}([h.ref,gc(i),...a]):h.ref=dc(h.ref,gc(i),a):dc(null,null)),l?(void 0!==u&&(h.className=ic(h.className,u)),void 0!==d&&(h.style=$s(h.style,d)),h):vc}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);const e=Vs(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===xc&&(i=a.Children.toArray(t)[0]),a.cloneElement(i,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?(0,a.createElement)("button",{type:"button",...t,key:t.key}):"img"===e?(0,a.createElement)("img",{alt:"",...t,key:t.key}):a.createElement(e,t)}(e,n);throw new Error(sc(8))}(e,r,i,n.state??vc)}const xc=Symbol.for("react.lazy"),wc=a.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=lc({disabled:i,focusableWhenDisabled:o,native:a});return bc("button",e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Mc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Mc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jc(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Mc(e))&&(r&&(r+=" "),r+=t);return r}const Oc=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Nc=jc,Sc=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Nc(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const a=Oc(t)||Oc(r);return i[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),c=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]);return Nc(e,a,c,null==n?void 0:n.class,null==n?void 0:n.className)},Ec=e=>{const t=Ac(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),kc(n,t)||Ic(e)},getConflictingClassGroupIds:(e,t)=>{const i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},kc=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?kc(e.slice(1),r):void 0;if(i)return i;if(0===t.validators.length)return;const o=e.join("-");return t.validators.find(({validator:e})=>e(o))?.classGroupId},Dc=/^\[(.+)\]$/,Ic=e=>{if(Dc.test(e)){const t=Dc.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ac=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zc(Object.entries(e.classGroups),n).forEach(([e,n])=>{Tc(n,r,e,t)}),r},Tc=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?Pc(e)?void Tc(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,i])=>{Tc(i,Cc(t,e),n,r)});(""===e?t:Cc(t,e)).classGroupId=n})},Cc=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Pc=e=>e.isThemeGetter,zc=(e,t)=>t?e.map(([e,n])=>{const r=n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e);return[e,r]}):e,_c=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(i(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},Rc=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,i=t[0],o=t.length,a=e=>{const n=[];let a,s=0,c=0;for(let l=0;l<e.length;l++){let u=e[l];if(0===s){if(u===i&&(r||e.slice(l,l+o)===t)){n.push(e.slice(c,l)),c=l+o;continue}if("/"===u){a=l;continue}}"["===u?s++:"]"===u&&s--}const l=0===n.length?e:e.substring(c),u=l.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:a&&a>c?a-c:void 0}};return n?e=>n({className:e,parseClassName:a}):a},Lc=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Uc=/\s+/;function Yc(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Fc(e))&&(r&&(r+=" "),r+=t);return r}const Fc=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Wc(e,...t){let n,r,i,o=function(s){const c=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:_c(e.cacheSize),parseClassName:Rc(e),...Ec(e)}))(c),r=n.cache.get,i=n.cache.set,o=a,a(s)};function a(e){const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(Uc);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=Lc(c).join(":"),m=l?h+"!":h,g=m+p;if(o.includes(g))continue;o.push(g);const y=i(p,f);for(let e=0;e<y.length;++e){const t=y[e];o.push(m+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return i(e,o),o}return function(){return o(Yc.apply(null,arguments))}}const Bc=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Qc=/^\[(?:([a-z-]+):)?(.+)\]$/i,qc=/^\d+\/\d+$/,Gc=new Set(["px","full","screen"]),$c=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Vc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xc=e=>el(e)||Gc.has(e)||qc.test(e),Jc=e=>pl(e,"length",hl),el=e=>Boolean(e)&&!Number.isNaN(Number(e)),tl=e=>pl(e,"number",el),nl=e=>Boolean(e)&&Number.isInteger(Number(e)),rl=e=>e.endsWith("%")&&el(e.slice(0,-1)),il=e=>Qc.test(e),ol=e=>$c.test(e),al=new Set(["length","size","percentage"]),sl=e=>pl(e,al,ml),cl=e=>pl(e,"position",ml),ll=new Set(["image","url"]),ul=e=>pl(e,ll,yl),dl=e=>pl(e,"",gl),fl=()=>!0,pl=(e,t,n)=>{const r=Qc.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},hl=e=>Hc.test(e)&&!Vc.test(e),ml=()=>!1,gl=e=>Kc.test(e),yl=e=>Zc.test(e),vl=Wc((Symbol.toStringTag,()=>{const e=Bc("colors"),t=Bc("spacing"),n=Bc("blur"),r=Bc("brightness"),i=Bc("borderColor"),o=Bc("borderRadius"),a=Bc("borderSpacing"),s=Bc("borderWidth"),c=Bc("contrast"),l=Bc("grayscale"),u=Bc("hueRotate"),d=Bc("invert"),f=Bc("gap"),p=Bc("gradientColorStops"),h=Bc("gradientColorStopPositions"),m=Bc("inset"),g=Bc("margin"),y=Bc("opacity"),v=Bc("padding"),b=Bc("saturate"),x=Bc("scale"),w=Bc("sepia"),M=Bc("skew"),j=Bc("space"),O=Bc("translate"),N=()=>["auto",il,t],S=()=>[il,t],E=()=>["",Xc,Jc],k=()=>["auto",el,il],D=()=>["","0",il],I=()=>[el,il];return{cacheSize:500,separator:":",theme:{colors:[fl],spacing:[Xc,Jc],blur:["none","",ol,il],brightness:I(),borderColor:[e],borderRadius:["none","","full",ol,il],borderSpacing:S(),borderWidth:E(),contrast:I(),grayscale:D(),hueRotate:I(),invert:D(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[rl,Jc],inset:N(),margin:N(),opacity:I(),padding:S(),saturate:I(),scale:I(),sepia:D(),skew:I(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",il]}],container:["container"],columns:[{columns:[ol]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",il]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nl,il]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",il]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",nl,il]}],"grid-cols":[{"grid-cols":[fl]}],"col-start-end":[{col:["auto",{span:["full",nl,il]},il]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[fl]}],"row-start-end":[{row:["auto",{span:[nl,il]},il]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",il]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",il]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",il,t]}],"min-w":[{"min-w":[il,t,"min","max","fit"]}],"max-w":[{"max-w":[il,t,"none","full","min","max","fit","prose",{screen:[ol]},ol]}],h:[{h:[il,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[il,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[il,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[il,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ol,Jc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tl]}],"font-family":[{font:[fl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",il]}],"line-clamp":[{"line-clamp":["none",el,tl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xc,il]}],"list-image":[{"list-image":["none",il]}],"list-style-type":[{list:["none","disc","decimal",il]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xc,Jc]}],"underline-offset":[{"underline-offset":["auto",Xc,il]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",il]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",il]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",cl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sl]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ul]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Xc,il]}],"outline-w":[{outline:[Xc,Jc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Xc,Jc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ol,dl]}],"shadow-color":[{shadow:[fl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ol,il]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",il]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",il]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",il]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[nl,il]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",il]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",il]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",il]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xc,Jc,tl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function bl(...e){return vl(jc(e))}function xl(e){return DISCO.base_currency+Number(e).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function wl(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—"}function Ml(e,t){const n=new Date(e+"T00:00:00"),r={month:"short",day:"numeric",year:"numeric"};if("week"===t){const e=new Date(n);return e.setDate(e.getDate()+6),`${n.toLocaleDateString("en-US",r)} - ${e.toLocaleDateString("en-US",r)}`}if("month"===t){const e=new Date(n.getFullYear(),n.getMonth()+1,0);return`${n.toLocaleDateString("en-US",r)} - ${e.toLocaleDateString("en-US",r)}`}return n.toLocaleDateString("en-US",r)}function jl(e,t){return e.length>t?e.slice(0,t)+"...":e}function Ol(e){return e.sort((e,t)=>"Unknown"===e?.name?1:"Unknown"===t?.name?-1:0)}const Nl=window.ReactJSXRuntime,Sl=Sc("disco-group/button disco-inline-flex disco-shrink-0 disco-items-center disco-justify-center disco-rounded-lg disco-border disco-border-transparent disco-bg-clip-padding disco-text-sm disco-font-medium disco-whitespace-nowrap disco-transition-all disco-outline-none disco-select-none focus-visible:disco-border-ring focus-visible:disco-ring-3 focus-visible:disco-ring-ring/50 active:not-aria-[haspopup]:disco-translate-y-px disabled:disco-pointer-events-none disabled:disco-opacity-50 aria-invalid:disco-border-destructive aria-invalid:disco-ring-3 aria-invalid:disco-ring-destructive/20 dark:aria-invalid:disco-border-destructive/50 dark:aria-invalid:disco-ring-destructive/40 [&_svg]:disco-pointer-events-none [&_svg]:disco-shrink-0 [&_svg:not([class*=size-])]:disco-size-4",{variants:{variant:{default:"disco-bg-primary disco-text-primary-foreground [a]:hover:disco-bg-primary/80",outline:"disco-border-border disco-bg-background hover:disco-bg-muted hover:disco-text-foreground aria-expanded:disco-bg-muted aria-expanded:disco-text-foreground dark:disco-border-input dark:disco-bg-input/30 dark:hover:disco-bg-input/50",secondary:"disco-bg-secondary disco-text-secondary-foreground hover:disco-bg-secondary/80 aria-expanded:disco-bg-secondary aria-expanded:disco-text-secondary-foreground",ghost:"hover:disco-bg-muted hover:disco-text-foreground aria-expanded:disco-bg-muted aria-expanded:disco-text-foreground dark:hover:disco-bg-muted/50",destructive:"disco-bg-destructive/10 disco-text-destructive hover:disco-bg-destructive/20 focus-visible:disco-border-destructive/40 focus-visible:disco-ring-destructive/20 dark:disco-bg-destructive/20 dark:hover:disco-bg-destructive/30 dark:focus-visible:disco-ring-destructive/40",link:"disco-text-primary disco-underline-offset-4 hover:disco-underline"},size:{default:"disco-h-8 disco-gap-1.5 disco-px-2.5 has-data-[icon=inline-end]:disco-pr-2 has-data-[icon=inline-start]:disco-pl-2",xs:"disco-h-6 disco-gap-1 disco-rounded-[min(var(--radius-md),10px)] disco-px-2 disco-text-xs in-data-[slot=button-group]:disco-rounded-lg has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 [&_svg:not([class*=size-])]:disco-size-3",sm:"disco-h-7 disco-gap-1 disco-rounded-[min(var(--radius-md),12px)] disco-px-2.5 disco-text-[0.8rem] in-data-[slot=button-group]:disco-rounded-lg has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 [&_svg:not([class*=size-])]:disco-size-3.5",lg:"disco-h-9 disco-gap-1.5 disco-px-2.5 has-data-[icon=inline-end]:disco-pr-2 has-data-[icon=inline-start]:disco-pl-2",icon:"disco-size-8","icon-xs":"disco-size-6 disco-rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:disco-rounded-lg [&_svg:not([class*=size-])]:disco-size-3","icon-sm":"disco-size-7 disco-rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:disco-rounded-lg","icon-lg":"disco-size-9"}},defaultVariants:{variant:"default",size:"default"}});function El({className:e,variant:t="default",size:n="default",...r}){return(0,Nl.jsx)(wc,{"data-slot":"button",className:bl(Sl({variant:t,size:n,className:e})),...r})}function kl(e){return bc(e.defaultTagName??"div",e,e)}const Dl=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Il=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Al=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Tl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Cl=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Pl=(0,a.createContext)({}),zl=(0,a.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...c},l)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:h=""}=(0,a.useContext)(Pl)??{},m=r??f?24*Number(n??d)/Number(t??u):n??d;return(0,a.createElement)("svg",{ref:l,...Tl,width:t??u??Tl.width,height:t??u??Tl.height,stroke:e??p,strokeWidth:m,className:Dl("lucide",h,i),...!o&&!Cl(c)&&{"aria-hidden":"true"},...c},[...s.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(o)?o:[o]])}),_l=(e,t)=>{const n=(0,a.forwardRef)(({className:n,...r},i)=>(0,a.createElement)(zl,{ref:i,iconNode:t,className:Dl(`lucide-${Il(Al(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Al(e),n},Rl=_l("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);function Ll({className:e,...t}){return(0,Nl.jsx)("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:bl(e),...t})}function Ul({className:e,...t}){return(0,Nl.jsx)("ol",{"data-slot":"breadcrumb-list",className:bl("disco-flex disco-flex-wrap disco-items-center disco-gap-1.5 disco-text-sm disco-wrap-break-word disco-text-muted-foreground",e),...t})}function Yl({className:e,...t}){return(0,Nl.jsx)("li",{"data-slot":"breadcrumb-item",className:bl("disco-inline-flex disco-items-center disco-gap-1",e),...t})}function Fl({className:e,render:t,...n}){return kl({defaultTagName:"a",props:Vs({className:bl("transition-colors hover:text-foreground",e)},n),render:t,state:{slot:"breadcrumb-link"}})}function Wl({className:e,...t}){return(0,Nl.jsx)("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:bl("disco-font-normal disco-text-foreground",e),...t})}function Bl({children:e,className:t,...n}){return(0,Nl.jsx)("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:bl("[&>svg]:disco-size-3.5",t),...n,children:e??(0,Nl.jsx)(Rl,{})})}const Ql=aa.injectEndpoints({endpoints:e=>({getCampaigns:e.query({query:({date_from:e,date_to:t,search:n,customer_id:r,sort_by:i="revenue",order:o="desc",page:a=1,limit:s=10}={})=>({url:"/campaigns",params:{date_from:e,date_to:t,search:n,customer_id:r,sort_by:i,order:o,page:a,limit:s}})}),getCampaign:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/campaigns/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetCampaignsQuery:ql,useGetCampaignQuery:Gl}=Ql,$l=aa.injectEndpoints({endpoints:e=>({getCustomers:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="total_spent",order:i="asc",campaign_id:o,order_id:a,page:s=1,limit:c=10}={})=>({url:"/customers",params:{date_from:e,date_to:t,search:n,sort_by:r,order:i,campaign_id:o,order_id:a,page:s,limit:c}})}),getCustomer:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/customers/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetCustomersQuery:Hl,useGetCustomerQuery:Vl}=$l,Kl=[{match:"/campaigns-reports/",parent:{label:"Campaigns Report",path:"/campaigns-reports"},current:"Campaign Details",type:"campaign"},{match:"/customers/",parent:{label:"Customers",path:"/customers"},current:"Customer Details",type:"customer"}],Zl="disco-no-underline hover:disco-text-primary focus:disco-text-primary",Xl=({pathname:e,NAV_ITEMS:t})=>{const n=Kl.find(t=>e.startsWith(t.match)),{campaignId:r,customerId:i}=Ue(),{data:o}=Vl({id:i},{skip:"customer"!==n?.type||!i}),{data:a}=Gl({id:r},{skip:"campaign"!==n?.type||!r});if("/"===e)return null;const s=n?"customer"===n?.type?o?.data?.name:"campaign"===n?.type?a?.campaign_name:null:null;return(0,Nl.jsx)(Ll,{children:(0,Nl.jsxs)(Ul,{className:"disco-px-3 disco-py-2 disco-bg-[#f9fafb]",children:[(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Fl,{render:(0,Nl.jsx)(Et,{to:"/",end:!0,className:Zl}),children:"Dashboard"})}),n?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Fl,{render:(0,Nl.jsx)(Et,{to:n.parent.path,className:Zl}),children:n.parent.label})}),(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Wl,{children:s})})]}):(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Bl,{}),(0,Nl.jsx)(Yl,{children:(0,Nl.jsx)(Wl,{children:t.find(t=>t.path===e)?.label})})]})]})})};let Jl=0;const eu=Ls.useId;function tu(e,t){if(void 0!==eu){const n=eu();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,r]=a.useState(e),i=e||n;return a.useEffect(()=>{null==n&&(Jl+=1,r(`${t}-${Jl}`))},[n,t]),i}(e,t)}function nu(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class ru{nodesRef={current:[]};events=nu();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}const iu=a.createContext(null),ou=a.createContext(null),au=()=>a.useContext(iu)?.id||null,su=e=>{const t=a.useContext(ou);return e??t};function cu(e){const{children:t,id:n}=e,r=au();return(0,Nl.jsx)(iu.Provider,{value:a.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function lu(e){const{children:t,externalTree:n}=e,r=Ys(()=>n??new ru).current;return(0,Nl.jsx)(ou.Provider,{value:r,children:t})}function uu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function du(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function fu(e){return e?.ownerDocument||document}const pu=[];function hu(e){a.useEffect(e,pu)}class mu{static create(){return new mu}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function gu(){const e=Ys(mu.create).current;return hu(e.disposeEffect),e}const{userAgent:yu,platform:vu,maxTouchPoints:bu}="undefined"==typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},xu=yu.toLowerCase(),wu=vu.toLowerCase(),Mu="undefined"!=typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none");function ju(e,t,n,r){let i=!1,o=!1;const a=r??vc;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}!Mu&&xu.includes("firefox"),!Mu&&xu.includes("chrom");const Ou="trigger-press",Nu="trigger-hover",Su="outside-press",Eu="close-press",ku="focus-out",Du="escape-key",Iu="imperative-action";function Au(e){return`data-base-ui-${e}`}const Tu="data-base-ui-focusable",Cu="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pu(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function zu(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&ws(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _u(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ru(e,t){if(!bs(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(zu(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function Lu(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Uu(e){return xs(e)&&e.matches(Cu)}function Yu(e){return!!e&&"combobox"===e.getAttribute("role")&&Uu(e)}function Fu(e){return e?e.hasAttribute(Tu)?e:e.querySelector(`[${Tu}]`)||e:null}const Wu=/^i(os$|p)/.test(wu)||"macintel"===wu&&bu>1,Bu="android",Qu=wu===Bu||xu.includes(Bu),qu=!Wu&&wu.startsWith("mac"),Gu=(wu.startsWith("win"),!Qu&&/^(linux|chrome os)/.test(wu),qu||Wu),$u=/jsdom|happydom/.test(xu);function Hu(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Vu(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Vu(e,t.id,n)])}function Ku(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Zu(){return!1}function Xu(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:o="sloppy",referencePress:s=Zu,bubbles:c,externalTree:l}=t,u="rootStore"in e?e.rootStore:e,d=u.useState("open"),f=u.useState("floatingElement"),{dataRef:p}=u.context,h=su(l),m=Bs("function"==typeof i?i:()=>!1),g="function"==typeof i?m:i,y=!1!==g,v=Bs(()=>o),{escapeKey:b,outsidePress:x}={escapeKey:"boolean"==typeof(w=c)?w:w?.escapeKey??!1,outsidePress:"boolean"==typeof w?w:w?.outsidePress??!0};var w;const M=a.useRef(!1),j=a.useRef(!1),O=a.useRef(!1),N=a.useRef(!1),S=a.useRef(""),E=a.useRef(null),k=gu(),D=gu(),I=Bs(()=>{D.clear(),p.current.insideReactTree=!1}),A=Bs(e=>{const t=p.current.floatingContext?.nodeId;return(h?Vu(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),T=Bs(e=>Lu(e,u.select("floatingElement"))||Lu(e,u.select("domReferenceElement"))),C=Bs(e=>{s()&&u.setOpen(!1,ju(Ou,e.nativeEvent))}),P=Bs(e=>{if(!d||!n||!r||"Escape"!==e.key)return;if(N.current)return;if(!b&&A("__escapeKeyBubbles"))return;const t=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,i=ju(Du,t);u.setOpen(!1,i),i.isCanceled||e.preventDefault(),b||i.isPropagationAllowed||e.stopPropagation()}),z=Bs(()=>{p.current.insideReactTree=!0,D.start(0,I)}),_=Bs(e=>{if(!d||!n||0!==e.button)return;const t=_u(e.nativeEvent);zu(u.select("floatingElement"),t)&&(M.current||(M.current=!0,j.current=!1))}),R=Bs(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&M.current&&(j.current=!0)});a.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=b,p.current.__outsidePressBubbles=x;const e=new mu,t=new mu;function i(){O.current=!0,t.start(0,()=>{O.current=!1})}function o(){M.current=!1,j.current=!1}function a(){const e=S.current,t="pen"!==e&&e?e:"mouse",n=v(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function s(e){const t=p.current.floatingContext?.nodeId,n=h&&Vu(h.nodesRef.current,t).some(t=>Lu(e,t.context?.elements.floating));return T(e)||n}function c(e){if(function(e){const t=a();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return"click"===e.type||T(e)||(t.clear(),O.current=!1),void I();if(p.current.insideReactTree)return void I();const n=_u(e),r=`[${Au("inert")}]`,i=bs(n)?n.getRootNode():null,o=Array.from((ws(i)?i:fu(u.select("floatingElement"))).querySelectorAll(r)),c=u.context.triggerElements;if(n&&(c.hasElement(n)||c.hasMatchingElement(e=>zu(e,n))))return;let l=bs(n)?n:null;for(;l&&!As(l);){const e=Ps(l);if(As(e)||!bs(e))break;l=e}if(!o.length||!bs(n)||n.matches("html,body")||zu(n,u.select("floatingElement"))||!o.every(e=>!zu(l,e))){if(xs(n)&&!("touches"in e)){const t=As(n),r=Ts(n),i=/auto|scroll/,o=t||i.test(r.overflowX),a=t||i.test(r.overflowY),s=o&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=a&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l="rtl"===r.direction,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!s(e))return"intentional"===a()&&O.current?(t.clear(),void(O.current=!1)):void(("function"!=typeof g||g(e))&&(A("__outsidePressBubbles")||(u.setOpen(!1,ju(Su,e)),I())))}}function l(e){if("sloppy"!==a()||!u.select("open")||!n||T(e))return;const t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function m(e,t){const n=_u(e);if(!n)return;const r=uu(n,e.type,()=>{t(e),r()})}function w(e){k.clear(),"pointerdown"===e.type&&(S.current=e.pointerType),"mousedown"===e.type&&E.current&&!E.current.dismissOnMouseDown||m(e,e=>{"pointerdown"===e.type?function(e){"sloppy"===a()&&"touch"!==e.pointerType&&u.select("open")&&n&&!T(e)&&c(e)}(e):c(e)})}function D(e){if(!M.current)return;const n=j.current;o(),"intentional"===a()&&("pointercancel"!==e.type?s(e)||(n?i():("function"!=typeof g||g(e))&&(t.clear(),O.current=!0,I())):n&&i())}function C(e){if("sloppy"!==a()||!E.current||T(e))return;const t=e.touches[0];if(!t)return;const n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(c(e),k.clear(),E.current=null)}function z(e){"sloppy"===a()&&E.current&&!T(e)&&(E.current.dismissOnTouchEnd&&c(e),k.clear(),E.current=null)}const _=fu(f),R=du(r&&du(uu(_,"keydown",P),uu(_,"compositionstart",function(){e.clear(),N.current=!0}),uu(_,"compositionend",function(){e.start(Mu?5:0,()=>{N.current=!1})})),y&&du(uu(_,"click",w,!0),uu(_,"pointerdown",w,!0),uu(_,"pointerup",D,!0),uu(_,"pointercancel",D,!0),uu(_,"mousedown",w,!0),uu(_,"mouseup",D,!0),uu(_,"touchstart",function(e){S.current="touch",m(e,l)},!0),uu(_,"touchmove",function(e){m(e,C)},!0),uu(_,"touchend",function(e){m(e,z)},!0)));return()=>{R(),e.clear(),t.clear(),o(),O.current=!1}},[p,f,r,y,g,d,n,b,x,P,I,v,A,T,h,u,k]),a.useEffect(I,[g,I]);const L=a.useMemo(()=>({onKeyDown:P,onPointerDown:C,onClick:C}),[P,C]),U=a.useMemo(()=>({onKeyDown:P,onPointerDown:R,onMouseDown:R,onClickCapture:z,onMouseDownCapture(e){z(),_(e)},onPointerDownCapture(e){z(),_(e)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[P,z,_,R]);return a.useMemo(()=>n?{reference:L,floating:U,trigger:L}:{},[n,L,U])}const Ju=a.createContext(void 0);function ed(e){const t=a.useContext(Ju);if(void 0===t&&!e)throw new Error(sc(47));return t}const td=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(sc(1));let s;if(e&&t&&n&&r&&i&&o)s=(a,s,c,l)=>{const u=e(a,s,c,l),d=t(a,s,c,l),f=n(a,s,c,l),p=r(a,s,c,l),h=i(a,s,c,l);return o(u,d,f,p,h,s,c,l)};else if(e&&t&&n&&r&&i)s=(o,a,s,c)=>{const l=e(o,a,s,c),u=t(o,a,s,c),d=n(o,a,s,c),f=r(o,a,s,c);return i(l,u,d,f,a,s,c)};else if(e&&t&&n&&r)s=(i,o,a,s)=>{const c=e(i,o,a,s),l=t(i,o,a,s),u=n(i,o,a,s);return r(c,l,u,o,a,s)};else if(e&&t&&n)s=(r,i,o,a)=>{const s=e(r,i,o,a),c=t(r,i,o,a);return n(s,c,i,o,a)};else if(e&&t)s=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");s=e}return s};var nd=n(888),rd=n(242);const id=mc(19)?function(e,t,n,r,i){const o=void 0;if(!o)return function(e,t,n,r,i){const o=a.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,nd.useSyncExternalStore)(e.subscribe,o,o)}(e,t,n,r,i);const s=o.syncIndex;let c;return o.syncIndex+=1,o.didInitialize?(c=o.syncHooks[s],c.store===e&&c.selector===t&&Object.is(c.a1,n)&&Object.is(c.a2,r)&&Object.is(c.a3,i)||(c.store!==e&&(o.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=i,c.value=t(e.getSnapshot(),n,r,i))):(c={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},o.syncHooks.push(c)),c.value}:function(e,t,n,r,i){return(0,rd.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function od(e,t,n,r,i){return id(e,t,n,r,i)}var ad;ad={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),(0,nd.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}},[].push(ad);class sd{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return od(this,e,t,n,r)}}class cd extends sd{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){a.useDebugValue(e);const n=this;Gs(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){const n=this;Gs(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){const t=this,n=Object.values(e);Gs(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){a.useDebugValue(e);const n=this,r=void 0!==t;Gs(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return a.useDebugValue(e),od(this,this.selectors[e],t,n,r)}useContextCallback(e,t){a.useDebugValue(e);const n=Bs(t??yc);this.context[e]=n}useStateSetter(e){const t=a.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const i=n(e);if(!Object.is(r,i)){const e=r;r=i,t(i,e,this)}})}}const ld={open:td(e=>e.open),transitionStatus:td(e=>e.transitionStatus),domReferenceElement:td(e=>e.domReferenceElement),referenceElement:td(e=>e.positionReference??e.referenceElement),floatingElement:td(e=>e.floatingElement),floatingId:td(e=>e.floatingId)};class ud extends cd{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...o}=e;super({...o,positionReference:o.referenceElement,domReferenceElement:o.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:nu(),nested:n,triggerElements:i},ld),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||null!=t&&function(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}class dd{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function fd(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new ud({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new dd,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0}),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:vc,inactiveTriggerProps:vc,popupProps:vc}}function pd(e,t,n=!1){return new ud({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const hd=td(e=>e.triggerIdProp??e.activeTriggerId),md=td(e=>e.openProp??e.open),gd=td(e=>(e.popupElement?.id??e.floatingId)||void 0);function yd(e,t){return void 0!==t&&md(e)&&hd(e)===t}const vd={open:md,mounted:td(e=>e.mounted),transitionStatus:td(e=>e.transitionStatus),floatingRootContext:td(e=>e.floatingRootContext),triggerCount:td(e=>e.triggerCount),preventUnmountingOnClose:td(e=>e.preventUnmountingOnClose),payload:td(e=>e.payload),activeTriggerId:hd,activeTriggerElement:td(e=>e.mounted?e.activeTriggerElement:null),popupId:gd,isTriggerActive:td((e,t)=>void 0!==t&&hd(e)===t),isOpenedByTrigger:td((e,t)=>yd(e,t)),isMountedByTrigger:td((e,t)=>void 0!==t&&hd(e)===t&&e.mounted),triggerProps:td((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:td((e,t)=>function(e,t){return!!yd(e,t)||void 0!==t&&md(e)&&null==hd(e)&&1===e.triggerCount}(e,t)?gd(e):void 0),popupProps:td(e=>e.popupProps),popupElement:td(e=>e.popupElement),positionerElement:td(e=>e.positionerElement)};function bd(e){const t=a.useRef(!0);t.current&&(t.current=!1,e())}const xd=null;globalThis.requestAnimationFrame;const wd=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Md{static create(){return new Md}static request(e){return wd.request(e)}static cancel(e){return wd.cancel(e)}currentId=xd;request(e){this.cancel(),this.currentId=wd.request(()=>{this.currentId=xd,e()})}cancel=()=>{this.currentId!==xd&&(wd.cancel(this.currentId),this.currentId=xd)};disposeEffect=()=>this.cancel}function jd(){const e=Ys(Md.create).current;return hu(e.disposeEffect),e}function Od(e,t=!1,n=!1){const[r,i]=a.useState(e&&t?"idle":void 0),[o,s]=a.useState(e);return e&&!o&&(s(!0),i("starting")),e||!o||"ending"===r||n||i("ending"),e||o||"ending"!==r||i(void 0),Gs(()=>{if(!e&&o&&"ending"!==r&&n){const e=Md.request(()=>{i("ending")});return()=>{Md.cancel(e)}}},[e,o,r,n]),Gs(()=>{if(!e||t)return;const n=Md.request(()=>{i(void 0)});return()=>{Md.cancel(n)}},[t,e]),Gs(()=>{if(!e||!t)return;e&&o&&"idle"!==r&&i("starting");const n=Md.request(()=>{i("idle")});return()=>{Md.cancel(n)}},[t,e,o,r]),{mounted:o,setMounted:s,transitionStatus:r}}function Nd(e){return null==e?e:"current"in e?e.current:e}let Sd=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Ed={[Sd.startingStyle]:""},kd={[Sd.endingStyle]:""},Dd={transitionStatus:e=>"starting"===e?Ed:"ending"===e?kd:null};function Id(e,t=!1,n=!0){const r=jd();return Bs((i,a=null)=>{r.cancel();const s=Nd(e);if(null==s)return;const c=s,l=()=>{o.flushSync(i)};if("function"!=typeof c.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{if(t){const e=Sd.startingStyle;if(!c.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),u())});return t.observe(c,{attributes:!0,attributeFilter:[e]}),void a?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(u)}function u(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||l()}).catch(()=>{if(n)return void(a?.aborted||l());const e=c.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}})}function Ad(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Bs(i),s=Id(r,n,!1);a.useEffect(()=>{if(!t)return;const e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}const Td={tabIndex:-1,[Tu]:""};function Cd(e){return t=>"touch"!==t||e.current}function Pd(e,t,n=!1){const r=tu(),i=null!=au(),o=a.useRef(null);void 0===e&&null===o.current&&(o.current=t(r,i));const s=e??o.current;return function(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:o,onOpenChange:s}=e,c=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,p=a.useRef(null);void 0===r&&null===p.current&&(p.current=new ud({open:c,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:i,syncOnly:!0,nested:o}));const h=r??p.current;t.useSyncedValue("floatingId",i),Gs(()=>{const e={open:c,floatingId:i,referenceElement:l,floatingElement:u};bs(l)&&(e.domReferenceElement=l),h.state.positionReference===h.state.referenceElement&&(e.positionReference=l),h.update(e)},[c,i,l,u,h]),h.context.onOpenChange=f,h.context.nested=o}({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:s.setOpen}),{store:s,internalStore:o.current}}function zd(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function _d(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),i=e.useState("triggerCount");Gs(()=>{if(!r)return void(0!==e.state.triggerCount&&e.set("triggerCount",0));const t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);const o=e.select("activeTriggerId");let a=null;if(o){const t=e.context.triggerElements.getById(o);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):a=o}if(!a&&!o&&1===t){const t=e.context.triggerElements.entries().next();if(!t.done){const[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}void 0===i.triggerCount&&void 0===i.activeTriggerId&&void 0===i.activeTriggerElement||e.update(i),a&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===a&&!e.context.triggerElements.getById(a)){const t=ju("none");e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,i,n])}function Rd(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=Od(e),a=t.useState("preventUnmountingOnClose"),s=!e&&a;t.useSyncedValues({mounted:r,transitionStatus:o,preventUnmountingOnClose:s});const c=Bs(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ad({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:o}}function Ld(e,t){e.useSyncedValues(t),Gs(()=>()=>{e.update({activeTriggerProps:vc,inactiveTriggerProps:vc,popupProps:vc})},[e])}function Ud(e,t){Gs(()=>{t||null===e.state.openMethod||e.set("openMethod",null)},[t,e]),Gs(()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)},[e])}const Yd={...vd,disabled:td(e=>e.disabled),instantType:td(e=>e.instantType),openMethod:td(e=>e.openMethod),openChangeReason:td(e=>e.openChangeReason),modal:td(e=>e.modal),focusManagerModal:td(e=>e.focusManagerModal),stickIfOpen:td(e=>e.stickIfOpen),titleElementId:td(e=>e.titleElementId),descriptionElementId:td(e=>e.descriptionElementId),openOnHover:td(e=>e.openOnHover),closeDelay:td(e=>e.closeDelay),hasViewport:td(e=>e.hasViewport)};class Fd extends cd{constructor(e,t,n=!1){const r={...{...fd(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1},...e},i=new dd;r.open&&void 0===e?.mounted&&(r.mounted=!0),r.floatingRootContext=pd(i,t,n),super(r,{popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:a.createRef(),beforeContentFocusGuardRef:a.createRef(),stickIfOpenTimeout:new mu,triggerElements:i},Yd)}setOpen=(e,t)=>{const n=t.reason===Nu,r=t.reason===Ou&&0===t.event.detail,i=!e&&(t.reason===Du||null==t.reason),a=function(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}(t),s=this.select("activeTriggerId");if(e||t.reason!==Eu||null!=t.trigger||null==s||(t.trigger=this.context.triggerElements.getById(s)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const c=()=>{const n={open:e,openChangeReason:t.reason};zd(n,e,t.trigger,a()),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),o.flushSync(c)):c(),r||i?this.set("instantType",r?"click":"dismiss"):t.reason===ku?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const{store:n,internalStore:r}=Pd(e,(e,n)=>new Fd(t,e,n));return a.useEffect(()=>r?.disposeEffect(),[r]),n}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function Wd({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,modal:s=!1,handle:c,triggerId:l,defaultTriggerId:u=null}=e,d=Fd.useStore(c?.store,{modal:s,open:r,openProp:n,activeTriggerId:u,triggerIdProp:l});!function(e,t,n,r){bd(()=>{void 0===t&&!1===e.state.open&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}(d,n,r,u),d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",l);const f=d.useState("open"),p=d.useState("mounted"),h=d.useState("payload"),m=null!=au();d.useContextCallback("onOpenChange",i),d.useContextCallback("onOpenChangeComplete",o),Ud(d,f),_d(d);const{forceUnmount:g}=Rd(f,d,()=>{d.update({stickIfOpen:!0,openChangeReason:null})});d.useSyncedValues({modal:s,nested:m}),a.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]);const y=a.useCallback(()=>{d.setOpen(!1,ju(Iu))},[d]);a.useImperativeHandle(e.actionsRef,()=>({unmount:g,close:y}),[g,y]);const v=f||p,b=a.useMemo(()=>({store:d}),[d]);return(0,Nl.jsxs)(Ju.Provider,{value:b,children:[v&&(0,Nl.jsx)(Qd,{store:d,modal:s}),"function"==typeof t?t({payload:h}):t]})}function Bd(e){return ed(!0)?(0,Nl.jsx)(Wd,{props:e}):(0,Nl.jsx)(lu,{children:(0,Nl.jsx)(Wd,{props:e})})}function Qd({store:e,modal:t}){const n=Xu(e.useState("floatingRootContext"),{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}});return Ld(e,{activeTriggerProps:n.reference??vc,inactiveTriggerProps:n.trigger??vc,popupProps:a.useMemo(()=>Vs(Td,n.floating),[n.floating])}),null}let qd=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Sd.startingStyle]="startingStyle",e[e.endingStyle=Sd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Gd=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const $d={[Gd.popupOpen]:""},Hd={[Gd.popupOpen]:"",[Gd.pressed]:""},Vd={[qd.open]:""},Kd={[qd.closed]:""},Zd={[qd.anchorHidden]:""},Xd=e=>e?$d:null,Jd=e=>e?Hd:null,ef={open:e=>e?Vd:Kd,anchorHidden:e=>e?Zd:null},tf={style:{transition:"none"}},nf="data-base-ui-click-trigger",rf={fallbackAxisSide:"end"},of={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function af(e){const t=Ys(sf,e).current;return t.next=e,Gs(t.effect),t}function sf(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}class cf{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new mu,this.restTimeout=new mu,this.handleCloseOptions=void 0}static create(){return new cf}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const lf=new WeakMap;function uf(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&lf.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),lf.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function df(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,o=lf.get(n);o&&o!==e&&uf(o),uf(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,lf.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function ff(e){const t=e.context.dataRef.current,n=Ys(()=>t.hoverInteractionState??cf.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),hu(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function pf(e,t,n){const r=function(e,t){return null==t||Hu(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function hf(e){return"function"==typeof e?e():e}function mf(e,t){return t||"click"===e||"mousedown"===e}const gf={current:null},yf=.1*.1,vf=.5;function bf(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function xf(e,t,n,r,i,o,a,s,c,l){let u=!1;return bf(e,t,n,r,i,o)&&(u=!u),bf(e,t,i,o,a,s)&&(u=!u),bf(e,t,a,s,c,l)&&(u=!u),bf(e,t,c,l,n,r)&&(u=!u),u}function wf(e,t,n,r,i,o){const a=Math.min(n,i),s=Math.max(n,i),c=Math.min(r,o),l=Math.max(r,o);return e>=a&&e<=s&&t>=c&&t<=l}function Mf(e={}){const{blockPointerEvents:t=!1}=e,n=new mu,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:a,tree:s})=>{const c=r?.split("-")[0];let l=!1,u=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=i.domReference,h=i.floating;if(!p||!h||null==c||null==e||null==t)return;const{clientX:m,clientY:g}=r,y=_u(r),v="mouseleave"===r.type,b=zu(h,y),x=zu(p,y);if(b&&(l=!0,!v))return;if(x&&(l=!1,!v))return void(l=!0);if(v&&bs(r.relatedTarget)&&zu(h,r.relatedTarget))return;function w(){return Boolean(s&&Vu(s.nodesRef.current,a).length>0)}function M(){w()||(n.clear(),o())}if(w())return;const j=p.getBoundingClientRect(),O=h.getBoundingClientRect(),N=e>O.right-O.width/2,S=t>O.bottom-O.height/2,E=O.width>j.width,k=O.height>j.height,D=(E?j:O).left,I=(E?j:O).right,A=(k?j:O).top,T=(k?j:O).bottom;if("top"===c&&t>=j.bottom-1||"bottom"===c&&t<=j.top+1||"left"===c&&e>=j.right-1||"right"===c&&e<=j.left+1)return void M();let C=!1;switch(c){case"top":C=wf(m,g,D,j.top+1,I,O.bottom-1);break;case"bottom":C=wf(m,g,D,O.top+1,I,j.bottom-1);break;case"left":C=wf(m,g,O.right-1,T,j.left+1,A);break;case"right":C=wf(m,g,j.right-1,T,O.left+1,A)}if(C)return;if(l&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(m,g,j))return void M();if(!v&&function(e,t){const n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;const i=e-u,o=t-d;return u=e,d=t,f=n,i*i+o*o<r*r*yf}(m,g))return void M();let P=!1;switch(c){case"top":{const n=E?.25:2,r=E||N?e+n:e-n,i=E?e-n:N?e+n:e-n,o=t+vf+1,a=N||E?O.bottom-vf:O.top,s=N?E?O.bottom-vf:O.top:O.bottom-vf;P=xf(m,g,r,o,i,o,O.left,a,O.right,s);break}case"bottom":{const n=E?.25:2,r=E||N?e+n:e-n,i=E?e-n:N?e+n:e-n,o=t-vf,a=N||E?O.top+vf:O.bottom,s=N?E?O.top+vf:O.bottom:O.top+vf;P=xf(m,g,r,o,i,o,O.left,a,O.right,s);break}case"left":{const n=k?.25:2,r=k||S?t+n:t-n,i=k?t-n:S?t+n:t-n,o=e+vf+1,a=S||k?O.right-vf:O.left,s=S?k?O.right-vf:O.left:O.right-vf;P=xf(m,g,a,O.top,s,O.bottom,o,r,o,i);break}case"right":{const n=k?.25:2,r=k||S?t+n:t-n,i=k?t-n:S?t+n:t-n,o=e-vf,a=S||k?O.left+vf:O.right,s=S?k?O.left+vf:O.right:O.left+vf;P=xf(m,g,o,r,o,i,a,O.top,s,O.bottom);break}}P?l||n.start(40,M):M()}};return r.__options={...e,blockPointerEvents:t},r}function jf(e){return tu(e,"base-ui")}const Of=Gu,Nf={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},Sf=a.forwardRef(function(e,t){const[n,r]=a.useState();Gs(()=>{Of&&Mu&&r("button")},[]);const i={tabIndex:0,role:n};return(0,Nl.jsx)("span",{...e,ref:t,style:Nf,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":""})});function Ef(e,t=(e?Ts(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}function kf(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return ws(n)?n.host:null}function Df(e){for(const t of Array.from(e.children))if("summary"===ms(t))return t;return null}function If(e,t){const n=Df(t);return!!n&&(e===n||zu(n,e))}function Af(e){const t=e?ms(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===ms(e.parentElement)&&Df(e.parentElement)===e)&&("details"!==t||null==Df(e))&&("input"!==t||"hidden"!==e.type)}function Tf(e){if(!Af(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=kf(t)){const n=t!==e,r="slot"===ms(t);if(t.hasAttribute("inert"))return!1;if(n&&"details"===ms(t)&&!t.open&&!If(e,t)||t.hasAttribute("hidden")||!r&&!Cf(t,n))return!1}return!0}function Cf(e,t){const n=Ts(e);return t?"none"!==n.display:Ef(e,n)}function Pf(e){const t=e.tabIndex;if(t<0){const t=ms(e);if("details"===t||"audio"===t||"video"===t||xs(e)&&e.isContentEditable)return 0}return t}function zf(e){if("input"!==ms(e))return null;const t=e;return"radio"===t.type&&""!==t.name?t:null}function _f(e){if(xs(e)&&"slot"===ms(e)){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return xs(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Rf(e,t){_f(e).forEach(e=>{Af(e)&&t.push(e),Rf(e,t)})}function Lf(e,t,n){_f(e).forEach(e=>{xs(e)&&e.matches(t)&&n.push(e),Lf(e,t,n)})}function Uf(e){return Tf(e)&&Pf(e)>=0}function Yf(e){const t=[];return Rf(e,t),t.filter(Tf)}function Ff(e){const t=Yf(e);return t.filter(e=>Pf(e)>=0&&function(e,t){const n=zf(e);if(!n)return!0;const r=t.find(e=>{const t=zf(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{const t=zf(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function Wf(e,t){const n=Ff(e),r=n.length;if(0===r)return;const i=Pu(fu(e)),o=n.indexOf(i);return n[-1===o?1===t?0:r-1:o+t]}function Bf(e){return Wf(fu(e).body,1)||e}function Qf(e){return Wf(fu(e).body,-1)||e}function qf(e,t){if(!e)return null;const n=Ff(fu(e).body),r=n.length;if(0===r)return null;const i=n.indexOf(e);return-1===i?null:n[(i+t+r)%r]}function Gf(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!zu(n,r)}function $f(e){const t=[];Lf(e,"[data-tabindex]",t),t.forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Hf=a.forwardRef(function(e,t){const{render:n,className:r,style:i,disabled:s=!1,nativeButton:c=!0,handle:l,payload:u,openOnHover:d=!1,delay:f=300,closeDelay:p=0,id:h,...m}=e,g=ed(!0),y=l?.store??g?.store;if(!y)throw new Error(sc(74));const v=jf(h),b=y.useState("isTriggerActive",v),x=y.useState("floatingRootContext"),w=y.useState("isOpenedByTrigger",v),M=y.useState("triggerPopupId",v),j=a.useRef(null),{registerTrigger:O,isMountedByThisTrigger:N}=function(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=function(e,t){const n=a.useRef(null),r=a.useRef(null);return a.useCallback(i=>{if(void 0===e)return;let o=!1;if(null!==n.current){const e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&(t.context.triggerElements.delete(e),o=!0),n.current=null,r.current=null}if(null!==i&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),o=!0),o){const e=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==e&&t.set("triggerCount",e)}},[t,e])}(e,n),s=Bs(t=>{if(o(t),!t)return;const i=n.select("open"),a=n.select("activeTriggerId");a!==e?null==a&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r}):n.update({activeTriggerElement:t,...i?r:null})});return Gs(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}(v,j,y,{payload:u,disabled:s,openOnHover:d,closeDelay:p}),S=y.useState("openChangeReason"),E=y.useState("stickIfOpen"),k=y.useState("openMethod"),D=y.useState("focusManagerModal"),I=function(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:s=!1,restMs:c=0,move:l=!0,triggerElementRef:u=gf,externalTree:d,isActiveTrigger:f=!0,getHandleCloseContext:p,isClosing:h,shouldOpen:m}=t,g="rootStore"in e?e.rootStore:e,{dataRef:y,events:v}=g.context,b=su(d),x=ff(g),w=a.useRef(!1),M=af(i),j=af(r),O=af(c),N=af(n),S=af(m),E=af(h),k=Bs(()=>mf(y.current.openEvent?.type,x.interactedInside)),D=Bs(()=>!1!==S.current?.()),I=Bs((e,t,n)=>{const r=g.context.triggerElements;if(r.hasElement(t))return!e||!zu(e,t);if(!bs(n))return!1;const i=n;return r.hasMatchingElement(e=>zu(e,i))&&(!e||!zu(e,i))}),A=Bs(()=>{x.handler&&(fu(g.select("domReferenceElement")).removeEventListener("mousemove",x.handler),x.handler=void 0)}),T=Bs(()=>{uf(x)});return f&&(x.handleCloseOptions=M.current?.__options),a.useEffect(()=>A,[A]),a.useEffect(()=>{if(n)return v.on("openchange",e),()=>{v.off("openchange",e)};function e(e){e.open?w.current=!1:(w.current=e.reason===Nu,A(),x.openChangeTimeout.clear(),x.restTimeout.clear(),x.blockMouseMove=!0,x.restTimeoutPending=!1)}},[n,v,x,A]),a.useEffect(()=>{if(!n)return;function e(e,t=!0){const n=pf(j.current,"close",x.pointerType);n?x.openChangeTimeout.start(n,()=>{g.setOpen(!1,ju(Nu,e)),b?.events.emit("floating.closed",e)}):t&&(x.openChangeTimeout.clear(),g.setOpen(!1,ju(Nu,e)),b?.events.emit("floating.closed",e))}const t=u.current??(f?g.select("domReferenceElement"):null);if(bs(t))return l?du(uu(t,"mousemove",r,{once:!0}),uu(t,"mouseenter",r),uu(t,"mouseleave",i)):du(uu(t,"mouseenter",r),uu(t,"mouseleave",i));function r(e){if(x.openChangeTimeout.clear(),x.blockMouseMove=!1,s&&!Hu(x.pointerType))return;const t=hf(O.current),n=pf(j.current,"open",x.pointerType),r=_u(e),i=e.currentTarget??null,o=g.select("domReferenceElement");let a=i;if(bs(r)&&!g.context.triggerElements.hasElement(r))for(const e of g.context.triggerElements.elements())if(zu(e,r)){a=e;break}bs(i)&&bs(o)&&!g.context.triggerElements.hasElement(i)&&zu(i,o)&&(a=o);const c=null!=a&&I(o,a,r),l=g.select("open"),u=E.current?.()??"ending"===g.select("transitionStatus"),d=!l&&u&&w.current,f=!c&&bs(a)&&bs(o)&&zu(o,a)&&d,p=t>0&&!n,h=!l||c;c&&(l||d)||f?D()&&g.setOpen(!0,ju(Nu,e,a)):p||(n?x.openChangeTimeout.start(n,()=>{h&&D()&&g.setOpen(!0,ju(Nu,e,a))}):h&&D()&&g.setOpen(!0,ju(Nu,e,a)))}function i(t){if(k())return void T();A();const n=fu(g.select("domReferenceElement"));x.restTimeout.clear(),x.restTimeoutPending=!1;const r=y.current.floatingContext??p?.();if(!Ru(t.relatedTarget,g.context.triggerElements)){if(M.current&&r){g.select("open")||x.openChangeTimeout.clear();const i=u.current;return x.handler=M.current({...r,tree:b,x:t.clientX,y:t.clientY,onClose(){T(),A(),N.current&&!k()&&i===g.select("domReferenceElement")&&e(t,!0)}}),n.addEventListener("mousemove",x.handler),void x.handler(t)}("touch"!==x.pointerType||!zu(g.select("floatingElement"),t.relatedTarget))&&e(t)}}},[A,T,y,j,g,n,M,x,f,I,k,s,l,O,u,b,N,p,E,D]),a.useMemo(()=>{if(n)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,n=e.currentTarget,r=g.select("domReferenceElement"),i=g.select("open"),a=I(r,n,e.target);if(s&&!Hu(x.pointerType))return;if(i&&a&&x.handleCloseOptions?.blockPointerEvents){const e=g.select("floatingElement");if(e){const t=x.handleCloseOptions?.getScope?.()??n.ownerDocument.body;df(x,{scopeElement:t,referenceElement:n,floatingElement:e})}}const c=hf(O.current);function l(){if(x.restTimeoutPending=!1,k())return;const e=g.select("open");x.blockMouseMove||e&&!a||!D()||g.setOpen(!0,ju(Nu,t,n))}i&&!a||0===c||!a&&x.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(x.restTimeout.clear(),"touch"===x.pointerType?o.flushSync(()=>{l()}):a&&i?l():(x.restTimeoutPending=!0,x.restTimeout.start(c,l)))}};function e(e){x.pointerType=e.pointerType}},[n,x,k,I,s,g,O,D])}(x,{enabled:!s&&null!=x&&d&&("touch"!==k||S!==Ou),mouseOnly:!0,move:!1,handleClose:Mf(),restMs:f,delay:{close:p},triggerElementRef:j,isActiveTrigger:b,isClosing:()=>"ending"===y.select("transitionStatus")}),A=function(e,t={}){const{enabled:n=!0,event:r="click",toggle:i=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=Ou}=t,u="rootStore"in e?e.rootStore:e,d=u.context.dataRef,f=a.useRef(void 0),p=jd(),h=gu(),m=a.useMemo(()=>{function e(e,t,n,r){const i=ju(l,t,n);e&&"touch"===r&&c>0?h.start(c,()=>{u.setOpen(!0,i)}):u.setOpen(e,i)}function t(e,t,n){const r=d.current.openEvent,o=u.select("domReferenceElement")!==t;return!((!e||!o)&&e&&i&&(!r||!s||n(r.type)))}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){const i=f.current,a=n.nativeEvent,s=u.select("open");if(0!==n.button||"click"===r||Hu(i,!0)&&o)return;const c=t(s,n.currentTarget,e=>"click"===e||"mousedown"===e),l=_u(a);if(Uu(l))return void e(c,a,l,i);const d=n.currentTarget;p.request(()=>{e(c,a,d,i)})},onClick(n){if("mousedown-only"===r)return;const i=f.current;"mousedown"===r&&i?f.current=void 0:Hu(i,!0)&&o||e(t(u.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,i)},onKeyDown(){f.current=void 0}}},[d,r,o,l,u,s,i,p,h,c]);return a.useMemo(()=>n?{reference:m}:vc,[n,m])}(x,{enabled:null!=x,stickIfOpen:E}),T=function(e,t){const n=Bs((n,r)=>{("function"==typeof e?e():e)||t(r||(Wu?"touch":""))}),{onClick:r,onPointerDown:i}=function(e){const t=a.useRef(""),n=a.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:a.useCallback(n=>{0!==n.detail?(e(n,"pointerType"in n?n.pointerType:t.current),t.current=""):e(n,"keyboard")},[e]),onPointerDown:n}}(n);return a.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}(()=>y.select("open"),e=>{y.set("openMethod",e)}),C=y.useState("triggerProps",N),{getButtonProps:P,buttonRef:z}=lc({disabled:s,native:c}),_={open:e=>e&&S===Ou?Jd(e):Xd(e)},{preFocusGuardRef:R,handlePreFocusGuardFocus:L,handleFocusTargetFocus:U}=function(e,t){const n=a.useRef(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:function(t){o.flushSync(()=>{e.setOpen(!1,ju(ku,t.nativeEvent,t.currentTarget))});const r=qf(n.current,-1);r?.focus()},handleFocusTargetFocus:function(n){const r=e.select("positionerElement");if(r&&Gf(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{o.flushSync(()=>{e.setOpen(!1,ju(ku,n.nativeEvent,n.currentTarget))});let i=qf(e.context.triggerFocusTargetRef.current||t.current,1);for(;null!==i&&zu(r,i);){const e=i;if(i=Bf(i),i===e)break}i?.focus()}}}}(y,j),Y=bc("button",e,{state:{disabled:s,open:w},ref:[z,t,O,j],props:[A.reference,I,C,T,{[nf]:"",id:v,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":M},m,P],stateAttributesMapping:_});return N&&!D?(0,Nl.jsxs)(a.Fragment,{children:[(0,Nl.jsx)(Sf,{ref:R,onFocus:L}),(0,Nl.jsx)(a.Fragment,{children:Y},v),(0,Nl.jsx)(Sf,{ref:y.context.triggerFocusTargetRef,onFocus:U})]}):(0,Nl.jsx)(a.Fragment,{children:Y},v)}),Vf=a.createContext(null),Kf=()=>a.useContext(Vf),Zf=Au("portal"),Xf=a.forwardRef(function(e,t){const{render:n,className:r,style:i,children:s,container:c,renderGuards:l,...u}=e,{portalNode:d,portalSubtree:f}=function(e={}){const{ref:t,container:n,componentProps:r=vc,elementProps:i}=e,s=tu(),c=Kf(),l=c?.portalNode,[u,d]=a.useState(null),[f,p]=a.useState(null),h=Bs(e=>{null!==e&&p(e)}),m=a.useRef(null);Gs(()=>{if(null===n)return void(m.current&&(m.current=null,p(null),d(null)));if(null==s)return;const e=(n&&(vs(n)?n:n.current))??l??document.body;null!=e?m.current!==e&&(m.current=e,p(null),d(e)):m.current&&(m.current=null,p(null),d(null))},[n,l,s]);const g=bc("div",r,{ref:[t,h],props:[{id:s,[Zf]:""},i]});return{portalNode:f,portalSubtree:u&&g?o.createPortal(g,u):null}}({container:c,ref:t,componentProps:e,elementProps:u}),p=a.useRef(null),h=a.useRef(null),m=a.useRef(null),g=a.useRef(null),[y,v]=a.useState(null),b=a.useRef(!1),x=y?.modal,w=y?.open,M="boolean"==typeof l?l:!!y&&!y.modal&&y.open&&!!d;a.useEffect(()=>{if(d&&!x)return du(uu(d,"focusin",e,!0),uu(d,"focusout",e,!0));function e(e){d&&e.relatedTarget&&Gf(e)&&("focusin"===e.type?b.current&&($f(d),b.current=!1):(function(e){Ff(e).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}(d),b.current=!0))}},[d,x]),Gs(()=>{d&&!0===w&&b.current&&($f(d),b.current=!1)},[w,d]);const j=a.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:h,beforeInsideRef:m,afterInsideRef:g,portalNode:d,setFocusManagerState:v}),[d]);return(0,Nl.jsxs)(a.Fragment,{children:[f,(0,Nl.jsxs)(Vf.Provider,{value:j,children:[M&&d&&(0,Nl.jsx)(Sf,{"data-type":"outside",ref:p,onFocus:e=>{if(Gf(e,d))m.current?.focus();else{const e=Qf(y?y.domReference:null);e?.focus()}}}),M&&d&&(0,Nl.jsx)("span",{"aria-owns":d.id,style:of}),d&&o.createPortal(s,d),M&&d&&(0,Nl.jsx)(Sf,{"data-type":"outside",ref:h,onFocus:e=>{if(Gf(e,d))g.current?.focus();else{const t=Bf(y?y.domReference:null);t?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,ju(ku,e.nativeEvent))}}})]})]})}),Jf=a.createContext(void 0),ep=a.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=ed();return i.useState("mounted")||n?(0,Nl.jsx)(Jf.Provider,{value:n,children:(0,Nl.jsx)(Xf,{ref:t,...r})}):null});function tp(e){return mc(19)?e:e?"true":void 0}const np=a.createContext(void 0),rp=["top","right","bottom","left"],ip=Math.min,op=Math.max,ap=Math.round,sp=Math.floor,cp=e=>({x:e,y:e}),lp={left:"right",right:"left",bottom:"top",top:"bottom"};function up(e,t,n){return op(e,ip(t,n))}function dp(e,t){return"function"==typeof e?e(t):e}function fp(e){return e.split("-")[0]}function pp(e){return e.split("-")[1]}function hp(e){return"x"===e?"y":"x"}function mp(e){return"y"===e?"height":"width"}function gp(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function yp(e){return hp(gp(e))}function vp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bp=["left","right"],xp=["right","left"],wp=["top","bottom"],Mp=["bottom","top"];function jp(e){const t=fp(e);return lp[t]+e.slice(t.length)}function Op(e){return"number"!=typeof e?function(e){var t,n,r,i;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(i=e.left)?i:0}}(e):{top:e,right:e,bottom:e,left:e}}function Np(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sp(e,t,n){let{reference:r,floating:i}=e;const o=gp(t),a=yp(t),s=mp(a),c=fp(t),l="y"===o,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}const h=pp(t);return h&&(p[a]+=f*("end"===h?1:-1)*(n&&l?-1:1)),p}async function Ep(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=dp(t,e),h=Op(p),m=s[f?"floating"===d?"reference":"floating":d],g=Np(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=Np(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:c}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}function kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dp(e){return rp.some(t=>e[t]>=0)}const Ip=new Set(["left","top"]);function Ap(e){const t=Ts(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xs(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ap(n)!==o||ap(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Tp(e){return bs(e)?e:e.contextElement}function Cp(e){const t=Tp(e);if(!xs(t))return cp(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Ap(t);let a=(o?ap(n.width):n.width)/r,s=(o?ap(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Pp=cp(0);function zp(e){const t=gs(e);return Is()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pp}function _p(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=Tp(e);let a=cp(1);t&&(r?bs(r)&&(a=Cp(r)):a=Cp(e));const s=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===gs(e)}(o,n,r)?zp(o):cp(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o&&r){const e=gs(o),t=bs(r)?gs(r):r;let n=e,i=Rs(n);for(;i&&t!==n;){const e=Cp(i),t=i.getBoundingClientRect(),r=Ts(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=o,l+=a,n=gs(i),i=Rs(n)}}return Np({width:u,height:d,x:c,y:l})}function Rp(e,t){const n=Cs(e).scrollLeft;return t?t.left+n:_p(ys(e)).left+n}function Lp(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Rp(e,n),y:n.top+t.scrollTop}}function Up(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,i=gs(e),o=ys(e),a=i.visualViewport;let s=o.clientWidth,c=o.clientHeight,l=0,u=0;if(a){const e=!Is()||"fixed"===t;r?e||(l=-a.offsetLeft,u=-a.offsetTop):(s=a.width,c=a.height,e&&(l=a.offsetLeft,u=a.offsetTop))}if(Rp(o)<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),a="stable both-edges"===getComputedStyle(o).scrollbarGutter?i/2:i;a<=25&&(s-=a)}return{width:s,height:c,x:l,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=Cs(e),n=e.ownerDocument.body,r=op(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=op(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+Rp(e);const a=-t.scrollTop;return"rtl"===Ts(n).direction&&(o+=op(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:a}}(ys(e));else if(bs(t))r=function(e,t){const n=_p(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Cp(e);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=zp(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Np(r)}function Yp(e,t,n){const r=xs(t),i=ys(t),o="fixed"===n,a=_p(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const c=cp(0);if((r||!o)&&(("body"!==ms(t)||Ms(i))&&(s=Cs(t)),r)){const e=_p(t,!0,o,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Rp(i));const l=!i||r||o?cp(0):Lp(i,s);return{x:a.left+s.scrollLeft-c.x-l.x,y:a.top+s.scrollTop-c.y-l.y,width:a.width,height:a.height}}function Fp(e){return"static"===Ts(e).position}function Wp(e,t){if(!xs(e)||"fixed"===Ts(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function Bp(e,t){const n=gs(e);if(Os(e))return n;if(!xs(e)){let t=Ps(e);for(;t&&!As(t);){if(bs(t)&&!Fp(t))return t;t=Ps(t)}return n}let r=Wp(e,t);for(;r&&js(r)&&Fp(r);)r=Wp(r,t);return r&&As(r)&&Fp(r)&&!Ds(r)?n:r||function(e){let t=Ps(e);for(;xs(t)&&!As(t);){if(Ds(t))return t;if(Os(t))return null;t=Ps(t)}return null}(e)||n}const Qp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=ys(r),s=!!t&&Os(t.floating);if(r===a||s&&o)return n;let c={scrollLeft:0,scrollTop:0},l=cp(1);const u=cp(0),d=xs(r);if((d||!o)&&(("body"!==ms(r)||Ms(a))&&(c=Cs(r)),d)){const e=_p(r);l=Cp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||o?cp(0):Lp(a,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}},getDocumentElement:ys,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?Os(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=_s(e,[],!1).filter(e=>bs(e)&&"body"!==ms(e)),i=null;const o="fixed"===Ts(e).position;let a=o?Ps(e):e;for(;bs(a)&&!As(a);){const e=Ts(a),t=Ds(a),n=i?i.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==a),a=Ps(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],s=Up(t,a[0],i);let c=s.top,l=s.right,u=s.bottom,d=s.left;for(let e=1;e<a.length;e++){const n=Up(t,a[e],i);c=op(n.top,c),l=ip(n.right,l),u=ip(n.bottom,u),d=op(n.left,d)}return{width:l-d,height:u-c,x:d,y:c}},getOffsetParent:Bp,getElementRects:async function(e){const t=this.getOffsetParent||Bp,n=this.getDimensions,r=await n(e.floating);return{reference:Yp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=Ap(e);return{width:t,height:n}},getScale:Cp,isElement:bs,isRTL:function(e){return"rtl"===Ts(e).direction}};function qp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gp(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=Tp(e),u=i||o?[...l?_s(l):[],...t?_s(t):[]]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n),o&&e.addEventListener("resize",n)});const d=l&&s?function(e,t,n){let r,i=null;const o=ys(e);function a(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}function s(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),a();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;const h={rootMargin:-sp(d)+"px "+-sp(o.clientWidth-(u+f))+"px "+-sp(o.clientHeight-(d+p))+"px "+-sp(u)+"px",threshold:op(0,ip(1,c))||1};let m=!0;function g(t){const n=t[0].intersectionRatio;if(!qp(l,e.getBoundingClientRect()))return s();if(n!==c){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}m=!1}try{i=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(g,h)}i.observe(e)}const c=gs(e),l=()=>s(n);return c.addEventListener("resize",l),s(!0),()=>{c.removeEventListener("resize",l),a()}}(l,n,o):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),l&&!c&&h.observe(l),t&&h.observe(t));let m=c?_p(e):null;return c&&function t(){const r=_p(e);m&&!qp(m,r)&&n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const $p=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=dp(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=fp(i),v=gp(s),b=fp(s)===s,x=await(null==c.isRTL?void 0:c.isRTL(l.floating)),w=f||(b||!m?[jp(s)]:function(e){const t=jp(e);return[vp(e),t,vp(t)]}(s)),M="none"!==h;!f&&M&&w.push(...function(e,t,n,r){const i=pp(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?xp:bp:t?bp:xp;case"left":case"right":return t?wp:Mp;default:return[]}}(fp(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(vp)))),o}(s,m,h,x));const j=[s,...w],O=await c.detectOverflow(t,g),N=[];let S=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&N.push(O[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=pp(e),i=yp(e),o=mp(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=jp(a)),[a,jp(a)]}(i,a,x);N.push(O[e[0]],O[e[1]])}if(S=[...S,{placement:i,overflows:N}],!N.every(e=>e<=0)){var E,k;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=j[e];if(t&&("alignment"!==d||v===gp(t)||S.every(e=>gp(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(k=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=S.filter(e=>{if(M){const t=gp(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},Hp=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:o,placement:a,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=dp(e,t),f={x:i,y:o},p=gp(a),h=hp(p);let m=f[h],g=f[p];const y=dp(l,t),v="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:null!=(n=y.mainAxis)?n:0,crossAxis:null!=(r=y.crossAxis)?r:0};if(u){const e="y"===h?"height":"width",t=s.reference[h]-s.floating[e]+v.mainAxis,n=s.reference[h]+s.reference[e]-v.mainAxis;m<t?m=t:m>n&&(m=n)}if(d){var b,x;const e="y"===h?"width":"height",t=Ip.has(fp(a)),n=s.reference[p]-s.floating[e]+(t&&(null==(b=c.offset)?void 0:b[p])||0)+(t?0:v.crossAxis),r=s.reference[p]+s.reference[e]+(t?0:(null==(x=c.offset)?void 0:x[p])||0)-(t?v.crossAxis:0);g<n?g=n:g>r&&(g=r)}return{[h]:m,[p]:g}}}};var Vp="undefined"!=typeof document?a.useLayoutEffect:function(){};function Kp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Kp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(!("_owner"===n&&e.$$typeof||Kp(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Zp(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xp(e,t){const n=Zp(e);return Math.round(t*n)/n}function Jp(e){const t=a.useRef(e);return Vp(()=>{t.current=e}),t}function eh(e={}){const{nodeId:t,externalTree:n}=e,r=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=tu(),o=null!=au(),a=Ys(()=>new ud({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new dd,floatingId:i,syncOnly:!1,nested:o})).current;return Gs(()=>{const e={open:t,floatingId:i};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=bs(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a}(e),i=e.rootContext||r,s=i.useState("referenceElement"),c=i.useState("floatingElement"),l=i.useState("domReferenceElement"),u=i.useState("open"),d=i.useState("floatingId"),[f,p]=a.useState(null),[h,m]=a.useState(void 0),[g,y]=a.useState(void 0),v=a.useRef(null),b=su(n),x=a.useMemo(()=>({reference:s,floating:c,domReference:l}),[s,c,l]),w=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=a.useState(r);Kp(h,r)||m(r);const[g,y]=a.useState(null),[v,b]=a.useState(null),x=a.useCallback(e=>{e!==O.current&&(O.current=e,y(e))},[]),w=a.useCallback(e=>{e!==N.current&&(N.current=e,b(e))},[]),M=s||g,j=c||v,O=a.useRef(null),N=a.useRef(null),S=a.useRef(f),E=null!=u,k=Jp(u),D=Jp(i),I=Jp(d),A=a.useCallback(()=>{if(!O.current||!N.current)return;const e={placement:t,strategy:n,middleware:h};D.current&&(e.platform=D.current),((e,t,n)=>{const r=new Map,i=null!=n?n:{},o={...Qp,...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Ep},c=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Sp(l,r,c),f=r,p=0;const h={};for(let n=0;n<o.length;n++){const m=o[n];if(!m)continue;const{name:g,fn:y}=m,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,h[g]={...h[g],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(l=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),({x:u,y:d}=Sp(l,f,c))),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})})(O.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==I.current};T.current&&!Kp(S.current,t)&&(S.current=t,o.flushSync(()=>{p(t)}))})},[h,t,n,D,I]);Vp(()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const T=a.useRef(!1);Vp(()=>(T.current=!0,()=>{T.current=!1}),[]),Vp(()=>{if(M&&(O.current=M),j&&(N.current=j),M&&j){if(k.current)return k.current(M,j,A);A()}},[M,j,A,k,E]);const C=a.useMemo(()=>({reference:O,floating:N,setReference:x,setFloating:w}),[x,w]),P=a.useMemo(()=>({reference:M,floating:j}),[M,j]),z=a.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Xp(P.floating,f.x),r=Xp(P.floating,f.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Zp(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,P.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:A,refs:C,elements:P,floatingStyles:z}),[f,A,C,P,z])}({...e,elements:{...x,...f&&{reference:f}}}),M=bs(h)?h:null,j=void 0===g?i.state.floatingElement:g;i.useSyncedValue("referenceElement",h??null),i.useSyncedValue("domReferenceElement",void 0===h?l:M),i.useSyncedValue("floatingElement",j);const O=a.useCallback(e=>{const t=bs(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),w.refs.setReference(t)},[w.refs]),N=a.useCallback(e=>{(bs(e)||null===e)&&(v.current=e,m(e)),(bs(w.refs.reference.current)||null===w.refs.reference.current||null!==e&&!bs(e))&&w.refs.setReference(e)},[w.refs,m]),S=a.useCallback(e=>{y(e),w.refs.setFloating(e)},[w.refs]),E=a.useMemo(()=>({...w.refs,setReference:N,setFloating:S,setPositionReference:O,domReference:v}),[w.refs,N,S,O]),k=a.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),D=a.useMemo(()=>({...w,dataRef:i.context.dataRef,open:u,onOpenChange:i.setOpen,events:i.context.events,floatingId:d,refs:E,elements:k,nodeId:t,rootStore:i}),[w,E,k,t,i,u,d]);return Gs(()=>{l&&(v.current=l)},[l]),Gs(()=>{i.context.dataRef.current.floatingContext=D;const e=b?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),a.useMemo(()=>({...w,context:D,refs:E,elements:k,rootStore:i}),[w,E,k,D,i])}const th=a.createContext(void 0),nh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d="real"}=dp(e,t)||{};if(null==l)return{};const f=Op(u),p={x:n,y:r},h=yp(i),m=mp(h),g=await a.getDimensions(l),y="y"===h,v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=o.reference[m]+o.reference[h]-p[h]-o.floating[m],M=p[h]-o.reference[h],j="real"===d?await(a.getOffsetParent?.(l)):s.floating;let O=s.floating[x]||o.floating[m];O&&await(a.isElement?.(j))||(O=s.floating[x]||o.floating[m]);const N=w/2-M/2,S=O/2-g[m]/2-1,E=Math.min(f[v],S),k=Math.min(f[b],S),D=E,I=O-g[m]-k,A=O/2-g[m]/2+N,T=up(D,A,I),C=!c.arrow&&null!=pp(i)&&A!==T&&o.reference[m]/2-(A<D?E:k)-g[m]/2<0,P=C?A<D?A-D:A-I:0;return{[h]:p[h]+P,data:{[h]:T,centerOffset:A-T-P,...C&&{alignmentOffset:P}},reset:C}}}),rh=(e=>{const t=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=dp(e,t);switch(i){case"referenceHidden":{const e=kp(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Dp(e)}}}case"escaped":{const e=kp(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Dp(e)}}}default:return{}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})().fn,ih={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=0===t&&0===n&&0===r&&0===i,a=await rh(e);return{data:{referenceHidden:a.data?.referenceHidden||o}}}},oh={sideX:"left",sideY:"top"},ah={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:s}=e,c=gs(i),l=c.getComputedStyle(i);if("0s"===l.transitionDuration||""===l.transitionDuration)return{x:t,y:n,data:oh};const u=await(o.getOffsetParent?.(i));let d={width:0,height:0};if("fixed"===a&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){const e=fu(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(o.isElement?.(u))&&(d=await o.getDimensions(u));const f=fp(s);let p=t,h=n;return"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height)),{x:p,y:h,data:{sideX:"left"===f?"right":oh.sideX,sideY:"top"===f?"bottom":oh.sideY}}}};function sh(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function ch(e,t,n){const{rects:r,placement:i}=e;return{side:sh(t,fp(i),n),align:pp(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function lh(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:h=!1,floatingRootContext:m,mounted:g,collisionAvoidance:y,shiftCrossAxis:v=!1,nodeId:b,adaptiveOrigin:x,lazyFlip:w=!1,externalTree:M}=e,[j,O]=a.useState(null);g||null===j||O(null);const N=y.side||"flip",S=y.align||"flip",E=y.fallbackAxisSide||"end",k="function"==typeof t?t:void 0,D=Bs(k),I=k?D:t,A=af(t),T=af(g),C=function(){const e=a.useContext(th);return e?.direction??"ltr"}(),P="rtl"===C,z=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":P?"left":"right","inline-start":P?"right":"left"}[r],_="center"===o?z:`${z}-${o}`;let R=l;const L="bottom"===r?1:0,U="top"===r?1:0,Y="right"===r?1:0,F="left"===r?1:0;"number"==typeof R?R={top:R+L,right:R+F,bottom:R+U,left:R+Y}:R&&(R={top:(R.top||0)+L,right:(R.right||0)+F,bottom:(R.bottom||0)+U,left:(R.left||0)+Y});const W={boundary:"clipping-ancestors"===c?"clippingAncestors":c,padding:R},B=a.useRef(null),Q=af(i),q=af(s),G="function"!=typeof i?i:0,$="function"!=typeof s?s:0,H=[];p&&H.push(p),H.push(((e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=fp(n),s=pp(n),c="y"===gp(n),l=Ip.has(a)?-1:1,u=o&&c?-1:1,d=dp(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=ch(e,r,P),n="function"==typeof Q.current?Q.current(t):Q.current,i="function"==typeof q.current?q.current(t):q.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[G,$,P,r]));const V="none"===S&&"shift"!==N,K=!V&&(u||v||"shift"===N),Z="none"===N?null:(e=>{const t=$p(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...W,padding:{top:R.top+1,right:R.right+1,bottom:R.bottom+1,left:R.left+1},mainAxis:!v&&"flip"===N,crossAxis:"flip"===S&&"alignment",fallbackAxisSideDirection:E}),X=V?null:((e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=dp(e,t),u={x:n,y:r},d=await o.detectOverflow(t,l),f=gp(i),p=hp(f);let h=u[p],m=u[f];const g=(e,t)=>up(t+d["y"===e?"top":"left"],t,t-d["y"===e?"bottom":"right"]);a&&(h=g(p,h)),s&&(m=g(f,m));const y=c.fn({...t,[p]:h,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:a,[f]:s}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=fu(e.elements.floating).documentElement;return{...W,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==S,crossAxis:K,limiter:u||v?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=gp(fp(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?R.left+R.right:R.top+R.bottom)/2}},{fn:Hp(n).fn,options:[n,void 0]})};var n},[W,u,v,R,S]);var J,ee;"shift"===N||"shift"===S||"center"===o?H.push(X,Z):H.push(Z,X),H.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=dp(e,t),c=await i.detectOverflow(t,s),l=fp(n),u=pp(n),d="y"===gp(n),{width:f,height:p}=r.floating;let h,m;"top"===l||"bottom"===l?(h=l,m=u===(await(null==i.isRTL?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=l,h="end"===u?"top":"bottom");const g=p-c.top-c.bottom,y=f-c.left-c.right,v=ip(p-c[h],g),b=ip(f-c[m],y),x=t.middlewareData.shift,w=!x;let M=v,j=b;null!=x&&x.enabled.x&&(j=y),null!=x&&x.enabled.y&&(M=g),w&&!u&&(d?j=f-2*op(c.left,c.right):M=p-2*op(c.top,c.bottom)),await a({...t,availableWidth:j,availableHeight:M});const O=await i.getDimensions(o.floating);return f!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...W,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!T.current)return;const i=e.style;i.setProperty("--available-width",`${t}px`),i.setProperty("--available-height",`${n}px`);const o=gs(e).devicePixelRatio||1,{x:a,y:s,width:c,height:l}=r.reference,u=(Math.round((a+c)*o)-Math.round(a*o))/o,d=(Math.round((s+l)*o)-Math.round(s*o))/o;i.setProperty("--anchor-width",`${u}px`),i.setProperty("--anchor-height",`${d}px`)}}),(ee=[d],{...nh(J=e=>({element:B.current||fu(e.elements.floating).createElement("div"),padding:d,offsetParent:"floating"})),options:[J,ee]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:o,rects:a,y:s}=e,c=fp(o),l=gp(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),g=a.reference.height/2,y="function"==typeof i?i(ch(e,r,P)):i,v=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[c],x=`${p}px ${a.reference.y+g-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===l&&v?x:b),{}}},ih,x),Gs(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,m]);const te=a.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:ne,elements:re,x:ie,y:oe,middlewareData:ae,update:se,placement:ce,context:le,isPositioned:ue,floatingStyles:de}=eh({rootContext:m,open:h?g:void 0,placement:_,middleware:H,strategy:n,whileElementsMounted:h?void 0:(...e)=>Gp(...e,te),nodeId:b,externalTree:M}),{sideX:fe,sideY:pe}=ae.adaptiveOrigin||oh,he=ue?n:"fixed",me=a.useMemo(()=>{const e=x?{position:he,[fe]:ie,[pe]:oe}:{position:he,...de};return ue||(e.opacity=0),e},[x,he,fe,ie,pe,oe,de,ue]),ge=a.useRef(null);Gs(()=>{if(!g)return;const e=A.current,t="function"==typeof e?e():e,n=(uh(t)?t.current:t)||null;n!==ge.current&&(ne.setPositionReference(n),ge.current=n)},[g,ne,I,A]),a.useEffect(()=>{if(!g)return;const e=A.current;"function"!=typeof e&&uh(e)&&e.current!==ge.current&&(ne.setPositionReference(e.current),ge.current=e.current)},[g,ne,I,A]),a.useEffect(()=>{if(h&&g&&re.reference&&re.floating)return Gp(re.reference,re.floating,se,te)},[h,g,re,se,te]);const ye=fp(ce),ve=sh(r,ye,P),be=pp(ce)||"center",xe=Boolean(ae.hide?.referenceHidden);Gs(()=>{w&&g&&ue&&O(ye)},[w,g,ue,ye]);const we=a.useMemo(()=>({position:"absolute",top:ae.arrow?.y,left:ae.arrow?.x}),[ae.arrow]),Me=0!==ae.arrow?.centerOffset;return a.useMemo(()=>({positionerStyles:me,arrowStyles:we,arrowRef:B,arrowUncentered:Me,side:ve,align:be,physicalSide:ye,anchorHidden:xe,refs:ne,context:le,isPositioned:ue,update:se}),[me,we,B,Me,ve,be,ye,xe,ne,le,ue,se])}function uh(e){return null!=e&&"current"in e}const dh=a.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Nl.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})});function fh(e){return"starting"===e?tf:vc}let ph={},hh={},mh="";const gh=new class{lockCount=0;restore=null;timeoutLock=mu.create();timeoutUnlock=mu.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(0===this.lockCount||null!==this.restore)return;const t=fu(e).documentElement,n=gs(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=yc);const r=Wu||!function(e){if("undefined"==typeof document)return!1;const t=fu(e);return gs(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=fu(e),n=t.documentElement,r=t.body,i=Ms(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}(e):function(e){const t=fu(e),n=t.documentElement,r=t.body,i=gs(n);let o=0,a=0,s=!1;const c=Md.create();if(Mu&&1!==(i.visualViewport?.scale??1))return()=>{};function l(){const t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,ph={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},mh=n.style.scrollBehavior,hh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===c.overflowY,p="scroll"===t.overflowX||"scroll"===c.overflowX,h=Math.max(0,i.innerWidth-r.clientWidth),m=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),y=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Ms(n)?n:r;if(s=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=fu(e),n=t.documentElement,r=t.body,i=Ms(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const s=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,s===c}(e),s)return n.style.scrollbarGutter=l,v.style.overflowY="hidden",void(v.style.overflowX="hidden");Object.assign(n.style,{scrollbarGutter:l,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||m?`calc(100dvh - ${g+m}px)`:"100dvh",width:y||h?`calc(100vw - ${y+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,ph),Object.assign(r.style,hh),s||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=mh)}l();const d=uu(i,"resize",function(){u(),c.request(l)});return()=>{c.cancel(),u(),"function"==typeof i.removeEventListener&&d()}}(e)}};function yh(e=!0,t=null){Gs(()=>{if(e)return gh.acquire(t)},[e,t])}const vh=a.forwardRef(function(e,t){const{render:n,className:r,style:i,anchor:o,positionMethod:s="absolute",side:c="bottom",align:l="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:y=rf,...v}=e,{store:b}=ed(),x=function(){const e=a.useContext(Jf);if(void 0===e)throw new Error(sc(45));return e}(),w=function(){const e=tu(),t=su(void 0),n=au();return Gs(()=>{if(!e)return;const r={id:e,parentId:n};return t?.addNode(r),()=>{t?.removeNode(r)}},[t,e,n]),e}(),M=b.useState("floatingRootContext"),j=b.useState("mounted"),O=b.useState("open"),N=b.useState("openChangeReason"),S=b.useState("activeTriggerElement"),E=b.useState("modal"),k=b.useState("openMethod"),D=b.useState("positionerElement"),I=b.useState("instantType"),A=b.useState("transitionStatus"),T=b.useState("hasViewport"),C=a.useRef(null),P=Id(D,!1,!1),z=lh({anchor:o,floatingRootContext:M,positionMethod:s,mounted:j,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:g,keepMounted:x,nodeId:w,collisionAvoidance:y,adaptiveOrigin:T?ah:void 0}),_=M.useState("domReferenceElement");Gs(()=>{const e=_,t=C.current;if(e&&(C.current=e),t&&e&&e!==t){b.set("instantType",void 0);const e=new AbortController;return P(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[_,P,b]),function(e,t,n,r){const[i,o]=a.useState(!1);Gs(()=>{if(!e||!t||null==n)return void o(!1);const r=fu(n).documentElement.clientWidth,i=n.offsetWidth;o(r>0&&i>0&&i>=r-20)},[e,t,n]),yh(e&&(!t||i),r)}(O&&!0===E&&N!==Nu,"touch"===k,D,S);const R=a.useCallback(e=>{b.set("positionerElement",e)},[b]),L=function(e,t,{styles:n,transitionStatus:r,props:i,refs:o,hidden:a,inert:s=!1}){const c={...n};return s&&(c.pointerEvents="none"),bc("div",e,{state:t,ref:o,props:[{role:"presentation",hidden:a,style:c},fh(r),i],stateAttributesMapping:ef})}(e,{open:O,side:z.side,align:z.align,anchorHidden:z.anchorHidden,instant:I},{styles:z.positionerStyles,transitionStatus:A,props:v,refs:[t,R],hidden:!j,inert:!O});return(0,Nl.jsxs)(np.Provider,{value:z,children:[j&&!0===E&&N!==Nu&&(0,Nl.jsx)(dh,{ref:b.context.internalBackdropRef,inert:tp(!O),cutout:S}),(0,Nl.jsx)(cu,{id:w,children:L})]})});let bh=0;function xh(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;function o(){i&&!i()||e?.focus({preventScroll:n})}if(cancelAnimationFrame(bh),r)return o(),yc;const a=requestAnimationFrame(o);return bh=a,()=>{bh===a&&(cancelAnimationFrame(a),bh=0)}}const wh={inert:new WeakMap,"aria-hidden":new WeakMap},Mh="data-base-ui-inert",jh={inert:new WeakSet,"aria-hidden":new WeakSet};let Oh=new WeakMap,Nh=0;function Sh(e){return e?ws(e)?e.host:Sh(e.parentNode):null}const Eh=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=Sh(t);return e.contains(n)?n:null}).filter(e=>null!=e),kh=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Dh=(e,t,n)=>{const r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==ms(e)&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ih(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t;return function(e,t,n,r,{mark:i=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let a=null,s=null;const c=Eh(t,e),l=i?Dh(t,kh(c),new Set(c)):[],u=[],d=[];if(o){const e=wh[o],n=function(e){return jh[e]}(o);s=n,a=e;const r=Eh(t,Array.from(t.querySelectorAll("[aria-live]"))),i=c.concat(r);Dh(t,kh(i),new Set(i)).forEach(t=>{const r=t.getAttribute(o),i=null!==r&&"false"!==r,a=(e.get(t)||0)+1;e.set(t,a),u.push(t),1===a&&i&&n.add(t),i||t.setAttribute(o,"inert"===o?"":"true")})}return i&&l.forEach(e=>{const t=(Oh.get(e)||0)+1;Oh.set(e,t),d.push(e),1===t&&e.setAttribute(Mh,"")}),Nh+=1,()=>{a&&u.forEach(e=>{const t=(a.get(e)||0)-1;a.set(e,t),t||(!s?.has(e)&&o&&e.removeAttribute(o),s?.delete(e))}),i&&d.forEach(e=>{const t=(Oh.get(e)||0)-1;Oh.set(e,t),t||e.removeAttribute(Mh)}),Nh-=1,Nh||(wh.inert=new WeakMap,wh["aria-hidden"]=new WeakMap,jh.inert=new WeakSet,jh["aria-hidden"]=new WeakSet,Oh=new WeakMap)}}(e,fu(e[0]).body,n,r,{mark:i})}let Ah=[];function Th(){Ah=Ah.filter(e=>e.deref()?.isConnected)}function Ch(e){Th(),e&&"body"!==ms(e)&&(Ah.push(new WeakRef(e)),Ah.length>20&&(Ah=Ah.slice(-20)))}function Ph(){return Th(),Ah[Ah.length-1]?.deref()}function zh(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex"))return;if(!e.getAttribute("role")?.includes("dialog"))return;const t=Yf(e).filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Uf(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function _h(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:h,getInsideElements:m}=e,g="rootStore"in t?t.rootStore:t,y=g.useState("open"),v=g.useState("domReferenceElement"),b=g.useState("floatingElement"),{events:x,dataRef:w}=g.context,M=Bs(()=>w.current.floatingContext?.nodeId),j=!1===i,O=Yu(v)&&j,N=af(i),S=af(o),E=af(u),k=af(y),D=su(h),I=Kf(),A=a.useRef(!1),T=a.useRef(!1),C=a.useRef(!1),P=a.useRef(null),z=a.useRef(""),_=a.useRef(""),R=a.useRef(null),L=a.useRef(null),U=dc(R,p,I?.beforeInsideRef),Y=dc(L,I?.afterInsideRef),F=gu(),W=gu(),B=jd(),Q=null!=I,q=Fu(b),G=Bs((e=q)=>e?Ff(e):[]),$=Bs(()=>m?.().filter(e=>null!=e)??[]);a.useEffect(()=>{if(!r&&c)return uu(fu(q),"keydown",function(e){"Tab"===e.key&&zu(q,Pu(fu(q)))&&0===G().length&&!O&&function(e){e.preventDefault(),e.stopPropagation()}(e)})},[r,q,c,O,G]),a.useEffect(()=>{if(r||!y)return;const e=fu(q);function t(){C.current=!1}return du(uu(e,"pointerdown",function(e){const t=_u(e),n=$(),r=zu(b,t)||zu(v,t)||zu(I?.portalNode,t)||n.some(e=>e===t||zu(e,t));C.current=!r,_.current=e.pointerType||"keyboard",t?.closest(`[${nf}]`)&&(T.current=!0,W.start(0,()=>{T.current=!1}))},!0),uu(e,"pointerup",t,!0),uu(e,"pointercancel",t,!0),uu(e,"keydown",function(){_.current="keyboard"},!0),t)},[r,b,v,q,y,I,W,$]),a.useEffect(()=>{if(r||!l)return;const e=fu(q);function t(t){const n=t.relatedTarget,r=t.currentTarget,i=_u(t);c&&null==n&&null!=i&&zu(b,i)&&Ch(i),queueMicrotask(()=>{const o=M(),a=g.context.triggerElements,l=$(),u=n?.hasAttribute(Au("focus-guard"))&&[R.current,L.current,I?.beforeInsideRef.current,I?.afterInsideRef.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,Nd(f),Nd(d)].includes(n),p=!(zu(v,n)||zu(b,n)||zu(n,b)||zu(I?.portalNode,n)||l.some(e=>e===n||zu(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>zu(e,n))||u||D&&(Vu(D.nodesRef.current,o).find(e=>zu(e.context?.elements.floating,n)||zu(e.context?.elements.domReference,n))||Ku(D.nodesRef.current,o).find(e=>[e.context?.elements.floating,Fu(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===v&&q&&zh(q),s&&r!==v&&!Ef(i)&&Pu(e)===e.body){if(xs(q)&&(q.focus(),"popup"===s))return void B.request(()=>{q.focus()});const e=G(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||q;xs(n)&&n.focus()}w.current.insideReactTree?w.current.insideReactTree=!1:!O&&c||!n||!p||T.current||!O&&n===Ph()||(A.current=!0,g.setOpen(!1,ju(ku,t)))})}const n=xs(v)?v:null;return b||n?du(n&&uu(n,"focusout",t),n&&uu(n,"pointerdown",function(){T.current=!0,W.start(0,()=>{T.current=!1})}),b&&uu(b,"focusin",function(e){const t=_u(e);Uf(t)&&(P.current=t)}),b&&uu(b,"focusout",t),b&&I&&uu(b,"focusout",function(){C.current||(w.current.insideReactTree=!0,F.start(0,()=>{w.current.insideReactTree=!1}))},!0)):void 0},[r,v,b,q,c,D,I,g,l,s,G,O,M,w,F,W,B,d,f,$]),a.useEffect(()=>{if(r||!b||!y)return;const e=Array.from(I?.portalNode?.querySelectorAll(`[${Au("portal")}]`)||[]),t=D?Ku(D.nodesRef.current,M()):[],n=t.find(e=>Yu(e.context?.elements.domReference||null))?.context?.elements.domReference,i=Ih([b,...e,R.current,L.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,...$(),n,Nd(f),Nd(d),O?v:null].filter(e=>null!=e),{ariaHidden:c||O,mark:!1}),o=Ih([b,...e].filter(e=>null!=e));return()=>{o(),i()}},[y,r,v,b,c,I,O,D,M,d,f,$]),Gs(()=>{if(!y||r||!xs(q))return;const e=fu(q),t=Pu(e);queueMicrotask(()=>{const n=N.current,r="function"==typeof n?n(E.current||""):n;if(void 0===r||!1===r)return;if(zu(q,t))return;let i=null;const o=()=>(null==i&&(i=G(q)),i[0]||q);let a;a=!0===r||null===r?o():Nd(r),a=a||o();const s=zu(q,Pu(e));xh(a,{preventScroll:a===q,shouldFocus(){if(!k.current)return!1;if(s)return!0;const t=Pu(e);return!(t!==a&&zu(q,t))}})})},[r,y,q,G,N,E,k]),Gs(()=>{if(r||!q)return;const e=fu(q),t=Pu(e),n=null==E.current;function i(e){var t;if(e.open||(z.current=function(e,t){const n=gs(_u(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,_.current)),e.reason===Nu&&"mouseleave"===e.nativeEvent.type&&(A.current=!0),e.reason===Su)if(e.nested)A.current=!1;else if(""===(t=e.nativeEvent).pointerType&&t.isTrusted||(Qu&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)||function(e){return!$u&&(!Qu&&0===e.width&&0===e.height||Qu&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}(e.nativeEvent))A.current=!1;else{let e=!1;fu(q).createElement("div").focus({get preventScroll(){return e=!0,!1}}),A.current=!e}}return Ch(t),x.on("openchange",i),()=>{x.off("openchange",i);const r=Pu(e),o=$(),a=zu(b,r)||o.some(e=>e===r||zu(e,r))||D&&Vu(D.nodesRef.current,M(),!1).some(e=>zu(e.context?.elements.floating,r)),s=S.current,c=function(){const e=S.current;let r="function"==typeof e?e(z.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);const i=v?.isConnected?v:null,o=t?.isConnected&&"body"!==ms(t)?t:null;let a=n?o||i:i||o;return a||(a=Ph()||null),"boolean"==typeof r?a:Nd(r)||a||null}();queueMicrotask(()=>{const t=(n=c)?Uf(n)?n:Ff(n)[0]||n:null;var n;const i="boolean"!=typeof s;s&&!A.current&&xs(t)&&(i||t===r||r===e.body||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,b,q,S,E,x,D,v,M,$]),Gs(()=>{if(!Mu||y||!b)return;const e=Pu(fu(b));xs(e)&&Uu(e)&&zu(b,e)&&e.blur()},[y,b]),Gs(()=>{if(!r&&I)return I.setFocusManagerState({modal:c,closeOnFocusOut:l,open:y,onOpenChange:g.setOpen,domReference:v}),()=>{I.setFocusManagerState(null)}},[r,I,c,y,g,l,v]),Gs(()=>{if(!r&&q)return zh(q),()=>{queueMicrotask(Th)}},[r,q]);const H=!r&&(!c||!O)&&(Q||c);return(0,Nl.jsxs)(a.Fragment,{children:[H&&(0,Nl.jsx)(Sf,{"data-type":"inside",ref:U,onFocus:e=>{if(c){const e=G();xh(e[e.length-1])}else if(I?.portalNode)if(A.current=!1,Gf(e,I.portalNode)){const e=Bf(v);e?.focus()}else Nd(f??I.beforeOutsideRef)?.focus()}}),n,H&&(0,Nl.jsx)(Sf,{"data-type":"inside",ref:Y,onFocus:e=>{if(c)xh(G()[0]);else if(I?.portalNode)if(l&&(A.current=!0),Gf(e,I.portalNode)){const e=Qf(v);e?.focus()}else Nd(d??I.afterOutsideRef)?.focus()}})]})}const Rh="ArrowUp",Lh="ArrowDown",Uh="ArrowLeft",Yh="ArrowRight",Fh="Home",Wh="End",Bh=new Set([Uh,Yh]),Qh=(new Set([Uh,Yh,Fh,Wh]),new Set([Rh,Lh])),qh=(new Set([Rh,Lh,Fh,Wh]),new Set([...Bh,...Qh])),Gh=new Set([...qh,Fh,Wh]);new Set(["Shift","Control","Alt","Meta"]);const $h=a.createContext(void 0),Hh=a.createContext(void 0);function Vh(e){const{value:t,children:n}=e;return(0,Nl.jsx)(Hh.Provider,{value:t,children:n})}const Kh={...ef,...Dd},Zh=a.forwardRef(function(e,t){const{render:n,className:r,style:i,initialFocus:o,finalFocus:s,...c}=e,{store:l}=ed(),u=function(){const e=a.useContext(np);if(!e)throw new Error(sc(46));return e}(),d=null!=function(){const e=a.useContext($h);return e}(),{context:f,hasClosePart:p}=function(){const[e,t]=a.useState(0),n=Bs(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:a.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),h=l.useState("open"),m=l.useState("openMethod"),g=l.useState("instantType"),y=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("titleElementId"),x=l.useState("descriptionElementId"),w=l.useState("modal"),M=l.useState("mounted"),j=l.useState("openChangeReason"),O=l.useState("activeTriggerElement"),N=l.useState("floatingRootContext"),S=N.useState("floatingId"),E=l.useState("disabled"),k=l.useState("openOnHover"),D=l.useState("closeDelay"),I=c.id??S;Ad({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}}),function(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,o="rootStore"in e?e.rootStore:e,s=o.useState("open"),c=o.useState("floatingElement"),l=o.useState("domReferenceElement"),{dataRef:u}=o.context,d=su(),f=au(),p=ff(o),h=gu(),m=Bs(()=>mf(u.current.openEvent?.type,p.interactedInside)),g=Bs(()=>{return e=u.current.openEvent?.type,e?.includes("mouse")&&"mousedown"!==e;var e}),y=Bs(()=>{uf(p)});Gs(()=>{s||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,y())},[s,p,y]),a.useEffect(()=>y,[y]),Gs(()=>{if(n&&s&&p.handleCloseOptions?.blockPointerEvents&&g()&&bs(l)&&c){const e=l,t=c,n=fu(c),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const i=p.pointerEventsScopeElement!==t?p.pointerEventsScopeElement:null,o=r!==t?r:null,a=p.handleCloseOptions?.getScope?.()??i??o??e.closest("[data-rootownerid]")??n.body;return df(p,{scopeElement:a,referenceElement:e,floatingElement:t}),()=>{y()}}},[n,s,l,c,p,g,d,f,y]),a.useEffect(()=>{if(!n)return;function e(){return!!(d&&f&&Vu(d.nodesRef.current,f).length>0)}function t(n){d&&f&&!e()&&h.start(0,()=>{d.events.off("floating.closed",t),o.setOpen(!1,ju(Nu,n)),d.events.emit("floating.closed",n)})}const a=c;return du(a&&uu(a,"mouseenter",function(){p.openChangeTimeout.clear(),h.clear(),d?.events.off("floating.closed",t),y()}),a&&uu(a,"mouseleave",function(n){if(e()&&d)return void d.events.on("floating.closed",t);if(Ru(n.relatedTarget,o.context.triggerElements))return;const a=u.current.floatingContext?.nodeId??i,s=n.relatedTarget;d&&a&&bs(s)&&Vu(d.nodesRef.current,a,!1).some(e=>zu(e.context?.elements.floating,s))||(p.handler?p.handler(n):(y(),g()&&!m()&&function(e){const t=pf(r,"close",p.pointerType),n=()=>{o.setOpen(!1,ju(Nu,e)),d?.events.emit("floating.closed",e)};t?p.openChangeTimeout.start(t,n):(p.openChangeTimeout.clear(),n())}(n)))}),a&&uu(a,"pointerdown",function(e){const t=_u(e);var n;n=t,null!=n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Cu}`)?p.interactedInside=null!=t?.closest("[aria-haspopup]"):p.interactedInside=!1},!0),()=>{d?.events.off("floating.closed",t)})},[n,c,o,u,r,i,g,m,y,p,d,f,h])}(N,{enabled:k&&!E,closeDelay:D});const A=void 0===o?Cd(l.context.popupRef):o,T=!1!==w&&p;l.useSyncedValue("focusManagerModal",T);const C=a.useCallback(e=>{l.set("popupElement",e)},[l]),P=bc("div",e,{state:{open:h,side:u.side,align:u.align,instant:g,transitionStatus:y},ref:[t,l.context.popupRef,C],props:[v,{id:I,role:"dialog",...Td,"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){d&&Gh.has(e.key)&&e.stopPropagation()}},fh(y),c],stateAttributesMapping:Kh});return(0,Nl.jsx)(_h,{context:N,openInteractionType:m,modal:T,disabled:!M||j===Nu,initialFocus:A,returnFocus:s,restoreFocus:"popup",previousFocusableElement:xs(O)?O:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,Nl.jsx)(Vh,{value:f,children:P})})}),Xh=_l("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Jh=_l("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),em={...ga,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>ns(e,t,{locale:ga,...n});let o=i(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>ns(e,n,{locale:ga,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let i;i=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>ns(e,t,{locale:ga,...n});let o=i(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>ns(e,n,{locale:ga,...t}),r(e,"cccc")}}};Symbol.for("constructDateFrom");const tm={},nm={};function rm(e,t){try{const n=(tm[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in nm?nm[n]:om(n,n.split(":"))}catch{if(e in nm)return nm[e];const t=e?.match(im);return t?om(e,t.slice(1)):NaN}}const im=/([+-]\d\d):?(\d\d)?/;function om(e,t){const n=+(t[0]||0),r=+(t[1]||0),i=+(t[2]||0)/60;return nm[e]=60*n+r>0?60*n+r+i:60*n-r-i}class am extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(rm(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),lm(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new am(...t,e):new am(Date.now(),e)}withTimeZone(e){return new am(+this,e)}getTimezoneOffset(){const e=-rm(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),cm(this),+this}[Symbol.for("constructDateFrom")](e){return new am(+new Date(e),this.timeZone)}}const sm=/^(get|set)(?!UTC)/;function cm(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-rm(e.timeZone,e)))}function lm(e,t){const n=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,r=rm(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),s=-new Date(+o).getTimezoneOffset();let c=a;if(a-s&&a!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){const t=new Date(+e),n=a-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);const r=rm(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(c=s)}const l=c-i;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const u=new Date(+e);u.setUTCSeconds(0);const d=a>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-60*rm(e.timeZone,e))%60;(f||d)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+d);const p=rm(e.timeZone,e),h=p>0?Math.floor(p):Math.ceil(p),m=h!==i,g=-new Date(+e).getTimezoneOffset()-h-l,y=h-i,v=n-60*h*1e3,b=y>0&&um(e)-n===60*y*1e3&&um(e,v)!==n;if(m&&g&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const t=rm(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&g<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}cm(e);const x=(t?n:n+1e3*f)-+e.internal;x&&Math.abs(x)<18e5&&(Date.prototype.setTime.call(e,+e+x),cm(e))}function um(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-rm(e.timeZone,n))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!sm.test(e))return;const t=e.replace(sm,"$1UTC");am.prototype[t]&&(e.startsWith("get")?am.prototype[e]=function(){return this.internal[t]()}:(am.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),lm(e)}(this),+this},am.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),cm(this),+this}))});class dm extends am{static tz(e,...t){return t.length?new dm(...t,e):new dm(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new dm(+this,e)}[Symbol.for("constructDateFrom")](e){return new dm(+new Date(e),this.timeZone)}}function fm(e,t,n){const r=Ma(e,n?.in);if(isNaN(t))return wa(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=wa(n?.in||e,r.getTime());return o.setMonth(r.getMonth()+t+1,0),i>=o.getDate()?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function pm(e,t,n){return fm(e,12*t,n)}function hm(e,t,n){const[r,i]=Oa(n?.in,e,t);return 12*(r.getFullYear()-i.getFullYear())+(r.getMonth()-i.getMonth())}function mm(e,t){const[n,r]=Oa(e,t.start,t.end);return{start:n,end:r}}function gm(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ma(e,t?.in),o=i.getDay(),a=6+(o<r?-7:0)-(o-r);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}function ym(e,t){return+Ma(e)>+Ma(t)}function vm(e,t){return+Ma(e)<+Ma(t)}function bm(e,t,n){const r=Ma(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=wa(n?.in||e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=function(e,t){const n=Ma(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=wa(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(o,s)),r}function xm(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class wm{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?dm.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new dm(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):is(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):fm(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return is(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):pm(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Sa(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):hm(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=mm(t?.in,e);let i=+n>+r;const o=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0),a.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);const c=[];for(;+a<=o;)c.push(wa(n,a)),a.setMonth(a.getMonth()+s);return i?c.reverse():c}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e,t){const{start:n,end:r}=mm(t?.in,e);let i=+n>+r;const o=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);const c=[];for(;+a<=o;)c.push(wa(n,a)),a.setFullYear(a.getFullYear()+s);return i?c.reverse():c}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=xm(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,1-r),o=t.addDays(i,34);return t.getMonth(e)===t.getMonth(o)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return gm(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=Ma(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):gm(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Ma(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):ns(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Aa(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Ma(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Ma(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Ca(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):ym(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):vm(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Va(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,i]=Oa(n?.in,e,t);return+Na(r)===+Na(i)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,i]=Oa(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,i]=Oa(n?.in,e,t);return r.getFullYear()===i.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=wa.bind(null,e));const t=Ma(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),wa(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=wa.bind(null,e));const t=Ma(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),wa(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):bm(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Ma(e,n?.in);return isNaN(+r)?wa(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):xm(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Na(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Da(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=Ma(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):ka(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Ea(e),this.options={locale:em,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&wm.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,i=t?.code;if(i&&wm.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:n,numberingSystem:r}).format(e)}catch{}const o="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,o)}}wm.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Mm=new wm;var jm,Om,Nm,Sm;function Em(e,t,n=!1,r=Mm){let{from:i,to:o}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return i&&o?(a(o,i)<0&&([i,o]=[o,i]),a(t,i)>=(n?1:0)&&a(o,t)>=(n?1:0)):!n&&o?s(o,t):!(n||!i)&&s(i,t)}function km(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Dm(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Im(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Am(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function Tm(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Cm(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Pm(e,t,n=Mm){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:o,isAfter:a}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return i(e,t);if(Cm(t,n))return t.some(t=>i(e,t));if(Dm(t))return Em(t,e,!1,n);if(Tm(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(km(t)){const n=o(t.before,e)>0,r=o(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return Im(t)?o(e,t.after)>0:Am(t)?o(t.before,e)>0:"function"==typeof t&&t(e)})}function zm(e){return a.createElement("button",{...e})}function _m(e){return a.createElement("span",{...e})}function Rm(e){const{size:t=24,orientation:n="left",className:r}=e;return a.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&a.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&a.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&a.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&a.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Lm(e){const{day:t,modifiers:n,...r}=e;return a.createElement("td",{...r})}function Um(e){const{day:t,modifiers:n,...r}=e,i=a.useRef(null);return a.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),a.createElement("button",{ref:i,...r})}function Ym(e){const{options:t,className:n,components:r,classNames:i,...o}=e,s=[i[jm.Dropdown],n].join(" "),c=t?.find(({value:e})=>e===o.value);return a.createElement("span",{"data-disabled":o.disabled,className:i[jm.DropdownRoot]},a.createElement(r.Select,{className:s,...o},t?.map(({value:e,label:t,disabled:n})=>a.createElement(r.Option,{key:e,value:e,disabled:n},t))),a.createElement("span",{className:i[jm.CaptionLabel],"aria-hidden":!0},c?.label,a.createElement(r.Chevron,{orientation:"down",size:18,className:i[jm.Chevron]})))}function Fm(e){return a.createElement("div",{...e})}function Wm(e){return a.createElement("div",{...e})}function Bm(e){const{calendarMonth:t,displayIndex:n,...r}=e;return a.createElement("div",{...r},e.children)}function Qm(e){const{calendarMonth:t,displayIndex:n,...r}=e;return a.createElement("div",{...r})}function qm(e){return a.createElement("table",{...e})}function Gm(e){return a.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(jm||(jm={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(Om||(Om={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Nm||(Nm={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(Sm||(Sm={}));const $m=(0,a.createContext)(void 0);function Hm(){const e=(0,a.useContext)($m);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Vm(e){const{components:t}=Hm();return a.createElement(t.Dropdown,{...e})}function Km(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:s,classNames:c,labels:{labelPrevious:l,labelNext:u}}=Hm(),d=(0,a.useCallback)(e=>{i&&n?.(e)},[i,n]),f=(0,a.useCallback)(e=>{r&&t?.(e)},[r,t]);return a.createElement("nav",{...o},a.createElement(s.PreviousMonthButton,{type:"button",className:c[jm.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:f},a.createElement(s.Chevron,{disabled:!r||void 0,className:c[jm.Chevron],orientation:"left"})),a.createElement(s.NextMonthButton,{type:"button",className:c[jm.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":u(i),onClick:d},a.createElement(s.Chevron,{disabled:!i||void 0,orientation:"right",className:c[jm.Chevron]})))}function Zm(e){const{components:t}=Hm();return a.createElement(t.Button,{...e})}function Xm(e){return a.createElement("option",{...e})}function Jm(e){const{components:t}=Hm();return a.createElement(t.Button,{...e})}function eg(e){const{rootRef:t,...n}=e;return a.createElement("div",{...n,ref:t})}function tg(e){return a.createElement("select",{...e})}function ng(e){const{week:t,...n}=e;return a.createElement("tr",{...n})}function rg(e){return a.createElement("th",{...e})}function ig(e){return a.createElement("thead",{"aria-hidden":!0},a.createElement("tr",{...e}))}function og(e){const{week:t,...n}=e;return a.createElement("th",{...n})}function ag(e){return a.createElement("th",{...e})}function sg(e){return a.createElement("tbody",{...e})}function cg(e){const{components:t}=Hm();return a.createElement(t.Dropdown,{...e})}function lg(){const e={};for(const t in jm)e[jm[t]]=`rdp-${jm[t]}`;for(const t in Om)e[Om[t]]=`rdp-${Om[t]}`;for(const t in Nm)e[Nm[t]]=`rdp-${Nm[t]}`;for(const t in Sm)e[Sm[t]]=`rdp-${Sm[t]}`;return e}function ug(e,t,n){return(n??new wm(t)).formatMonthYear(e)}const dg=ug;function fg(e,t,n){return(n??new wm(t)).format(e,"d")}function pg(e,t=Mm){return t.format(e,"LLLL")}function hg(e,t,n){return(n??new wm(t)).format(e,"cccccc")}function mg(e,t=Mm){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function gg(){return""}function yg(e,t=Mm){return t.format(e,"yyyy")}const vg=yg;function bg(e,t,n,r){let i=(r??new wm(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const xg=bg;function wg(e,t,n){return(n??new wm(t)).formatMonthYear(e)}const Mg=wg;function jg(e,t,n,r){let i=(r??new wm(n)).format(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i}function Og(e){return"Choose the Month"}function Ng(){return""}const Sg="Go to the Next Month";function Eg(e,t){return Sg}function kg(e){return"Go to the Previous Month"}function Dg(e,t,n){return(n??new wm(t)).format(e,"cccc")}function Ig(e,t){return`Week ${e}`}function Ag(e){return"Week Number"}function Tg(e){return"Choose the Year"}const Cg=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function Pg(e,t){const n=t.locale?.labels??{};return{...r,...e??{},labelDayButton:Cg(bg,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Cg(Og,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Cg(Eg,e?.labelNext,n.labelNext),labelPrevious:Cg(kg,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Cg(Ig,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Cg(Tg,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Cg(wg,e?.labelGrid,n.labelGrid),labelGridcell:Cg(jg,e?.labelGridcell,n.labelGridcell),labelNav:Cg(Ng,e?.labelNav,n.labelNav),labelWeekNumberHeader:Cg(Ag,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Cg(Dg,e?.labelWeekday,n.labelWeekday)}}function zg(e,t,n,r,i){const{startOfMonth:o,startOfYear:a,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=i;return c({start:a(e),end:s(e)}).map(e=>{const a=r.formatMonthDropdown(e,i);return{value:l(e),label:a,disabled:t&&e<o(t)||n&&e>o(n)||!1}})}function _g(e,t,n,r,i=!1){if(!e)return;if(!t)return;const{startOfYear:o,endOfYear:a,eachYearOfInterval:s,getYear:c}=r,l=s({start:o(e),end:a(t)});return i&&l.reverse(),l.map(e=>{const t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}const Rg=e=>e instanceof HTMLElement?e:null,Lg=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ug=e=>Rg(e.querySelector("[data-animated-caption]")),Yg=e=>Rg(e.querySelector("[data-animated-weeks]"));function Fg(e,t,n,r){const{month:i,defaultMonth:o,today:a=r.today(),numberOfMonths:s=1}=e;let c=i||o||a;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}class Wg{constructor(e,t,n=Mm){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(t,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Bg{constructor(e,t){this.days=t,this.weekNumber=e}}class Qg{constructor(e,t){this.date=e,this.weeks=t}}function qg(e,t){const[n,r]=(0,a.useState)(e);return[void 0===t?n:t,r]}var Gg;function $g(e){return!e[Om.disabled]&&!e[Om.hidden]&&!e[Om.outside]}function Hg(e,t,n,r,i,o,a,s=0){if(s>365)return;const c=function(e,t,n,r,i,o,a){const{ISOWeek:s,broadcastCalendar:c}=o,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfWeek:m,max:g,min:y,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:x}=a,w={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,a):s?b(e):x(e),endOfWeek:e=>c?p(e):s?h(e):m(e)};let M=w[e](n,"after"===t?1:-1);return"before"===t&&r?M=g([r,M]):"after"===t&&i&&(M=y([i,M])),M}(e,t,n.date,r,i,o,a),l=Boolean(o.disabled&&Pm(c,o.disabled,a)),u=Boolean(o.hidden&&Pm(c,o.hidden,a)),d=new Wg(c,c,a);return l||u?Hg(e,t,d,r,i,o,a,s+1):d}function Vg(e,t,n,r,i){const{autoFocus:o}=e,[s,c]=(0,a.useState)(),l=function(e,t,n,r){let i,o=-1;for(const a of e){const e=t(a);$g(e)&&(e[Om.focused]&&o<Gg.FocusedModifier?(i=a,o=Gg.FocusedModifier):r?.isEqualTo(a)&&o<Gg.LastFocused?(i=a,o=Gg.LastFocused):n(a.date)&&o<Gg.Selected?(i=a,o=Gg.Selected):e[Om.today]&&o<Gg.Today&&(i=a,o=Gg.Today))}return i||(i=e.find(e=>$g(t(e)))),i}(t.days,n,r||(()=>!1),s),[u,d]=(0,a.useState)(o?l:void 0);return{isFocusTarget:e=>Boolean(l?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{c(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const o=Hg(n,r,u,t.navStart,t.navEnd,e,i);if(o){if(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(o)))return;t.goToDay(o),d(o)}}}}function Kg(e,t,n=Mm){return Em(e,t.from,!1,n)||Em(e,t.to,!1,n)||Em(t,e.from,!1,n)||Em(t,e.to,!1,n)}function Zg(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:o,required:a,onSelect:s}=e,[c,l]=qg(o,s?o:void 0),u=s?o:c;return{selected:u,select:(o,c,d)=>{const{min:f,max:p}=e;let h;if(o){const e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(o,e);h=!i||!r&&u?.from?function(e,t,n=0,r=0,i=!1,o=Mm){const{from:a,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=o;let d;if(a||s){if(a&&!s)d=c(a,e)?0===n?{from:a,to:e}:i?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(c(a,e)&&c(s,e))d=i?{from:a,to:s}:void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(l(e,a))d={from:a,to:e};else{if(!l(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=o.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(o,u,f,p,a,t):!a&&s?void 0:{from:o,to:void 0}}return r&&n&&h?.from&&h.to&&function(e,t,n=Mm){const r=Array.isArray(t)?t:[t],i=r.filter(e=>"function"!=typeof e).some(t=>"boolean"==typeof t?t:n.isDate(t)?Em(e,t,!1,n):Cm(t,n)?t.some(t=>Em(e,t,!1,n)):Dm(t)?!(!t.from||!t.to)&&Kg(e,{from:t.from,to:t.to},n):Tm(t)?function(e,t,n=Mm){const r=Array.isArray(t)?t:[t];let i=e.from;const o=n.differenceInCalendarDays(e.to,e.from),a=Math.min(o,6);for(let e=0;e<=a;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}(e,t.dayOfWeek,n):km(t)?n.isAfter(t.before,t.after)?Kg(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Pm(e.from,t,n)||Pm(e.to,t,n):!(!Im(t)&&!Am(t))&&(Pm(e.from,t,n)||Pm(e.to,t,n)));if(i)return!0;const o=r.filter(e=>"function"==typeof e);if(o.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(o.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}({from:h.from,to:h.to},n,t)&&(h.from=o,h.to=void 0),s||l(h),s?.(h,o,c,d),h},isSelected:e=>u&&Em(u,e,!1,t)}}function Xg(e,t){return e instanceof dm&&e.timeZone===t?e:new dm(e,t)}function Jg(e,t,n){if(!n)return Xg(e,t);const r=Xg(e,t),i=new dm(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function ey(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?Jg(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?Jg(e,t,n):e):Dm(e)?{...e,from:e.from?Xg(e.from,t):e.from,to:e.to?Xg(e.to,t):e.to}:km(e)?{before:Jg(e.before,t,n),after:Jg(e.after,t,n)}:Im(e)?{after:Jg(e.after,t,n)}:Am(e)?{before:Jg(e.before,t,n)}:e}function ty(e,t,n){return e?Array.isArray(e)?e.map(e=>ey(e,t,n)):ey(e,t,n):e}function ny(n){let r=n;const i=r.timeZone;if(i&&(r={...n,timeZone:i},r.today&&(r.today=Xg(r.today,i)),r.month&&(r.month=Xg(r.month,i)),r.defaultMonth&&(r.defaultMonth=Xg(r.defaultMonth,i)),r.startMonth&&(r.startMonth=Xg(r.startMonth,i)),r.endMonth&&(r.endMonth=Xg(r.endMonth,i)),"single"===r.mode&&r.selected?r.selected=Xg(r.selected,i):"multiple"===r.mode&&r.selected?r.selected=r.selected?.map(e=>Xg(e,i)):"range"===r.mode&&r.selected&&(r.selected={from:r.selected.from?Xg(r.selected.from,i):r.selected.from,to:r.selected.to?Xg(r.selected.to,i):r.selected.to}),void 0!==r.disabled&&(r.disabled=ty(r.disabled,i)),void 0!==r.hidden&&(r.hidden=ty(r.hidden,i)),r.modifiers)){const e={};Object.keys(r.modifiers).forEach(t=>{e[t]=ty(r.modifiers?.[t],i)}),r.modifiers=e}const{components:o,formatters:s,labels:c,dateLib:l,locale:u,classNames:d}=(0,a.useMemo)(()=>{const n={...em,...r.locale},i=r.broadcastCalendar?1:r.weekStartsOn,o=r.noonSafe&&r.timeZone?function(e,t={}){const{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,o=t=>{const n="number"==typeof t||"string"==typeof t?new Date(t):t;return new dm(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},a=e=>{const t=o(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>o(dm.tz(e)),newDate:(t,n,r)=>new dm(t,n,r,12,0,0,e),startOfDay:e=>o(e),startOfWeek:(e,t)=>{const n=o(e),r=t?.weekStartsOn??i,a=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-a),n},startOfISOWeek:e=>{const t=o(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{const t=o(e);return t.setDate(1),t},startOfYear:e=>{const t=o(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{const n=o(e),r=(((t?.weekStartsOn??i)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{const t=o(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{const t=o(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{const t=o(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{const n=o(t.start),r=o(t.end),i=[],a=new dm(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=12*r.getFullYear()+r.getMonth();for(;12*a.getFullYear()+a.getMonth()<=s;)i.push(new dm(a,e)),a.setMonth(a.getMonth()+1,1);return i},addDays:(e,t)=>{const n=o(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{const n=o(e);return n.setDate(n.getDate()+7*t),n},addMonths:(e,t)=>{const n=o(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{const n=o(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{const n=o(t.start),r=o(t.end),i=[],a=new dm(n.getFullYear(),0,1,12,0,0,e);for(;a.getFullYear()<=r.getFullYear();)i.push(new dm(a,e)),a.setFullYear(a.getFullYear()+1,0,1);return i},getWeek:(e,t)=>Ca(a(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>Aa(a(e)),differenceInCalendarDays:(e,t)=>Sa(a(e),a(t)),differenceInCalendarMonths:(e,t)=>hm(a(e),a(t))}}(r.timeZone,{weekStartsOn:i,locale:n}):void 0,a=r.dateLib&&o?{...o,...r.dateLib}:r.dateLib??o,s=new wm({locale:n,weekStartsOn:i,firstWeekContainsDate:r.firstWeekContainsDate,useAdditionalWeekYearTokens:r.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:r.useAdditionalDayOfYearTokens,timeZone:r.timeZone,numerals:r.numerals},a);return{dateLib:s,components:(l=r.components,{...e,...l}),formatters:(c=r.formatters,c?.formatMonthCaption&&!c.formatCaption&&(c.formatCaption=c.formatMonthCaption),c?.formatYearCaption&&!c.formatYearDropdown&&(c.formatYearDropdown=c.formatYearCaption),{...t,...c}),labels:Pg(r.labels,s.options),locale:n,classNames:{...lg(),...r.classNames}};var c,l},[r.locale,r.broadcastCalendar,r.weekStartsOn,r.firstWeekContainsDate,r.useAdditionalWeekYearTokens,r.useAdditionalDayOfYearTokens,r.timeZone,r.numerals,r.dateLib,r.noonSafe,r.components,r.formatters,r.labels,r.classNames]);r.today||(r={...r,today:l.today()});const{captionLayout:f,mode:p,navLayout:h,numberOfMonths:m=1,onDayBlur:g,onDayClick:y,onDayFocus:v,onDayKeyDown:b,onDayMouseEnter:x,onDayMouseLeave:w,onNextClick:M,onPrevClick:j,showWeekNumber:O,styles:N}=r,{formatCaption:S,formatDay:E,formatMonthDropdown:k,formatWeekNumber:D,formatWeekNumberHeader:I,formatWeekdayName:A,formatYearDropdown:T}=s,C=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:a,endOfMonth:s,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:h,toMonth:m}=e;!n&&h&&(n=h),!n&&f&&(n=t.newDate(f,0,1)),!r&&m&&(r=m),!r&&p&&(r=u(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=a(n):f?n=u(f,0,1):!n&&g&&(n=i(c(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=l(e.today??d())),[n?o(n):n,r?o(r):r]}(e,t),{startOfMonth:i,endOfMonth:o}=t,s=Fg(e,n,r,t),[c,l]=qg(s,e.month?s:void 0);(0,a.useEffect)(()=>{const i=Fg(e,n,r,t);l(i)},[e.timeZone]);const{months:u,weeks:d,days:f,previousMonth:p,nextMonth:h}=(0,a.useMemo)(()=>{const i=function(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let n=0;n<i;n++){const i=r.addMonths(e,n);if(t&&i>t)break;o.push(i)}return o}(c,r,{numberOfMonths:e.numberOfMonths},t),a=function(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:h,endOfWeek:m,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:v,startOfWeek:b}=r,x=c?y(i,r):a?v(i):b(i),w=c?f(o):a?p(h(o)):m(h(o)),M=t&&(c?f(t):a?p(t):m(t)),j=u(M&&g(w,M)?M:w,x),O=d(o,i)+1,N=[];for(let e=0;e<=j;e++){const t=l(x,e);N.push(t)}const S=(c?35:42)*O;if(s&&N.length<S){const e=S-N.length;for(let t=0;t<e;t++){const e=l(N[N.length-1],1);N.push(e)}}return N}(i,e.endMonth?o(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),s=function(e,t,n,r){const{addDays:i,endOfBroadcastWeek:o,endOfISOWeek:a,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,h=e.reduce((e,h)=>{const m=n.broadcastCalendar?d(h,r):n.ISOWeek?f(h):p(h),g=n.broadcastCalendar?o(h):n.ISOWeek?a(s(h)):c(s(h)),y=t.filter(e=>e>=m&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<v){const e=t.filter(e=>{const t=v-y.length;return e>g&&e<=i(g,t)});y.push(...e)}const b=y.reduce((e,t)=>{const i=n.ISOWeek?l(t):u(t),o=e.find(e=>e.weekNumber===i),a=new Wg(t,h,r);return o?o.days.push(a):e.push(new Bg(i,[a])),e},[]),x=new Qg(h,b);return e.push(x),e},[]);return n.reverseMonths?h.reverse():h}(i,a,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),l=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(s),u=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(s),d=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:c}=r,l=i?o??1:1,u=a(e);return t&&c(u,t)<=0?void 0:s(u,-l)}(c,n,e,t),f=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:c}=r,l=i?o:1,u=a(e);return t&&c(t,e)<o?void 0:s(u,l)}(c,r,e,t);return{months:s,weeks:l,days:u,previousMonth:d,nextMonth:f}},[t,c.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:g}=e,y=e=>{if(m)return;let t=i(e);n&&t<i(n)&&(t=i(n)),r&&t>i(r)&&(t=i(r)),l(t),g?.(t)};return{months:u,weeks:d,days:f,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:y,goToDay:e=>{(e=>d.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||y(e.date)}}}(r,l),{days:P,months:z,navStart:_,navEnd:R,previousMonth:L,nextMonth:U,goToMonth:Y}=C,F=function(e,t,n,r,i){const{disabled:o,hidden:a,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=i.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:h,endOfMonth:m,isAfter:g}=i,y=n&&p(n),v=r&&m(r),b={[Om.focused]:[],[Om.outside]:[],[Om.disabled]:[],[Om.hidden]:[],[Om.today]:[]},x={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(y&&h(e,y)),m=Boolean(v&&g(e,v)),w=Boolean(o&&Pm(e,o,i)),M=Boolean(a&&Pm(e,a,i))||p||m||!l&&!c&&r||l&&!1===c&&r,j=d(e,u);r&&b.outside.push(t),w&&b.disabled.push(t),M&&b.hidden.push(t),j&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&Pm(e,r,i)&&(x[n]?x[n].push(t):x[n]=[t])})}return e=>{const t={[Om.focused]:!1,[Om.disabled]:!1,[Om.hidden]:!1,[Om.outside]:!1,[Om.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some(t=>t===e)}for(const t in x)n[t]=x[t].some(t=>t===e);return{...t,...n}}}(P,r,_,R,l),{isSelected:W,select:B,selected:Q}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=qg(n,i?n:void 0),s=i?n:o,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let o=e;return!r&&s&&s&&c(e,s)&&(o=void 0),i||a(o),i?.(o,e,t,n),o},isSelected:e=>!!s&&c(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=qg(n,i?n:void 0),s=i?n:o,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let o=[...s??[]];if(l(e)){if(s?.length===u)return;if(r&&1===s?.length)return;o=s?.filter(t=>!c(t,e))}else o=s?.length===d?[e]:[...o,e];return i||a(o),i?.(o,e,t,n),o},isSelected:l}}(e,t),i=Zg(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}(r,l)??{},{blur:q,focused:G,isFocusTarget:$,moveFocus:H,setFocused:V}=Vg(r,C,F,W??(()=>!1),l),{labelDayButton:K,labelGridcell:Z,labelGrid:X,labelMonthDropdown:J,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:ie,labelWeekNumberHeader:oe,labelYearDropdown:ae}=c,se=(0,a.useMemo)(()=>function(e,t,n,r){const i=r??e.today(),o=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),a=[];for(let t=0;t<7;t++){const n=e.addDays(o,t);a.push(n)}return a}(l,r.ISOWeek,r.broadcastCalendar,r.today),[l,r.ISOWeek,r.broadcastCalendar,r.today]),ce=void 0!==p||void 0!==y,le=(0,a.useCallback)(()=>{L&&(Y(L),j?.(L))},[L,Y,j]),ue=(0,a.useCallback)(()=>{U&&(Y(U),M?.(U))},[Y,U,M]),de=(0,a.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),V(e),t.disabled||(B?.(e.date,t,n),y?.(e.date,t,n))},[B,y,V]),fe=(0,a.useCallback)((e,t)=>n=>{V(e),v?.(e.date,t,n)},[v,V]),pe=(0,a.useCallback)((e,t)=>n=>{q(),g?.(e.date,t,n)},[q,g]),he=(0,a.useCallback)((e,t)=>n=>{const i={ArrowLeft:[n.shiftKey?"month":"day","rtl"===r.dir?"after":"before"],ArrowRight:[n.shiftKey?"month":"day","rtl"===r.dir?"before":"after"],ArrowDown:[n.shiftKey?"year":"week","after"],ArrowUp:[n.shiftKey?"year":"week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(i[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=i[n.key];H(e,t)}b?.(e.date,t,n)},[H,b,r.dir]),me=(0,a.useCallback)((e,t)=>n=>{x?.(e.date,t,n)},[x]),ge=(0,a.useCallback)((e,t)=>n=>{w?.(e.date,t,n)},[w]),ye=(0,a.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setMonth(l.startOfMonth(e),n);Y(r)},[l,Y]),ve=(0,a.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setYear(l.startOfMonth(e),n);Y(r)},[l,Y]),{className:be,style:xe}=(0,a.useMemo)(()=>({className:[d[jm.Root],r.className].filter(Boolean).join(" "),style:{...N?.[jm.Root],...r.style}}),[d,r.className,r.style,N]),we=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(r),Me=(0,a.useRef)(null);!function(e,t,{classNames:n,months:r,focused:i,dateLib:o}){const s=(0,a.useRef)(null),c=(0,a.useRef)(r),l=(0,a.useRef)(!1);(0,a.useLayoutEffect)(()=>{const a=c.current;if(c.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==a.length&&r.length===a.length))return;const u=o.isSameMonth(r[0].date,a[0].date),d=o.isAfter(r[0].date,a[0].date),f=d?n[Sm.caption_after_enter]:n[Sm.caption_before_enter],p=d?n[Sm.weeks_after_enter]:n[Sm.weeks_before_enter],h=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Lg(m).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Rg(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=Ug(e);n&&n.classList.remove(f);const r=Yg(e);r&&r.classList.remove(p)}),s.current=m):s.current=null,l.current||u||i)return;const g=h instanceof HTMLElement?Lg(h):[],y=Lg(e.current);if(y?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){l.current=!0;const t=[];e.current.style.isolation="isolate";const r=(v=e.current,Rg(v.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),y.forEach((i,o)=>{const a=g[o];if(!a)return;i.style.position="relative",i.style.overflow="hidden";const s=Ug(i);s&&s.classList.add(f);const c=Yg(i);c&&c.classList.add(p);const u=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(f),c&&c.classList.remove(p),i.style.position="",i.style.overflow="",i.contains(a)&&i.removeChild(a)};t.push(u),a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const h=(e=>Rg(e.querySelector("[data-animated-weekdays]")))(a);h&&(h.style.opacity="0");const m=Ug(a);m&&(m.classList.add(d?n[Sm.caption_before_exit]:n[Sm.caption_after_exit]),m.addEventListener("animationend",u));const y=Yg(a);y&&y.classList.add(d?n[Sm.weeks_before_exit]:n[Sm.weeks_after_exit]),i.insertBefore(a,i.firstChild)})}var v})}(Me,Boolean(r.animate),{classNames:d,months:z,focused:G,dateLib:l});const je={dayPickerProps:r,selected:Q,select:B,isSelected:W,months:z,nextMonth:U,previousMonth:L,goToMonth:Y,getModifiers:F,components:o,classNames:d,styles:N,labels:c,formatters:s};return a.createElement($m.Provider,{value:je},a.createElement(o.Root,{rootRef:r.animate?Me:void 0,className:be,style:xe,dir:r.dir,id:r.id,lang:r.lang??u.code,nonce:r.nonce,title:r.title,role:r.role,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],...we},a.createElement(o.Months,{className:d[jm.Months],style:N?.[jm.Months]},!r.hideNavigation&&!h&&a.createElement(o.Nav,{"data-animated-nav":r.animate?"true":void 0,className:d[jm.Nav],style:N?.[jm.Nav],"aria-label":ee(),onPreviousClick:le,onNextClick:ue,previousMonth:L,nextMonth:U}),z.map((e,t)=>a.createElement(o.Month,{"data-animated-month":r.animate?"true":void 0,className:d[jm.Month],style:N?.[jm.Month],key:t,displayIndex:t,calendarMonth:e},"around"===h&&!r.hideNavigation&&0===t&&a.createElement(o.PreviousMonthButton,{type:"button",className:d[jm.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":te(L),onClick:le,"data-animated-button":r.animate?"true":void 0},a.createElement(o.Chevron,{disabled:!L||void 0,className:d[jm.Chevron],orientation:"rtl"===r.dir?"right":"left"})),a.createElement(o.MonthCaption,{"data-animated-caption":r.animate?"true":void 0,className:d[jm.MonthCaption],style:N?.[jm.MonthCaption],calendarMonth:e,displayIndex:t},f?.startsWith("dropdown")?a.createElement(o.DropdownNav,{className:d[jm.Dropdowns],style:N?.[jm.Dropdowns]},(()=>{const t="dropdown"===f||"dropdown-months"===f?a.createElement(o.MonthsDropdown,{key:"month",className:d[jm.MonthsDropdown],"aria-label":J(),classNames:d,components:o,disabled:Boolean(r.disableNavigation),onChange:ye(e.date),options:zg(e.date,_,R,s,l),style:N?.[jm.Dropdown],value:l.getMonth(e.date)}):a.createElement("span",{key:"month"},k(e.date,l)),n="dropdown"===f||"dropdown-years"===f?a.createElement(o.YearsDropdown,{key:"year",className:d[jm.YearsDropdown],"aria-label":ae(l.options),classNames:d,components:o,disabled:Boolean(r.disableNavigation),onChange:ve(e.date),options:_g(_,R,s,l,Boolean(r.reverseYears)),style:N?.[jm.Dropdown],value:l.getYear(e.date)}):a.createElement("span",{key:"year"},T(e.date,l));return"year-first"===l.getMonthYearOrder()?[n,t]:[t,n]})(),a.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},S(e.date,l.options,l))):a.createElement(o.CaptionLabel,{className:d[jm.CaptionLabel],role:"status","aria-live":"polite"},S(e.date,l.options,l))),"around"===h&&!r.hideNavigation&&t===m-1&&a.createElement(o.NextMonthButton,{type:"button",className:d[jm.NextMonthButton],tabIndex:U?void 0:-1,"aria-disabled":!U||void 0,"aria-label":ne(U),onClick:ue,"data-animated-button":r.animate?"true":void 0},a.createElement(o.Chevron,{disabled:!U||void 0,className:d[jm.Chevron],orientation:"rtl"===r.dir?"left":"right"})),t===m-1&&"after"===h&&!r.hideNavigation&&a.createElement(o.Nav,{"data-animated-nav":r.animate?"true":void 0,className:d[jm.Nav],style:N?.[jm.Nav],"aria-label":ee(),onPreviousClick:le,onNextClick:ue,previousMonth:L,nextMonth:U}),a.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===p||"range"===p,"aria-label":X(e.date,l.options,l)||void 0,className:d[jm.MonthGrid],style:N?.[jm.MonthGrid]},!r.hideWeekdays&&a.createElement(o.Weekdays,{"data-animated-weekdays":r.animate?"true":void 0,className:d[jm.Weekdays],style:N?.[jm.Weekdays]},O&&a.createElement(o.WeekNumberHeader,{"aria-label":oe(l.options),className:d[jm.WeekNumberHeader],style:N?.[jm.WeekNumberHeader],scope:"col"},I()),se.map(e=>a.createElement(o.Weekday,{"aria-label":re(e,l.options,l),className:d[jm.Weekday],key:String(e),style:N?.[jm.Weekday],scope:"col"},A(e,l.options,l)))),a.createElement(o.Weeks,{"data-animated-weeks":r.animate?"true":void 0,className:d[jm.Weeks],style:N?.[jm.Weeks]},e.weeks.map(e=>a.createElement(o.Week,{className:d[jm.Week],key:e.weekNumber,style:N?.[jm.Week],week:e},O&&a.createElement(o.WeekNumber,{week:e,style:N?.[jm.WeekNumber],"aria-label":ie(e.weekNumber,{locale:u}),className:d[jm.WeekNumber],scope:"row",role:"rowheader"},D(e.weekNumber,l)),e.days.map(e=>{const{date:t}=e,n=F(e);if(n[Om.focused]=!n.hidden&&Boolean(G?.isEqualTo(e)),n[Nm.selected]=W?.(t)||n.selected,Dm(Q)){const{from:e,to:r}=Q;n[Nm.range_start]=Boolean(e&&r&&l.isSameDay(t,e)),n[Nm.range_end]=Boolean(e&&r&&l.isSameDay(t,r)),n[Nm.range_middle]=Em(Q,t,!0,l)}const i=function(e,t={},n={}){let r={...t?.[jm.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(n,N,r.modifiersStyles),s=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[Om[r]]?e.push(t[Om[r]]):t[Nm[r]]&&e.push(t[Nm[r]]),e),[t[jm.Day]])}(n,d,r.modifiersClassNames),c=ce||n.hidden?void 0:Z(t,n,l.options,l);return a.createElement(o.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:n,className:s.join(" "),style:i,role:"gridcell","aria-selected":n.selected||void 0,"aria-label":c,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":n.selected||void 0,"data-disabled":n.disabled||void 0,"data-hidden":n.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":n.focused||void 0,"data-today":n.today||void 0},!n.hidden&&ce?a.createElement(o.DayButton,{className:d[jm.DayButton],style:N?.[jm.DayButton],type:"button",day:e,modifiers:n,disabled:!n.focused&&n.disabled||void 0,"aria-disabled":n.focused&&n.disabled||void 0,tabIndex:$(e)?0:-1,"aria-label":K(t,n,l.options,l),onClick:de(e,n),onBlur:pe(e,n),onFocus:fe(e,n),onKeyDown:he(e,n),onMouseEnter:me(e,n),onMouseLeave:ge(e,n)},E(t,l.options,l)):!n.hidden&&E(e.date,l.options,l))})))))))),r.footer&&a.createElement(o.Footer,{className:d[jm.Footer],style:N?.[jm.Footer],role:"status","aria-live":"polite"},r.footer)))}function ry(e,t){const n=+Ma(e)-+Ma(t);return n<0?-1:n>0?1:n}function iy(e,t,n){const[r,i]=Oa(n?.in,e,t),o=ry(r,i),a=Math.abs(function(e,t,n){const[r,i]=Oa(n?.in,e,t);return r.getFullYear()-i.getFullYear()}(r,i));r.setFullYear(1584),i.setFullYear(1584);const s=o*(a-+(ry(r,i)===-o));return 0===s?0:s}function oy({modifiers:e,children:t,...n}){const r=e.range_start||e.range_end,i=e.range_middle,o=e.outside;return(0,Nl.jsx)("button",{...n,className:bl("disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-rounded-full disco-text-[11px] disco-transition-colors disco-select-none",r?"disco-bg-[#08c889] disco-font-semibold disco-text-white":i?"disco-text-[rgba(74,74,74,0.8)]":o?"disco-cursor-default disco-text-[rgba(74,74,74,0.25)]":"disco-cursor-pointer disco-text-[rgba(74,74,74,0.85)] hover:disco-bg-[rgba(8,200,137,0.12)]"),children:t})}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(Gg||(Gg={}));class ay{subPriority=0;validate(e,t){return!0}}class sy extends ay{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class cy extends ay{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>wa(t,e))}set(e,t){return t.timestampIsSet?e:wa(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):wa(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class ly{run(e,t,n,r){const i=this.parse(e,t,n,r);return i?{setter:new sy(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}}const uy=/^(1[0-2]|0?\d)/,dy=/^(3[0-1]|[0-2]?\d)/,fy=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,py=/^(5[0-3]|[0-4]?\d)/,hy=/^(2[0-3]|[0-1]?\d)/,my=/^(2[0-4]|[0-1]?\d)/,gy=/^(1[0-1]|0?\d)/,yy=/^(1[0-2]|0?\d)/,vy=/^[0-5]?\d/,by=/^[0-5]?\d/,xy=/^\d/,wy=/^\d{1,2}/,My=/^\d{1,3}/,jy=/^\d{1,4}/,Oy=/^-?\d+/,Ny=/^-?\d/,Sy=/^-?\d{1,2}/,Ey=/^-?\d{1,3}/,ky=/^-?\d{1,4}/,Dy=/^([+-])(\d{2})(\d{2})?|Z/,Iy=/^([+-])(\d{2})(\d{2})|Z/,Ay=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ty=/^([+-])(\d{2}):(\d{2})|Z/,Cy=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Py(e,t){return e?{value:t(e.value),rest:e.rest}:e}function zy(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function _y(e,t){const n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function Ry(e){return zy(Oy,e)}function Ly(e,t){switch(e){case 1:return zy(xy,t);case 2:return zy(wy,t);case 3:return zy(My,t);case 4:return zy(jy,t);default:return zy(new RegExp("^\\d{1,"+e+"}"),t)}}function Uy(e,t){switch(e){case 1:return zy(Ny,t);case 2:return zy(Sy,t);case 3:return zy(Ey,t);case 4:return zy(ky,t);default:return zy(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Yy(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Fy(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const t=r+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?i:1-i}function Wy(e){return e%400==0||e%4==0&&e%100!=0}const By=[31,28,31,30,31,30,31,31,30,31,30,31],Qy=[31,29,31,30,31,30,31,31,30,31,30,31];function qy(e,t,n){const r=va(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Ma(e,n?.in),a=o.getDay(),s=7-i;return is(o,t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7,n)}function Gy(e,t,n){const r=Ma(e,n?.in);return is(r,t-function(e,t){const n=Ma(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}const $y={G:new class extends ly{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends ly{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Py(Ly(4,e),r);case"yo":return Py(n.ordinalNumber(e,{unit:"year"}),r);default:return Py(Ly(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Fy(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends ly{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Py(Ly(4,e),r);case"Yo":return Py(n.ordinalNumber(e,{unit:"year"}),r);default:return Py(Ly(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const i=Ta(e,r);if(n.isTwoDigitYear){const t=Fy(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),ka(e,r)}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),ka(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends ly{priority=130;parse(e,t){return Uy("R"===t?4:t.length,e)}set(e,t,n){const r=wa(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Da(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends ly{priority=130;parse(e,t){return Uy("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends ly{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Ly(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends ly{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Ly(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends ly{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return Py(zy(uy,e),r);case"MM":return Py(Ly(2,e),r);case"Mo":return Py(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends ly{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return Py(zy(uy,e),r);case"LL":return Py(Ly(2,e),r);case"Lo":return Py(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends ly{priority=100;parse(e,t,n){switch(t){case"w":return zy(py,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Ly(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return ka(function(e,t,n){const r=Ma(e,n?.in),i=Ca(r,n)-t;return r.setDate(r.getDate()-7*i),Ma(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends ly{priority=100;parse(e,t,n){switch(t){case"I":return zy(py,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Ly(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Da(function(e,t,n){const r=Ma(e,n?.in),i=Aa(r,n)-t;return r.setDate(r.getDate()-7*i),r}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends ly{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return zy(dy,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Ly(t.length,e)}}validate(e,t){const n=Wy(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Qy[r]:t>=1&&t<=By[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends ly{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return zy(fy,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Ly(t.length,e)}}validate(e,t){return Wy(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends ly{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=qy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends ly{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Py(Ly(t.length,e),i);case"eo":return Py(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=qy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends ly{priority=90;parse(e,t,n,r){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Py(Ly(t.length,e),i);case"co":return Py(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=qy(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends ly{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Ly(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Py(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Py(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Py(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Py(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=Gy(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends ly{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yy(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends ly{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yy(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends ly{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yy(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends ly{priority=70;parse(e,t,n){switch(t){case"h":return zy(yy,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Ly(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends ly{priority=70;parse(e,t,n){switch(t){case"H":return zy(hy,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Ly(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends ly{priority=70;parse(e,t,n){switch(t){case"K":return zy(gy,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Ly(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends ly{priority=70;parse(e,t,n){switch(t){case"k":return zy(my,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Ly(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends ly{priority=60;parse(e,t,n){switch(t){case"m":return zy(vy,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Ly(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends ly{priority=50;parse(e,t,n){switch(t){case"s":return zy(by,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Ly(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends ly{priority=30;parse(e,t){return Py(Ly(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends ly{priority=10;parse(e,t){switch(t){case"X":return _y(Dy,e);case"XX":return _y(Iy,e);case"XXXX":return _y(Ay,e);case"XXXXX":return _y(Cy,e);default:return _y(Ty,e)}}set(e,t,n){return t.timestampIsSet?e:wa(e,e.getTime()-ja(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends ly{priority=10;parse(e,t){switch(t){case"x":return _y(Dy,e);case"xx":return _y(Iy,e);case"xxxx":return _y(Ay,e);case"xxxxx":return _y(Cy,e);default:return _y(Ty,e)}}set(e,t,n){return t.timestampIsSet?e:wa(e,e.getTime()-ja(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends ly{priority=40;parse(e){return Ry(e)}set(e,t,n){return[wa(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends ly{priority=20;parse(e){return Ry(e)}set(e,t,n){return[wa(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Hy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ky=/^'([^]*?)'?$/,Zy=/''/g,Xy=/\S/,Jy=/[a-zA-Z]/;function ev(e,t,n,r){const i=()=>wa(r?.in||n,NaN),o=Object.assign({},va()),a=r?.locale??o.locale??ga,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?i():Ma(n,r?.in);const l={firstWeekContainsDate:s,weekStartsOn:c,locale:a},u=[new cy(r?.in,n)],d=t.match(Vy).map(e=>{const t=e[0];return t in Wa?(0,Wa[t])(e,a.formatLong):e}).join("").match(Hy),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&$a(n)&&Ha(n,t,e),!r?.useAdditionalDayOfYearTokens&&Ga(n)&&Ha(n,t,e);const o=n[0],s=$y[o];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=f.find(e=>t.includes(e.token)||e.token===o);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&f.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:o,fullToken:n});const r=s.run(e,n,a.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(o.match(Jy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");if("''"===n?n="'":"'"===o&&(n=tv(n)),0!==e.indexOf(n))return i();e=e.slice(n.length)}}if(e.length>0&&Xy.test(e))return i();const p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=Ma(n,r?.in);if(isNaN(+h))return i();const m={};for(const e of p){if(!e.validate(h,l))return i();const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return h}function tv(e){return e.match(Ky)[1].replace(Zy,"'")}const nv="dd-MM-yyyy";function rv({label:e,date:t,onDateChange:n}){const[r,i]=(0,a.useState)(!1),[o,s]=(0,a.useState)(""),[c,l]=(0,a.useState)(!1),u=(0,a.useRef)(null),d=t?ns(t,nv):"";(0,a.useEffect)(()=>{r||(s(d),l(!1))},[d,r]);const f=e=>{const t=e.trim();if(!t)return i(!1),void l(!1);const r=ev(t,nv,new Date);Ka(r)?(n(r),i(!1),l(!1)):l(!0)};return(0,Nl.jsxs)("div",{className:bl("disco-mb-2 disco-flex disco-items-center disco-gap-2 disco-rounded-[5px] disco-border disco-px-3 disco-py-1.5",c?"disco-border-red-400":"disco-border-[#e5e7eb]"),children:[(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-medium disco-text-[rgba(74,74,74,0.45)]",children:e}),r?(0,Nl.jsx)("input",{ref:u,type:"text",value:o,onChange:e=>{s(e.target.value),l(!1)},onBlur:()=>{f(o),Ka(ev(o.trim(),nv,new Date))||(s(d),l(!1),i(!1))},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),f(o)),"Escape"===e.key&&(s(d),l(!1),i(!1))},placeholder:"DD-MM-YYYY",className:"!disco-border-none disco-bg-transparent disco-p-0 disco-text-xs disco-font-semibold disco-text-gray-700 !disco-outline-none !disco-shadow-none focus:!disco-outline-none focus:!disco-shadow-none focus:!disco-border-none disco-h-[30px] !disco-min-h-0 disco-max-w-28"}):(0,Nl.jsx)("span",{onClick:()=>{n&&(i(!0),s(d),l(!1),setTimeout(()=>u.current?.focus(),0))},className:bl("disco-text-xs disco-font-semibold disco-text-gray-700 disco-h-[30px] disco-leading-8",n&&"disco-cursor-text"),children:d||"--"})]})}const iv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ov({month:e,onMonthChange:t}){const n=(0,a.useRef)(null),r=[];for(let t=e.getFullYear()-2;t<=e.getFullYear()+2;t++)for(let e=0;e<12;e++)r.push({year:t,month:e});const i=r.findIndex(t=>t.year===e.getFullYear()&&t.month===e.getMonth());return(0,a.useEffect)(()=>{n.current&&-1!==i&&(n.current.scrollTop=26*(i-Math.floor(2.5)))},[e.getFullYear(),e.getMonth()]),(0,Nl.jsx)("div",{ref:n,className:"disco-flex-shrink-0 disco-overflow-y-auto",style:{width:28,height:130,scrollbarWidth:"none",msOverflowStyle:"none"},children:r.map((n,r)=>{const i=n.year===e.getFullYear()&&n.month===e.getMonth();return(0,Nl.jsx)("div",{onClick:()=>t(new Date(n.year,n.month,1)),style:{height:26},className:bl("disco-flex disco-cursor-pointer disco-items-center disco-justify-center disco-rounded disco-text-[9px] disco-transition-colors",i?"disco-font-bold disco-text-[rgba(74,74,74,0.9)]":"disco-text-[rgba(74,74,74,0.3)] hover:disco-text-[rgba(74,74,74,0.7)]"),children:iv[n.month]},r)})})}const av={root:"disco-p-0",months:"disco-flex disco-flex-col",month:"disco-flex disco-flex-col disco-gap-1",month_caption:"disco-relative disco-flex disco-h-7 disco-items-center disco-justify-center",caption_label:"disco-text-[11px] disco-font-semibold disco-text-[rgba(74,74,74,0.85)] disco-select-none",nav:"disco-absolute disco-inset-x-0 disco-top-0 disco-flex disco-items-center disco-justify-between",button_previous:"disco-flex disco-h-8 disco-w-8 disco-items-center disco-justify-center disco-rounded disco-text-[rgba(74,74,74,0.4)] disco-transition-colors hover:disco-text-[rgba(74,74,74,0.8)] disabled:disco-opacity-30 disco-z-10",button_next:"disco-flex disco-h-8 disco-w-8 disco-items-center disco-justify-center disco-rounded disco-text-[rgba(74,74,74,0.4)] disco-transition-colors hover:disco-text-[rgba(74,74,74,0.8)] disabled:disco-opacity-30 disco-z-10",weekdays:"disco-flex",weekday:"disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-select-none disco-text-[9px] disco-font-medium disco-text-[rgba(74,74,74,0.4)]",weeks:"disco-flex disco-flex-col",week:"disco-flex",day:"disco-flex disco-h-[26px] disco-w-[26px] disco-items-center disco-justify-center disco-p-0",range_start:"disco-rounded-l-full disco-bg-[rgba(8,200,137,0.12)]",range_end:"disco-rounded-r-full disco-bg-[rgba(8,200,137,0.12)]",range_middle:"disco-rounded-none disco-bg-[rgba(8,200,137,0.12)]",today:"",outside:"",disabled:"disco-opacity-30 disco-pointer-events-none",hidden:"disco-invisible",selected:""},sv=({onApply:e})=>{const t=new Date,n=new Date(t.getFullYear(),t.getMonth()-1,1),{startDate:r,endDate:i}=D(e=>e.dateRange),[o,s]=(0,a.useState)({from:ns(r,"yyyy-MM-dd"),to:ns(i,"yyyy-MM-dd")}),[c,l]=(0,a.useState)(n),[u,d]=(0,a.useState)(t),f=o.from&&o.to&&iy(o.to,o.from)>=2,p=o.from&&o.to&&!f,h=o.from?[{before:pm(o.from,-2)},{after:pm(o.from,2)}]:[],m={mode:"range",selected:o,onSelect:e=>s(e??{from:void 0,to:void 0}),showOutsideDays:!0,disabled:h,classNames:av,components:{DayButton:oy,Chevron:({orientation:e})=>"left"===e?(0,Nl.jsx)(Jh,{className:"disco-h-4 disco-w-4"}):(0,Nl.jsx)(Rl,{className:"disco-h-4 disco-w-4"})}};return(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-gap-3",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-4",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-1 disco-flex-col",children:[(0,Nl.jsx)(rv,{label:"From",date:o.from,onDateChange:e=>{o.to&&ym(e,o.to)?s({from:e,to:void 0}):s(t=>({...t,from:e})),l(e)}}),(0,Nl.jsxs)("div",{className:"disco-relative disco-flex disco-items-start disco-gap-1",children:[(0,Nl.jsx)(ny,{...m,month:c,onMonthChange:l}),(0,Nl.jsx)("div",{style:{paddingTop:62},children:(0,Nl.jsx)(ov,{month:c,onMonthChange:l})})]})]}),(0,Nl.jsx)("div",{className:"disco-w-px disco-self-stretch disco-bg-[#e5e7eb]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-1 disco-flex-col",children:[(0,Nl.jsx)(rv,{label:"To",date:o.to,onDateChange:e=>{o.from&&vm(e,o.from)?s({from:void 0,to:e}):s(t=>({...t,to:e})),d(e)}}),(0,Nl.jsxs)("div",{className:"disco-relative disco-flex disco-items-start disco-gap-1",children:[(0,Nl.jsx)(ny,{...m,month:u,onMonthChange:d}),(0,Nl.jsx)("div",{style:{paddingTop:62},children:(0,Nl.jsx)(ov,{month:u,onMonthChange:d})})]})]})]}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-end disco-gap-2",children:[(0,Nl.jsx)("button",{onClick:()=>{s({from:ns(t,"yyyy-MM-dd"),to:ns(t,"yyyy-MM-dd")})},className:"disco-h-6 disco-cursor-pointer disco-rounded-[5px] disco-bg-[#f8f8f8] disco-px-3 disco-text-[10px] disco-font-medium disco-text-[#8a8a8a] disco-transition-colors hover:disco-bg-[#efefef]",children:"Clear"}),(0,Nl.jsx)("button",{onClick:()=>{o.from&&o.to&&e({startDate:o.from,endDate:o.to})},disabled:!p,className:bl("disco-h-6 disco-cursor-pointer disco-rounded-[5px] disco-bg-[#08c889] disco-px-3 disco-text-[10px] disco-font-medium disco-text-white disco-transition-colors hover:disco-bg-[#07b87c]",!p&&"disco-cursor-not-allowed disco-opacity-50"),children:"Apply"})]})]})},cv=[{label:"Today",days:0},{label:"Yesterday",days:1},{label:"Last 7 days",days:7},{label:"Last 28 days",days:28},{label:"Last 90 days",days:90}];function lv(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric"}).format(e)}function uv(e){const t=new Date;if(0===e)return{start:t,end:t};if(1===e){const e=new Date(t);return e.setDate(t.getDate()-1),{start:e,end:e}}const n=new Date(t);return n.setDate(t.getDate()-e+1),{start:n,end:t}}function dv(e){return ns(e,"yyyy-MM-dd")}const fv=()=>{const e=S(),{startDate:t,endDate:n}=D(us),[r,i]=(0,a.useState)(!1),[o,s]=(0,a.useState)("list"),[c,l]=(0,a.useState)("Last 28 days"),[u,d]=(0,a.useState)(!1),f=cv.find(e=>e.label===c)??cv[3],{start:p,end:h}=(0,a.useMemo)(()=>u?{start:new Date(t),end:new Date(n)}:uv(f.days),[u,t,n,f]),m=u?`${ns(new Date(t),"MMM dd, yyyy")} - ${ns(new Date(n),"MMM dd, yyyy")}`:f.days<=1?lv(p):`${lv(p)} - ${lv(h)}`,g=u?"Custom":c;return(0,Nl.jsxs)(Bd,{open:r,onOpenChange:e=>{i(e),e||s("list")},children:[(0,Nl.jsxs)(Hf,{className:bl("disco-inline-flex disco-h-7 disco-cursor-pointer disco-items-center disco-gap-1.5","disco-rounded-[6px] disco-border disco-border-[#d6d6d6] disco-bg-white","disco-px-2.5 disco-text-xs disco-text-[#7e7e7e]","disco-transition-colors hover:disco-bg-transparent hover:disco-text-[#7e7e7e]","focus:disco-outline-none"),children:[g,(0,Nl.jsx)(Xh,{className:bl("disco-size-3 disco-text-[#7e7e7e] disco-transition-transform disco-duration-200",r&&"disco-rotate-180")})]}),(0,Nl.jsx)(ep,{children:(0,Nl.jsx)(vh,{side:"bottom",align:"end",sideOffset:6,style:{zIndex:99999},children:(0,Nl.jsx)(Zh,{className:bl("disco-overflow-hidden disco-rounded-[8px] disco-border disco-border-[#e5e7eb] disco-bg-white","disco-shadow-[0px_6px_5px_0px_rgba(0,0,0,0.05)]","custom"===o?"disco-w-auto disco-p-4":"disco-w-[300px] disco-pb-[18px] disco-pr-px disco-pt-[14px]"),children:"list"===o?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsxs)("div",{className:"disco-px-6",children:[(0,Nl.jsx)("p",{className:"disco-text-[12px] disco-font-normal disco-not-italic disco-tracking-[-0.12px] disco-text-[rgba(74,74,74,0.8)]",children:g}),(0,Nl.jsx)("p",{className:"disco-mt-[6px] disco-text-[14px] disco-font-bold disco-not-italic disco-tracking-[-0.14px] disco-text-black",children:m})]}),(0,Nl.jsx)("div",{className:"disco-my-3 disco-h-px disco-bg-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-flex-col",children:cv.map(t=>{const n=!u&&c===t.label;return(0,Nl.jsx)("button",{onClick:()=>(t=>{const n=cv.find(e=>e.label===t),{start:r,end:o}=uv(n.days);e(ls({startDate:dv(r),endDate:dv(o)})),l(t),d(!1),i(!1),s("list")})(t.label),className:bl("disco-w-full disco-cursor-pointer disco-px-[23px] disco-py-[8px] disco-text-left","disco-text-[14px] disco-not-italic disco-tracking-[-0.14px] disco-transition-colors",n?"disco-font-bold disco-text-[#08c889]":"disco-font-semibold disco-text-[rgba(74,74,74,0.8)] hover:disco-text-[rgba(74,74,74,1)]"),children:t.label},t.label)})}),(0,Nl.jsx)("div",{className:"disco-my-1 disco-h-px disco-bg-[#e5e7eb]"}),(0,Nl.jsx)("button",{onClick:()=>s("custom"),className:bl("disco-w-full disco-cursor-pointer disco-px-[23px] disco-py-[8px] disco-text-left","disco-text-[14px] disco-font-semibold disco-not-italic disco-tracking-[-0.14px]",u?"disco-font-bold disco-text-[#08c889]":"disco-text-[rgba(74,74,74,0.8)] disco-transition-colors hover:disco-text-[rgba(74,74,74,1)]"),children:"Custom..."})]}):(0,Nl.jsx)(sv,{onApply:({startDate:t,endDate:n})=>{e(ls({startDate:dv(t),endDate:dv(n)})),d(!0),l("Custom"),i(!1),s("list")},onClear:()=>{s("list")}})})})})]})},pv=[{label:"Dashboard",path:"/",end:!0},{label:"Campaigns Report",path:"/campaigns-reports"},{label:"Products",path:"/products"},{label:"Orders",path:"/orders"},{label:"Customers",path:"/customers"}],hv={"/campaigns-reports":"/campaigns-reports/","/customers":"/customers/"},mv=()=>{const{pathname:e}=Pe();return(0,Nl.jsxs)("div",{className:"disco-min-h-[calc(100vh-42px)] disco-bg-white",children:[(0,Nl.jsxs)("div",{className:bl("disco-sticky disco-top-8 disco-z-50 disco-flex disco-items-center disco-justify-between disco-border-b disco-border-[#e5e7eb] disco-bg-white disco-px-3 disco-py-[13px]"),children:[(0,Nl.jsx)("nav",{className:"disco-flex disco-items-center disco-gap-1",children:pv.map(({label:t,path:n,end:r})=>(0,Nl.jsx)(Et,{to:n,end:r,className:({isActive:t})=>bl(Sl({variant:"ghost",size:"sm"}),"disco-h-7 !disco-rounded-md disco-px-3 disco-text-sm disco-font-medium disco-font-sans disco-no-underline ",t||hv[n]&&e.startsWith(hv[n])?"disco-bg-[#0dc98b] disco-text-white hover:disco-bg-[#0dc98b] hover:disco-text-white":"disco-text-gray-600 focus:!disco-text-gray-600 hover:disco-bg-transparent hover:disco-text-gray-600 focus:disco-outline-none visited:disco-outline-none"),children:t},n))}),(0,Nl.jsx)(fv,{})]}),(0,Nl.jsx)(Xl,{pathname:e,NAV_ITEMS:pv}),(0,Nl.jsx)(Xe,{})]})},gv=()=>!!DISCO.is_pro_active,yv=window.wp.i18n,vv=_l("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function bv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty",className:bl("disco-flex disco-w-full disco-min-w-0 disco-flex-1 disco-flex-col disco-items-center disco-justify-center disco-gap-4 disco-rounded-xl disco-border-dashed disco-p-6 disco-text-center disco-text-balance",e),...t})}function xv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-header",className:bl("disco-flex disco-max-w-sm disco-flex-col disco-items-center disco-gap-2",e),...t})}const wv=Sc("disco-mb-2 disco-flex disco-shrink-0 disco-items-center disco-justify-center [&_svg]:disco-pointer-events-none [&_svg]:disco-shrink-0",{variants:{variant:{default:"disco-bg-transparent",icon:"disco-flex disco-size-8 disco-shrink-0 disco-items-center disco-justify-center disco-rounded-lg disco-bg-muted disco-text-foreground [&_svg:not([class*=size-])]:disco-size-4"}},defaultVariants:{variant:"default"}});function Mv({className:e,variant:t="default",...n}){return(0,Nl.jsx)("div",{"data-slot":"empty-icon","data-variant":t,className:bl(wv({variant:t,className:e})),...n})}function jv({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-title",className:bl("disco- disco-text-sm disco-font-medium disco-tracking-tight",e),...t})}function Ov({className:e,...t}){return(0,Nl.jsx)("div",{"data-slot":"empty-description",className:bl("disco-text-sm/relaxed disco-text-muted-foreground [&>a]:disco-underline [&>a]:disco-underline-offset-4 [&>a:hover]:disco-text-primary",e),...t})}const Nv=_l("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Sv=({title:e,description:t})=>(0,Nl.jsx)(bv,{className:bl("disco-bg-white disco-rounded-xl disco-border disco-border-[#e5e7eb] disco-overflow-hidden disco-py-10"),children:(0,Nl.jsxs)(xv,{children:[(0,Nl.jsx)(Mv,{variant:"icon",children:(0,Nl.jsx)(Nv,{className:"disco-size-8 disco-text-red-400"})}),(0,Nl.jsx)(jv,{children:(0,yv.__)(`${e} Not Found!`,"disco")||"No Data Found!"}),(0,Nl.jsx)(Ov,{children:(0,yv.__)(t,"disco")})]})}),Ev=_l("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),kv=({label:e,title:t,description:n,showIcon:r=!1,size:i="default",position:o="disco-inset-0",rounded:a="disco-rounded-[10px]",className:s,style:c,titleClassName:l})=>{const u="lg"===i;return(0,Nl.jsxs)("div",{style:c,className:bl("disco-absolute disco-z-10 disco-flex disco-flex-col disco-items-center disco-justify-center disco-gap-3 disco-bg-white/80 disco-px-6 disco-text-center disco-backdrop-blur-[2px]",o,a,s),children:[(r||t||n)&&(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-items-center disco-gap-1.5",children:[(r||t)&&(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2",children:[r&&(0,Nl.jsx)(Ev,{className:"disco-size-[18px] disco-text-[#1f2937]",strokeWidth:2.5}),t&&(0,Nl.jsx)("p",{className:bl("disco-text-[#1f2937]",l??(u?"disco-text-2xl disco-font-bold disco-tracking-tight":"disco-text-base disco-font-medium")),children:t})]}),n&&(0,Nl.jsx)("p",{className:"disco-max-w-md disco-text-sm disco-text-[#6b7280]",children:n})]}),(0,Nl.jsx)(El,{onClick:()=>window.open("https://discoplugin.com/?utm_source=analytics&utm_medium=Analytics-Free&utm_id=free-to-pro","_blank"),className:bl("disco-rounded disco-bg-primary disco-font-semibold disco-text-white disco-shadow-[3px_4px_2px_rgba(0,0,0,0.07)] hover:disco-bg-primary-dark",u&&"disco-h-auto disco-px-6 disco-py-3 disco-text-base"),children:e})]})},Dv=_l("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function Iv({className:e,...t}){return(0,Nl.jsx)("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:bl("disco-flex disco-w-fit disco-justify-center",e),...t})}function Av({className:e,...t}){return(0,Nl.jsx)("ul",{"data-slot":"pagination-content",className:bl("disco-flex disco-flex-row disco-items-center disco-gap-1",e),...t})}function Tv({...e}){return(0,Nl.jsx)("li",{"data-slot":"pagination-item",...e})}function Cv({className:e,isActive:t,size:n="icon-sm",...r}){return(0,Nl.jsx)("button",{type:"button","aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:bl(Sl({variant:"ghost",size:n}),t?"disco-bg-[#47cd89] disco-text-white hover:disco-bg-[#47cd89]/90 hover:disco-text-white":"disco-text-[#6b7280]",e),...r})}function Pv({className:e,...t}){return(0,Nl.jsx)(Cv,{"aria-label":"Go to previous page",className:e,...t,children:(0,Nl.jsx)(Jh,{})})}function zv({className:e,...t}){return(0,Nl.jsx)(Cv,{"aria-label":"Go to next page",className:e,...t,children:(0,Nl.jsx)(Rl,{})})}function _v({className:e,...t}){return(0,Nl.jsxs)("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:bl("disco-flex disco-size-7 disco-items-center disco-justify-center disco-text-[#6b7280]",e),...t,children:[(0,Nl.jsx)(Dv,{className:"disco-size-4"}),(0,Nl.jsx)("span",{className:"disco-sr-only",children:"More pages"})]})}const Rv=(e,t)=>Array.from({length:t-e+1},(t,n)=>e+n),Lv=({totalPages:e,page:t,onPageChange:n,disabled:r=!1})=>{const i=function(e,t){return t<=7?Rv(1,t):e<=4?[1,2,3,4,5,"ellipsis",t]:e>=t-3?[1,"ellipsis",...Rv(t-4,t)]:[1,"ellipsis",e-1,e,e+1,"ellipsis",t]}(t,e);return(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-2.5 disco-border-t disco-border-[#f3f4f6]",children:[(0,Nl.jsxs)("span",{className:"disco-text-xs disco-text-[#9ca3af]",children:["Showing ",t," of ",e]}),e>1&&(0,Nl.jsx)(Iv,{"aria-disabled":r,className:bl("disco-border disco-border-primary disco-py-1 disco-px-2 disco-rounded-lg",r&&"disco-pointer-events-none disco-opacity-50"),children:(0,Nl.jsxs)(Av,{children:[(0,Nl.jsx)(Tv,{children:(0,Nl.jsx)(Pv,{onClick:()=>n(t-1),disabled:r||t<=1})}),i.map((e,i)=>"ellipsis"===e?(0,Nl.jsx)(Tv,{children:(0,Nl.jsx)(_v,{})},`ellipsis-${i}`):(0,Nl.jsx)(Tv,{children:(0,Nl.jsx)(Cv,{isActive:e===t,onClick:()=>n(e),disabled:r,children:e})},e)),(0,Nl.jsx)(Tv,{children:(0,Nl.jsx)(zv,{onClick:()=>n(t+1),disabled:r||t>=e})})]})})]})},Uv=({active:e,dir:t})=>(0,Nl.jsx)("span",{className:"disco-ml-0.5 disco-text-[10px]",children:e?"asc"===t?"↑":"↓":"↕"}),Yv=({columns:e,data:t=[],renderRow:n,title:r,total:i=0,searchPlaceholder:o="Search...",search:s="",onSearchChange:c,sortKey:l,sortDir:u="desc",onSort:d,page:f=1,totalPages:p=1,onPageChange:h,isLoading:m=!1,rowKey:g="id",cellPadding:y="disco-px-4",className:v="",locked:b=!1,visibleRows:x=2,lockOverlay:w})=>{const M=w??{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to see which products respond best to discounts — and which ones you're over-discounting.","disco")]})},j=(0,a.useRef)(null),[O,N]=(0,a.useState)(null),S=b&&!m&&t.length>x;return(0,a.useLayoutEffect)(()=>{if(!S||!j.current)return void N(null);const e=j.current.querySelectorAll("tbody > tr")[x];if(!e)return void N(null);const t=j.current.getBoundingClientRect().top;N(e.getBoundingClientRect().top-t)},[S,t,x]),(0,Nl.jsxs)("div",{className:bl(`disco-bg-white disco-rounded-xl disco-border disco-border-[#e5e7eb] disco-overflow-hidden ${v}`),children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-3 disco-border-b disco-border-[#f3f4f6]",children:[(0,Nl.jsxs)("span",{className:"disco-text-sm disco-font-semibold disco-text-[#1f2937]",children:[(0,yv.__)(r),(0,Nl.jsxs)("span",{className:"disco-text-[#9ca3af] disco-font-normal disco-text-xs",children:["(",i,")"]})]}),(0,Nl.jsxs)("div",{className:"disco-relative",children:[(0,Nl.jsx)(vv,{className:"disco-absolute disco-left-2.5 disco-top-1/2 disco--translate-y-1/2 disco-size-3 disco-text-[#9ca3af]"}),(0,Nl.jsx)("input",{type:"text",placeholder:o,value:s,onChange:e=>c(e.target.value),className:"!disco-pl-7 disco-pr-3 disco-py-1.5 disco-text-xs disco-border !disco-border-gray-300 !disco-rounded-lg disco-bg-gray-100 disco-text-gray-500 placeholder:disco-text-gray-400 !disco-outline-none focus:!disco-border-primary disco-w-44 focus:!disco-shadow-none",disabled:b})]})]}),(0,Nl.jsxs)("div",{ref:j,className:"disco-relative disco-overflow-x-auto",style:S&&null!==O?{minHeight:O+200}:void 0,children:[S&&null!==O&&(0,Nl.jsx)(kv,{...M,position:"disco-inset-x-0 disco-bottom-0",rounded:"disco-rounded-none",className:"disco-bg-white/[0.94]",style:{top:O}}),0!==t.length||m?(0,Nl.jsxs)("table",{className:"disco-w-full disco-text-xs",children:[(0,Nl.jsx)("thead",{children:(0,Nl.jsx)("tr",{className:"disco-bg-[#f9fafb] disco-border-b disco-border-[#f3f4f6]",children:e.map(e=>(0,Nl.jsxs)("th",{onClick:()=>!b&&e.sortable&&d(e.key),className:bl(y,"disco-py-2.5 disco-text-left disco-font-semibold disco-tracking-[0.06em] disco-uppercase disco-text-[10px] disco-whitespace-nowrap",e.sortable&&"disco-cursor-pointer disco-select-none",l===e.key?"disco-text-[#2fa86d]":"disco-text-[#9ca3af]"),children:[e.label,e.sortable&&(0,Nl.jsx)(Uv,{active:l===e.key,dir:u})]},e.key))})}),(0,Nl.jsx)("tbody",{children:m?Array.from({length:5}).map((t,n)=>(0,Nl.jsx)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:(0,Nl.jsx)("td",{colSpan:e.length,className:bl(y,"disco-py-3"),children:(0,Nl.jsx)("div",{className:"disco-h-5 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"})})},n)):t.map((e,t)=>n(e,t,((e,t)=>"function"==typeof g?g(e):e[g]??t)(e,t)))})]}):(0,Nl.jsx)(Sv,{title:r.split(" ").at(-1)})]}),(0,Nl.jsx)(Lv,{page:f,totalPages:p,onPageChange:h,disabled:b})]})},Fv=[{key:"name",label:"Customer"},{key:"email",label:"Email"},{key:"orders",label:"Order",sortable:!0},{key:"total_spent",label:"Total",sortable:!0}],Wv=(e,t)=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)("span",{className:"disco-font-medium disco-text-[#0dc98b]",children:e.name})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:e.email}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_spent)})]},t),Bv=({campaignId:e})=>{const t=gv(),n=D(ds),[r,i]=(0,a.useState)(""),[o,s]=(0,a.useState)("total_spent"),[c,l]=(0,a.useState)("desc"),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=Hl({...n,campaign_id:e,search:r||void 0,sort_by:o,order:c,page:u,limit:t?20:10}),m=f?.data,g=f?.collection?.total_pages??1;return(0,Nl.jsx)(Yv,{columns:Fv,data:m,renderRow:Wv,title:"Recent customers on this Campaign",total:f?.collection?.total??0,searchPlaceholder:"Search customers...",search:r,onSearchChange:i,sortKey:o,sortDir:c,onSort:e=>{o===e?l(e=>"asc"===e?"desc":"asc"):(s(e),l("desc")),d(1)},page:u,totalPages:g,onPageChange:d,isLoading:p||h,className:"disco-rounded-tl-none disco-rounded-tr-none",locked:!t})},Qv={Product:{bg:"#f0fdf4",text:"#15803d"},Shipping:{bg:"#eff6ff",text:"#1d4ed8"},Bulk:{bg:"#f5f3ff",text:"#6d28d9"},BOGO:{bg:"#fff7ed",text:"#c2410c"},Bundle:{bg:"#fdf4ff",text:"#86198f"},Cart:{bg:"#fff1f2",text:"#be123c"}},qv=({intent:e})=>{const t=Qv[e]??{bg:"#f3f4f6",text:"#6b7280"};return(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-font-semibold disco-tracking-wide disco-uppercase",style:{backgroundColor:t.bg,color:t.text},children:e})},Gv={active:{dot:"#16a34a",text:"#374151"},expired:{dot:"#9ca3af",text:"#6b7280"},deleted:{dot:"#ef4444",text:"#374151"}},$v=({status:e})=>{let t=Gv[e]||{dot:"#d1d5db",text:"#6b7280"};return(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1.5 disco-text-xs",style:{color:t.text},children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-full disco-shrink-0",style:{backgroundColor:t.dot}}),e]})},Hv=({campaign:e})=>{const{dotColor:t,name:n,intent:r,dateRange:i,status:o}=e;return(0,Nl.jsx)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-4 disco-flex disco-items-center disco-justify-between",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-start disco-gap-3",children:[(0,Nl.jsx)("span",{className:"disco-size-[9px] disco-rounded-[3px] disco-shrink-0 disco-mt-1.5",style:{backgroundColor:t}}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h2",{className:"disco-text-sm disco-font-bold disco-text-[#111827] disco-tracking-tight disco-leading-snug",children:n}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-1.5 disco-mt-1.5 disco-flex-wrap",children:[(0,Nl.jsx)(qv,{intent:r}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-text-gray-500",children:i}),(0,Nl.jsx)($v,{status:o})]})]})]})})},Vv=_l("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]),Kv=_l("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),Zv=_l("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),Xv=_l("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),Jv=({icon:e,iconBg:t,label:n,value:r,locked:i=!1})=>(0,Nl.jsxs)("div",{className:"disco-relative disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-3.5 disco-flex disco-items-center disco-gap-3 disco-flex-1 disco-overflow-hidden",children:[(0,Nl.jsx)("span",{className:"disco-size-8 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-text-base disco-shrink-0",style:{backgroundColor:t},children:(0,Nl.jsx)(e,{className:"disco-size-4"})}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-text-[10px] disco-font-semibold disco-text-[#9ca3af] disco-uppercase disco-tracking-wider disco-leading-none",children:n}),(0,Nl.jsx)("p",{className:"disco-text-base disco-font-bold disco-text-[#111827] disco-mt-1 disco-leading-tight",children:r})]}),i&&(0,Nl.jsx)("div",{className:"disco-absolute disco-inset-0 disco-flex disco-items-center disco-justify-center disco-bg-white/80 disco-backdrop-blur-[2px]",children:(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1 disco-rounded-md disco-bg-primary disco-px-2 disco-py-1 disco-text-[11px] disco-font-semibold disco-text-white",children:[(0,Nl.jsx)(Xv,{className:"disco-size-3"}),(0,yv.__)("Pro feature","disco")]})})]}),eb=({revenue:e,averageOrderValue:t,totalOrders:n,customers:r})=>{const i=gv(),o=[{icon:Vv,iconBg:"#dcfce7",label:(0,yv.__)("Revenue","disco"),value:xl(e)},{icon:Kv,iconBg:"#FEF9C3",label:(0,yv.__)("Total Orders","disco"),value:n},{icon:Zv,iconBg:"#F8C3FE4A",label:(0,yv.__)("Customers","disco"),value:r},{icon:Kv,iconBg:"#DBEAFE",label:(0,yv.__)("Avg Order Value","disco"),value:xl(t)}];return(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:o.map((e,t)=>(0,Nl.jsx)(Jv,{...e,locked:!i&&t>0},e.label))})},tb=_l("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]),nb=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(tb,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:"Campaign not found"}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:"This campaign doesn't exist or has no order history."}),(0,Nl.jsx)(St,{to:"/campaigns-reports",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:"Back to Campaigns"})]}),rb=aa.injectEndpoints({endpoints:e=>({getProducts:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="revenue",order:i="desc",campaign_id:o,customer_id:a,order_id:s,page:c=1,limit:l=10}={})=>({url:"/products",params:{date_from:e,date_to:t,search:n,sort_by:r,order:i,campaign_id:o,customer_id:a,order_id:s,page:c,limit:l}})}),getProduct:e.query({query:({id:e,date_from:t,date_to:n})=>({url:`/products/${e}`,params:{date_from:t,date_to:n}})})})}),{useGetProductsQuery:ib,useGetProductQuery:ob}=rb,ab=[{key:"name",label:"Product"},{key:"category",label:"Category"},{key:"quantity",label:"Quantity",sortable:!0},{key:"customers",label:"Customers",sortable:!0},{key:"revenue",label:"Net sale",sortable:!0}],sb={quantity:"quantity",customers:"customers",revenue:"revenue"},cb=({category:e})=>(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-text-[#4b5563] disco-bg-[#f3f4f6]",children:e}),lb=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2",children:[e.image?(0,Nl.jsx)("img",{src:e.image,alt:e.name,className:"disco-size-7 disco-rounded-lg disco-object-cover disco-shrink-0"}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:"🛍️"}),(0,Nl.jsx)("span",{className:"disco-font-medium disco-text-[#111827]",children:jl(e.name,40)})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:e.categories?.[0]?(0,Nl.jsx)(cb,{category:e.categories[0].name}):(0,Nl.jsx)("span",{className:"disco-text-[#9ca3af]",children:"—"})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.total_quantity}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.total_customers}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_revenue)})]},e.id),ub=({campaignId:e})=>{const t=gv(),n=D(ds),[r,i]=(0,a.useState)("revenue"),[o,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=ib({...n,campaign_id:e,sort_by:sb[r]??"revenue",order:o,page:u,search:c,limit:t?20:10}),m=f?.data??[],g=f?.collection?.total_pages??1;return(0,Nl.jsx)(Yv,{columns:ab,data:m,renderRow:lb,title:"Recent products on this Campaign",total:f?.collection?.total??0,searchPlaceholder:"Search products...",search:c,onSearchChange:l,sortKey:r,sortDir:o,onSort:e=>{e===r?s("asc"===o?"desc":"asc"):(i(e),s("desc"))},page:u,totalPages:g,onPageChange:d,isLoading:p||h,className:"disco-rounded-tl-none disco-rounded-tr-none",locked:!t})},db=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981"],fb=[{id:"products",label:(0,yv.__)("Products","disco")},{id:"customers",label:(0,yv.__)("Customers","disco")}],pb=()=>{const{campaignId:e}=Ue(),t=D(ds),{data:n,isLoading:r,isError:i}=Gl({id:e,...t}),[o,s]=(0,a.useState)("products");if(i)return(0,Nl.jsx)(nb,{});const c=n?{dotColor:db[n.campaign_id%db.length],name:n.campaign_name,intent:n.intent,dateRange:`${wl(n.valid_date?.from)} - ${wl(n.valid_date?.to)}`,status:n.status,totalOrders:n.total_orders,customers:n.total_customers,revenue:xl(n.revenue)}:null;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6 disco-space-y-3",children:[r?(0,Nl.jsxs)("div",{className:"disco-space-y-3",children:[(0,Nl.jsx)("div",{className:"disco-h-16 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:Array.from({length:2}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-flex-1 disco-h-20 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"},t))})]}):c?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Hv,{campaign:c}),(0,Nl.jsx)(eb,{revenue:n.revenue,averageOrderValue:n.average_order_value,totalOrders:n.total_orders,customers:n.total_customers})]}):null,(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-overflow-hidden",children:[(0,Nl.jsx)("div",{className:"disco-flex disco-gap-0 disco-border-b disco-border-[#e5e7eb] disco-px-4 disco-pt-3",children:fb.map(e=>(0,Nl.jsx)("button",{onClick:()=>s(e.id),className:bl("disco-px-3 disco-pb-2.5 disco-text-xs disco-font-medium disco-border-b-2 disco-transition-colors disco-mr-1",o===e.id?"disco-border-[#0dc98b] disco-text-[#0dc98b]":"disco-border-transparent disco-text-[#6b7280] hover:disco-text-[#111827]"),children:e.label},e.id))}),"products"===o?(0,Nl.jsx)(ub,{embedded:!0,campaignId:e}):(0,Nl.jsx)(Bv,{embedded:!0,campaignId:e})]})]})},hb=[{key:"name",label:"Name"},{key:"intent",label:"Intent"},{key:"revenue",label:"Revenue",sortable:!0},{key:"dateRange",label:"Date Range"},{key:"orders",label:"Orders",sortable:!0},{key:"customers",label:"Customers",sortable:!0},{key:"status",label:"Status"}],mb=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2",children:[(0,Nl.jsx)("span",{className:"disco-size-[7px] disco-rounded-[2px] disco-shrink-0",style:{backgroundColor:e.dotColor}}),(0,Nl.jsx)(St,{to:`/campaigns-reports/${e.id}`,className:"disco-font-medium disco-text-gray-900 hover:disco-text-primary focus:disco-text-primary",children:jl(e.name,30)})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)(qv,{intent:e.intent})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#374151]",children:e.revenue}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:e.dateRange}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.customers}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)($v,{status:e.status})})]},e.id),gb=({campaigns:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:i="spent",sortDir:o="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=gv();return(0,Nl.jsx)(Yv,{columns:hb,data:e,renderRow:mb,title:"Recent Campaigns",total:l,searchPlaceholder:"Search campaigns...",search:n,onSearchChange:r,sortKey:i,sortDir:o,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to unlock your complete campaign data — including real revenue per campaign, discount ROI, and full trend history.","disco")]})}})},yb=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981","#f97316","#06b6d4","#ec4899","#84cc16","#a78bfa"];function vb(e){if(!e||"Unknown"===e)return"—";const{from:t,to:n}=e;if(!t&&!n)return"—";const r=e=>e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"—";return`${r(t)} – ${r(n)}`}const bb=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)("revenue"),[i,o]=(0,a.useState)("desc"),s=D(ds),c=gv(),{data:l,isLoading:u,isFetching:d}=ql({...s,limit:c?20:10,sort_by:n,order:i,search:e||void 0,page:1}),f=(l?.data??[]).map((e,t)=>({id:e.campaign_id,name:e.campaign_name,dotColor:yb[t%yb.length],intent:e.intent,dateRange:vb(e.valid_date),orders:e.orders,customers:e.customers,revenue:xl(e.revenue),status:e.status}));return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Campaigns","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,yv.__)("All discount campaigns","disco")})]}),(0,Nl.jsx)(gb,{campaigns:f,isLoading:u||d,search:e,sortKey:n,sortDir:i,onSearchChange:t,onSort:e=>{e===n?o("asc"===i?"desc":"asc"):(r(e),o("desc"))},count:l?.collection?.count,total:l?.collection?.total})]})},xb=_l("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),wb=_l("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Mb=_l("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),jb=a.createContext(void 0);function Ob(){const e=a.useContext(jb);if(void 0===e)throw new Error(sc(13));return e}const Nb={imageLoadingStatus:()=>null},Sb=a.forwardRef(function(e,t){const{className:n,render:r,style:i,...o}=e,[s,c]=a.useState("idle"),l={imageLoadingStatus:s},u=a.useMemo(()=>({imageLoadingStatus:s,setImageLoadingStatus:c}),[s,c]),d=bc("span",e,{state:l,ref:t,props:o,stateAttributesMapping:Nb});return(0,Nl.jsx)(jb.Provider,{value:u,children:d})}),Eb={...Nb,...Dd},kb=a.forwardRef(function(e,t){const{className:n,render:r,onLoadingStatusChange:i,style:o,...s}=e,{setImageLoadingStatus:c}=Ob(),l=function(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i}){const[o,s]=a.useState("idle");return Gs(()=>{if(!e&&!i)return s("error"),yc;let o=!0;const a=new window.Image,c=e=>()=>{o&&s(e)};return s("loading"),a.onload=c("loaded"),a.onerror=c("error"),t&&(a.referrerPolicy=t),a.crossOrigin=n??null,r&&(a.sizes=r),i&&(a.srcset=i),e&&(a.src=e),a.complete&&s(a.naturalWidth>0?"loaded":"error"),()=>{o=!1}},[e,i,r,n,t]),o}(s.src,s),u="loaded"===l,{mounted:d,transitionStatus:f,setMounted:p}=Od(u),h=a.useRef(null),m=Bs(e=>{i?.(e),c(e)});Gs(()=>{"idle"!==l&&m(l)},[l,m]),Gs(()=>()=>c("idle"),[c]),Ad({open:u,ref:h,onComplete(){u||p(!1)}});const g=bc("img",e,{state:{imageLoadingStatus:l,transitionStatus:f},ref:[t,h],props:s,stateAttributesMapping:Eb,enabled:d});return d?g:null}),Db=a.forwardRef(function(e,t){const{className:n,render:r,delay:i,style:o,...s}=e,{imageLoadingStatus:c}=Ob(),[l,u]=a.useState(void 0===i),d=gu();return a.useEffect(()=>(void 0!==i?d.start(i,()=>u(!0)):u(!0),d.clear),[d,i]),bc("span",e,{state:{imageLoadingStatus:c},ref:t,props:s,stateAttributesMapping:Nb,enabled:"loaded"!==c&&(void 0===i||l)})});function Ib({className:e,size:t="default",...n}){return(0,Nl.jsx)(Sb,{"data-slot":"avatar","data-size":t,className:bl("disco-group/avatar disco-relative disco-flex disco-size-8 disco-shrink-0 disco-rounded-full disco-select-none after:disco-absolute after:disco-inset-0 after:disco-rounded-full after:disco-border after:disco-border-border after:disco-mix-blend-darken data-[size=lg]:disco-size-10 data-[size=sm]:disco-size-6 dark:after:disco-mix-blend-lighten",e),...n})}function Ab({className:e,...t}){return(0,Nl.jsx)(kb,{"data-slot":"avatar-image",className:bl("disco-aspect-square disco-size-full disco-rounded-full disco-object-cover",e),...t})}function Tb({className:e,...t}){return(0,Nl.jsx)(Db,{"data-slot":"avatar-fallback",className:bl("disco-flex disco-size-full disco-items-center disco-justify-center disco-rounded-full disco-bg-muted disco-text-sm disco-text-muted-foreground group-data-[size=sm]/avatar:disco-text-xs",e),...t})}const Cb={"#06b6d4":"#ecfeff","#ec4899":"#fdf2f8","#f59e0b":"#fffbeb","#f97316":"#fff7ed","#3b82f6":"#eff6ff","#84cc16":"#f7fee7","#ef4444":"#fef2f2","#a78bfa":"#f5f3ff","#8b5cf6":"#f5f3ff"},Pb=({avatar:e,color:t,fallback:n})=>{const r=Cb[t]??"#f3f4f6";return(0,Nl.jsxs)(Ib,{children:[(0,Nl.jsx)(Ab,{src:e}),(0,Nl.jsx)(Tb,{style:{backgroundColor:r,color:t},children:n})]})},zb=["#06b6d4","#ec4899","#f59e0b","#f97316","#3b82f6","#84cc16","#8b5cf6","#ef4444","#a78bfa","#10b981"];function _b(e){if(!e)return"?";const t=e.trim().split(/\s+/);return((t[0]?.[0]??"")+(t[1]?.[0]??"")).toUpperCase()}const Rb=({customer:e})=>{const{id:t,name:n,email:r,state:i,avatar:o}=e,a=zb[t%zb.length];return(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-xl disco-px-4 disco-py-4 disco-flex disco-items-center disco-gap-3",children:[(0,Nl.jsx)(Pb,{avatar:o,fallback:_b(n),color:a}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h2",{className:"disco-text-sm disco-font-bold disco-text-[#111827] disco-tracking-tight disco-leading-snug",children:n}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-3 disco-mt-1.5 disco-flex-wrap",children:[r&&(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#6b7280]",children:[(0,Nl.jsx)(xb,{className:"disco-size-3 disco-text-[#9ca3af]"}),r]}),i&&(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#6b7280]",children:[(0,Nl.jsx)(wb,{className:"disco-size-3 disco-text-[#9ca3af]"}),i]}),(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1 disco-text-[10px] disco-text-[#9ca3af]",children:[(0,Nl.jsx)(Mb,{className:"disco-size-3"}),"ID: ",t]})]})]})]})},Lb=_l("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),Ub=({totalSpent:e,orders:t,campaignsCount:n})=>{const r=gv(),i=[{icon:Vv,iconBg:"#dcfce7",label:"Total Spent",value:xl(e)},{icon:Kv,iconBg:"#FEF9C3",label:"Orders",value:t},{icon:Lb,iconBg:"#DBEAFE",label:"Campaigns Used",value:n},{icon:Zv,iconBg:"#F8C3FE4A",label:"Avg Order Value",value:t>0?xl(e/t):"$0.00"}];return(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:i.map((e,t)=>(0,Nl.jsx)(Jv,{...e,locked:!r&&t>0},e.label))})},Yb=_l("user-x",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]),Fb=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(Yb,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:"Customer not found"}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:"This customer doesn't exist or has no campaign order history."}),(0,Nl.jsx)(St,{to:"/customers",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:"Back to Customers"})]}),Wb=aa.injectEndpoints({endpoints:e=>({getOrders:e.query({query:({date_from:e,date_to:t,search:n,sort_by:r="revenue",order:i="desc",campaign_id:o,customer_id:a,page:s=1,limit:c=10}={})=>({url:"/orders",params:{date_from:e,date_to:t,search:n,sort_by:r,order:i,campaign_id:o,customer_id:a,page:s,limit:c}})}),getOrder:e.query({query:({id:e})=>`/orders/${e}`})})}),{useGetOrdersQuery:Bb,useGetOrderQuery:Qb}=Wb,qb=a.createContext(!1),Gb=a.createContext(void 0);function $b(e){const t=a.useContext(Gb);if(!1===e&&void 0===t)throw new Error(sc(27));return t}function Hb({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("disablePointerDismissal"),o=e.useState("modal"),s=e.useState("popupElement"),c=e.useState("floatingRootContext"),[l,u]=a.useState(0),[d,f]=a.useState(0),p=0===l,h=Xu(c,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===o?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current)return!1;if("button"in t&&0!==t.button)return!1;if("touches"in t&&1!==t.touches.length)return!1;const n=_u(t);return!(!p||i)&&(!o||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||zu(n,s)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:p});yh(r&&!0===o,s),e.useContextCallback("onNestedDialogOpen",(e,t)=>{u(e),f(t)}),e.useContextCallback("onNestedDialogClose",()=>{u(0),f(0)}),a.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+(n?1:0)),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,l,d,t]);const m=h.reference??vc,g=h.trigger??vc,y=h.floating??vc;return Ld(e,{activeTriggerProps:m,inactiveTriggerProps:g,popupProps:y,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}const Vb={...vd,modal:td(e=>e.modal),nested:td(e=>e.nested),nestedOpenDialogCount:td(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:td(e=>e.nestedOpenDrawerCount),disablePointerDismissal:td(e=>e.disablePointerDismissal),openMethod:td(e=>e.openMethod),descriptionElementId:td(e=>e.descriptionElementId),titleElementId:td(e=>e.titleElementId),viewportElement:td(e=>e.viewportElement),role:td(e=>e.role)};class Kb extends cd{constructor(e,t,n=!1){const r=new dd,i=function(e={}){return{...fd(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);i.floatingRootContext=pd(r,t,n),super(i,{popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Vb)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const n={open:e};zd(n,e,t.trigger),this.update(n)};static useStore(e,t){return Pd(e,(e,n)=>new Kb(t,e,n),!0).store}}function Zb(e){return function(e,t="dialog"){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null}=e,h="drawer"===t,m="alert-dialog"===t,g=!!m||l,y=m||c,v=m?"alertdialog":"dialog",b=$b(!0),x={modal:g,disablePointerDismissal:y,nested:Boolean(b),role:v},w=Kb.useStore(d?.store,{open:i,openProp:r,activeTriggerId:p,triggerIdProp:f,...x});bd(()=>{const e=void 0===r&&!1===w.state.open&&!0===i?{open:!0,activeTriggerId:p}:null;m?w.update(e?{...x,...e}:x):e&&w.update(e)}),w.useControlledProp("openProp",r),w.useControlledProp("triggerIdProp",f),w.useSyncedValues(x),w.useContextCallback("onOpenChange",o),w.useContextCallback("onOpenChangeComplete",s);const M=w.useState("open"),j=w.useState("mounted"),O=w.useState("payload");!function(e){const{store:t,actionsRef:n}=e,r=t.useState("open");Ud(t,r),_d(t);const{forceUnmount:i}=Rd(r,t),o=a.useCallback(()=>{t.setOpen(!1,ju(Iu))},[t]);a.useImperativeHandle(n,()=>({unmount:i,close:o}),[i,o])}({store:w,actionsRef:u});const N=M||j,S=a.useMemo(()=>({store:w}),[w]);return(0,Nl.jsx)(qb.Provider,{value:!1,children:(0,Nl.jsxs)(Gb.Provider,{value:S,children:[N&&(0,Nl.jsx)(Hb,{store:w,parentContext:b?.store.context,isDrawer:h}),"function"==typeof n?n({payload:O}):n]})})}(e,a.useContext(qb)?"drawer":"dialog")}const Xb=a.forwardRef(function(e,t){const{render:n,className:r,style:i,disabled:o=!1,nativeButton:a=!0,...s}=e,{store:c}=$b(),l=c.useState("open"),{getButtonProps:u,buttonRef:d}=lc({disabled:o,native:a});return bc("button",e,{state:{disabled:o},ref:[t,d],props:[{onClick:function(e){l&&c.setOpen(!1,ju(Eu,e.nativeEvent))}},s,u]})}),Jb={...ef,...Dd},ex=a.forwardRef(function(e,t){const{render:n,className:r,style:i,forceRender:o=!1,...a}=e,{store:s}=$b(),c=s.useState("open"),l=s.useState("nested"),u=s.useState("mounted");return bc("div",e,{state:{open:c,transitionStatus:s.useState("transitionStatus")},ref:[s.context.backdropRef,t],stateAttributesMapping:Jb,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:o||!l})}),tx=a.createContext(void 0),nx=a.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=$b(),o=i.useState("mounted"),a=i.useState("modal"),s=i.useState("open");return o||n?(0,Nl.jsx)(tx.Provider,{value:n,children:(0,Nl.jsxs)(Xf,{ref:t,...r,children:[o&&!0===a&&(0,Nl.jsx)(dh,{ref:i.context.internalBackdropRef,inert:tp(!s)}),e.children]})}):null});let rx=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),ix=function(e){return e[e.open=qd.open]="open",e[e.closed=qd.closed]="closed",e[e.startingStyle=qd.startingStyle]="startingStyle",e[e.endingStyle=qd.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const ox={...ef,...Dd,nestedDialogOpen:e=>e?{[ix.nestedDialogOpen]:""}:null},ax=a.forwardRef(function(e,t){const{render:n,className:r,style:i,finalFocus:o,initialFocus:s,...c}=e,{store:l}=$b(),u=l.useState("descriptionElementId"),d=l.useState("disablePointerDismissal"),f=l.useState("floatingRootContext"),p=l.useState("popupProps"),h=l.useState("modal"),m=l.useState("mounted"),g=l.useState("nested"),y=l.useState("nestedOpenDialogCount"),v=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),w=l.useState("transitionStatus"),M=l.useState("role"),j=f.useState("floatingId"),O=c.id??j;!function(){if(void 0===a.useContext(tx))throw new Error(sc(26))}(),Ad({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});const N=void 0===s?Cd(l.context.popupRef):s,S=y>0,E=l.useStateSetter("popupElement"),k=bc("div",e,{state:{open:v,nested:g,transitionStatus:w,nestedDialogOpen:S},props:[p,{id:O,"aria-labelledby":x??void 0,"aria-describedby":u??void 0,role:M,...Td,hidden:!m,onKeyDown(e){Gh.has(e.key)&&e.stopPropagation()},style:{[rx.nestedDialogs]:y}},c],ref:[t,l.context.popupRef,E],stateAttributesMapping:ox});return(0,Nl.jsx)(_h,{context:f,openInteractionType:b,disabled:!m,closeOnFocusOut:!d,initialFocus:N,returnFocus:o,modal:!1!==h,restoreFocus:"popup",children:k})}),sx=a.forwardRef(function(e,t){const{render:n,className:r,style:i,id:o,...a}=e,{store:s}=$b(),c=jf(o);return s.useSyncedValueWithCleanup("titleElementId",c),bc("h2",e,{ref:t,props:[{id:c},a]})});function cx({...e}){return(0,Nl.jsx)(Zb,{...e})}function lx({...e}){return(0,Nl.jsx)(Xb,{...e})}function ux({className:e,...t}){return(0,Nl.jsx)(ex,{className:bl("disco-fixed disco-inset-0 disco-z-50 disco-bg-black/30 disco-backdrop-blur-[2px]","data-[starting-style]:disco-opacity-0 data-[ending-style]:disco-opacity-0 disco-transition-opacity",e),...t})}function dx({className:e,children:t,...n}){return(0,Nl.jsxs)(nx,{children:[(0,Nl.jsx)(ux,{}),(0,Nl.jsx)(ax,{className:bl("disco-fixed disco-left-1/2 disco-top-1/2 disco-z-50 disco--translate-x-1/2 disco--translate-y-1/2","disco-rounded-2xl disco-bg-white disco-shadow-xl","disco-overflow-hidden disco-outline-none","data-[starting-style]:disco-opacity-0 data-[starting-style]:disco-scale-95","data-[ending-style]:disco-opacity-0 data-[ending-style]:disco-scale-95","disco-transition-all",e),...n,children:t})]})}function fx({className:e,...t}){return(0,Nl.jsx)(sx,{className:bl("disco-text-lg disco-font-semibold",e),...t})}const px=({title:e,items:t})=>{const[n,r]=(0,a.useState)(!1);if(!t.length)return"—";if(1===t.length)return jl(t[0].name,40);const i=jl(t[0].name,30),o=t.length-1;return(0,Nl.jsxs)("span",{className:"disco-inline-flex disco-items-center disco-gap-1.5",children:[(0,Nl.jsx)("span",{children:i}),(0,Nl.jsxs)(cx,{open:n,onOpenChange:r,children:[(0,Nl.jsxs)("span",{onClick:()=>r(!0),className:"disco-inline-flex disco-items-center disco-px-1.5 disco-py-0.5 disco-text-xs disco-font-medium disco-text-primary disco-border disco-border-primary disco-rounded-md disco-cursor-pointer disco-whitespace-nowrap",children:["+",o," More"]}),(0,Nl.jsxs)(dx,{className:"disco-w-full disco-max-w-sm disco-p-0",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-px-4 disco-py-3 disco-border-b disco-border-gray-100",children:[(0,Nl.jsxs)(fx,{className:"disco-text-sm disco-font-semibold",children:[e," (",t.length,")"]}),(0,Nl.jsx)(lx,{className:"disco-text-gray-400 hover:disco-text-gray-600 disco-text-lg disco-leading-none disco-cursor-pointer disco-outline-none",children:"✕"})]}),(0,Nl.jsx)("div",{className:"disco-max-h-60 disco-overflow-y-auto disco-py-1",children:t.map((e,n)=>(0,Nl.jsx)("div",{className:"disco-px-4 disco-py-2 disco-text-sm disco-text-gray-700"+(n<t.length-1?" disco-border-b disco-border-gray-100":""),children:jl(e.name,50)},e.id))})]})]})]})},hx=[{key:"id",label:"Order"},{key:"campaign",label:"Campaign"},{key:"intent",label:"Intent Type"},{key:"total_spent",label:"Spent",sortable:!0},{key:"products",label:"Products"},{key:"quantity",label:"Quantity",sortable:!0},{key:"date",label:"Date",sortable:!0}],mx={total_spent:"revenue",quantity:"quantity",date:"date"},gx=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-transition-colors",children:[(0,Nl.jsxs)("td",{className:"disco-px-4 disco-py-3 disco-font-mono disco-text-[#9ca3af]",children:["#",e.id]}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#2fa86d] disco-whitespace-nowrap",children:jl((e.campaigns??[]).map(e=>e.name).join(", "),30)||"—"}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-gray-500 disco-font-medium disco-whitespace-nowrap",children:e?.campaigns[0]?.intent}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:xl(e.total_spent)}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(px,{title:"Products",items:e.products??[]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.quantity}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#9ca3af] disco-whitespace-nowrap",children:wl(e.date)})]},e.id),yx=({customerId:e})=>{const t=gv(),n=D(ds),[r,i]=(0,a.useState)("date"),[o,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),[u,d]=(0,a.useState)(1),{data:f,isLoading:p,isFetching:h}=Bb({...n,customer_id:e,sort_by:mx[r]??"revenue",order:o,page:u,search:c,limit:t?20:10}),m=f?.data??[],g=f?.collection?.total_pages??1,y=f?.collection?.total??0;return(0,Nl.jsx)(Yv,{columns:hx,data:m,renderRow:gx,title:"Recent orders from this Customer",total:y,searchPlaceholder:"Search by id...",search:c,onSearchChange:l,sortKey:r,sortDir:o,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(i(e),s("desc")),d(1)},page:u,totalPages:g,onPageChange:d,isLoading:p||h,locked:!t,lockOverlay:{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to unlock your complete campaign data — including real revenue per campaign, discount ROI, and full trend history.","disco")]})}})},vx=()=>{const{customerId:e}=Ue(),t=D(ds),{data:n,isLoading:r}=Vl({id:e,...t}),i=n?.data??null;return r||i?(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6 disco-space-y-3",children:[r?(0,Nl.jsxs)("div",{className:"disco-space-y-3",children:[(0,Nl.jsx)("div",{className:"disco-h-16 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"}),(0,Nl.jsx)("div",{className:"disco-flex disco-gap-3",children:Array.from({length:4}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-flex-1 disco-h-20 disco-animate-pulse disco-rounded-xl disco-bg-white disco-border disco-border-[#e5e7eb]"},t))})]}):i?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)(Rb,{customer:i}),(0,Nl.jsx)(Ub,{totalSpent:i.total_spent,orders:i.orders,campaignsCount:(i.campaigns??[]).length})]}):null,(0,Nl.jsx)(yx,{customerId:e})]}):(0,Nl.jsx)(Fb,{})},bx=[{key:"name",label:"Customer"},{key:"state",label:"State"},{key:"campaigns",label:"Campaigns Used"},{key:"orders",label:"Orders",sortable:!0},{key:"spent",label:"Spent",sortable:!0}],xx=(e,t)=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5",children:"0"!=e.id?(0,Nl.jsxs)(St,{to:`/customers/${e.id}`,className:"disco-flex disco-items-center disco-gap-2.5 disco-group",children:[(0,Nl.jsx)(Pb,{avatar:e.avatar,fallback:e.initials,color:e.color}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-font-medium disco-text-gray-900 disco-leading-tight group-hover:disco-text-primary disco-transition-colors",children:e.name}),(0,Nl.jsx)("p",{className:"disco-text-gray-400 disco-text-[10px] disco-mt-0.5 group-hover:disco-text-primary disco-transition-colors",children:e.email})]})]}):(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2.5",children:[(0,Nl.jsx)(Pb,{avatar:e.avatar,fallback:e.initials,color:e.color}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsxs)("p",{className:"disco-font-medium disco-text-gray-900 disco-leading-tight",children:[e.name||"Guest",(0,Nl.jsx)("span",{className:"disco-text-gray-400 disco-text-[8px] disco-border disco-rounded-full disco-bg-orange-100 disco-border-orange-200 disco-px-2 disco-py-0.5 disco-ml-2",children:"Not Registered"})]}),(0,Nl.jsx)("p",{className:"disco-text-gray-400 disco-text-[10px] disco-mt-0.5",children:e.email})]})]})}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-500 disco-whitespace-nowrap",children:e.state}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-500",children:(0,Nl.jsx)(px,{title:"Campaigns",items:e.campaigns})}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-text-gray-600",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-3 disco-py-2.5 disco-font-semibold disco-text-gray-700",children:e.spent})]},t),wx=({customers:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:i="spent",sortDir:o="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=gv();return(0,Nl.jsx)(Yv,{columns:bx,data:e,renderRow:xx,title:"All Customers",total:l,searchPlaceholder:"Search Customers...",search:n,onSearchChange:r,sortKey:i,sortDir:o,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,cellPadding:"disco-px-3",locked:!d,lockOverlay:{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to identify your highest-value customers — and find out which ones only buy when a discount is running.","disco")]})}})},Mx=["#06b6d4","#ec4899","#f59e0b","#f97316","#3b82f6","#84cc16","#8b5cf6","#ef4444","#a78bfa","#10b981"];function jx(e){if(!e)return"?";const t=e.trim().split(/\s+/);return(t[0]?.[0]??"")+(t[1]?.[0]??"")}const Ox={spent:"total_spent",orders:"orders"},Nx=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,i]=(0,a.useState)("spent"),[o,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=gv(),{data:d,isLoading:f,isFetching:p}=Hl({...e,limit:u?20:10,sort_by:Ox[r]??"total_spent",order:o,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map((e,t)=>({id:e.id,initials:jx(e.name).toUpperCase(),color:Mx[t%Mx.length],name:e.name||"—",email:e.email||"—",state:e.state||"—",campaigns:Ol([...e.campaigns]),orders:e.orders,spent:xl(e.total_spent),avatar:e.avatar})),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Customers","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,yv.__)("Customers who used at least one Disco campaign","disco")})]}),(0,Nl.jsx)(wx,{customers:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:o,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(i(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})};function Sx({className:e,size:t="default",...n}){return(0,Nl.jsx)("div",{"data-slot":"card","data-size":t,className:bl("disco-group/card disco-flex disco-flex-col disco-gap-4 disco-overflow-hidden disco-rounded-xl disco-bg-card disco-py-4 disco-text-sm disco-text-card-foreground disco-ring-foreground/10 has-data-[slot=card-footer]:disco-pb-0 has-[>img:first-child]:disco-pt-0 data-[size=sm]:disco-gap-3 data-[size=sm]:disco-py-3 data-[size=sm]:has-data-[slot=card-footer]:disco-pb-0 *:[img:first-child]:disco-rounded-t-xl *:[img:last-child]:disco-rounded-b-xl",e),...n})}const Ex=aa.injectEndpoints({endpoints:e=>({getSummary:e.query({query:({date_from:e,date_to:t}={})=>({url:"/summary",params:{date_from:e,date_to:t}})}),getRevenueChart:e.query({query:({date_from:e,date_to:t}={})=>({url:"/revenue-chart",params:{date_from:e,date_to:t}})}),getIntentsPerformance:e.query({query:({date_from:e,date_to:t}={})=>({url:"/intents-performance",params:{date_from:e,date_to:t}})})})}),{useGetSummaryQuery:kx,useGetRevenueChartQuery:Dx,useGetIntentsPerformanceQuery:Ix}=Ex;function Ax(e,t=0,n={}){const{leading:r=!0,trailing:i=!0}=n;return function(e,t=0,n={}){"object"!=typeof n&&(n={});const{leading:r=!1,trailing:i=!0,maxWait:o}=n,a=Array(2);let s;r&&(a[0]="leading"),i&&(a[1]="trailing");let c=null;const l=function(e,t,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),c=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let l=null;const u=()=>{null!=l&&clearTimeout(l),l=setTimeout(()=>{l=null,s&&c(),d()},t)},d=()=>{null!==l&&(clearTimeout(l),l=null),i=void 0,o=null},f=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==l;u(),a&&t&&c()};return f.schedule=u,f.cancel=d,f.flush=()=>{c()},n?.addEventListener("abort",d,{once:!0}),f}(function(...t){s=e.apply(this,t),c=null},t,{edges:a}),u=function(...t){return null!=o&&(null===c&&(c=Date.now()),Date.now()-c>=o)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}(e,t,{leading:r,maxWait:t,trailing:i})}function Tx(e){return"__proto__"===e}function Cx(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Px(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function zx(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(zx).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function Rx(e){if(Array.isArray(e))return e.map(Px);if("symbol"==typeof e)return[e];const t=[],n=(e=zx(e)).length;if(0===n)return t;let r=0,i="",o="",a=!1;for(46===e.charCodeAt(0)&&t.push("");r<n;){const s=e[r];if(o)"\\"===s&&r+1<n?(r++,i+=e[r]):s===o?o="":i+=s;else if(a)'"'===s||"'"===s?o=s:"]"===s?(a=!1,t.push(i),i=""):i+=s;else if("["===s)a=!0,i&&(t.push(i),i="");else if("."===s){i&&(t.push(i),i="");const n=e[r+1];void 0!==n&&"."!==n||t.push("")}else i+=s;r++}return i&&t.push(i),t}function Lx(e,t,n){if(null==e)return n;switch(typeof t){case"string":{if(Tx(t))return n;const r=e[t];return void 0===r?Cx(t)&&!Object.hasOwn(e,t)?Lx(e,Rx(t),n):n:r}case"number":case"symbol":{"number"==typeof t&&(t=Px(t));const r=e[t];return void 0===r?n:r}default:{if(Array.isArray(t))return function(e,t,n){if(0===t.length)return n;let r=e;for(let e=0;e<t.length;e++){if(null==r)return n;if(Tx(t[e]))return n;r=r[t[e]]}return void 0===r?n:r}(e,t,n);if(Tx(t=Object.is(t?.valueOf(),-0)?"-0":String(t)))return n;const r=e[t];return void 0===r?n:r}}}function Ux(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function Yx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return"string"==typeof i?e+i+t:void 0!==i?e+Ux(i)+t:e+t},"")}var Fx=e=>0===e?0:e>0?1:-1,Wx=e=>"number"==typeof e&&e!=+e,Bx=e=>"string"==typeof e&&e.length>1&&e.indexOf("%")===e.length-1,Qx=e=>("number"==typeof e||e instanceof Number)&&!Wx(e),qx=e=>Qx(e)||"string"==typeof e,Gx=0,$x=e=>{var t=++Gx;return"".concat(e||"").concat(t)},Hx=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Qx(e)&&"string"!=typeof e)return r;if(Bx(e)){if(null==t)return r;var o=e.indexOf("%");n=t*parseFloat(e.slice(0,o))/100}else n=+e;return Wx(n)&&(n=r),i&&null!=t&&n>t&&(n=t),n},Vx=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function Kx(e,t,n){return Qx(e)&&Qx(t)?Ux(e+n*(t-e)):t}function Zx(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Lx(e,t))===n)}var Xx=e=>null==e,Jx=e=>Xx(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ew(e){return null!=e}function tw(){}var nw=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(t.replace(/%s/g,()=>r[o++]))}},rw={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},iw=(e,t,n)=>{var r=n.width,i=void 0===r?rw.width:r,o=n.height,a=void 0===o?rw.height:o,s=n.aspect,c=n.maxHeight,l=Bx(i)?e:Number(i),u=Bx(a)?t:Number(a);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&null!=u&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},ow={width:0,height:0,overflow:"visible"},aw={width:0,overflowX:"visible"},sw={height:0,overflowY:"visible"},cw={},lw=e=>{var t=e.width,n=e.height,r=Bx(t),i=Bx(n);return r&&i?ow:r?aw:i?sw:cw};function uw(e){return Number.isFinite(e)}function dw(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}var fw=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pw.apply(null,arguments)}function hw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hw(Object(n),!0).forEach(function(t){gw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var vw=(0,a.createContext)(rw.initialDimension);function bw(e){var t=e.children,n=e.width,r=e.height,i=(0,a.useMemo)(()=>({width:n,height:r}),[n,r]);return function(e){return dw(e.width)&&dw(e.height)}(i)?a.createElement(vw.Provider,{value:i},t):null}var xw=()=>(0,a.useContext)(vw),ww=(0,a.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=void 0===r?rw.initialDimension:r,o=e.width,s=e.height,c=e.minWidth,l=void 0===c?rw.minWidth:c,u=e.minHeight,d=e.maxHeight,f=e.children,p=e.debounce,h=void 0===p?rw.debounce:p,m=e.id,g=e.className,y=e.onResize,v=e.style,b=void 0===v?{}:v,x=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,fw),w=(0,a.useRef)(null),M=(0,a.useRef)();M.current=y,(0,a.useImperativeHandle)(t,()=>w.current);var j=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)({containerWidth:i.width,containerHeight:i.height}),2),O=j[0],N=j[1],S=(0,a.useCallback)((e,t)=>{N(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,a.useEffect)(()=>{if(null==w.current||"undefined"==typeof ResizeObserver)return tw;var e=e=>{var t,n=e[0];if(null!=n){var r=n.contentRect,i=r.width,o=r.height;S(i,o),null===(t=M.current)||void 0===t||t.call(M,i,o)}};h>0&&(e=Ax(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=w.current.getBoundingClientRect(),r=n.width,i=n.height;return S(r,i),t.observe(w.current),()=>{t.disconnect()}},[S,h]);var E=O.containerWidth,k=O.containerHeight;nw(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=iw(E,k,{width:o,height:s,aspect:n,maxHeight:d}),I=D.calculatedWidth,A=D.calculatedHeight;return nw(E<0||k<0||null!=I&&I>0||null!=A&&A>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",I,A,o,s,l,u,n),a.createElement("div",pw({id:m?"".concat(m):void 0,className:jc("recharts-responsive-container",g),style:mw(mw({},b),{},{width:o,height:s,minWidth:l,minHeight:u,maxHeight:d}),ref:w},x),a.createElement("div",{style:lw({width:o,height:s})},a.createElement(bw,{width:I,height:A},f)))}),Mw=(0,a.forwardRef)((e,t)=>{var n=xw();if(dw(n.width)&&dw(n.height))return e.children;var r=function(e){var t=e.aspect,n=e.width,r=e.height;return void 0===n&&void 0===r?(n=rw.width,r=rw.height):void 0===n?n=t&&t>0?void 0:rw.width:void 0===r&&(r=t&&t>0?void 0:rw.height),{width:n,height:r}}({width:e.width,height:e.height,aspect:e.aspect}),i=r.width,o=r.height,s=iw(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=s.calculatedWidth,l=s.calculatedHeight;return Qx(c)&&Qx(l)?a.createElement(bw,{width:c,height:l},e.children):a.createElement(ww,pw({},e,{width:i,height:o,ref:t}))}),jw=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Wx(n))return e[n]}},Ow=Br({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Nw=Ow.reducer,Sw=Ow.actions.createEventEmitter,Ew={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},kw=Br({name:"tooltip",initialState:{itemInteraction:{click:Ew,hover:Ew},axisInteraction:{click:Ew,hover:Ew},keyboardInteraction:Ew,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:gr()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,o=Jn(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:gr()},removeTooltipEntrySettings:{reducer(e,t){var n=Jn(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:gr()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Dw=kw.actions,Iw=Dw.addTooltipEntrySettings,Aw=Dw.replaceTooltipEntrySettings,Tw=Dw.removeTooltipEntrySettings,Cw=Dw.setTooltipSettingsState,Pw=Dw.setActiveMouseOverItemIndex,zw=Dw.mouseLeaveItem,_w=Dw.mouseLeaveChart,Rw=Dw.setActiveClickItemIndex,Lw=Dw.setMouseOverAxisIndex,Uw=Dw.setMouseClickAxisIndex,Yw=Dw.setSyncInteraction,Fw=Dw.setKeyboardInteraction,Ww=kw.reducer,Bw=Br({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,i=n.endIndex;null!=r&&(e.dataStartIndex=r),null!=i&&(e.dataEndIndex=i)}}}),Qw=Bw.actions,qw=Qw.setChartData,Gw=Qw.setDataStartEndIndexes,$w=(Qw.setComputedData,Bw.reducer),Hw=Br({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(o=t.payload.left)&&void 0!==o?o:0},setScale(e,t){e.scale=t.payload}}}),Vw=Hw.actions,Kw=Vw.setMargin,Zw=Vw.setLayout,Xw=Vw.setChartSize,Jw=Vw.setScale,eM=Hw.reducer,tM=(0,a.createContext)(null),nM=e=>e,rM=()=>{var e=(0,a.useContext)(tM);return e?e.store.dispatch:nM},iM=()=>{},oM=()=>iM,aM=(e,t)=>e===t;function sM(e){var t=(0,a.useContext)(tM),n=(0,a.useMemo)(()=>t?t=>{if(null!=t)return e(t)}:iM,[t,e]);return(0,rd.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:oM,t?t.store.getState:iM,t?t.store.getState:iM,n,aM)}function cM(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function lM(e){return null!=e&&"function"!=typeof e&&function(e){return Number.isSafeInteger(e)&&e>=0}(e.length)}function uM(e){return null!==e&&("object"==typeof e||"function"==typeof e)}const dM=/^(?:0|[1-9]\d*)$/;function fM(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return dM.test(e)}}function pM(e,t,n){return!!uM(n)&&!!("number"==typeof t&&lM(n)&&fM(t)&&t<n.length||"string"==typeof t&&t in n)&&cM(n[t],e)}function hM(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}const mM=(e,t,n)=>{if(e!==t){const r=hM(e),i=hM(t);if(r===i&&0===r){if(e<t)return"desc"===n?1:-1;if(e>t)return"desc"===n?-1:1}return"desc"===n?i-r:r-i}return 0};function gM(e){return"symbol"==typeof e||e instanceof Symbol}const yM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vM=/^\w*$/;function bM(e,...t){const n=t.length;return n>1&&pM(e,t[0],t[1])?t=[]:n>2&&pM(t[0],t[1],t[2])&&(t=[t[0]]),function(e,t,n,r){if(null==e)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=null==t?[null]:[t]),0===t.length&&(t=[null]),Array.isArray(n)||(n=null==n?[]:[n]),n=n.map(e=>String(e));const i=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},o=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||function(e){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!gM(e))||"string"==typeof e&&(vM.test(e)||!yM.test(e))||!1)}(e)?e:{key:e,path:Rx(e)}));return e.map(e=>({original:e,criteria:o.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?i(t,e):"object"==typeof t?t[e]:t)(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){const i=mM(e.criteria[r],t.criteria[r],n[r]);if(0!==i)return i}return 0}).map(e=>e.original)}(e,function(e,t=1){const n=[],r=Math.floor(t),i=(e,t)=>{for(let o=0;o<e.length;o++){const a=e[o];Array.isArray(a)&&t<r?i(a,t+1):n.push(a)}};return i(e,0),n}(t),["asc"])}var xM=e=>e.legend.settings,wM=ki([e=>e.legend.payload,xM],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?bM(r,n):r});function MM(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function jM(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}MM(e,t)}}function OM(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}MM(e,t)}}function NM(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,c=0,l=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}c+=d,l+=f*d}n[a-1][1]+=n[a-1][0]=o,c&&(o-=l/c)}n[a-1][1]+=n[a-1][0]=o,MM(e,t)}}function SM(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function EM(e){return function(){return e}}function kM(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function DM(e,t){return e[t]}function IM(e){const t=[];return t.key=e,t}function AM(){var e=EM([]),t=kM,n=MM,r=DM;function i(i){var o,a,s=Array.from(e.apply(this,arguments),IM),c=s.length,l=-1;for(const e of i)for(o=0,++l;o<c;++o)(s[o][l]=[0,+r(e,s[o].key,l,i)]).data=e;for(o=0,a=SM(t(s));o<c;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:EM(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:EM(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?kM:"function"==typeof e?e:EM(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??MM,i):n},i}function TM(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function CM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CM(Object(n),!0).forEach(function(t){zM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zM(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _M(e,t,n){return Xx(e)||Xx(t)?n:qx(t)?Lx(e,t,n):"function"==typeof t?t(e):n}n.dn(MM),n.dn(jM),n.dn(OM),n.dn(NM),n.dn(SM),Array.prototype.slice,n.dn(EM),n.dn(kM),n.dn(AM);var RM=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,LM=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,o,a=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(o=!0),e.coordinate));return i||a.push(t),o||a.push(n),a},UM=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,o=e.range,a=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!a)return null;var h="scaleBand"===s&&a.bandwidth?a.bandwidth()/2:2,m=(t||n)&&"category"===i&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&o&&o.length>=2?2*Fx(o[0]-o[1])*m:m,t&&(d||f)){var g=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=a.map(n);return uw(i)?{coordinate:i+m,value:e,offset:m,index:t}:null}).filter(ew);return g}return c&&l?l.map((e,t)=>{var n=a.map(e);return uw(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(ew):a.ticks&&!n&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return uw(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(ew):a.domain().map((e,t)=>{var n=a.map(e);return uw(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(ew)},YM={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0,s=0;s<n;++s){var c=e[s],l=null==c?void 0:c[i];if(null!=l){var u=l[1],d=l[0],f=Wx(u)?d:u;f>=0?(l[0]=o,o+=f,l[1]=o):(l[0]=a,a+=f,l[1]=a)}}}},expand:jM,none:MM,silhouette:OM,wiggle:NM,positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var i=0;i<r;++i)for(var o=0,a=0;a<n;++a){var s=e[a],c=null==s?void 0:s[i];if(null!=c){var l=Wx(c[1])?c[0]:c[1];l>=0?(c[0]=o,o+=l,c[1]=o):(c[0]=0,c[1]=0)}}}}},FM=(e,t,n)=>{var r,i=null!==(r=YM[n])&&void 0!==r?r:MM,o=AM().keys(t).value((e,t)=>Number(_M(e,t,0))).order(kM).offset(i)(e);return o.forEach((n,r)=>{n.forEach((n,i)=>{var o=_M(e[i],t[r],0);Array.isArray(o)&&2===o.length&&Qx(o[0])&&Qx(o[1])&&(n[0]=o[0],n[1]=o[1])})}),o};function WM(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Xx(i[t.dataKey])){var s=Zx(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[o]?n[o].coordinate+r/2:null}var c=_M(i,Xx(a)?t.dataKey:a),l=t.scale.map(c);return Qx(l)?l:null}var BM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,QM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qM=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=bM(t,e=>e.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var c=i[a],l=i[a-1];o=Math.min(((null==c?void 0:c.coordinate)||0)-((null==l?void 0:l.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function GM(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,o=e.name;return PM(PM({},t),{},{dataKey:n,payload:r,value:i,name:o})}function $M(e,t){return null!=e?String(e):"string"==typeof t?t:void 0}var HM=e=>e.layout.width,VM=e=>e.layout.height,KM=e=>e.layout.scale,ZM=e=>e.layout.margin,XM=ki(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),JM=ki(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),ej="data-recharts-item-index",tj="data-recharts-item-id";function nj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nj(Object(n),!0).forEach(function(t){ij(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ij(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oj=ki([HM,VM,ZM,e=>e.brush.height,function(e){return JM(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return JM(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return XM(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return XM(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},xM,e=>e.legend.size],(e,t,n,r,i,o,a,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d=rj(rj({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var r=n.width,i=n.height,o=t.align,a=t.verticalAlign,s=t.layout;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==o&&Qx(e[o]))return PM(PM({},e),{},{[o]:e[o]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===o)&&"middle"!==a&&Qx(e[a]))return PM(PM({},e),{},{[a]:e[a]+(i||0)})}return e})(d,c,l);var p=e-d.left-d.right,h=t-d.top-d.bottom;return rj(rj({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),aj=ki(oj,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),sj=ki(HM,VM,(e,t)=>({x:0,y:0,width:e,height:t})),cj=(0,a.createContext)(null),lj=()=>null!=(0,a.useContext)(cj),uj=e=>e.brush,dj=ki([uj,oj,ZM],(e,t,n)=>({height:e.height,x:Qx(e.x)?e.x:t.left,y:Qx(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Qx(e.width)?e.width:t.width}));function fj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var pj=()=>{var e,t=lj(),n=sM(aj),r=sM(dj),i=null===(e=sM(uj))||void 0===e?void 0:e.padding;return t&&r&&i?{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}:n},hj={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mj=()=>{var e;return null!==(e=sM(oj))&&void 0!==e?e:hj},gj=()=>sM(HM),yj=()=>sM(VM),vj=e=>e.layout.layoutType,bj=()=>sM(vj),xj=()=>{var e=bj();if("horizontal"===e||"vertical"===e)return e},wj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},Mj=e=>{var t=rM(),n=lj(),r=e.width,i=e.height,o=xw(),s=r,c=i;return o&&(s=o.width>0?o.width:r,c=o.height>0?o.height:i),(0,a.useEffect)(()=>{!n&&dw(s)&&dw(c)&&t(Xw({width:s,height:c}))},[t,n,s,c]),null};function jj(e){return e?(e=function(e){return gM(e)?NaN:Number(e)}(e))===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e==e?e:0:0===e?e:0}function Oj(e,t,n){n&&"number"!=typeof n&&pM(e,t,n)&&(t=n=void 0),e=jj(e),void 0===t?(t=e,e=0):t=jj(t),n=void 0===n?e<t?1:-1:jj(n);const r=Math.max(Math.ceil((t-e)/(n||1)),0),i=new Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}var Nj=e=>e.chartData,Sj=ki([Nj],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ej=(e,t,n,r)=>r?Sj(e):Nj(e),kj=ki([Ej],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]}),Dj=ki([Sj],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]}),Ij=ki([Nj],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return null!=t?t.slice(n,r+1):[]});function Aj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cj(e){if(Array.isArray(e)&&2===e.length){var t=Aj(e,2),n=t[0],r=t[1];if(uw(n)&&uw(r))return!0}return!1}function Pj(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function zj(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,i=Aj(e,2),o=i[0],a=i[1];if(uw(o))n=o;else if("function"==typeof o)return;if(uw(a))r=a;else if("function"==typeof a)return;var s=[n,r];if(Cj(s))return s}}var _j=n(351),Rj=n.n(_j);function Lj(e){return 0===e?1:Math.floor(new(Rj())(e).abs().log(10).toNumber())+1}function Uj(e,t,n){for(var r=new(Rj())(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}function Yj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Fj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Wj=e=>{var t=Yj(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]},Bj=(e,t,n)=>{if(e.lte(0))return new(Rj())(0);var r=Lj(e.toNumber()),i=new(Rj())(10).pow(r),o=e.div(i),a=1!==r?.05:.1,s=new(Rj())(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return t?new(Rj())(s.toNumber()):new(Rj())(Math.ceil(s.toNumber()))},Qj=(e,t,n)=>{var r;if(e.lte(0))return new(Rj())(0);var i=[1,2,2.5,5],o=e.toNumber(),a=Math.floor(new(Rj())(o).abs().log(10).toNumber()),s=new(Rj())(10).pow(a),c=e.div(s).toNumber(),l=i.findIndex(e=>e>=c-1e-10);if(-1===l&&(s=s.mul(10),l=0),(l+=n)>=i.length){var u=Math.floor(l/i.length);l%=i.length,s=s.mul(new(Rj())(10).pow(u))}var d=null!==(r=i[l])&&void 0!==r?r:1,f=new(Rj())(d).mul(s);return t?f:new(Rj())(Math.ceil(f.toNumber()))},qj=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bj;if(!Number.isFinite((t-e)/(n-1)))return{step:new(Rj())(0),tickMin:new(Rj())(0),tickMax:new(Rj())(0)};var a,s=o(new(Rj())(t).sub(e).div(n-1),r,i);a=e<=0&&t>=0?new(Rj())(0):(a=new(Rj())(e).add(t).div(2)).sub(new(Rj())(a).mod(s));var c=Math.ceil(a.sub(e).div(s).toNumber()),l=Math.ceil(new(Rj())(t).sub(a).div(s).toNumber()),u=c+l+1;return u>n?qj(e,t,n,r,i+1,o):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:s,tickMin:a.sub(new(Rj())(c).mul(s)),tickMax:a.add(new(Rj())(l).mul(s))})},Gj=function(e){var t=Yj(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",s=Math.max(i,2),c=Yj(Wj([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return((e,t,n)=>{var r=new(Rj())(1),i=new(Rj())(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new(Rj())(10).pow(Lj(e)-1),i=new(Rj())(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new(Rj())(Math.floor(e)))}else 0===e?i=new(Rj())(Math.floor((t-1)/2)):n||(i=new(Rj())(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new(Rj())(c-a).mul(r)).toNumber());return s})(l,i,o);var f=qj(l,u,s,o,0,"snap125"===a?Qj:Bj),p=f.step,h=Uj(f.tickMin,f.tickMax.add(new(Rj())(.1).mul(p)),p);return n>r?h.reverse():h},$j=function(e,t){var n=Yj(e,2),r=n[0],i=n[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",s=Yj(Wj([r,i]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var u="snap125"===a?Qj:Bj,d=Math.max(t,2),f=u(new(Rj())(l).sub(c).div(d-1),o,0),p=[...Uj(new(Rj())(c),new(Rj())(l),f),l];if(!1===o){p=p.map(e=>Math.round(e));var h=p.length-1;h>0&&p[h]===p[h-1]&&(p=p.slice(0,h))}return r>i?p.reverse():p},Hj=e=>e.rootProps.stackOffset,Vj=e=>e.rootProps.reverseStackOrder,Kj=e=>e.options.chartName,Zj=e=>e.rootProps.syncId,Xj=e=>e.rootProps.syncMethod,Jj=e=>e.options.eventEmitter;function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(t){nO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nO(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rO=Math.PI/180,iO=e=>180*e/Math.PI,oO=(e,t,n,r)=>({x:e+Math.cos(-rO*r)*n,y:t+Math.sin(-rO*r)*n}),aO=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},sO=(e,t)=>{var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360);return e+360*Math.min(i,o)},cO=(e,t)=>{var n=((e,t)=>{var n=e.x,r=e.y,i=t.cx,o=t.cy,a=((e,t)=>{var n=e.x,r=e.y,i=t.x,o=t.y;return Math.sqrt((n-i)**2+(r-o)**2)})({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,c=Math.acos(s);return r>o&&(c=2*Math.PI-c),{radius:a,angle:iO(c),angleInRadian:c}})({x:e.relativeX,y:e.relativeY},t),r=n.radius,i=n.angle,o=t.innerRadius,a=t.outerRadius;if(r<o||r>a)return null;if(0===r)return null;var s,c=(e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-360*o,endAngle:n-360*o}})(t),l=c.startAngle,u=c.endAngle,d=i;if(l<=u){for(;d>u;)d-=360;for(;d<l;)d+=360;s=d>=l&&d<=u}else{for(;d>l;)d-=360;for(;d<u;)d+=360;s=d>=u&&d<=l}return s?tO(tO({},t),{},{radius:r,angle:sO(d,t)}):null},lO={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},uO=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function dO(e,t,n){return"auto"!==n?n:null!=e?RM(e,t)?"category":"number":void 0}function fO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fO(Object(n),!0).forEach(function(t){hO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hO(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mO={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},gO={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},yO=ki([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},wj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=dO(t,"angleAxis",mO.type))&&void 0!==n?n:"category";return pO(pO({},mO),{},{type:r})}),vO=ki([(e,t)=>e.polarAxis.radiusAxis[t],wj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=dO(t,"radiusAxis",gO.type))&&void 0!==n?n:"category";return pO(pO({},gO),{},{type:r})}),bO=e=>e.polarOptions,xO=ki([HM,VM,oj],aO),wO=ki([bO,xO],(e,t)=>{if(null!=e)return Hx(e.innerRadius,t,0)}),MO=ki([bO,xO],(e,t)=>{if(null!=e)return Hx(e.outerRadius,t,.8*t)}),jO=ki([bO],e=>null==e?[0,0]:[e.startAngle,e.endAngle]),OO=(ki([yO,jO],uO),ki([xO,wO,MO],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]})),NO=(ki([vO,OO],uO),ki([vj,bO,wO,MO,HM,VM],(e,t,n,r,i,o)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var a=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:Hx(a,i,i/2),cy:Hx(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}})),SO=(e,t)=>t,EO=(e,t,n)=>n;function kO(e){return null==e?void 0:e.id}function DO(e,t,n){var r=t.chartData,i=void 0===r?[]:r,o=n.allowDuplicatedCategory,a=n.dataKey,s=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:i;if(null!=n&&0!==n.length){var r=kO(e);n.forEach((t,n)=>{var i,c=null==a||o?n:String(_M(t,a,null)),l=_M(t,e.dataKey,0);i=s.has(c)?s.get(c):{},Object.assign(i,{[r]:l}),s.set(c,i)})}}),Array.from(s.values())}function IO(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var AO=(e,t)=>e===t||null!=e&&null!=t&&e[0]===t[0]&&e[1]===t[1];function TO(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var CO=e=>{var t=vj(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},PO=e=>e.tooltip.settings.axisId;function zO(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var i=e.bandwidth();switch(n.position){case"middle":r+=i/2;break;case"end":r+=i}}return r}}}}}var _O=(e,t)=>{if(null!=t){if("linear"===e){if(!Cj(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];uw(o)&&((void 0===n||o<n)&&(n=o),(void 0===r||o>r)&&(r=o))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}};function RO(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function LO(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class UO extends Map{constructor(e,t=FO){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(YO(this,e))}has(e){return super.has(YO(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function YO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function FO(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const WO=Symbol("implicit");function BO(){var e=new UO,t=[],n=[],r=WO;function i(i){let o=e.get(i);if(void 0===o){if(r!==WO)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new UO;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return BO(t,n).unknown(r)},RO.apply(i,arguments),i}function QO(){var e,t,n=BO().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,c=0,l=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-c+2*l),s&&(e=Math.floor(e)),f+=(p-f-e*(n-c))*u,t=e*(1-c),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},n.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},n.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return QO(r(),[o,a]).round(s).paddingInner(c).paddingOuter(l).align(u)},RO.apply(d(),arguments)}function qO(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return qO(t())},e}function GO(){return qO(QO.apply(null,arguments).paddingInner(1))}const $O=Math.sqrt(50),HO=Math.sqrt(10),VO=Math.sqrt(2);function KO(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=$O?10:o>=HO?5:o>=VO?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?KO(e,t,2*n):[s,c,l]}function ZO(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?KO(t,e,n):KO(e,t,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)c[e]=(o-e)/-a;else for(let e=0;e<s;++e)c[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)c[e]=(i+e)/-a;else for(let e=0;e<s;++e)c[e]=(i+e)*a;return c}function XO(e,t,n){return KO(e=+e,t=+t,n=+n)[2]}function JO(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?XO(t,e,n):XO(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function eN(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tN(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nN(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=eN,n=(t,n)=>eN(e(t),n),r=(t,n)=>e(t)-n):(t=e===eN||e===tN?e:rN,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function rN(){return 0}function iN(e){return null===e?NaN:+e}const oN=nN(eN),aN=oN.right,sN=(oN.left,nN(iN).center,aN);function cN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function uN(){}n.dn(cN);var dN=.7,fN=1/dN,pN="\\s*([+-]?\\d+)\\s*",hN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gN=/^#([0-9a-f]{3,8})$/,yN=new RegExp(`^rgb\\(${pN},${pN},${pN}\\)$`),vN=new RegExp(`^rgb\\(${mN},${mN},${mN}\\)$`),bN=new RegExp(`^rgba\\(${pN},${pN},${pN},${hN}\\)$`),xN=new RegExp(`^rgba\\(${mN},${mN},${mN},${hN}\\)$`),wN=new RegExp(`^hsl\\(${hN},${mN},${mN}\\)$`),MN=new RegExp(`^hsla\\(${hN},${mN},${mN},${hN}\\)$`),jN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ON(){return this.rgb().formatHex()}function NN(){return this.rgb().formatRgb()}function SN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=gN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?EN(t):3===n?new IN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?kN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?kN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=yN.exec(e))?new IN(t[1],t[2],t[3],1):(t=vN.exec(e))?new IN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=bN.exec(e))?kN(t[1],t[2],t[3],t[4]):(t=xN.exec(e))?kN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wN.exec(e))?_N(t[1],t[2]/100,t[3]/100,1):(t=MN.exec(e))?_N(t[1],t[2]/100,t[3]/100,t[4]):jN.hasOwnProperty(e)?EN(jN[e]):"transparent"===e?new IN(NaN,NaN,NaN,0):null}function EN(e){return new IN(e>>16&255,e>>8&255,255&e,1)}function kN(e,t,n,r){return r<=0&&(e=t=n=NaN),new IN(e,t,n,r)}function DN(e,t,n,r){return 1===arguments.length?((i=e)instanceof uN||(i=SN(i)),i?new IN((i=i.rgb()).r,i.g,i.b,i.opacity):new IN):new IN(e,t,n,r??1);var i}function IN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function AN(){return`#${zN(this.r)}${zN(this.g)}${zN(this.b)}`}function TN(){const e=CN(this.opacity);return`${1===e?"rgb(":"rgba("}${PN(this.r)}, ${PN(this.g)}, ${PN(this.b)}${1===e?")":`, ${e})`}`}function CN(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function PN(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zN(e){return((e=PN(e))<16?"0":"")+e.toString(16)}function _N(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new LN(e,t,n,r)}function RN(e){if(e instanceof LN)return new LN(e.h,e.s,e.l,e.opacity);if(e instanceof uN||(e=SN(e)),!e)return new LN;if(e instanceof LN)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new LN(a,s,c,e.opacity)}function LN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function UN(e){return(e=(e||0)%360)<0?e+360:e}function YN(e){return Math.max(0,Math.min(1,e||0))}function FN(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function WN(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function BN(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return WN((n-r/t)*t,a,i,o,s)}}function QN(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return WN((n-r/t)*t,i,o,a,s)}}cN(uN,SN,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ON,formatHex:ON,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return RN(this).formatHsl()},formatRgb:NN,toString:NN}),cN(IN,DN,lN(uN,{brighter(e){return e=null==e?fN:Math.pow(fN,e),new IN(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dN:Math.pow(dN,e),new IN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new IN(PN(this.r),PN(this.g),PN(this.b),CN(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:AN,formatHex:AN,formatHex8:function(){return`#${zN(this.r)}${zN(this.g)}${zN(this.b)}${zN(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:TN,toString:TN})),cN(LN,function(e,t,n,r){return 1===arguments.length?RN(e):new LN(e,t,n,r??1)},lN(uN,{brighter(e){return e=null==e?fN:Math.pow(fN,e),new LN(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dN:Math.pow(dN,e),new LN(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new IN(FN(e>=240?e-240:e+120,i,r),FN(e,i,r),FN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new LN(UN(this.h),YN(this.s),YN(this.l),CN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=CN(this.opacity);return`${1===e?"hsl(":"hsla("}${UN(this.h)}, ${100*YN(this.s)}%, ${100*YN(this.l)}%${1===e?")":`, ${e})`}`}})),n.dn(BN),n.dn(QN);const qN=e=>()=>e;function GN(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):qN(isNaN(e)?t:e)}n.dn(qN);const $N=function e(t){var n=function(e){return 1===(e=+e)?GN:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):qN(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=DN(e)).r,(t=DN(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=GN(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function HN(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=DN(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}function VN(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=rS(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function KN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ZN(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function XN(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=rS(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}HN(BN),HN(QN),n.dn(function(e,t){return((void 0)(t)?void 0:VN)(e,t)}),n.dn(KN),n.dn(ZN),n.dn(XN),n.dn(tS);var JN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eS=new RegExp(JN.source,"g");function tS(e,t){var n,r,i,o=JN.lastIndex=eS.lastIndex=0,a=-1,s=[],c=[];for(e+="",t+="";(n=JN.exec(e))&&(r=eS.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,c.push({i:a,x:ZN(n,r)})),o=eS.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?function(e){return function(t){return e(t)+""}}(c[0].x):function(e){return function(){return e}}(t):(t=c.length,function(e){for(var n,r=0;r<t;++r)s[(n=c[r]).i]=n.x(e);return s.join("")})}function nS(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function rS(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?qN(t):("number"===i?ZN:"string"===i?(n=SN(t))?(t=n,$N):tS:t instanceof SN?$N:t instanceof Date?KN:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?VN:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?XN:ZN:nS))(e,t)}function iS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function oS(e){return+e}n.dn(nS),n.dn(rS),n.dn(iS);var aS=[0,1];function sS(e){return e}function cS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function lS(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=cS(i,r),o=n(a,o)):(r=cS(r,i),o=n(o,a)),function(e){return o(r(e))}}function uS(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=cS(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=sN(e,t,1,r)-1;return o[n](i[n](t))}}function dS(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fS(){var e,t,n,r,i,o,a=aS,s=aS,c=rS,l=sS;function u(){var e=Math.min(a.length,s.length);return l!==sS&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?uS:lS,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,c)))(e(l(t)))}return d.invert=function(n){return l(t((o||(o=r(s,a.map(e),ZN)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,oS),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),c=iS,u()},d.clamp=function(e){return arguments.length?(l=!!e||sS,u()):l!==sS},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function pS(){return fS()(sS,sS)}var hS,mS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gS(e){if(!(t=mS.exec(e)))throw new Error("invalid format: "+e);var t;return new yS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function yS(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function vS(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function bS(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xS(e){return(e=bS(Math.abs(e)))?e[1]:NaN}function wS(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(xS(t)/3)))-xS(Math.abs(e)))}function MS(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function jS(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}function OS(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}function NS(e,t){var n=bS(e,t);if(!n)return hS=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(hS=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+bS(e,Math.max(0,t+o-1))[0]}function SS(e,t){var n=bS(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}gS.prototype=yS.prototype,yS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},n.dn(vS),n.dn(xS),n.dn(wS),n.dn(MS),n.dn(jS),n.dn(OS),n.dn(NS),n.dn(SS);const ES={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vS,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>SS(100*e,t),r:SS,s:NS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kS(e){return e}n.dn(kS),n.dn(PS);var DS,IS,AS,TS=Array.prototype.map,CS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PS(e){var t=void 0===e.grouping||void 0===e.thousands?kS:MS(TS.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?kS:jS(TS.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function l(e,l){var u=(e=gS(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,y=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):ES[b]||(void 0===y&&(y=12),v=!0,b="g"),(h||"0"===u&&"="===d)&&(h=!0,u="0",d="=");var x=(l&&void 0!==l.prefix?l.prefix:"")+("$"===p?n:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?r:/[%p]/.test(b)?a:"")+(l&&void 0!==l.suffix?l.suffix:""),M=ES[b],j=/[defgprs%]/.test(b);function O(e){var n,r,a,l=x,p=w;if("c"===b)p=M(e)+p,e="";else{var O=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:M(Math.abs(e),y),v&&(e=OS(e)),O&&0===+e&&"+"!==f&&(O=!1),l=(O?"("===f?f:s:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===hS?"":CS[8+hS/3])+p+(O&&"("===f?")":""),j)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){p=(46===a?i+e.slice(n+1):e.slice(n))+p,e=e.slice(0,n);break}}g&&!h&&(e=t(e,1/0));var N=l.length+e.length+p.length,S=N<m?new Array(m-N+1).join(u):"";switch(g&&h&&(e=t(S+e,S.length?m-p.length:1/0),S=""),d){case"<":e=l+e+p+S;break;case"=":e=l+S+e+p;break;case"^":e=S.slice(0,N=S.length>>1)+l+e+p+S.slice(N);break;default:e=S+l+e+p}return o(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),O.toString=function(){return e+""},O}return{format:l,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(xS(t)/3))),r=Math.pow(10,-n),i=l(((e=gS(e)).type="f",e),{suffix:CS[8+n/3]});return function(e){return i(r*e)}}}}function zS(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xS(t)-xS(e))+1}function _S(e){return Math.max(0,-xS(Math.abs(e)))}function RS(e,t,n,r){var i,o=JO(e,t,n);switch((r=gS(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=wS(o,a))||(r.precision=i),AS(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=zS(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=_S(o))||(r.precision=i-2*("%"===r.type))}return IS(r)}function LS(e){var t=e.domain;return e.ticks=function(e){var n=t();return ZO(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return RS(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,c=o[a],l=o[s],u=10;for(l<c&&(i=c,c=l,l=i,i=a,a=s,s=i);u-- >0;){if((i=XO(c,l,n))===r)return o[a]=c,o[s]=l,t(o);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function US(){var e=pS();return e.copy=function(){return dS(e,US())},RO.apply(e,arguments),LS(e)}function YS(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,oS),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return YS(e).unknown(t)},e=arguments.length?Array.from(e,oS):[0,1],LS(n)}function FS(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function WS(e){return Math.log(e)}function BS(e){return Math.exp(e)}function QS(e){return-Math.log(-e)}function qS(e){return-Math.exp(-e)}function GS(e){return isFinite(e)?+("1e"+e):e<0?0:e}function $S(e){return(t,n)=>-e(-t,n)}function HS(e){const t=e(WS,BS),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?GS:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=$S(r),i=$S(i),e(QS,qS)):e(WS,BS),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const c=s<a;c&&([a,s]=[s,a]);let l,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(l=1;l<o;++l)if(u=d<0?l/i(-d):l*i(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(l=o-1;l>=1;--l)if(u=d>0?l/i(-d):l*i(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=ZO(a,s,p))}else h=ZO(d,f,Math.min(f-d,p)).map(i);return c?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=gS(n)).precision||(n.trim=!0),n=IS(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(FS(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function VS(){const e=HS(fS()).domain([1,10]);return e.copy=()=>dS(e,VS()).base(e.base()),RO.apply(e,arguments),e}function KS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ZS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function XS(e){var t=1,n=e(KS(t),ZS(t));return n.constant=function(n){return arguments.length?e(KS(t=+n),ZS(t)):t},LS(n)}function JS(){var e=XS(fS());return e.copy=function(){return dS(e,JS()).constant(e.constant())},RO.apply(e,arguments)}function eE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function nE(e){return e<0?-e*e:e*e}function rE(e){var t=e(sS,sS),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(sS,sS):.5===n?e(tE,nE):e(eE(n),eE(1/n)):n},LS(t)}function iE(){var e=rE(fS());return e.copy=function(){return dS(e,iE()).exponent(e.exponent())},RO.apply(e,arguments),e}function oE(){return iE.apply(null,arguments).exponent(.5)}function aE(e){return Math.sign(e)*e*e}function sE(){var e,t=pS(),n=[0,1],r=!1;function i(n){var i=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(i)?e:r?Math.round(i):i}return i.invert=function(e){return t.invert(aE(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((n=Array.from(e,oS)).map(aE)),i):n.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(r=!!e,i):r},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return sE(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},RO.apply(i,arguments),LS(i)}function cE(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function lE(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function uE(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function dE(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?uE:function(e=eN){if(e===eN)return uE;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(o-c)/o)*(a-o/2<0?-1:1);dE(e,t,Math.max(n,Math.floor(t-a*c/o+l)),Math.min(r,Math.floor(t+(o-a)*c/o+l)),i)}const o=e[t];let a=n,s=r;for(fE(e,n,t),i(e[r],o)>0&&fE(e,n,r);a<s;){for(fE(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?fE(e,n,s):(++s,fE(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function fE(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function pE(e,t,n=iN){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function hE(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e<i;)r[e-1]=pE(t,e/i);return o}function o(t){return null==t||isNaN(t=+t)?e:n[sN(r,t)]}return o.invertExtent=function(e){var i=n.indexOf(e);return i<0?[NaN,NaN]:[i>0?r[i-1]:t[0],i<r.length?r[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(eN),i()},o.range=function(e){return arguments.length?(n=Array.from(e),i()):n.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return r.slice()},o.copy=function(){return hE().domain(t).range(n).unknown(e)},RO.apply(o,arguments)}function mE(){var e,t=0,n=1,r=1,i=[.5],o=[0,1];function a(t){return null!=t&&t<=t?o[sN(i,t,0,r)]:e}function s(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(o=Array.from(e)).length-1,s()):o.slice()},a.invertExtent=function(e){var a=o.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return mE().domain([t,n]).range(o).unknown(e)},RO.apply(LS(a),arguments)}function gE(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[sN(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return gE().domain(t).range(n).unknown(e)},RO.apply(i,arguments)}DS=PS({thousands:",",grouping:[3],currency:["$",""]}),IS=DS.format,AS=DS.formatPrefix,n.dn(zS),n.dn(_S);const yE=36e5,vE=864e5,bE=6048e5,xE=31536e6,wE=new Date,ME=new Date;function jE(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>jE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(wE.setTime(+t),ME.setTime(+r),e(wE),e(ME),Math.floor(n(wE,ME))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const OE=jE(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);OE.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?jE(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):OE:null),OE.range;const NE=jE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),SE=(NE.range,jE(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())),EE=(SE.range,jE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())),kE=(EE.range,jE(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+t*yE)},(e,t)=>(t-e)/yE,e=>e.getHours())),DE=(kE.range,jE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yE)},(e,t)=>(t-e)/yE,e=>e.getUTCHours())),IE=(DE.range,jE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/vE,e=>e.getDate()-1)),AE=(IE.range,jE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vE,e=>e.getUTCDate()-1)),TE=(AE.range,jE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vE,e=>Math.floor(e/vE)));function CE(e){return jE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/bE)}TE.range;const PE=CE(0),zE=CE(1),_E=CE(2),RE=CE(3),LE=CE(4),UE=CE(5),YE=CE(6);function FE(e){return jE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/bE)}PE.range,zE.range,_E.range,RE.range,LE.range,UE.range,YE.range;const WE=FE(0),BE=FE(1),QE=FE(2),qE=FE(3),GE=FE(4),$E=FE(5),HE=FE(6),VE=(WE.range,BE.range,QE.range,qE.range,GE.range,$E.range,HE.range,jE(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),KE=(VE.range,jE(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),ZE=(KE.range,jE(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));ZE.every=e=>isFinite(e=Math.floor(e))&&e>0?jE(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,ZE.range;const XE=jE(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function JE(e,t,n,r,i,o){const a=[[NE,1,1e3],[NE,5,5e3],[NE,15,15e3],[NE,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,yE],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,vE],[r,2,1728e5],[n,1,bE],[t,1,2592e6],[t,3,7776e6],[e,1,xE]];function s(t,n,r){const i=Math.abs(n-t)/r,o=nN(([,,e])=>e).right(a,i);if(o===a.length)return e.every(JO(t/xE,n/xE,r));if(0===o)return OE.every(Math.max(JO(t,n,r),1));const[s,c]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(c)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}XE.every=e=>isFinite(e=Math.floor(e))&&e>0?jE(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,XE.range;const[ek,tk]=JE(XE,KE,WE,TE,DE,EE),[nk,rk]=JE(ZE,VE,PE,IE,kE,SE);function ik(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ok(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ak(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var sk,ck,lk,uk={"-":"",_:" ",0:"0"},dk=/^\s*\d+/,fk=/^%/,pk=/[\\^$*+?|[\]().{}]/g;function hk(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function mk(e){return e.replace(pk,"\\$&")}function gk(e){return new RegExp("^(?:"+e.map(mk).join("|")+")","i")}function yk(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function vk(e,t,n){var r=dk.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function bk(e,t,n){var r=dk.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function xk(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function wk(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Mk(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jk(e,t,n){var r=dk.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ok(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nk(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Sk(e,t,n){var r=dk.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Ek(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function kk(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Dk(e,t,n){var r=dk.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ik(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ak(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Tk(e,t,n){var r=dk.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ck(e,t,n){var r=dk.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Pk(e,t,n){var r=dk.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zk(e,t,n){var r=fk.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _k(e,t,n){var r=dk.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Rk(e,t,n){var r=dk.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Lk(e,t){return hk(e.getDate(),t,2)}function Uk(e,t){return hk(e.getHours(),t,2)}function Yk(e,t){return hk(e.getHours()%12||12,t,2)}function Fk(e,t){return hk(1+IE.count(ZE(e),e),t,3)}function Wk(e,t){return hk(e.getMilliseconds(),t,3)}function Bk(e,t){return Wk(e,t)+"000"}function Qk(e,t){return hk(e.getMonth()+1,t,2)}function qk(e,t){return hk(e.getMinutes(),t,2)}function Gk(e,t){return hk(e.getSeconds(),t,2)}function $k(e){var t=e.getDay();return 0===t?7:t}function Hk(e,t){return hk(PE.count(ZE(e)-1,e),t,2)}function Vk(e){var t=e.getDay();return t>=4||0===t?LE(e):LE.ceil(e)}function Kk(e,t){return e=Vk(e),hk(LE.count(ZE(e),e)+(4===ZE(e).getDay()),t,2)}function Zk(e){return e.getDay()}function Xk(e,t){return hk(zE.count(ZE(e)-1,e),t,2)}function Jk(e,t){return hk(e.getFullYear()%100,t,2)}function eD(e,t){return hk((e=Vk(e)).getFullYear()%100,t,2)}function tD(e,t){return hk(e.getFullYear()%1e4,t,4)}function nD(e,t){var n=e.getDay();return hk((e=n>=4||0===n?LE(e):LE.ceil(e)).getFullYear()%1e4,t,4)}function rD(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+hk(t/60|0,"0",2)+hk(t%60,"0",2)}function iD(e,t){return hk(e.getUTCDate(),t,2)}function oD(e,t){return hk(e.getUTCHours(),t,2)}function aD(e,t){return hk(e.getUTCHours()%12||12,t,2)}function sD(e,t){return hk(1+AE.count(XE(e),e),t,3)}function cD(e,t){return hk(e.getUTCMilliseconds(),t,3)}function lD(e,t){return cD(e,t)+"000"}function uD(e,t){return hk(e.getUTCMonth()+1,t,2)}function dD(e,t){return hk(e.getUTCMinutes(),t,2)}function fD(e,t){return hk(e.getUTCSeconds(),t,2)}function pD(e){var t=e.getUTCDay();return 0===t?7:t}function hD(e,t){return hk(WE.count(XE(e)-1,e),t,2)}function mD(e){var t=e.getUTCDay();return t>=4||0===t?GE(e):GE.ceil(e)}function gD(e,t){return e=mD(e),hk(GE.count(XE(e),e)+(4===XE(e).getUTCDay()),t,2)}function yD(e){return e.getUTCDay()}function vD(e,t){return hk(BE.count(XE(e)-1,e),t,2)}function bD(e,t){return hk(e.getUTCFullYear()%100,t,2)}function xD(e,t){return hk((e=mD(e)).getUTCFullYear()%100,t,2)}function wD(e,t){return hk(e.getUTCFullYear()%1e4,t,4)}function MD(e,t){var n=e.getUTCDay();return hk((e=n>=4||0===n?GE(e):GE.ceil(e)).getUTCFullYear()%1e4,t,4)}function jD(){return"+0000"}function OD(){return"%"}function ND(e){return+e}function SD(e){return Math.floor(+e/1e3)}function ED(e){return new Date(e)}function kD(e){return e instanceof Date?+e:+new Date(+e)}function DD(e,t,n,r,i,o,a,s,c,l){var u=pS(),d=u.invert,f=u.domain,p=l(".%L"),h=l(":%S"),m=l("%I:%M"),g=l("%I %p"),y=l("%a %d"),v=l("%b %d"),b=l("%B"),x=l("%Y");function w(e){return(c(e)<e?p:s(e)<e?h:a(e)<e?m:o(e)<e?g:r(e)<e?i(e)<e?y:v:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,kD)):f().map(ED)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:l(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],e??10)),e?f(FS(n,e)):u},u.copy=function(){return dS(u,DD(e,t,n,r,i,o,a,s,c,l))},u}function ID(){return RO.apply(DD(nk,rk,ZE,VE,PE,IE,kE,SE,NE,ck).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AD(){return RO.apply(DD(ek,tk,XE,KE,WE,AE,DE,EE,NE,lk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function TD(){var e,t,n,r,i,o=0,a=1,s=sS,c=!1;function l(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,c?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),l):[s(0),s(1)]}}return l.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),l):[o,a]},l.clamp=function(e){return arguments.length?(c=!!e,l):c},l.interpolator=function(e){return arguments.length?(s=e,l):s},l.range=u(rS),l.rangeRound=u(iS),l.unknown=function(e){return arguments.length?(i=e,l):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),l}}function CD(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function PD(){var e=LS(TD()(sS));return e.copy=function(){return CD(e,PD())},LO.apply(e,arguments)}function zD(){var e=HS(TD()).domain([1,10]);return e.copy=function(){return CD(e,zD()).base(e.base())},LO.apply(e,arguments)}function _D(){var e=XS(TD());return e.copy=function(){return CD(e,_D()).constant(e.constant())},LO.apply(e,arguments)}function RD(){var e=rE(TD());return e.copy=function(){return CD(e,RD()).exponent(e.exponent())},LO.apply(e,arguments)}function LD(){return RD.apply(null,arguments).exponent(.5)}function UD(){var e=[],t=sS;function n(n){if(null!=n&&!isNaN(n=+n))return t((sN(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(eN),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>function(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return lE(e);if(t>=1)return cE(e);var r,i=(r-1)*t,o=Math.floor(i),a=cE(dE(e,o).subarray(0,o+1));return a+(lE(e.subarray(o+1))-a)*(i-o)}}(e,r/t))},n.copy=function(){return UD(t).domain(e)},LO.apply(n,arguments)}function YD(){var e,t,n,r,i,o,a,s=0,c=.5,l=1,u=1,d=sS,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(u*e<u*t?r:i),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,d=function(e,t){void 0===t&&(t=e,e=rS);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}(e,[n,r,i]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,c,l]=a,e=o(s=+s),t=o(c=+c),n=o(l=+l),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,c,l]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(rS),p.rangeRound=h(iS),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return o=a,e=a(s),t=a(c),n=a(l),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function FD(){var e=LS(YD()(sS));return e.copy=function(){return CD(e,FD())},LO.apply(e,arguments)}function WD(){var e=HS(YD()).domain([.1,1,10]);return e.copy=function(){return CD(e,WD()).base(e.base())},LO.apply(e,arguments)}function BD(){var e=XS(YD());return e.copy=function(){return CD(e,BD()).constant(e.constant())},LO.apply(e,arguments)}function QD(){var e=rE(YD());return e.copy=function(){return CD(e,QD()).exponent(e.exponent())},LO.apply(e,arguments)}function qD(){return QD.apply(null,arguments).exponent(.5)}function GD(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=i;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(Jx(e));return n in t&&"function"==typeof t[n]?t[n]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function $D(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?GD(e.scale,n,r):GD(t,n,r)}sk=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,c=e.shortMonths,l=gk(i),u=yk(i),d=gk(o),f=yk(o),p=gk(a),h=yk(a),m=gk(s),g=yk(s),y=gk(c),v=yk(c),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Lk,e:Lk,f:Bk,g:eD,G:nD,H:Uk,I:Yk,j:Fk,L:Wk,m:Qk,M:qk,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ND,s:SD,S:Gk,u:$k,U:Hk,V:Kk,w:Zk,W:Xk,x:null,X:null,y:Jk,Y:tD,Z:rD,"%":OD},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return c[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:iD,e:iD,f:lD,g:xD,G:MD,H:oD,I:aD,j:sD,L:cD,m:uD,M:dD,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ND,s:SD,S:fD,u:pD,U:hD,V:gD,w:yD,W:vD,x:null,X:null,y:bD,Y:wD,Z:jD,"%":OD},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:kk,e:kk,f:Pk,g:Ok,G:jk,H:Ik,I:Ik,j:Dk,L:Ck,m:Ek,M:Ak,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Sk,Q:_k,s:Rk,S:Tk,u:bk,U:xk,V:wk,w:vk,W:Mk,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:Ok,Y:jk,Z:Nk,"%":zk};function M(e,t){return function(n){var r,i,o,a=[],s=-1,c=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(c,s)),null!=(i=uk[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),c=s+1);return a.push(e.slice(c,s)),a.join("")}}function j(e,t){return function(n){var r,i,o=ak(1900,void 0,1);if(O(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ok(ak(o.y,0,1))).getUTCDay(),r=i>4||0===i?BE.ceil(r):BE(r),r=AE.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ik(ak(o.y,0,1))).getDay(),r=i>4||0===i?zE.ceil(r):zE(r),r=IE.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ok(ak(o.y,0,1)).getUTCDay():ik(ak(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ok(o)):ik(o)}}function O(e,t,n,r){for(var i,o,a=0,s=t.length,c=n.length;a<s;){if(r>=c)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in uk?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=j(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=j(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ck=sk.format,sk.parse,lk=sk.utcFormat,sk.utcParse;var HD=(e,t,n)=>{if(null!=e){var r=e.scale,o=e.type;return"auto"===r?"category"===o&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===o?"band":"linear":"string"==typeof r?function(e){return"scale".concat(Jx(e))}(r)in i?r:"point":void 0}};function VD(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),i=e.range();if(!(0===n.length||i.length<2))return e=>{var t,i,o=function(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}(r,e);if(o<=0)return n[0];if(o>=n.length)return n[n.length-1];var a=null!==(t=r[o-1])&&void 0!==t?t:0,s=null!==(i=r[o])&&void 0!==i?i:0;return Math.abs(e-a)<=Math.abs(e-s)?n[o-1]:n[o]}}}function KD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KD(Object(n),!0).forEach(function(t){XD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XD(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eI(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tI=[0,"auto"],nI={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},rI=(e,t)=>e.cartesianAxis.xAxis[t],iI=(e,t)=>rI(e,t)??nI,oI={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:tI,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},aI=(e,t)=>e.cartesianAxis.yAxis[t],sI=(e,t)=>aI(e,t)??oI,cI={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},lI=(e,t)=>e.cartesianAxis.zAxis[t]??cI,uI=(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return sI(e,n);case"zAxis":return lI(e,n);case"angleAxis":return yO(e,n);case"radiusAxis":return vO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},dI=(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return sI(e,n);case"angleAxis":return yO(e,n);case"radiusAxis":return vO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},fI=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function pI(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var hI=e=>e.graphicalItems.cartesianItems,mI=ki([SO,EO],pI),gI=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),yI=ki([hI,uI,mI],gI,{memoizeOptions:{resultEqualityCheck:TO}}),vI=ki([yI],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(IO)),bI=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),xI=ki([yI],bI),wI=e=>e.map(e=>e.data).filter(Boolean).flat(1),MI=ki([yI],e=>e.some(e=>!e.data)),jI=ki([yI],wI,{memoizeOptions:{resultEqualityCheck:TO}}),OI=(e,t)=>{var n=t.chartData,r=void 0===n?[]:n,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:r.slice(i,o+1)},NI=ki([jI,Ej],OI),SI=(e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:_M(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:_M(e,t)}))):e.map(e=>({value:e})),EI=(e,t,n,r,i,o)=>{var a=r.chartData,s=void 0===a?[]:a,c=r.dataStartIndex,l=r.dataEndIndex,u=SI(e,t,n);return i&&null!=(null==t?void 0:t.dataKey)&&o.length>0?[...s.slice(c,l+1).map(e=>({value:_M(e,t.dataKey)})).filter(e=>null!=e.value),...u]:u},kI=ki([NI,uI,yI,Ej,MI,jI],EI);function DI(e){if(qx(e)||e instanceof Date){var t=Number(e);if(uw(t))return t}}function II(e){if(Array.isArray(e)){var t=[DI(e[0]),DI(e[1])];return Cj(t)?t:void 0}var n=DI(e);if(null!=n)return[n,n]}function AI(e){return e.map(DI).filter(ew)}function TI(e,t){var n=DI(e),r=DI(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var CI=ki([kI],e=>null==e?void 0:e.map(e=>e.value).sort(TI));function PI(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var zI=e=>{var t=CO(e),n=PO(e);return dI(e,t,n)},_I=ki([zI],e=>null==e?void 0:e.dataKey),RI=ki([vI,Ej,zI],DO),LI=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=JD(t,2),o=i[0],a=i[1],s=r?[...a].reverse():a,c=s.map(kO);return[o,{stackedData:FM(e,c,n),graphicalItems:s}]}))},UI=ki([RI,vI,Hj,Vj],LI),YI=(e,t,n,r)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(null==r&&"zAxis"!==n)return((e,t,n)=>{var r;if(null!=e&&0!==Object.keys(e).length)return r=Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var a=o.stackedData.reduce((e,r)=>{var i,o=(i=TM(r,t,n).flat(2).filter(Qx),[Math.min(...i),Math.max(...i)]);return uw(o[0])&&uw(o[1])?[Math.min(e[0],o[0]),Math.max(e[1],o[1])]:e},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]})(e,i,o)},FI=ki([uI],e=>e.allowDataOverflow),WI=e=>{var t;if(null==e||!("domain"in e))return tI;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=AI(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:tI},BI=ki([uI],WI),QI=ki([BI,FI],zj),qI=ki([UI,Nj,SO,QI],YI,{memoizeOptions:{resultEqualityCheck:AO}}),GI=e=>e.errorBars,$I=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},HI=function(e,t,n,r,i){var o,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(n.length>0&&n.forEach(e=>{var n,c=null!=e.data?[...e.data]:s,l=null===(n=r[e.id])||void 0===n?void 0:n.filter(e=>PI(i,e));c.forEach(n=>{var r,i=_M(n,null!==(r=t.dataKey)&&void 0!==r?r:e.dataKey),s=function(e,t,n){if(!n)return[];if(!n.length)return[];var r;if("number"!=typeof t||Wx(t)){if(Array.isArray(t)){var i=AI(t);i.length>0&&(r=Math.max(...i))}}else r=t;return null==r?[]:AI(n.flatMap(t=>{var n,i,o=_M(e,t.dataKey);if(Array.isArray(o)){var a=JD(o,2);n=a[0],i=a[1]}else n=i=o;if(uw(n)&&uw(i))return[r-n,r+i]}))}(n,i,l);if(s.length>=2){var c=Math.min(...s),u=Math.max(...s);(null==o||c<o)&&(o=c),(null==a||u>a)&&(a=u)}var d=II(i);null!=d&&(o=null==o?d[0]:Math.min(o,d[0]),a=null==a?d[1]:Math.max(a,d[1]))})}),null!=(null==t?void 0:t.dataKey)&&0===n.length&&e.forEach(e=>{var n=II(_M(e,t.dataKey));null!=n&&(o=null==o?n[0]:Math.min(o,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),uw(o)&&uw(a))return[o,a]},VI=ki([NI,uI,xI,GI,SO,kj],HI,{memoizeOptions:{resultEqualityCheck:AO}});function KI(e){var t=e.value;if(qx(t)||t instanceof Date)return t}var ZI=e=>e.referenceElements.dots,XI=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),JI=ki([ZI,SO,EO],XI),eA=e=>e.referenceElements.areas,tA=ki([eA,SO,EO],XI),nA=e=>e.referenceElements.lines,rA=ki([nA,SO,EO],XI),iA=(e,t)=>{if(null!=e){var n=AI(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},oA=ki(JI,SO,iA),aA=(e,t)=>{if(null!=e){var n=AI(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},sA=ki([tA,SO],aA),cA=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return AI([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:AI(n)}(e):function(e){var t;if(null!=e.y)return AI([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:AI(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},lA=ki([rA,SO],cA),uA=ki(oA,lA,sA,(e,t,n)=>$I(e,n,t)),dA=(e,t,n,r,i,o,a,s,c)=>{if(null!=n)return n;var l="vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?$I(r,o,i):$I(o,i),u=function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(Cj(r))return Pj(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var i,o,a=Aj(e,2),s=a[0],c=a[1];if("auto"===s)null!=t&&(i=Math.min(...t));else if(Qx(s))i=s;else if("function"==typeof s)try{null!=t&&(i=s(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof s&&BM.test(s)){var l=BM.exec(s);if(null==l||null==l[1]||null==t)i=void 0;else{var u=+l[1];i=t[0]-u}}else i=null==t?void 0:t[0];if("auto"===c)null!=t&&(o=Math.max(...t));else if(Qx(c))o=c;else if("function"==typeof c)try{null!=t&&(o=c(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof c&&QM.test(c)){var d=QM.exec(c);if(null==d||null==d[1]||null==t)o=void 0;else{var f=+d[1];o=t[1]+f}}else o=null==t?void 0:t[1];var p=[i,o];if(Cj(p))return null==t?p:Pj(p,t,n)}}}(t,l,e.allowDataOverflow);return null!=u?u:e.allowDataOverflow&&null==l&&null!=c?c:u},fA=ki([uI],e=>{if(null!=e&&"number"===e.type&&"ticks"in e&&null!=e.ticks){var t=AI(e.ticks);if(0!==t.length)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:AO}}),pA=ki([uI,BI,QI,qI,VI,uA,vj,SO,fA],dA,{memoizeOptions:{resultEqualityCheck:AO}}),hA=[0,1],mA=(e,t,n,r,i,o,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,c=e.dataKey,l=e.type,u=RM(t,o);return u&&null==c?Oj(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===l?((e,t,n)=>{var r=e.map(KI).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&Vx(r))?Oj(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==i||u?a:hA}},gA=ki([uI,vj,NI,kI,Hj,SO,pA],mA),yA=ki([uI,fI,Kj],HD),vA=(e,t,n)=>{var r=t.niceTicks;if("none"!==r){var i=WI(t),o=Array.isArray(i)&&("auto"===i[0]||"auto"===i[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&Cj(e)){if(o)return Gj(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return $j(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(o&&Cj(e))return Gj(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&Cj(e))return $j(e,t.tickCount,t.allowDecimals,"adaptive")}}},bA=ki([gA,dI,yA],vA),xA=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&Cj(t)&&Array.isArray(n)&&n.length>0){var i,o,a=t[0],s=null!==(i=n[0])&&void 0!==i?i:0,c=t[1],l=null!==(o=n[n.length-1])&&void 0!==o?o:0;return[Math.min(a,s),Math.max(c,l)]}return t},wA=ki([uI,gA,bA,SO],xA),MA=ki(kI,uI,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(AI(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],o=r[r.length-1];if(null==i||null==o)return 1/0;var a=o-i;if(0===a)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(null!=c&&null!=l){var u=l-c;n=Math.min(n,u)}}return n/a}}),jA=ki(MA,vj,e=>e.rootProps.barCategoryGap,oj,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!uw(e))return 0;var o="vertical"===t?r.height:r.width;if("gap"===i)return e*o/2;if("no-gap"===i){var a=Hx(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),OA=ki(iI,(e,t,n)=>{var r=iI(e,t);return null==r||"string"!=typeof r.padding?0:jA(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var i=e.padding;return"string"==typeof i?{left:t,right:t}:{left:(null!==(n=i.left)&&void 0!==n?n:0)+t,right:(null!==(r=i.right)&&void 0!==r?r:0)+t}}),NA=ki(sI,(e,t,n)=>{var r=sI(e,t);return null==r||"string"!=typeof r.padding?0:jA(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var i=e.padding;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(n=i.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=i.bottom)&&void 0!==r?r:0)+t}}),SA=ki([oj,OA,dj,uj,(e,t,n)=>n],(e,t,n,r,i)=>{var o=r.padding;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),EA=ki([oj,vj,NA,dj,uj,(e,t,n)=>n],(e,t,n,r,i,o)=>{var a=i.padding;return o?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),kA=(e,t,n,r)=>{var i;switch(t){case"xAxis":return SA(e,n,r);case"yAxis":return EA(e,n,r);case"zAxis":return null===(i=lI(e,n))||void 0===i?void 0:i.range;case"angleAxis":return jO(e);case"radiusAxis":return OO(e,n);default:return}},DA=ki([uI,kA],uO),IA=ki([yA,wA],_O),AA=ki([uI,yA,IA,DA],$D),TA=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var i=n.type,o=n.scale;return!RM(e,r)||"number"!==i&&"auto"===o?void 0:t.map(e=>e.value)}},CA=ki([vj,kI,dI,SO],TA),PA=ki([AA],zO);function zA(e,t){return e.id<t.id?-1:e.id>t.id?1:0}ki([AA],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):VD(e,void 0)}),ki([AA,CI],VD),ki([yI,GI,SO],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>PI(n,e)));var _A=(e,t)=>t,RA=(e,t,n)=>n,LA=ki(XM,_A,RA,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(zA)),UA=ki(JM,_A,RA,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(zA)),YA=(e,t)=>({width:e.width,height:t.height}),FA=ki(oj,iI,YA),WA=ki(VM,oj,LA,_A,RA,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=YA(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var c="top"===r&&!i||"bottom"===r&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),BA=ki(HM,oj,UA,_A,RA,(e,t,n,r,i)=>{var o,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==o&&(o=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var c="left"===r&&!i||"right"===r&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a}),QA=ki([oj,iI,(e,t)=>{var n=iI(e,t);if(null!=n)return WA(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),qA=ki([oj,sI,(e,t)=>{var n=sI(e,t);if(null!=n)return BA(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var i=null==n?void 0:n[r];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),GA=ki(oj,sI,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),$A=(e,t,n,r)=>{if(null!=n){var i=n.allowDuplicatedCategory,o=n.type,a=n.dataKey,s=RM(e,r),c=t.map(e=>e.value),l=c.filter(e=>null!=e);return a&&s&&"category"===o&&i&&Vx(l)?c:void 0}},HA=ki([vj,kI,uI,SO],$A),VA=ki([vj,(e,t,n)=>{switch(t){case"xAxis":return iI(e,n);case"yAxis":return sI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},yA,PA,HA,CA,kA,bA,SO],(e,t,n,r,i,o,a,s,c)=>{if(null!=t){var l=RM(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:o,duplicateDomain:i,isCategorical:l,niceTicks:s,range:a,realScaleType:n,scale:r}}}),KA=ki([vj,dI,yA,PA,bA,kA,HA,CA,SO],(e,t,n,r,i,o,a,s,c)=>{if(null!=t&&null!=r){var l=RM(e,c),u=t.type,d=t.ticks,f=t.tickCount,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,h="category"===u&&r.bandwidth?r.bandwidth()/p:0;h="angleAxis"===c&&null!=o&&o.length>=2?2*Fx(o[0]-o[1])*h:h;var m=d||i;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,i=r.map(n);return uw(i)?{index:t,coordinate:i+h,value:e,offset:h}:null}).filter(ew):l&&s?s.map((e,t)=>{var n=r.map(e);return uw(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ew):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return uw(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ew):r.domain().map((e,t)=>{var n=r.map(e);return uw(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(ew)}}),ZA=ki([vj,dI,PA,kA,HA,CA,SO],(e,t,n,r,i,o,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=RM(e,a),c=t.tickCount,l=0;return l="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Fx(r[0]-r[1])*l:l,s&&o?o.map((e,t)=>{var r=n.map(e);return uw(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(ew):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return uw(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(ew):n.domain().map((e,t)=>{var r=n.map(e);return uw(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(ew)}}),XA=ki(uI,PA,(e,t)=>{if(null!=e&&null!=t)return ZD(ZD({},e),{},{scale:t})}),JA=ki([uI,yA,gA,DA],$D),eT=ki([JA],zO),tT=(ki((e,t,n)=>lI(e,n),eT,(e,t)=>{if(null!=e&&null!=t)return ZD(ZD({},e),{},{scale:t})}),ki([vj,XM,JM],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}})),nT=(ki([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,i=e[0];for(var o of e){var a=Math.abs(o.coordinate-t);a<r&&(r=a,i=o)}return null===(n=i)||void 0===n?void 0:n.value}}),e=>e.options.defaultTooltipEventType),rT=e=>e.options.validateTooltipEventTypes;function iT(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function oT(e,t){return iT(t,nT(e),rT(e))}var aT=(e,t)=>{var n,r=Number(t);if(!Wx(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0};function sT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sT(Object(n),!0).forEach(function(t){lT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uT=(e,t,n,r)=>{if(null==t)return Ew;var i=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==i)return Ew;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var o=!0===e.settings.active;if(null!=i.index){if(o)return cT(cT({},i),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return cT(cT({},Ew),{},{coordinate:i.coordinate})};var dT=(e,t,n,r)=>{var i=null==e?void 0:e.index;if(null==i)return null;var o=Number(i);if(!uw(o))return i;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(o,a)),c=t[s];return null==c||function(e,t,n){if(null==n||null==t)return!0;var r=_M(e,t);return null==r||!Cj(n)||function(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],i=t[1];if(void 0===n)return!1;var o=Math.min(r,i),a=Math.max(r,i);return n>=o&&n<=a}(r,n)}(c,n,r)?String(s):null},fT=(e,t,n,r,i,o,a)=>{if(null!=o){var s=a[0],c=null==s?void 0:s.getPosition(o);if(null!=c)return c;var l=null==i?void 0:i[Number(o)];if(l)return"horizontal"===n?{x:l.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:l.coordinate}}},pT=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var i;if(i="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==i)return e.tooltipItemPayloads;if(null==i&&(null!=r||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return null!=o?[o]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})},hT=e=>e.options.tooltipPayloadSearcher,mT=e=>e.tooltip;function gT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gT(Object(n),!0).forEach(function(t){vT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vT(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bT(e){if("string"==typeof e)return e}var xT=(e,t,n,r,i,o,a)=>{if(null!=t&&null!=o){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d,f,p,h=n.dataDefinedOnItem,m=n.settings,g=function(e,t){return null!=e?e:t}(h,s),y=Array.isArray(g)?TM(g,l,u):g,v=null!==(d=null==m?void 0:m.dataKey)&&void 0!==d?d:r,b=null==m?void 0:m.nameKey;return f=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===a?Zx(y,r,i):o(y,t,c,b),Array.isArray(f)?f.forEach(t=>{var n,r,i=function(e){if(null!=e&&"object"==typeof e){var t="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,n="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0,r="dataKey"in e?function(e){return"string"==typeof e||"number"==typeof e?e:"function"==typeof e?t=>e(t):void 0}(e.dataKey):void 0;return{name:t,unit:n,dataKey:r,payload:"payload"in e?e.payload:void 0,color:"color"in e?bT(e.color):void 0,fill:"fill"in e?bT(e.fill):void 0}}}(t),o=null==i?void 0:i.name,a=null==i?void 0:i.dataKey,s=null==i?void 0:i.payload,c=yT(yT({},m),{},{name:o,unit:null==i?void 0:i.unit,color:null!==(n=null==i?void 0:i.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==i?void 0:i.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push(GM({tooltipEntrySettings:c,dataKey:a,payload:s,value:_M(s,a),name:null==o?void 0:String(o)}))}):e.push(GM({tooltipEntrySettings:m,dataKey:v,payload:f,value:_M(f,v),name:null!==(p=_M(f,b))&&void 0!==p?p:null==m?void 0:m.name})),e},[])}},wT=ki([zI,fI,Kj],HD),MT=ki([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),jT=ki([CO,PO],pI),OT=ki([MT,zI,jT],gI,{memoizeOptions:{resultEqualityCheck:TO}}),NT=ki([OT],e=>e.filter(IO)),ST=ki([OT],wI,{memoizeOptions:{resultEqualityCheck:TO}}),ET=ki([OT],e=>e.some(e=>!e.data)),kT=ki([ST,Nj],OI),DT=ki([NT,Nj,zI],DO),IT=ki([kT,zI,OT,Nj,ET,ST],EI),AT=ki([zI],WI),TT=ki([zI],e=>e.allowDataOverflow),CT=ki([AT,TT],zj),PT=ki([OT],e=>e.filter(IO)),zT=ki([DT,PT,Hj,Vj],LI),_T=ki([zT,Nj,CO,CT],YI),RT=ki([OT],bI),LT=ki([kT,zI,RT,GI,CO,Ij],HI,{memoizeOptions:{resultEqualityCheck:AO}}),UT=ki([ZI,CO,PO],XI),YT=ki([UT,CO],iA),FT=ki([eA,CO,PO],XI),WT=ki([FT,CO],aA),BT=ki([nA,CO,PO],XI),QT=ki([BT,CO],cA),qT=ki([YT,QT,WT],$I),GT=ki([zI,AT,CT,_T,LT,qT,vj,CO],dA),$T=ki([zI,vj,kT,IT,Hj,CO,GT],mA),HT=ki([$T,zI,wT],vA),VT=ki([zI,$T,HT,CO],xA),KT=e=>{var t=CO(e),n=PO(e);return kA(e,t,n,!1)},ZT=ki([zI,KT],uO),XT=ki([zI,wT,VT,ZT],$D),JT=ki([XT],zO),eC=ki([vj,IT,zI,CO],$A),tC=ki([vj,IT,zI,CO],TA),nC=ki([vj,zI,wT,JT,KT,eC,tC,CO],(e,t,n,r,i,o,a,s)=>{if(t){var c=t.type,l=RM(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===c&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=i&&(null==i?void 0:i.length)>=2?2*Fx(i[0]-i[1])*d:d,l&&a?a.map((e,t)=>{var n=r.map(e);return uw(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(ew):r.domain().map((e,t)=>{var n=r.map(e);return uw(n)?{coordinate:n+d,value:o?o[e]:e,index:t,offset:d}:null}).filter(ew)}}}),rC=ki([nT,rT,e=>e.tooltip.settings],(e,t,n)=>iT(n.shared,e,t)),iC=e=>e.tooltip.settings.trigger,oC=e=>e.tooltip.settings.defaultIndex,aC=ki([mT,rC,iC,oC],uT),sC=ki([aC,kT,_I,$T],dT),cC=ki([nC,sC],aT),lC=ki([aC],e=>{if(e)return e.dataKey}),uC=ki([aC],e=>{if(e)return e.graphicalItemId}),dC=ki([mT,rC,iC,oC],pT),fC=ki([HM,VM,vj,oj,nC,oC,dC],fT),pC=ki([aC,fC],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),hC=ki([aC],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),mC=ki([dC,sC,Nj,_I,cC,hT,rC],xT),gC=ki([mC],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function yC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yC(Object(n),!0).forEach(function(t){bC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xC=(e,t,n,r,i)=>{var o,a=null!==(o=null==t?void 0:t.length)&&void 0!==o?o:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=i&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<a;s++){var c,l,u,d,f,p=s>0?null===(c=n[s-1])||void 0===c?void 0:c.coordinate:null===(l=n[a-1])||void 0===l?void 0:l.coordinate,h=null===(u=n[s])||void 0===u?void 0:u.coordinate,m=s>=a-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(f=n[s+1])||void 0===f?void 0:f.coordinate,g=void 0;if(null!=p&&null!=h&&null!=m)if(Fx(h-p)!==Fx(m-h)){var y=[];if(Fx(m-h)===Fx(i[1]-i[0])){g=m;var v=h+i[1]-i[0];y[0]=Math.min(v,(v+p)/2),y[1]=Math.max(v,(v+p)/2)}else{g=p;var b=m+i[1]-i[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1])return null===(x=n[s])||void 0===x?void 0:x.index}else{var M,j=Math.min(p,m),O=Math.max(p,m);if(e>(j+h)/2&&e<=(O+h)/2)return null===(M=n[s])||void 0===M?void 0:M.index}}else if(t)for(var N=0;N<a;N++){var S=t[N];if(null!=S){var E=t[N+1],k=t[N-1];if(0===N&&null!=E&&e<=(S.coordinate+E.coordinate)/2)return S.index;if(N===a-1&&null!=k&&e>(S.coordinate+k.coordinate)/2)return S.index;if(N>0&&N<a-1&&null!=k&&null!=E&&e>(S.coordinate+k.coordinate)/2&&e<=(S.coordinate+E.coordinate)/2)return S.index}}return-1},wC=(e,t)=>t,MC=(e,t,n)=>n,jC=(e,t,n,r)=>r,OC=ki(nC,e=>bM(e,e=>e.coordinate)),NC=ki([mT,wC,MC,jC],uT),SC=ki([NC,kT,_I,$T],dT),EC=ki([mT,wC,MC,jC],pT),kC=ki([HM,VM,vj,oj,nC,jC,EC],fT),DC=ki([NC,kC],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),IC=ki([nC,SC],aT),AC=ki([EC,SC,Nj,_I,IC,hT,wC],xT),TC=ki([NC,SC],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),CC=ki([(e,t)=>t,vj,NO,CO,ZT,nC,OC,oj],(e,t,n,r,i,o,a,s)=>{if(e&&t&&r&&i&&o)return"horizontal"===t||"vertical"===t?((e,t,n,r,i,o,a)=>{if(e&&n&&r&&i&&function(e,t){var n=e.relativeX,r=e.relativeY;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,a)){var s=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),c=xC(s,o,i,n,r),l=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("horizontal"===e)return{x:i.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}})(t,i,c,e);return{activeIndex:String(c),activeCoordinate:l}}})(e,t,r,i,o,a,s):((e,t,n,r,i,o,a)=>{if(e&&r&&i&&o&&n){var s=cO(e,n);if(s){var c=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),l=xC(c,a,o,r,i),u=((e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if("centric"===e){var o=i.coordinate,a=r.radius;return vC(vC(vC({},r),oO(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,c=r.angle;return vC(vC(vC({},r),oO(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,o,l,s);return{activeIndex:String(l),activeCoordinate:u}}}})(e,t,n,r,i,o,a)});function PC(e){var t,n,r,i=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var o=e.currentTarget.getBBox();t=o.width>0?i.width/o.width:1,n=o.height>0?i.height/o.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?i.width/a.offsetWidth:1,n=a.offsetHeight>0?i.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-i.left)/t),relativeY:Math.round((r-i.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var zC=dr("mouseClick"),_C=xi();_C.startListening({actionCreator:zC,effect:(e,t)=>{var n=e.payload,r=CC(t.getState(),PC(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(Uw({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var RC=dr("mouseMove"),LC=xi(),UC=null,YC=null,FC=null;function WC(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BC(Object(n),!0).forEach(function(t){qC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}LC.startListening({actionCreator:RC,effect:(e,t)=>{var n=e.payload,r=t.getState().eventSettings,i=r.throttleDelay,o=r.throttledEvents,a="all"===o||(null==o?void 0:o.includes("mousemove"));null!==UC&&(cancelAnimationFrame(UC),UC=null),null===YC||"number"==typeof i&&a||(clearTimeout(YC),YC=null),FC=PC(n);var s=()=>{var e=t.getState(),n=oT(e,e.tooltip.settings.shared);if(!FC)return UC=null,void(YC=null);if("axis"===n){var r=CC(e,FC);null!=(null==r?void 0:r.activeIndex)?t.dispatch(Lw({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(_w())}UC=null,YC=null};a?"raf"===i?UC=requestAnimationFrame(s):"number"==typeof i&&null===YC&&(YC=setTimeout(s,i)):s()}});var GC=Br({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:gr()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;void 0!==e.xAxis[r.id]&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=i)},prepare:gr()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:gr()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:gr()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;void 0!==e.yAxis[r.id]&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=i)},prepare:gr()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:gr()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:gr()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;void 0!==e.zAxis[r.id]&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=i)},prepare:gr()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:gr()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,i=n.width,o=e.yAxis[r];if(o){var a,s=o.widthHistory||[];if(3===s.length&&s[0]===s[2]&&i===s[1]&&i!==o.width&&Math.abs(i-(null!==(a=s[0])&&void 0!==a?a:0))<=1)return;var c=[...s,i].slice(-3);e.yAxis[r]=QC(QC({},o),{},{width:i,widthHistory:c})}}}}),$C=GC.actions,HC=$C.addXAxis,VC=$C.replaceXAxis,KC=$C.removeXAxis,ZC=$C.addYAxis,XC=$C.replaceYAxis,JC=$C.removeYAxis,eP=($C.addZAxis,$C.replaceZAxis,$C.removeZAxis,$C.updateYAxisWidth),tP=GC.reducer,nP=Br({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:gr()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,o=Jn(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=i)},prepare:gr()},removeCartesianGraphicalItem:{reducer(e,t){var n=Jn(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:gr()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:gr()},removePolarGraphicalItem:{reducer(e,t){var n=Jn(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:gr()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,o=Jn(e).polarItems.indexOf(r);o>-1&&(e.polarItems[o]=i)},prepare:gr()}}}),rP=nP.actions,iP=rP.addCartesianGraphicalItem,oP=rP.replaceCartesianGraphicalItem,aP=rP.removeCartesianGraphicalItem,sP=rP.addPolarGraphicalItem,cP=rP.removePolarGraphicalItem,lP=rP.replacePolarGraphicalItem,uP=nP.reducer,dP=Br({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Jn(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Jn(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Jn(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),fP=dP.actions,pP=(fP.addDot,fP.removeDot,fP.addArea,fP.removeArea,fP.addLine,fP.removeLine,dP.reducer),hP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},mP=Br({name:"brush",initialState:hP,reducers:{setBrushSettings:(e,t)=>null==t.payload?hP:t.payload}}),gP=(mP.actions.setBrushSettings,mP.reducer),yP=Br({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:gr()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,o=Jn(e).payload.indexOf(r);o>-1&&(e.payload[o]=i)},prepare:gr()},removeLegendPayload:{reducer(e,t){var n=Jn(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:gr()}}}),vP=yP.actions,bP=vP.setLegendSize,xP=vP.setLegendSettings,wP=vP.addLegendPayload,MP=vP.replaceLegendPayload,jP=vP.removeLegendPayload,OP=yP.reducer,NP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},SP=Br({name:"rootProps",initialState:NP,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:NP.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),EP=SP.reducer,kP=SP.actions.updateOptions,DP=Br({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),IP=DP.actions,AP=(IP.addRadiusAxis,IP.removeRadiusAxis,IP.addAngleAxis,IP.removeAngleAxis,DP.reducer),TP=Br({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),CP=TP.actions.updatePolarOptions,PP=TP.reducer,zP=dr("keyDown"),_P=dr("focus"),RP=dr("blur"),LP=xi(),UP=null,YP=null,FP=null;function WP(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}LP.startListening({actionCreator:zP,effect:(e,t)=>{FP=e.payload,null!==UP&&(cancelAnimationFrame(UP),UP=null);var n=t.getState().eventSettings,r=n.throttleDelay,i=n.throttledEvents,o="all"===i||i.includes("keydown");null===YP||"number"==typeof r&&o||(clearTimeout(YP),YP=null);var a=()=>{try{var e=t.getState();if(!1===e.rootProps.accessibilityLayer)return;var n=e.tooltip.keyboardInteraction,r=FP;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var i=dT(n,kT(e),_I(e),$T(e)),o=null==i?-1:Number(i),a=!Number.isFinite(o)||o<0,s=nC(e),c=kT(e),l=oT(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=kC(e,l,"hover",String(n.index));return void t.dispatch(Fw({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===tT(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=_I(e),m=$T(e),g=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var y=0;y<c.length;y++)if(null!=dT(g(y),c,h,m)){d=y;break}}else for(var v=c.length-1;v>=0;v--)if(null!=dT(g(v),c,h,m)){d=v;break}if(d<0)return}else{d=o+p*f;var b=(null==s?void 0:s.length)||c.length;if(0===b||d>=b||d<0)return}var x=kC(e,l,"hover",String(d));t.dispatch(Fw({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{UP=null,YP=null}};o?"raf"===r?UP=requestAnimationFrame(a):"number"==typeof r&&null===YP&&(a(),FP=null,YP=setTimeout(()=>{FP?a():(YP=null,UP=null)},r)):a()}}),LP.startListening({actionCreator:_P,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var r=n.tooltip.keyboardInteraction;if(!r.active&&null==r.index){var i=oT(n,n.tooltip.settings.shared),o=kC(n,i,"hover",String("0"));t.dispatch(Fw({active:!0,activeIndex:"0",activeCoordinate:o}))}}}}),LP.startListening({actionCreator:RP,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var r=n.tooltip.keyboardInteraction;r.active&&t.dispatch(Fw({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var BP=dr("externalEvent"),QP=xi(),qP=new Map,GP=new Map,$P=new Map;QP.startListening({actionCreator:BP,effect:(e,t)=>{var n=e.payload,r=n.handler,i=n.reactEvent;if(null!=r){var o=i.type,a=WP(i);$P.set(o,{handler:r,reactEvent:a});var s=qP.get(o);void 0!==s&&(cancelAnimationFrame(s),qP.delete(o));var c=t.getState().eventSettings,l=c.throttleDelay,u=c.throttledEvents,d="all"===u||(null==u?void 0:u.includes(o)),f=GP.get(o);void 0===f||"number"==typeof l&&d||(clearTimeout(f),GP.delete(o));var p=()=>{var e=$P.get(o);try{if(!e)return;var n=e.handler,r=e.reactEvent,i=t.getState(),a={activeCoordinate:pC(i),activeDataKey:lC(i),activeIndex:sC(i),activeLabel:cC(i),activeTooltipIndex:sC(i),isTooltipActive:hC(i)};n&&n(a,r)}finally{qP.delete(o),GP.delete(o),$P.delete(o)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);qP.set(o,h)}else if("number"==typeof l){if(!GP.has(o)){p();var m=setTimeout(p,l);GP.set(o,m)}}else p();else p()}}});var HP=ki([mT],e=>e.tooltipItemPayloads),VP=ki([HP,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var i=r.getPosition;if(null!=i)return i(t)}}}),KP=dr("touchMove"),ZP=xi(),XP=null,JP=null,ez=null,tz=null;ZP.startListening({actionCreator:KP,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){tz=WP(n);var r=t.getState().eventSettings,i=r.throttleDelay,o=r.throttledEvents,a="all"===o||o.includes("touchmove");null!==XP&&(cancelAnimationFrame(XP),XP=null),null===JP||"number"==typeof i&&a||(clearTimeout(JP),JP=null),ez=Array.from(n.touches).map(e=>PC({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=tz){var e=t.getState(),n=oT(e,e.tooltip.settings.shared);if("axis"===n){var r,i=null===(r=ez)||void 0===r?void 0:r[0];if(null==i)return XP=null,void(JP=null);var o=CC(e,i);null!=(null==o?void 0:o.activeIndex)&&t.dispatch(Lw({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if("item"===n){var a,s=tz.touches[0];if(null==document.elementFromPoint||null==s)return;var c=document.elementFromPoint(s.clientX,s.clientY);if(!c||!c.getAttribute)return;var l=c.getAttribute(ej),u=null!==(a=c.getAttribute(tj))&&void 0!==a?a:void 0,d=OT(e).find(e=>e.id===u);if(null==l||null==d||null==u)return;var f=d.dataKey,p=VP(e,l,u);t.dispatch(Pw({activeDataKey:f,activeIndex:l,activeCoordinate:p,activeGraphicalItemId:u}))}XP=null,JP=null}};a?"raf"===i?XP=requestAnimationFrame(s):"number"==typeof i&&null===JP&&(s(),tz=null,JP=setTimeout(()=>{tz?s():(JP=null,XP=null)},i)):s()}}});var nz=Br({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.prev,o=n.next;e[r]&&(e[r]=e[r].map(e=>e.dataKey===i.dataKey&&e.direction===i.direction?o:e))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==i.dataKey||e.direction!==i.direction))}}}),rz=nz.actions,iz=(rz.addErrorBar,rz.replaceErrorBar,rz.removeErrorBar,nz.reducer),oz=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function az(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?az(Object(n),!0).forEach(function(t){cz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):az(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cz(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lz={zIndexMap:Object.values(lO).reduce((e,t)=>sz(sz({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},uz=new Set(Object.values(lO)),dz=Br({name:"zIndex",initialState:lz,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:gr()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return uz.has(e)}(n)&&delete e.zIndexMap[n])},prepare:gr()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,o=n.isPanorama;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=i:e.zIndexMap[r].element=i:e.zIndexMap[r]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:gr()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:gr()}}}),fz=dz.actions,pz=fz.registerZIndexPortal,hz=fz.unregisterZIndexPortal,mz=fz.registerZIndexPortalElement,gz=fz.unregisterZIndexPortalElement,yz=dz.reducer,vz={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},bz=Br({name:"eventSettings",initialState:vz,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),xz=bz.actions.setEventSettings,wz=bz.reducer,Mz=Br({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId,o=n.ticks;e[r][i]=o},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId;delete e[r][i]}}}),jz=Mz.actions,Oz=jz.setRenderedTicks,Nz=jz.removeRenderedTicks,Sz=Ut({brush:gP,cartesianAxis:tP,chartData:$w,errorBars:iz,eventSettings:wz,graphicalItems:uP,layout:eM,legend:OP,options:Nw,polarAxis:AP,polarOptions:PP,referenceElements:pP,renderedTicks:Mz.reducer,rootProps:EP,tooltip:Ww,zIndex:yz});function Ez(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,i=lj(),o=(0,a.useRef)(null);if(i)return n;null==o.current&&(o.current=function(e){return br({reducer:Sz,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([_C.middleware,LC.middleware,LP.middleware,QP.middleware,ZP.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(vr({type:"raf"}))},devTools:{serialize:{replacer:WC},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(t,r));var s=tM;return a.createElement(x,{context:s,store:o.current},n)}var kz=e=>{var t=e.chartData,n=rM(),r=lj();return(0,a.useEffect)(()=>r?()=>{}:(n(qw(t)),()=>{n(qw(void 0))}),[t,n,r]),null},Dz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Iz(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function Az(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Dz.has(r)){if(null==e[r]&&null==t[r])continue;if(!m(e[r],t[r]))return!1}else if(!Iz(e[r],t[r]))return!1;return!0}function Tz(e){var t=e.layout,n=e.margin,r=rM(),i=lj();return(0,a.useEffect)(()=>{i||(r(Zw(t)),r(Kw(n)))},[r,i,t,n]),null}var Cz=(0,a.memo)(Tz,Az);function Pz(e){var t=rM();return(0,a.useEffect)(()=>{t(kP(e))},[t,e]),null}var zz=e=>{var t=rM();return(0,a.useEffect)(()=>{t(xz(e))},[t,e]),null},_z=(0,a.memo)(zz,Az);function Rz(e){var t=rM();return(0,a.useEffect)(()=>{t(CP(e))},[t,e]),null}var Lz=()=>{var e;return null===(e=sM(e=>e.rootProps.accessibilityLayer))||void 0===e||e},Uz=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Yz(e){return"string"==typeof e&&Uz.includes(e)}var Fz=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Wz(e){return"string"==typeof e&&Fz.has(e)}function Bz(e){return"string"==typeof e&&e.startsWith("data-")}function Qz(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Wz(n)||Bz(n))&&(t[n]=e[n]);return t}function qz(e){return null==e?null:(0,a.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?Qz(e.props):"object"!=typeof e||Array.isArray(e)?null:Qz(e)}function Gz(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Wz(n)||Bz(n)||Yz(n))&&(t[n]=e[n]);return t}var $z=["children","width","height","viewBox","className","style","title","desc"];function Hz(){return Hz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hz.apply(null,arguments)}var Vz=(0,a.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,o=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,$z),f=o||{width:r,height:i,x:0,y:0},p=jc("recharts-surface",s);return a.createElement("svg",Hz({},Gz(d),{className:p,width:r,height:i,style:c,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),a.createElement("title",null,l),a.createElement("desc",null,u),n)}),Kz=ki(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),Zz=ki(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(lO));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function Xz(e){var t=e.zIndex,n=e.isPanorama,r=(0,a.useRef)(null),i=rM();return(0,a.useLayoutEffect)(()=>(r.current&&i(mz({zIndex:t,element:r.current,isPanorama:n})),()=>{i(gz({zIndex:t,isPanorama:n}))}),[i,t,n]),a.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function Jz(e){var t=e.children,n=e.isPanorama,r=sM(Zz);if(!r||0===r.length)return t;var i=r.filter(e=>e<0),o=r.filter(e=>e>0);return a.createElement(a.Fragment,null,i.map(e=>a.createElement(Xz,{key:e,zIndex:e,isPanorama:n})),t,o.map(e=>a.createElement(Xz,{key:e,zIndex:e,isPanorama:n})))}var e_=["children"];function t_(){return t_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t_.apply(null,arguments)}var n_={width:"100%",height:"100%",display:"block"},r_=(0,a.forwardRef)((e,t)=>{var n=gj(),r=yj(),i=Lz();if(!dw(n)||!dw(r))return null;var o,s,c=e.children,l=e.otherAttributes,u=e.title,d=e.desc;return null!=l&&(o="number"==typeof l.tabIndex?l.tabIndex:i?0:void 0,s="string"==typeof l.role?l.role:i?"application":void 0),a.createElement(Vz,t_({},l,{title:u,desc:d,role:s,tabIndex:o,width:n,height:r,style:n_,ref:t}),c)}),i_=e=>{var t=e.children,n=sM(dj);if(!n)return null;var r=n.width,i=n.height,o=n.y,s=n.x;return a.createElement(Vz,{width:r,height:i,x:s,y:o},t)},o_=(0,a.forwardRef)((e,t)=>{var n=e.children,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,e_);return lj()?a.createElement(i_,null,a.createElement(Jz,{isPanorama:!0},n)):a.createElement(r_,t_({ref:t},r),a.createElement(Jz,{isPanorama:!1},n))}),a_=new(n(228)),s_="recharts.syncEvent.tooltip",c_="recharts.syncEvent.brush";function l_(e){return e.tooltip.syncInteraction}var u_=["x","y"];function d_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d_(Object(n),!0).forEach(function(t){p_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h_(){var e=rM();(0,a.useEffect)(()=>{e(Sw())},[e]),function(){var e=sM(Zj),t=sM(Jj),n=rM(),r=sM(Xj),i=sM(nC),o=bj(),s=pj(),c=sM(e=>e.rootProps.className);(0,a.useEffect)(()=>{if(null==e)return tw;var a=(a,c,l)=>{var u;if(t!==l&&e===a)if(!1!==c.payload.active)if("index"!==r){if(null!=i){var d;if("function"==typeof r){var f={activeTooltipIndex:null==c.payload.index?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:null==c.payload.index?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},p=r(i,f);d=i[p]}else"value"===r&&(d=i.find(e=>String(e.value)===c.payload.label));var h=c.payload.coordinate;if(null!=h&&null!=s)if(null!=d){var m=h.x,g=h.y,y=Math.min(m,s.x+s.width),v=Math.min(g,s.y+s.height),b={x:"horizontal"===o?d.coordinate:y,y:"horizontal"===o?v:d.coordinate},x=Yw({active:c.payload.active,coordinate:b,dataKey:c.payload.dataKey,index:String(d.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});n(x)}else n(Yw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));else n(Yw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(s&&null!=c&&null!==(u=c.payload)&&void 0!==u&&u.coordinate&&c.payload.sourceViewBox){var w=c.payload.coordinate,_x=w.x,M=w.y,j=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(w,u_),O=c.payload.sourceViewBox,N=O.x,S=O.y,E=O.width,k=O.height,D=f_(f_({},j),{},{x:s.x+(E?(_x-N)/E:0)*s.width,y:s.y+(k?(M-S)/k:0)*s.height});n(f_(f_({},c),{},{payload:f_(f_({},c.payload),{},{coordinate:D})}))}else n(c);else n(Yw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return a_.on(s_,a),()=>{a_.off(s_,a)}},[c,n,t,e,r,i,o,s])}(),function(){var e=sM(Zj),t=sM(Jj),n=rM();(0,a.useEffect)(()=>{if(null==e)return tw;var r=(r,i,o)=>{t!==o&&e===r&&n(Gw(i))};return a_.on(c_,r),()=>{a_.off(c_,r)}},[n,t,e])}()}function m_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var g_=(0,a.createContext)(null),y_=(0,a.createContext)(null);function v_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v_(Object(n),!0).forEach(function(t){x_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w_.apply(null,arguments)}function M_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O_=()=>(h_(),null);function N_(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var S_=(0,a.forwardRef)((e,t)=>{var n,r,i=(0,a.useRef)(null),o=M_((0,a.useState)({containerWidth:N_(null===(n=e.style)||void 0===n?void 0:n.width),containerHeight:N_(null===(r=e.style)||void 0===r?void 0:r.height)}),2),s=o[0],c=o[1],l=(0,a.useCallback)((e,t)=>{c(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),u=(0,a.useCallback)(e=>{if("function"==typeof t&&t(e),null!=i.current&&(i.current.disconnect(),i.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var n=e.getBoundingClientRect(),r=n.width,o=n.height;l(r,o);var a=new ResizeObserver(e=>{var t=e[0];if(null!=t){var n=t.contentRect,r=n.width,i=n.height;l(r,i)}});a.observe(e),i.current=a}},[t,l]);return(0,a.useEffect)(()=>()=>{var e=i.current;null!=e&&e.disconnect()},[l]),a.createElement(a.Fragment,null,a.createElement(Mj,{width:s.containerWidth,height:s.containerHeight}),a.createElement("div",w_({ref:u},e)))}),E_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=M_((0,a.useState)({containerWidth:N_(n),containerHeight:N_(r)}),2),o=i[0],s=i[1],c=(0,a.useCallback)((e,t)=>{s(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=(0,a.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;c(r,i)}},[t,c]);return a.createElement(a.Fragment,null,a.createElement(Mj,{width:o.containerWidth,height:o.containerHeight}),a.createElement("div",w_({ref:l},e)))}),k_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height;return a.createElement(a.Fragment,null,a.createElement(Mj,{width:n,height:r}),a.createElement("div",w_({ref:t},e)))}),D_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height;return"string"==typeof n||"string"==typeof r?a.createElement(E_,w_({},e,{ref:t})):"number"==typeof n&&"number"==typeof r?a.createElement(k_,w_({},e,{width:n,height:r,ref:t})):a.createElement(a.Fragment,null,a.createElement(Mj,{width:n,height:r}),a.createElement("div",w_({ref:t},e)))}),I_=(0,a.forwardRef)((e,t)=>{var n=e.children,r=e.className,i=e.height,o=e.onClick,s=e.onContextMenu,c=e.onDoubleClick,l=e.onMouseDown,u=e.onMouseEnter,d=e.onMouseLeave,f=e.onMouseMove,p=e.onMouseUp,h=e.onTouchEnd,m=e.onTouchMove,g=e.onTouchStart,y=e.style,v=e.width,b=e.responsive,x=e.dispatchTouchEvents,w=void 0===x||x,M=(0,a.useRef)(null),j=rM(),O=M_((0,a.useState)(null),2),N=O[0],S=O[1],E=M_((0,a.useState)(null),2),k=E[0],D=E[1],I=function(){var e=rM(),t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(null),2),n=t[0],r=t[1],i=sM(KM);return(0,a.useEffect)(()=>{if(null!=n){var t=n.getBoundingClientRect().width/n.offsetWidth;uw(t)&&t!==i&&e(Jw(t))}},[n,e,i]),r}(),A=xw(),T=(null==A?void 0:A.width)>0?A.width:v,C=(null==A?void 0:A.height)>0?A.height:i,P=(0,a.useCallback)(e=>{I(e),"function"==typeof t&&t(e),S(e),D(e),null!=e&&(M.current=e)},[I,t,S,D]),z=(0,a.useCallback)(e=>{j(zC(e)),j(BP({handler:o,reactEvent:e}))},[j,o]),_=(0,a.useCallback)(e=>{j(RC(e)),j(BP({handler:u,reactEvent:e}))},[j,u]),R=(0,a.useCallback)(e=>{j(_w()),j(BP({handler:d,reactEvent:e}))},[j,d]),L=(0,a.useCallback)(e=>{j(RC(e)),j(BP({handler:f,reactEvent:e}))},[j,f]),U=(0,a.useCallback)(()=>{j(_P())},[j]),Y=(0,a.useCallback)(()=>{j(RP())},[j]),F=(0,a.useCallback)(e=>{j(zP(e.key))},[j]),W=(0,a.useCallback)(e=>{j(BP({handler:s,reactEvent:e}))},[j,s]),B=(0,a.useCallback)(e=>{j(BP({handler:c,reactEvent:e}))},[j,c]),Q=(0,a.useCallback)(e=>{j(BP({handler:l,reactEvent:e}))},[j,l]),q=(0,a.useCallback)(e=>{j(BP({handler:p,reactEvent:e}))},[j,p]),G=(0,a.useCallback)(e=>{j(BP({handler:g,reactEvent:e}))},[j,g]),$=(0,a.useCallback)(e=>{w&&j(KP(e)),j(BP({handler:m,reactEvent:e}))},[j,w,m]),H=(0,a.useCallback)(e=>{j(BP({handler:h,reactEvent:e}))},[j,h]),V=function(e){return e?S_:D_}(b);return a.createElement(g_.Provider,{value:N},a.createElement(y_.Provider,{value:k},a.createElement(V,{width:null!=T?T:null==y?void 0:y.width,height:null!=C?C:null==y?void 0:y.height,className:jc("recharts-wrapper",r),style:b_({position:"relative",cursor:"default",width:T,height:C},y),onClick:z,onContextMenu:W,onDoubleClick:B,onFocus:U,onBlur:Y,onKeyDown:F,onMouseDown:Q,onMouseEnter:_,onMouseLeave:R,onMouseMove:L,onMouseUp:q,onTouchEnd:H,onTouchMove:$,onTouchStart:G,ref:P},a.createElement(O_,null),n)))}),A_=ki([oj],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),T_=ki([A_,HM,VM],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),C_=()=>sM(T_);function P_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var z_=(0,a.createContext)(void 0),R_=e=>{var t=e.children,n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)("".concat($x("recharts"),"-clip")),1)[0],r=C_();if(null==r)return null;var i=r.x,o=r.y,s=r.width,c=r.height;return a.createElement(z_.Provider,{value:n},a.createElement("defs",null,a.createElement("clipPath",{id:n},a.createElement("rect",{x:i,y:o,height:c,width:s}))),t)},L_=["width","height","responsive","children","className","style","compact","title","desc"],U_=(0,a.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=e.responsive,o=e.children,s=e.className,c=e.style,l=e.compact,u=e.title,d=e.desc,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,L_),p=Qz(f);return l?a.createElement(a.Fragment,null,a.createElement(Mj,{width:n,height:r}),a.createElement(o_,{otherAttributes:p,title:u,desc:d},o)):a.createElement(I_,{className:s,style:c,width:n,height:r,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},a.createElement(o_,{otherAttributes:p,title:u,desc:d,ref:t},a.createElement(R_,null,o)))});function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W_(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y_(Object(n),!0).forEach(function(t){F_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var B_=["layout"];function Q_(){return Q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q_.apply(null,arguments)}function q_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q_(Object(n),!0).forEach(function(t){G_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},vz),H_=(0,a.forwardRef)(function(e,t){var n,r=W_(e.categoricalChartProps,$_),i=r.layout,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,B_),s=e.chartName,c={chartName:s,defaultTooltipEventType:e.defaultTooltipEventType,validateTooltipEventTypes:e.validateTooltipEventTypes,tooltipPayloadSearcher:e.tooltipPayloadSearcher,eventEmitter:void 0};return a.createElement(Ez,{preloadedState:{options:c},reduxStoreName:null!==(n=r.id)&&void 0!==n?n:s},a.createElement(kz,{chartData:r.data}),a.createElement(Cz,{layout:i,margin:r.margin}),a.createElement(_z,{throttleDelay:r.throttleDelay,throttledEvents:r.throttledEvents}),a.createElement(Pz,{baseValue:void 0,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),a.createElement(Rz,{cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius}),a.createElement(U_,Q_({},o,{ref:t})))});function V_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V_(Object(n),!0).forEach(function(t){Z_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Z_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X_=["item"],J_=K_(K_({},$_),{},{layout:"centric",startAngle:0,endAngle:360}),eR=(0,a.forwardRef)((e,t)=>{var n=W_(e,J_);return a.createElement(H_,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:X_,tooltipPayloadSearcher:jw,categoricalChartProps:n,ref:t})}),tR=e=>e.graphicalItems.polarItems,nR=ki([SO,EO],pI),rR=ki([tR,uI,nR],gI),iR=ki([rR],wI),oR=ki([iR,Sj],OI),aR=ki([oR,uI,rR],SI),sR=(ki([oR,uI,rR],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>{var r;return{value:_M(e,null!==(r=t.dataKey)&&void 0!==r?r:n.dataKey),errorDomain:[]}})).filter(Boolean):null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:_M(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]}))),()=>{}),cR=ki([oR,uI,rR,GI,SO,Dj],HI),lR=ki([uI,BI,QI,sR,cR,sR,vj,SO],dA),uR=ki([uI,vj,oR,aR,Hj,SO,lR],mA),dR=ki([uR,dI,yA],vA),fR=ki([uI,uR,dR,SO],xA);function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(Object(n),!0).forEach(function(t){mR(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mR(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ki([yA,fR],_O);var gR=ki([tR,(e,t)=>t],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),yR=[],vR=(e,t,n)=>0===(null==n?void 0:n.length)?yR:n,bR=ki([Sj,gR,vR],(e,t,n)=>{var r,i=e.chartData;if(null!=t&&((r=null!=(null==t?void 0:t.data)&&t.data.length>0?t.data:i)&&r.length||null==n||(r=n.map(e=>hR(hR({},t.presentationProps),e.props))),null!=r))return r}),xR=ki([bR,gR,vR],(e,t,n)=>{if(null!=e&&null!=t)return e.map((e,r)=>{var i,o,a=_M(e,t.nameKey,t.name);return o=null!=n&&null!==(i=n[r])&&void 0!==i&&null!==(i=i.props)&&void 0!==i&&i.fill?n[r].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:$M(a,t.dataKey),dataKey:t.dataKey,color:o,payload:e,type:t.legendType}})}),wR=ki([bR,gR,vR,oj],(e,t,n,r)=>{if(null!=t&&null!=e)return function(e){var t,n,r,i=e.pieSettings,o=e.displayedData,a=e.cells,s=e.offset,c=i.cornerRadius,l=i.startAngle,u=i.endAngle,d=i.dataKey,f=i.nameKey,p=i.tooltipType,h=Math.abs(i.minAngle),m=cF(l,u),g=Math.abs(m),y=o.length<=1?0:null!==(t=i.paddingAngle)&&void 0!==t?t:0,v=o.filter(e=>0!==_M(e,d,0)).length,b=(g>=360?v:v-1)*y,x=o.reduce((e,t)=>{var n=_M(t,d,0);return e+(Qx(n)?n:0)},0),w=h>0&&x>0&&o.some(e=>{var t=_M(e,d,0),n=(Qx(t)?t:0)/x;return 0!==t&&n*g<h})?h:0,M=g-v*w-b;return x>0&&(n=o.map((e,t)=>{var n,o=_M(e,d,0),u=_M(e,f,t),h=sF(i,s,e),g=(Qx(o)?o:0)/x,v=tF(tF({},e),a&&a[t]&&a[t].props),b=null!=v&&"fill"in v&&"string"==typeof v.fill?v.fill:i.fill,j=(n=t?r.endAngle+Fx(m)*y*(0!==o?1:0):l)+Fx(m)*((0!==o?w:0)+g*M),O=(n+j)/2,N=(h.innerRadius+h.outerRadius)/2,S=[{name:u,value:o,payload:v,dataKey:d,type:p,color:b,fill:b,graphicalItemId:i.id}],E=oO(h.cx,h.cy,N,O);return r=tF(tF(tF(tF({},i.presentationProps),{},{percent:g,cornerRadius:"string"==typeof c?parseFloat(c):c,name:u,tooltipPayload:S,midAngle:O,middleRadius:N,tooltipPosition:E},v),h),{},{value:o,dataKey:d,startAngle:n,endAngle:j,payload:v,paddingAngle:0!==o?Fx(m)*y:0})})),n}({offset:r,pieSettings:t,displayedData:e,cells:n})}),MR=["children","className"];function jR(){return jR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jR.apply(null,arguments)}var OR=a.forwardRef((e,t)=>{var n=e.children,r=e.className,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,MR),o=jc("recharts-layer",r);return a.createElement("g",jR({className:o},Gz(i),{ref:t}),n)});function NR(){}function SR(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ER(e){this._context=e}function kR(e){return new ER(e)}function DR(e){this._context=e}function IR(e){return new DR(e)}function AR(e){this._context=e}function TR(e){return new AR(e)}n.dn(NR),n.dn(kR),ER.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:SR(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:SR(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},n.dn(IR),DR.prototype={areaStart:NR,areaEnd:NR,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:SR(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},n.dn(TR),AR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:SR(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class CR{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function PR(e){this._context=e}function zR(e){return new PR(e)}function _R(e){this._context=e}function RR(e){return new _R(e)}function LR(e){return e<0?-1:1}function UR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(LR(o)+LR(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function YR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function FR(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function WR(e){this._context=e}function BR(e){this._context=new QR(e)}function QR(e){this._context=e}function qR(e){this._context=e}function GR(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function $R(e){return new qR(e)}function HR(e,t){this._context=e,this._t=t}function VR(e){return new HR(e,.5)}n.dn(zR),PR.prototype={areaStart:NR,areaEnd:NR,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},n.dn(RR),_R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},WR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:FR(this,this._t0,YR(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,FR(this,YR(this,n=UR(this,e,t)),n);break;default:FR(this,this._t0,n=UR(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(BR.prototype=Object.create(WR.prototype)).point=function(e,t){WR.prototype.point.call(this,t,e)},QR.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},n.dn($R),qR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=GR(e),i=GR(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},n.dn(VR),HR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const KR=Math.PI,ZR=2*KR,XR=1e-6,JR=ZR-XR;function eL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class tL{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?eL:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return eL;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,c=r-t,l=o-e,u=a-t,d=l*l+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>XR)if(Math.abs(u*s-c*l)>XR&&i){let f=n-o,p=r-a,h=s*s+c*c,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=i*Math.tan((KR-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>XR&&this._append`L${e+b*l},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+x*s},${this._y1=t+x*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),c=e+a,l=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>XR||Math.abs(this._y1-l)>XR)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%ZR+ZR),d>JR?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>XR&&this._append`A${n},${n},0,${+(d>=KR)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function nL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new tL(t)}function rL(e){return e[0]}function iL(e){return e[1]}function oL(e,t){var n=EM(!0),r=null,i=RR,o=null,a=nL(s);function s(s){var c,l,u,d=(s=SM(s)).length,f=!1;for(null==r&&(o=i(u=a())),c=0;c<=d;++c)!(c<d&&n(l=s[c],c,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(l,c,s),+t(l,c,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?rL:EM(e),t="function"==typeof t?t:void 0===t?iL:EM(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:EM(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:EM(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:EM(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function aL(e,t,n){var r=null,i=EM(!0),o=null,a=RR,s=null,c=nL(l);function l(l){var u,d,f,p,h,m=(l=SM(l)).length,g=!1,y=new Array(m),v=new Array(m);for(null==o&&(s=a(h=c())),u=0;u<=m;++u){if(!(u<m&&i(p=l[u],u,l))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],v[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,l),v[u]=+t(p,u,l),s.point(r?+r(p,u,l):y[u],n?+n(p,u,l):v[u]))}if(h)return s=null,h+""||null}function u(){return oL().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?rL:EM(+e),t="function"==typeof t?t:EM(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?iL:EM(+n),l.x=function(t){return arguments.length?(e="function"==typeof t?t:EM(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:EM(+t),l):e},l.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:EM(+e),l):r},l.y=function(e){return arguments.length?(t="function"==typeof e?e:EM(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:EM(+e),l):t},l.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:EM(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:EM(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}n.dn(oL),n.dn(aL);var sL=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,cL=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,a.isValidElement)(e)&&(n=e.props),"object"!=typeof n&&"function"!=typeof n)return null;var r={};return Object.keys(n).forEach(e=>{Yz(e)&&"function"==typeof n[e]&&(r[e]=t||(t=>n[e](n,t)))}),r},lL=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];Yz(i)&&"function"==typeof o&&(r||(r={}),r[i]=((e,t,n)=>r=>(e(t,n,r),null))(o,t,n))}),r};function uL(){return uL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uL.apply(null,arguments)}function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(t){pL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hL,mL,gL,yL,vL,bL,xL,wL={curveBasisClosed:IR,curveBasisOpen:TR,curveBasis:kR,curveBumpX:function(e){return new CR(e,!0)},curveBumpY:function(e){return new CR(e,!1)},curveLinearClosed:zR,curveLinear:RR,curveMonotoneX:function(e){return new WR(e)},curveMonotoneY:function(e){return new BR(e)},curveNatural:$R,curveStep:VR,curveStepAfter:function(e){return new HR(e,1)},curveStepBefore:function(e){return new HR(e,0)}},ML=e=>uw(e.x)&&uw(e.y),jL=e=>null!=e.base&&ML(e.base)&&ML(e),OL=e=>e.x,NL=e=>e.y,SL=e=>{var t=e.className,n=e.points,r=e.path,i=e.pathRef,o=bj();if(!(n&&n.length||r))return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=n&&n.length?(e=>{var t=e.type,n=void 0===t?"linear":t,r=e.points,i=void 0===r?[]:r,o=e.baseLine,a=e.layout,s=e.connectNulls,c=void 0!==s&&s,l=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(Jx(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=wL["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return wL[n]||RR})(n,a),u=c?i.filter(ML):i;if(Array.isArray(o)){var d=i.map((e,t)=>fL(fL({},e),{},{base:o[t]}));return("vertical"===a?aL().y(NL).x1(OL).x0(e=>e.base.x):aL().x(OL).y1(NL).y0(e=>e.base.y)).defined(jL).curve(l)(c?d.filter(jL):d)}return("vertical"===a&&Qx(o)?aL().y(NL).x1(OL).x0(o):Qx(o)?aL().x(OL).y1(NL).y0(o):oL().x(OL).y(NL)).defined(ML).curve(l)(u)})(s):r;return a.createElement("path",uL({},Qz(e),cL(e),{className:jc("recharts-curve",t),d:null===c?void 0:c,ref:i}))};function EL(){return EL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EL.apply(null,arguments)}function kL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var DL=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,o=e.sign,a=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(a?1:-1)+r,u=Math.asin(s/l)/rO,d=c?i:i+o*u,f=c?i-o*u:i;return{center:oO(t,n,l,d),circleTangency:oO(t,n,r,d),lineTangency:oO(t,n,l*Math.cos(u*rO),f),theta:u}},IL=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=((e,t)=>Fx(t-e)*Math.min(Math.abs(t-e),359.999))(o,e.endAngle),s=o+a,c=oO(t,n,i,o),l=oO(t,n,i,s),u=Yx(hL||(hL=kL(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,i,i,+(Math.abs(a)>180),+(o>s),l.x,l.y);if(r>0){var d=oO(t,n,r,o),f=oO(t,n,r,s);u+=Yx(mL||(mL=kL(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),f.x,f.y,r,r,+(Math.abs(a)>180),+(o<=s),d.x,d.y)}else u+=Yx(gL||(gL=kL(["L ",","," Z"])),t,n);return u},AL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},TL=e=>{var t=W_(e,AL),n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,c=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=t.className;if(o<i||u===d)return null;var p,h=jc("recharts-sector",f),m=o-i,g=Hx(s,m,0,!0);return p=g>0&&Math.abs(u-d)<360?(e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=Fx(l-c),d=DL({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:o,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,h=d.theta,m=DL({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:o,cornerIsExternal:s}),g=m.circleTangency,y=m.lineTangency,v=m.theta,b=s?Math.abs(c-l):Math.abs(c-l)-h-v;if(b<0)return a?Yx(yL||(yL=kL(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),p.x,p.y,o,o,2*o,o,o,2*-o):IL({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var x=Yx(vL||(vL=kL(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),p.x,p.y,o,o,+(u<0),f.x,f.y,i,i,+(b>180),+(u<0),g.x,g.y,o,o,+(u<0),y.x,y.y);if(r>0){var w=DL({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),M=w.circleTangency,j=w.lineTangency,O=w.theta,N=DL({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),S=N.circleTangency,E=N.lineTangency,k=N.theta,D=s?Math.abs(c-l):Math.abs(c-l)-O-k;if(D<0&&0===o)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+=Yx(bL||(bL=kL(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),E.x,E.y,o,o,+(u<0),S.x,S.y,r,r,+(D>180),+(u>0),M.x,M.y,o,o,+(u<0),j.x,j.y)}else x+=Yx(xL||(xL=kL(["L",",","Z"])),t,n);return x})({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,m/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d}):IL({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:d}),a.createElement("path",EL({},Gz(t),{className:h,d:p}))};function CL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PL(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zL=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CL(Object(n),!0).forEach(function(t){PL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),_L=new class{constructor(e){(function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(zL.cacheSize),RL={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LL="recharts_measurement_span",UL=(e,t)=>{try{var n=document.getElementById(LL);n||((n=document.createElement("span")).setAttribute("id",LL),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,RL,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},YL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||oz)return{width:0,height:0};if(!zL.enableCache)return UL(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}(e,t),r=_L.get(n);if(r)return r;var i=UL(e,t);return _L.set(n,i),i};function FL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return WL(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?WL(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qL=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,GL=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$L={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},HL=["cm","mm","pt","pc","in","Q","px"],VL="NaN";class KL{static parse(e){var t,n=FL(null!==(t=GL.exec(e))&&void 0!==t?t:[],3),r=n[1],i=n[2];return null==r?KL.NaN:new KL(parseFloat(r),null!=i?i:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Wx(e)&&(this.unit=""),""===t||qL.test(t)||(this.num=NaN,this.unit=""),function(e){return HL.includes(e)}(t)&&(this.num=function(e,t){return e*$L[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new KL(NaN,""):new KL(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new KL(NaN,""):new KL(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new KL(NaN,""):new KL(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new KL(NaN,""):new KL(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Wx(this.num)}}function ZL(e){if(null==e||e.includes(VL))return VL;for(var t=e;t.includes("*")||t.includes("/");){var n,r=FL(null!==(n=BL.exec(t))&&void 0!==n?n:[],4),i=r[1],o=r[2],a=r[3],s=KL.parse(null!=i?i:""),c=KL.parse(null!=a?a:""),l="*"===o?s.multiply(c):s.divide(c);if(l.isNaN())return VL;t=t.replace(BL,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=FL(null!==(u=QL.exec(t))&&void 0!==u?u:[],4),f=d[1],p=d[2],h=d[3],m=KL.parse(null!=f?f:""),g=KL.parse(null!=h?h:""),y="+"===p?m.add(g):m.subtract(g);if(y.isNaN())return VL;t=t.replace(QL,y.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(KL,"NaN",new KL(NaN,""));var XL=/\(([^()]*)\)/;function JL(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=XL.exec(n));){var r=FL(t,2)[1];n=n.replace(XL,ZL(r))}return n}(t),ZL(t)}(e)}catch(e){return VL}}(e.slice(5,-1));return t===VL?"":t}var eU=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],tU=["dx","dy","angle","className","breakAll"];function nU(){return nU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nU.apply(null,arguments)}function rU(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var aU=/[ \f\n\r\t\v\u2028\u2029]+/,sU=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return Xx(t)||(i=n?t.toString().split(""):t.toString().split(aU)),{wordsWithComputedWidth:i.map(e=>({word:e,width:YL(e,r).width})),spaceWidth:n?0:YL(" ",r).width}}catch(e){return null}};function cU(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var lU=(e,t,n,r)=>e.reduce((e,i)=>{var o=i.word,a=i.width,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(o),s.width+=a+n;else{var c={words:[o],width:a};e.push(c)}return e},[]),uU=e=>e.reduce((e,t)=>e.width>t.width?e:t),dU=(e,t,n,r,i,o,a,s)=>{var c=e.slice(0,t),l=sU({breakAll:n,style:r,children:c+"…"});if(!l)return[!1,[]];var u=lU(l.wordsWithComputedWidth,o,a,s);return[u.length>i||uU(u).width>Number(o),u]},fU=e=>[{words:Xx(e)?[]:e.toString().split(aU),width:void 0}],pU="#808080",hU={angle:0,breakAll:!1,capHeight:"0.71em",fill:pU,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},mU=(0,a.forwardRef)((e,t)=>{var n=W_(e,hU),r=n.x,i=n.y,o=n.lineHeight,s=n.capHeight,c=n.fill,l=n.scaleToFit,u=n.textAnchor,d=n.verticalAnchor,f=rU(n,eU),p=(0,a.useMemo)(()=>(e=>{var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||n)&&!oz){var s=sU({breakAll:o,children:r,style:i});return s?((e,t,n,r,i)=>{var o=e.maxLines,a=e.children,s=e.style,c=e.breakAll,l=Qx(o),u=String(a),d=lU(t,r,n,i);if(!l||i)return d;if(!(d.length>o||uU(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var g=Math.floor((p+h)/2),y=iU(dU(u,g-1,c,s,o,r,n,i),2),v=y[0],b=y[1],x=iU(dU(u,g,c,s,o,r,n,i),1)[0];if(v||x||(p=g+1),v&&x&&(h=g-1),!v&&x){f=b;break}m++}return f||d})({breakAll:o,children:r,maxLines:a,style:i},s.wordsWithComputedWidth,s.spaceWidth,t,Boolean(n)):fU(r)}return fU(r)})({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:l,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,l,f.style,f.width]),h=f.dx,m=f.dy,g=f.angle,y=f.className,v=f.breakAll,b=rU(f,tU);if(!qx(r)||!qx(i)||0===p.length)return null;var x,w=Number(r)+(Qx(h)?h:0),M=Number(i)+(Qx(m)?m:0);if(!uw(w)||!uw(M))return null;switch(d){case"start":x=JL("calc(".concat(s,")"));break;case"middle":x=JL("calc(".concat((p.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:x=JL("calc(".concat(p.length-1," * -").concat(o,")"))}var j=[],O=p[0];if(l&&null!=O){var N=O.width,S=f.width;j.push("scale(".concat(Qx(S)&&Qx(N)?S/N:1,")"))}return g&&j.push("rotate(".concat(g,", ").concat(w,", ").concat(M,")")),j.length&&(b.transform=j.join(" ")),a.createElement("text",nU({},Gz(b),{ref:t,x:w,y:M,className:jc("recharts-text",y),textAnchor:u,fill:c.includes("url")?pU:c}),p.map((e,t)=>{var n=e.words.join(v?"":" ");return a.createElement("tspan",{x:w,dy:0===t?x:o,key:"".concat(n,"-").concat(t)},n)}))});mU.displayName="Text";var gU=e=>null;gU.displayName="Cell";var yU=n(405),vU=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",bU=null,xU=null,wU=e=>{if(e===bU&&Array.isArray(xU))return xU;var t=[];return a.Children.forEach(e,e=>{Xx(e)||((0,yU.zv)(e)?t=t.concat(wU(e.props.children)):t.push(e))}),xU=t,bU=e,t};function MU(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>vU(e)):[vU(t)],wU(e).forEach(e=>{var t=Lx(e,"type.displayName")||Lx(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var jU=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot);function OU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OU(Object(n),!0).forEach(function(t){SU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SU(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EU(e,t){return NU(NU({},t),e)}function kU(e){var t,n=e.option,r=e.DefaultShape,i=e.shapeProps,o=e.activeClassName,s=void 0===o?"recharts-active-shape":o,c=e.inActiveClassName,l=void 0===c?"recharts-shape":c,u=function(e){if("index"in e){var t=e.index;return"number"==typeof t||"string"==typeof t?t:void 0}}(i);return t=(0,a.isValidElement)(n)?function(e,t){return(0,a.cloneElement)(e,EU(function(e){return(0,a.isValidElement)(e)?e.props:e}(e),t))}(n,i):n===r?a.createElement(r,i):"function"==typeof n?n(i,u):"object"==typeof n?a.createElement(r,EU(n,i)):a.createElement(r,i),function(e){return"isActive"in e&&!0===e.isActive}(i)?a.createElement(OR,{className:s},t):a.createElement(OR,{className:l},t)}function DU(e){var t=e.tooltipEntrySettings,n=rM(),r=lj(),i=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{r||(null===i.current?n(Iw(t)):i.current!==t&&n(Aw({prev:i.current,next:t})),i.current=t)},[t,n,r]),(0,a.useLayoutEffect)(()=>()=>{i.current&&(n(Tw(i.current)),i.current=null)},[n]),null}function IU(e){var t=e.legendPayload,n=rM(),r=lj(),i=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{r||(null===i.current?n(wP(t)):i.current!==t&&n(MP({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,a.useLayoutEffect)(()=>()=>{i.current&&(n(jP(i.current)),i.current=null)},[n]),null}function AU(e){var t=e.legendPayload,n=rM(),r=sM(vj),i=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{"centric"!==r&&"radial"!==r||(null===i.current?n(wP(t)):i.current!==t&&n(MP({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,a.useLayoutEffect)(()=>()=>{i.current&&(n(jP(i.current)),i.current=null)},[n]),null}var TU=1e-4,CU=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],PU=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),zU=(e,t)=>n=>{var r=CU(e,t);return PU(r,n)},_U=function(){return((e,t,n,r)=>{var i,o,a=zU(e,n),s=zU(t,r),c=(i=e,o=n,e=>{var t=[...CU(i,o).map((e,t)=>e*t).slice(1),0];return PU(t,e)}),l=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=a(n)-t,o=c(n);if(Math.abs(i-t)<TU||o<TU)return s(n);n=l(n-i/o)}return s(n)};return u.isStepper=!1,u})(...function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]}(...arguments))},RU=(e,t,n)=>{var r,i=o=>{var a=t.tick(o);if("active"===t.getState())return n(t.getInterpolated()),1===t.getProgress()?(t.complete(),void(r=void 0)):void(r=e.setTimeout(i,a));r=e.setTimeout(i,a)};return r=e.setTimeout(i,0),()=>{var e;return null===(e=r)||void 0===e?void 0:e()}},LU=(0,a.createContext)(RU);function UU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function YU(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return UU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(()=>!oz&&!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),2),t=e[0],n=e[1];return(0,a.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),t}LU.Provider;var FU="init",WU="pending",BU="active";function QU(e){return Math.max(0,e)}class qU{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;(function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})(this,"state",FU),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=QU(e.animationDuration),this.animationBegin=QU(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,null===(t=e.onAnimationStart)||void 0===t||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===FU)return this.state=WU,this.beginStartedTime=e,this.animationBegin;if(this.getState()===WU){if(null==this.beginStartedTime)throw new Error;var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=BU,this.animationStartedTime=e,this.nextAnimationUpdate(0)):QU(this.animationBegin-t)}if(this.getState()===BU){if(null==this.animationStartedTime)throw new Error;var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){var e;this.progress=1,"active"===this.state&&(null===(e=this.onAnimationEnd)||void 0===e||e.call(this)),this.state="completed"}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class GU extends qU{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Kx(this.getFrom(),this.getTo(),this.getProgress()))}}class $U{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,i=o=>{o-n>=t?e(o):r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>{null!=r&&cancelAnimationFrame(r)}}}function HU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VU={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}};function KU(e){var t,n,r=W_(e,VU),i=r.animationId,o=r.isActive,s=r.canBegin,c=r.duration,l=r.easing,u=r.begin,d=r.onAnimationEnd,f=r.onAnimationStart,p=r.children,h=YU(),m="auto"===o?!oz&&!h:o,g=(t=r.animationController,n=(0,a.useContext)(LU),(0,a.useMemo)(()=>null!=t?t:n,[t,n])),y=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return HU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(m?0:1),2),v=y[0],b=y[1];return(0,a.useEffect)(()=>{m||b(1)},[m]),(0,a.useEffect)(()=>{var e=(e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return _U(e);case"spring":return function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,i=void 0===r?8:r,o=e.dt,a=void 0===o?16.67:o,s=[0],c=0,l=0,u=0;u<1e4&&(c+=(l+=(-(c-1)*n-l*i)*a/1e3)*a/1e3,s.push(c),!(Math.abs(c-1)<TU&&Math.abs(l)<TU));)u++;s[s.length-1]=1;var d=s.length-1;return e=>{var t,n,r;if(e<=0)return 0;if(e>=1)return 1;var i=e*d,o=Math.floor(i),a=i-o;return(null!==(t=s[o])&&void 0!==t?t:0)+((null!==(n=s[o+1])&&void 0!==n?n:0)-(null!==(r=s[o])&&void 0!==r?r:0))*a}}();default:if("cubic-bezier"===e.split("(")[0])return _U(e)}return"function"==typeof e?e:null})(l);if(!m||!s||null==e)return tw;var t=new $U,n=new GU({animationId:i,easing:e,animationDuration:c,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:0,to:1});return g(t,n,b)},[g,i,m,s,c,l,u,f,d]),p(Number(v))}function ZU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",n=(0,a.useRef)($x(t)),r=(0,a.useRef)(e);return r.current!==e&&(n.current=$x(t),r.current=e),n.current}function XU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return JU(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JU(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eY,tY="index",nY="append";function rY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=[];for(var i of n)r.push({status:"removed",prev:i});for(var o=0;o<t.length;o++){var a=e[o],s=t[o];null!=a?r.push({status:"matched",prev:a,next:s}):r.push({status:"added",next:s})}return r}function iY(e,t,n){return null==t?null:null==e?t.map(e=>({status:"added",next:e})):n===tY?function(e,t){var n=e.length/t.length;return rY(t.map((t,r)=>e[Math.floor(r*n)]),t)}(e,t):n===nY?function(e,t){return rY(t.map((t,n)=>e[n]),t)}(e,t):function(e,t,n){var r=function(e,t){for(var n=new Map,r=0;r<e.length;r++){var i=e[r];if(null!=i){var o=t(i,r);null==o||n.has(o)||n.set(o,i)}}return n}(e,n),i=new Set,o=t.map((e,t)=>{var o=n(e,t);if(null!=o){var a=r.get(o);if(void 0!==a)return i.add(o),a}}),a=[];for(var s of r){var c=XU(s,2),l=c[0],u=c[1];i.has(l)||a.push(u)}return rY(o,t,a)}(e,t,n)}function oY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aY(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(!1),2),r=n[0],i=n[1];return{isAnimating:r,handleAnimationStart:(0,a.useCallback)(()=>{"function"==typeof e&&e(),i(!0)},[e]),handleAnimationEnd:(0,a.useCallback)(()=>{"function"==typeof t&&t(),i(!1)},[t])}}function sY(e){var t,n=e.animationInput,r=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,s=e.isAnimationActive,c=e.animationBegin,l=e.animationDuration,u=e.animationEasing,d=e.onAnimationStart,f=e.onAnimationEnd,p=e.animationInterpolateFn,h=e.animationMatchBy,m=e.shouldUpdatePreviousRef,g=e.children,y=e.layout,v=ZU(n,r),b=function(e,t){var n=(0,a.useRef)(e),r=(0,a.useRef)(t.current),i=(0,a.useRef)(!0);n.current!==e&&(n.current=e,r.current=t.current,i.current=!1);var o=(0,a.useCallback)(function(e,n){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];0!==n?(1===n&&(r.current=e),n>0&&i.current&&o&&(t.current=e)):i.current=!0},[t]);return{startValue:r.current,syncStepValue:o}}(v,o),x=null!==(t=b.startValue)&&void 0!==t?t:null,w=iY(x,i,null!=h?h:tY);return a.createElement(KU,{animationId:v,begin:c,duration:l,isActive:s,easing:u,onAnimationEnd:f,onAnimationStart:d,key:v},e=>{var t=null==x,n=null==i?i:p(w,e,y),r=m?m(e):e>0;return b.syncStepValue(n,e,r),null==n?null:g(n,e,t)})}function cY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var lY=null!==(eY=a["useId".toString()])&&void 0!==eY?eY:()=>function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.useState(()=>$x("uid-")),1)[0],uY=(0,a.createContext)(void 0),dY=e=>{var t=e.id,n=e.type,r=e.children,i=function(e,t){var n=lY();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(n),t);return a.createElement(uY.Provider,{value:i},r(i))},fY=e=>{var t=rM(),n=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{null===n.current?t(iP(e)):n.current!==e&&t(oP({prev:n.current,next:e})),n.current=e},[t,e]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(aP(n.current)),n.current=null)},[t]),null},pY=(0,a.memo)(fY),hY=e=>{var t=rM(),n=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{null===n.current?t(sP(e)):n.current!==e&&t(lP({prev:n.current,next:e})),n.current=e},[t,e]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(cP(n.current)),n.current=null)},[t]),null},mY=(0,a.memo)(hY);function gY(e){var t=e.zIndex,n=e.children,r=void 0!==bj()&&void 0!==t&&0!==t,i=lj(),s=(0,a.useRef)(void 0),c=(0,a.useRef)(new Set),l=rM(),u=sM(e=>Kz(e,t,i));if((0,a.useLayoutEffect)(()=>{if(!r){var e=c.current;return e.forEach(e=>{l(hz({zIndex:e}))}),e.clear(),void(s.current=void 0)}if(c.current.has(t)||(l(pz({zIndex:t})),c.current.add(t)),u){s.current=u;var n=c.current;n.forEach(e=>{e!==t&&(l(hz({zIndex:e})),n.delete(e))})}},[l,t,r,u]),(0,a.useLayoutEffect)(()=>{var e=c.current;return()=>{e.forEach(e=>{l(hz({zIndex:e}))}),e.clear()}},[l]),!r)return n;var d=null!=u?u:s.current;return d?(0,o.createPortal)(n,d):null}function yY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yY(Object(n),!0).forEach(function(t){bY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bY(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xY=["labelRef"],wY=["content"];function MY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jY(Object(n),!0).forEach(function(t){NY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NY(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SY(){return SY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SY.apply(null,arguments)}var EY=(0,a.createContext)(null),kY=e=>{var t=e.x,n=e.y,r=e.upperWidth,i=e.lowerWidth,o=e.width,s=e.height,c=e.children,l=(0,a.useMemo)(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:s}),[t,n,r,i,o,s]);return a.createElement(EY.Provider,{value:l},c)},DY=()=>{var e=(0,a.useContext)(EY),t=pj();return e||(t?fj(t):void 0)},IY=(0,a.createContext)(null),AY=e=>null!=e&&"function"==typeof e,TY=e=>null!=e&&"cx"in e&&Qx(e.cx),CY={angle:0,offset:5,zIndex:lO.label,position:"middle",textBreakAll:!1};function PY(e){var t,n,r,i,o,s=W_(e,CY),c=s.viewBox,l=s.parentViewBox,u=s.position,d=s.value,f=s.children,p=s.content,h=s.className,m=void 0===h?"":h,g=s.textBreakAll,y=s.labelRef,v=(i=(0,a.useContext)(IY),o=sM(NO),i||o),b=DY(),x=function(e){if(!TY(e))return e;var t=e.cx,n=e.cy,r=e.outerRadius,i=2*r;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}(t=null==c?"center"===u?b:null!=v?v:b:TY(c)?c:fj(c));if(!t||Xx(d)&&Xx(f)&&!(0,a.isValidElement)(p)&&"function"!=typeof p)return null;var w=OY(OY({},s),{},{viewBox:t});if((0,a.isValidElement)(p)){w.labelRef;var M=MY(w,xY);return(0,a.cloneElement)(p,M)}if("function"==typeof p){w.content;var j=MY(w,wY);if(n=(0,a.createElement)(p,j),(0,a.isValidElement)(n))return n}else n=(e=>{var t=e.value,n=e.formatter,r=Xx(e.children)?t:e.children;return"function"==typeof n?n(r):r})(s);var O=Gz(s);if(TY(t)){if("insideStart"===u||"insideEnd"===u||"end"===u)return((e,t,n,r,i)=>{var o,s,c=e.offset,l=e.className,u=i.cx,d=i.cy,f=i.innerRadius,p=i.outerRadius,h=i.startAngle,m=i.endAngle,g=i.clockWise,y=(f+p)/2,v=((e,t)=>Fx(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=v>=0?1:-1;switch(t){case"insideStart":o=h+b*c,s=g;break;case"insideEnd":o=m-b*c,s=!g;break;case"end":o=m+b*c,s=g;break;default:throw new Error("Unsupported position ".concat(t))}s=v<=0?s:!s;var x=oO(u,d,y,o),w=oO(u,d,y,o+359*(s?1:-1)),M="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),j=Xx(e.id)?$x("recharts-radial-line-"):e.id;return a.createElement("text",SY({},r,{dominantBaseline:"central",className:jc("recharts-radial-bar-label",l)}),a.createElement("defs",null,a.createElement("path",{id:j,d:M})),a.createElement("textPath",{xlinkHref:"#".concat(j)},n))})(s,u,n,O,t);r=((e,t,n)=>{var r=e.cx,i=e.cy,o=e.innerRadius,a=e.outerRadius,s=(e.startAngle+e.endAngle)/2;if("outside"===n){var c=oO(r,i,a+t,s),_x=c.x;return{x:_x,y:c.y,textAnchor:_x>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var l=oO(r,i,(o+a)/2,s);return{x:l.x,y:l.y,textAnchor:"middle",verticalAnchor:"middle"}})(t,s.offset,s.position)}else{if(!x)return null;var N=(e=>{var t=e.position,n=e.offset,r=void 0===n?0:n,i=e.parentViewBox,o=e.clamp,a=fj(e.viewBox),s=a.x,c=a.y,l=a.height,u=a.upperWidth,d=a.lowerWidth,f=s,p=s+(u-d)/2,h=(f+p)/2,m=(u+d)/2,g=f+u/2,y=l>=0?1:-1,v=y*r,b=y>0?"end":"start",x=y>0?"start":"end",w=u>=0?1:-1,M=w*r,j=w>0?"end":"start",O=w>0?"start":"end",N=i;if("top"===t){var S={x:f+u/2,y:c-v,horizontalAnchor:"middle",verticalAnchor:b};return o&&N&&(S.height=Math.max(c-N.y,0),S.width=u),S}if("bottom"===t){var E={x:p+d/2,y:c+l+v,horizontalAnchor:"middle",verticalAnchor:x};return o&&N&&(E.height=Math.max(N.y+N.height-(c+l),0),E.width=d),E}if("left"===t){var k={x:h-M,y:c+l/2,horizontalAnchor:j,verticalAnchor:"middle"};return o&&N&&(k.width=Math.max(k.x-N.x,0),k.height=l),k}if("right"===t){var D={x:h+m+M,y:c+l/2,horizontalAnchor:O,verticalAnchor:"middle"};return o&&N&&(D.width=Math.max(N.x+N.width-D.x,0),D.height=l),D}var I=o&&N?{width:m,height:l}:{};return"insideLeft"===t?vY({x:h+M,y:c+l/2,horizontalAnchor:O,verticalAnchor:"middle"},I):"insideRight"===t?vY({x:h+m-M,y:c+l/2,horizontalAnchor:j,verticalAnchor:"middle"},I):"insideTop"===t?vY({x:f+u/2,y:c+v,horizontalAnchor:"middle",verticalAnchor:x},I):"insideBottom"===t?vY({x:p+d/2,y:c+l-v,horizontalAnchor:"middle",verticalAnchor:b},I):"insideTopLeft"===t?vY({x:f+M,y:c+v,horizontalAnchor:O,verticalAnchor:x},I):"insideTopRight"===t?vY({x:f+u-M,y:c+v,horizontalAnchor:j,verticalAnchor:x},I):"insideBottomLeft"===t?vY({x:p+M,y:c+l-v,horizontalAnchor:O,verticalAnchor:b},I):"insideBottomRight"===t?vY({x:p+d-M,y:c+l-v,horizontalAnchor:j,verticalAnchor:b},I):t&&"object"==typeof t&&(Qx(t.x)||Bx(t.x))&&(Qx(t.y)||Bx(t.y))?vY({x:s+Hx(t.x,m),y:c+Hx(t.y,l),horizontalAnchor:"end",verticalAnchor:"end"},I):vY({x:g,y:c+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},I)})({viewBox:x,position:u,offset:s.offset,parentViewBox:TY(l)?void 0:l,clamp:!0});r=OY(OY({x:N.x,y:N.y,textAnchor:N.horizontalAnchor,verticalAnchor:N.verticalAnchor},void 0!==N.width?{width:N.width}:{}),void 0!==N.height?{height:N.height}:{})}return a.createElement(gY,{zIndex:s.zIndex},a.createElement(mU,SY({ref:y,className:jc("recharts-label",m)},O,r,{textAnchor:cU(O.textAnchor)?O.textAnchor:r.textAnchor,breakAll:g}),n))}PY.displayName="Label";function zY(e){var t=e.label,n=e.labelRef;return((e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return!0===e?a.createElement(PY,SY({key:"label-implicit"},r)):qx(e)?a.createElement(PY,SY({key:"label-implicit",value:e},r)):(0,a.isValidElement)(e)?e.type===PY?(0,a.cloneElement)(e,OY({key:"label-implicit"},r)):a.createElement(PY,SY({key:"label-implicit",content:e},r)):AY(e)?a.createElement(PY,SY({key:"label-implicit",content:e},r)):e&&"object"==typeof e?a.createElement(PY,SY({},e,{key:"label-implicit"},r)):null})(t,DY(),n)||null}var _Y=["valueAccessor"],RY=["dataKey","clockWise","id","textBreakAll","zIndex"];function LY(){return LY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LY.apply(null,arguments)}function UY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var YY=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return Xx(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},FY=(0,a.createContext)(void 0),WY=FY.Provider,BY=(0,a.createContext)(void 0),QY=BY.Provider;function qY(e){var t=e.valueAccessor,n=void 0===t?YY:t,r=UY(e,_Y),i=r.dataKey,o=(r.clockWise,r.id),s=r.textBreakAll,c=r.zIndex,l=UY(r,RY),u=(0,a.useContext)(FY),d=(0,a.useContext)(BY),f=u||d;return f&&f.length?a.createElement(gY,{zIndex:null!=c?c:lO.label},a.createElement(OR,{className:"recharts-label-list"},f.map((e,t)=>{var c,u=Xx(i)?n(e,t):_M(e.payload,i),d=Xx(o)?{}:{id:"".concat(o,"-").concat(t)};return a.createElement(PY,LY({key:"label-".concat(t)},Gz(e),l,d,{fill:null!==(c=r.fill)&&void 0!==c?c:e.fill,parentViewBox:e.parentViewBox,value:u,textBreakAll:s,viewBox:e.viewBox,index:t,zIndex:0}))}))):null}function GY(e){var t=e.label;return t?!0===t?a.createElement(qY,{key:"labelList-implicit"}):a.isValidElement(t)||AY(t)?a.createElement(qY,{key:"labelList-implicit",content:t}):"object"==typeof t?a.createElement(qY,LY({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function $Y(e){return e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:""}qY.displayName="LabelList";var HY=["key"],VY=["onMouseEnter","onClick","onMouseLeave"],KY=["id"],ZY=["id"];function XY(){return XY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XY.apply(null,arguments)}function JY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eF(Object(n),!0).forEach(function(t){nF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rF=TL;function iF(e){var t=(0,a.useMemo)(()=>MU(e.children,gU),[e.children]),n=sM(n=>xR(n,e.id,t));return null==n?null:a.createElement(AU,{legendPayload:n})}var oF=a.memo(e=>{var t=e.dataKey,n=e.nameKey,r=e.sectors,i=e.stroke,o=e.strokeWidth,s=e.fill,c=e.name,l=e.hide,u=e.tooltipType,d=e.formatter,f=e.id,p=function(e){if(null!=e&&"boolean"!=typeof e&&"function"!=typeof e){if(a.isValidElement(e)){var t,n=null===(t=e.props)||void 0===t?void 0:t.fill;return"string"==typeof n?n:void 0}var r=e.fill;return"string"==typeof r?r:void 0}}(e.activeShape),h={dataDefinedOnItem:r.map(e=>{var t=e.tooltipPayload;return null==p||null==t?t:t.map(e=>tF(tF({},e),{},{color:p,fill:p}))}),getPosition:e=>{var t;return null===(t=r[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:o,fill:s,dataKey:t,nameKey:n,name:$M(c,t),hide:l,type:u,color:s,unit:"",formatter:d,graphicalItemId:f}};return a.createElement(DU,{tooltipEntrySettings:h})}),aF=(e,t)=>e>t?"start":e<t?"end":"middle",sF=(e,t,n)=>{var r=t.top,i=t.left,o=t.width,a=t.height,s=aO(o,a),c=i+Hx(e.cx,o,o/2),l=r+Hx(e.cy,a,a/2),u=Hx(e.innerRadius,s,0),d=((e,t,n)=>Hx("function"==typeof t?t(e):t,n,.8*n))(n,e.outerRadius,s);return{cx:c,cy:l,innerRadius:u,outerRadius:d,maxRadius:e.maxRadius||Math.sqrt(o*o+a*a)/2}},cF=(e,t)=>Fx(t-e)*Math.min(Math.abs(t-e),360);function lF(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label,o=n.labelLine,s=n.dataKey;if(!r||!i||!t)return null;var c=Qz(n),l=qz(i),u=qz(o),d="object"==typeof i&&"offsetRadius"in i&&"number"==typeof i.offsetRadius&&i.offsetRadius||20,f=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,r=oO(e.cx,e.cy,e.outerRadius+d,n),f=tF(tF(tF(tF({},c),e),{},{stroke:"none"},l),{},{index:t,textAnchor:aF(r.x,e.cx)},r),p=tF(tF(tF(tF({},c),e),{},{fill:"none",stroke:e.fill},u),{},{index:t,points:[oO(e.cx,e.cy,e.outerRadius,n),r],key:"line"});return a.createElement(gY,{zIndex:lO.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},a.createElement(OR,null,o&&((e,t)=>{if(a.isValidElement(e))return a.cloneElement(e,t);if("function"==typeof e)return e(t);var n=jc("recharts-pie-label-line","boolean"!=typeof e?e.className:""),r=(t.key,JY(t,HY));return a.createElement(SL,XY({},r,{type:"linear",className:n}))})(o,p),((e,t,n)=>{if(a.isValidElement(e))return a.cloneElement(e,t);var r=n;if("function"==typeof e&&(r=e(t),a.isValidElement(r)))return r;var i=jc("recharts-pie-label-text",$Y(e));return a.createElement(mU,XY({},t,{alignmentBaseline:"middle",className:i}),r)})(i,f,_M(e,s))))});return a.createElement(OR,{className:"recharts-pie-labels"},f)}function uF(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label;return"object"==typeof i&&null!=i&&"position"in i?a.createElement(GY,{label:i}):a.createElement(lF,{sectors:t,props:n,showLabels:r})}function dF(e){var t,n,r,i,o=e.sectors,s=e.activeShape,c=e.inactiveShape,l=e.allOtherPieProps,u=e.shape,d=e.id,f=e.animationElapsedTime,p=e.isAnimating,h=e.isEntrance,m=sM(sC),g=sM(lC),y=sM(uC),v=l.onMouseEnter,b=l.onClick,x=l.onMouseLeave,w=JY(l,VY),M=((e,t,n)=>{var r=rM();return(i,o)=>a=>{null==e||e(i,o,a),r(Pw({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}})(v,l.dataKey,d),j=(e=>{var t=rM();return(n,r)=>i=>{null==e||e(n,r,i),t(zw())}})(x),O=(t=b,n=l.dataKey,r=d,i=rM(),(e,o)=>a=>{null==t||t(e,o,a),i(Rw({activeIndex:String(o),activeDataKey:n,activeCoordinate:e.tooltipPosition,activeGraphicalItemId:r}))});return null==o||0===o.length?null:a.createElement(a.Fragment,null,o.map((e,t)=>{if(0===(null==e?void 0:e.startAngle)&&0===(null==e?void 0:e.endAngle)&&1!==o.length)return null;var n=null==y||y===d,r=String(t)===m&&(null==g||l.dataKey===g)&&n,i=s&&r?s:m?c:null,v=tF(tF({},e),{},{stroke:e.stroke,tabIndex:-1,index:t,isActive:r,animationElapsedTime:f,isAnimating:p,isEntrance:h,[ej]:t,[tj]:d});return a.createElement(OR,XY({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(t),tabIndex:-1,className:"recharts-pie-sector"},lL(w,e,t),{onMouseEnter:M(e,t),onMouseLeave:j(e,t),onClick:O(e,t)}),a.createElement(kU,{option:null!=i?i:u,DefaultShape:rF,shapeProps:v}))}))}function fF(e){var t=e.showLabels,n=e.sectors,r=e.children,i=(0,a.useMemo)(()=>t&&n?n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[n,t]);return a.createElement(QY,{value:t?i:void 0},r)}function pF(e){var t=e.props,n=e.previousSectorsRef,r=e.id,i=t.sectors,o=t.activeShape,s=t.inactiveShape,c=t.animationInterpolateFn,l=aY(t.onAnimationStart,t.onAnimationEnd),u=l.isAnimating,d=l.handleAnimationStart,f=l.handleAnimationEnd,p=sM(wj);return null==p?null:a.createElement(fF,{showLabels:!u,sectors:i},a.createElement(sY,{animationInput:t,animationIdPrefix:"recharts-pie-",items:i,previousItemsRef:n,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:d,onAnimationEnd:f,animationInterpolateFn:c,animationMatchBy:t.animationMatchBy,layout:p},(e,n,i)=>a.createElement(OR,null,a.createElement(dF,{sectors:e,activeShape:o,inactiveShape:s,allOtherPieProps:t,shape:t.shape,id:r,animationElapsedTime:n,isAnimating:u||n<1,isEntrance:i}))),a.createElement(uF,{showLabels:!u,sectors:i,props:t}),t.children)}var hF={animationBegin:400,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];var n=[],r=e.find(e=>"removed"!==e.status),i=r?r.next.startAngle:0;return e.forEach((e,r)=>{if("removed"!==e.status){var o=r>0?Lx(e.next,"paddingAngle",0):0;if("matched"===e.status){var a=Kx(e.prev.endAngle-e.prev.startAngle,e.next.endAngle-e.next.startAngle,t),s=tF(tF({},e.next),{},{startAngle:i+o,endAngle:i+a+o});n.push(s),i=s.endAngle}else{var c=Kx(0,e.next.endAngle-e.next.startAngle,t),l=tF(tF({},e.next),{},{startAngle:i+o,endAngle:i+c+o});n.push(l),i=l.endAngle}}}),n},animationMatchBy:nY,cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,shape:rF,startAngle:0,stroke:"#fff",zIndex:lO.area};function mF(e){var t=e.id,n=JY(e,KY),r=e.hide,i=e.className,o=e.rootTabIndex,s=(0,a.useMemo)(()=>MU(e.children,gU),[e.children]),c=sM(e=>wR(e,t,s)),l=(0,a.useRef)(null),u=jc("recharts-pie",i);return r||null==c?(l.current=null,a.createElement(OR,{tabIndex:o,className:u})):a.createElement(gY,{zIndex:e.zIndex},a.createElement(oF,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:c,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),a.createElement(OR,{tabIndex:o,className:u},a.createElement(pF,{props:tF(tF({},n),{},{sectors:c}),previousSectorsRef:l,id:t})))}var gF=function(e){var t=W_(e,hF),n=t.id,r=JY(t,ZY),i=Qz(r);return a.createElement(dY,{id:n,type:"pie"},e=>a.createElement(a.Fragment,null,a.createElement(mY,{type:"pie",id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),a.createElement(iF,XY({},r,{id:e})),a.createElement(mF,XY({},r,{id:e}))))};function yF(){return yF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yF.apply(null,arguments)}function vF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vF(Object(n),!0).forEach(function(t){xF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MF(e){return Array.isArray(e)&&qx(e[0])&&qx(e[1])?e.join(" ~ "):e}gF.displayName="Pie";var jF={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},OF=e=>{var t=e.separator,n=void 0===t?jF.separator:t,r=e.contentStyle,i=e.itemStyle,o=e.labelStyle,s=void 0===o?jF.labelStyle:o,c=e.payload,l=e.formatter,u=e.itemSorter,d=e.wrapperClassName,f=e.labelClassName,p=e.label,h=e.labelFormatter,m=e.accessibilityLayer,g=void 0===m?jF.accessibilityLayer:m,y=bF(bF({},jF.contentStyle),r),v=bF({margin:0},s),b=!Xx(p),x=b?p:"",w=jc("recharts-default-tooltip",d),M=jc("recharts-tooltip-label",f);b&&h&&null!=c&&(x=h(p,c));var j=g?{role:"status","aria-live":"assertive"}:{};return a.createElement("div",yF({className:w,style:y},j),a.createElement("p",{className:M,style:v},a.isValidElement(x)?x:"".concat(x)),(()=>{if(c&&c.length){var e=function(e,t){return null==t?e:bM(e,t)}(c,u),t=e.map((e,t)=>{if(!e||"none"===e.type)return null;var r=e.formatter||l||MF,o=e.value,s=e.name,u=o,d=s;if(r){var f=r(o,s,e,t,c);if(Array.isArray(f)){var p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wF(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wF(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(f,2);u=p[0],d=p[1]}else{if(null==f)return null;u=f}}var h=bF(bF({},jF.itemStyle),{},{color:e.color||jF.itemStyle.color},i);return a.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:h},qx(d)?a.createElement("span",{className:"recharts-tooltip-item-name"},d):null,qx(d)?a.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,a.createElement("span",{className:"recharts-tooltip-item-value"},u),a.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return a.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},t)}return null})())},NF="recharts-tooltip-wrapper",SF={visibility:"hidden"};function EF(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return jc(NF,{["".concat(NF,"-right")]:Qx(n)&&t&&Qx(t.x)&&n>=t.x,["".concat(NF,"-left")]:Qx(n)&&t&&Qx(t.x)&&n<t.x,["".concat(NF,"-bottom")]:Qx(r)&&t&&Qx(t.y)&&r>=t.y,["".concat(NF,"-top")]:Qx(r)&&t&&Qx(t.y)&&r<t.y})}function kF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offset,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(o&&Qx(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=c[r];return null==f?0:a[r]?u<f?Math.max(d,f):Math.max(u,f):null==l?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function DF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DF(Object(n),!0).forEach(function(t){AF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AF(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function CF(e){if((!e.prefersReducedMotion||"auto"!==e.isAnimationActive)&&e.isAnimationActive&&e.active){var t="string"==typeof e.animationEasing?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function PF(e){var t,n,r,i,o,s,c=YU(),l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return TF(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TF(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),u=l[0],d=l[1];a.useEffect(()=>{var t=t=>{var n,r,i,o;"Escape"===t.key&&d({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(i=null===(o=e.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null===(t=e.coordinate)||void 0===t?void 0:t.x,null===(n=e.coordinate)||void 0===n?void 0:n.y]),!u.dismissed||(null!==(r=null===(i=e.coordinate)||void 0===i?void 0:i.x)&&void 0!==r?r:0)===u.dismissedAtCoordinate.x&&(null!==(o=null===(s=e.coordinate)||void 0===s?void 0:s.y)&&void 0!==o?o:0)===u.dismissedAtCoordinate.y||d(IF(IF({},u),{},{dismissed:!1}));var f,p,h,m,g,y,v,b,x,w,M,j,O=(m=(f={allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}).allowEscapeViewBox,g=f.coordinate,y=f.offsetTop,v=f.offsetLeft,b=f.position,x=f.reverseDirection,M=f.useTranslate3d,j=f.viewBox,{cssProperties:(w=f.tooltipBox).height>0&&w.width>0&&g?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:p=kF({allowEscapeViewBox:m,coordinate:g,key:"x",offset:v,position:b,reverseDirection:x,tooltipDimension:w.width,viewBox:j,viewBoxDimension:j.width}),translateY:h=kF({allowEscapeViewBox:m,coordinate:g,key:"y",offset:y,position:b,reverseDirection:x,tooltipDimension:w.height,viewBox:j,viewBoxDimension:j.height}),useTranslate3d:M}):SF,cssClasses:EF({translateX:p,translateY:h,coordinate:g})}),N=O.cssClasses,S=O.cssProperties,E=e.hasPortalFromProps?{}:IF(IF({transition:CF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},S),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),k=IF(IF({},E),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return a.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:N,style:k,ref:e.innerRef},e.children)}var zF=a.memo(PF);function _F(e){return e}function RF(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function LF(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function UF(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const YF="[object String]",FF="[object Number]",WF="[object Boolean]",BF="[object Arguments]",QF="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof globalThis&&globalThis||function(){return this}();function qF(e,t,n,r=new Map,i=void 0){const o=i?.(e,t,n,r);if(void 0!==o)return o;if(RF(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const t=new Array(e.length);r.set(e,t);for(let o=0;o<e.length;o++)t[o]=qF(e[o],o,n,r,i);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;r.set(e,t);for(const[o,a]of e)t.set(o,qF(a,o,n,r,i));return t}if(e instanceof Set){const t=new Set;r.set(e,t);for(const o of e)t.add(qF(o,void 0,n,r,i));return t}if(a=e,void 0!==QF.Buffer&&QF.Buffer.isBuffer(a))return e.subarray();var a;if(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);r.set(e,t);for(let o=0;o<e.length;o++)t[o]=qF(e[o],o,n,r,i);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),GF(t,e,n,r,i),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return r.set(e,t),GF(t,e,n,r,i),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return r.set(e,t),GF(t,e,n,r,i),t}if(e instanceof Error){const t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,GF(t,e,n,r,i),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return r.set(e,t),GF(t,e,n,r,i),t}if(e instanceof Number){const t=new Number(e.valueOf());return r.set(e,t),GF(t,e,n,r,i),t}if(e instanceof String){const t=new String(e.valueOf());return r.set(e,t),GF(t,e,n,r,i),t}if("object"==typeof e&&function(e){switch(UF(e)){case BF:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case WF:case"[object Date]":case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case FF:case"[object Object]":case"[object RegExp]":case"[object Set]":case YF:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),GF(t,e,n,r,i),t}return e}function GF(e,t,n=e,r,i){const o=[...Object.keys(t),...LF(t)];for(let a=0;a<o.length;a++){const s=o[a],c=Object.getOwnPropertyDescriptor(e,s);(null==c||c.writable)&&(e[s]=qF(t[s],s,n,r,i))}}function $F(e,t,n){return"function"!=typeof n?$F(e,t,()=>{}):HF(e,t,function e(t,r,i,o,a,s){const c=n(t,r,i,o,a,s);return void 0!==c?Boolean(c):HF(t,r,e,s,!1)},new Map,!0)}function HF(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,n,r){if(null==t)return!0;if(Array.isArray(t))return VF(e,t,n,r);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries())if(!1===n(e.get(i),o,i,e,t,r))return!1;return!0}(e,t,n,r);if(t instanceof Set)return function(e,t,n,r){return 0===t.size||e instanceof Set&&VF([...e],[...t],n,r)}(e,t,n,r);const i=Object.keys(t);if(null==e||RF(e))return 0===i.length;if(0===i.length)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let o=0;o<i.length;o++){const a=i[o];if(!RF(e)&&!(a in e))return!1;if(void 0===t[a]&&void 0!==e[a])return!1;if(null===t[a]&&null!==e[a])return!1;if(!n(e[a],t[a],a,e,t,r))return!1}return!0}finally{r?.delete(t)}}(e,t,n,r);case"function":return Object.keys(t).length>0?HF(e,{...t},n,r,i):cM(e,t);default:return uM(e)&&i?"string"!=typeof t||""===t:cM(e,t)}}function VF(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const a=t[o];let s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=!1;if(n(e[c],a,o,e,t,r)&&(l=!0),l){i.add(c),s=!0;break}}if(!s)return!1}return!0}function KF(e,t){return $F(e,t,()=>{})}function ZF(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===UF(e)}function XF(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=Px(e)}return t=function(e,t){return qF(e,void 0,e,new Map,t)}(n=t,(e,t,i,o)=>{const a=r?.(e,t,i,o);if(void 0!==a)return a;if("object"==typeof n){if("[object Object]"===UF(n)&&"function"!=typeof n.constructor){const e={};return o.set(n,e),GF(e,n,i,o),e}switch(Object.prototype.toString.call(n)){case FF:case YF:case WF:{const e=new n.constructor(n?.valueOf());return GF(e,n),e}case BF:{const e={};return GF(e,n),e.length=n.length,e[Symbol.iterator]=n[Symbol.iterator],e}default:return}}}),function(n){const r=Lx(n,e);return void 0===r?function(e,t){let n;if(n=Array.isArray(t)?t:"string"==typeof t&&Cx(t)&&null==e?.[t]?Rx(t):[t],0===n.length)return!1;let r=e;for(let e=0;e<n.length;e++){const t=n[e];if(!(null!=r&&Object.hasOwn(r,t)||(Array.isArray(r)||ZF(r))&&fM(t)&&t<r.length))return!1;r=r[t]}return!0}(n,e):void 0===t?void 0===r:KF(r,t)};var n,r}function JF(e){if(null==e)return _F;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?XF(e[0],e[1]):(n=qF(r=n=e,void 0,r,new Map,void 0),e=>KF(e,n));case"string":case"symbol":case"number":return t=e,function(e){return Lx(e,t)}}var t,n,r}function eW(e,t=_F){return function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&lM(e)}(e)?function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],o=t(i,r,e);n.has(o)||n.set(o,i)}return Array.from(n.values())}(Array.from(e),(n=JF(t),function(...e){return n.apply(this,e.slice(0,1))})):[];var n}function tW(e,t,n){return!0===t?eW(e,n):"function"==typeof t?eW(e,t):e}function nW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rW(e,t){return Math.abs(e.height-t.height)>1||Math.abs(e.left-t.left)>1||Math.abs(e.top-t.top)>1||Math.abs(e.width-t.width)>1}function iW(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function oW(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,a.useRef)(null),o=(0,a.useRef)(n);o.current=n;var s=(0,a.useCallback)(e=>{if(null!=i.current&&(i.current.disconnect(),i.current=null),null!=e){var t=iW(e);if(rW(t,o.current)&&r(t),"undefined"!=typeof ResizeObserver){var n=new ResizeObserver(()=>{var t=iW(e);rW(t,o.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,a.useEffect)(()=>()=>{var e;null===(e=i.current)||void 0===e||e.disconnect()},[]),[n,s]}var aW=["x","y","top","left","width","height","className"];function sW(){return sW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sW.apply(null,arguments)}function cW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uW,dW,fW,pW,hW,mW,gW,yW,vW,bW,xW=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),wW=e=>{var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.top,s=void 0===o?0:o,c=e.left,l=void 0===c?0:c,u=e.width,d=void 0===u?0:u,f=e.height,p=void 0===f?0:f,h=e.className,m=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,aW),g=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cW(Object(n),!0).forEach(function(t){lW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:i,top:s,left:l,width:d,height:p},m);return Qx(n)&&Qx(i)&&Qx(d)&&Qx(p)&&Qx(s)&&Qx(l)?a.createElement("path",sW({},Gz(g),{className:jc("recharts-cross",h),d:xW(n,i,d,p,s,l)})):null},MW=["radius"],jW=["radius"];function OW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OW(Object(n),!0).forEach(function(t){SW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EW(){return EW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EW.apply(null,arguments)}function kW(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function DW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IW(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var AW=(e,t,n,r,i)=>{var o,a=Ux(n),s=Ux(r),c=Math.min(Math.abs(a)/2,Math.abs(s)/2),l=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0;if(c>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=i[p])&&void 0!==h?h:0;f[p]=m>c?c:m}o=Yx(uW||(uW=IW(["M",",",""])),e,t+l*f[0]),f[0]>0&&(o+=Yx(dW||(dW=IW(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),o+=Yx(fW||(fW=IW(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(o+=Yx(pW||(pW=IW(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+l*f[1])),o+=Yx(hW||(hW=IW(["L ",",",""])),e+n,t+r-l*f[2]),f[2]>0&&(o+=Yx(mW||(mW=IW(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),o+=Yx(gW||(gW=IW(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(o+=Yx(yW||(yW=IW(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-l*f[3])),o+="Z"}else if(c>0&&i===+i&&i>0){var g=Math.min(c,i);o=Yx(vW||(vW=IW(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+l*g,g,g,d,e+u*g,t,e+n-u*g,t,g,g,d,e+n,t+l*g,e+n,t+r-l*g,g,g,d,e+n-u*g,t+r,e+u*g,t+r,g,g,d,e,t+r-l*g)}else o=Yx(bW||(bW=IW(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return o},TW={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},CW=e=>{var t=W_(e,TW),n=(0,a.useRef)(null),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return DW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(-1),2),i=r[0],o=r[1];(0,a.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&o(e)}catch(e){}},[]);var s=t.x,c=t.y,l=t.width,u=t.height,d=t.radius,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,g=t.isAnimationActive,y=t.isUpdateAnimationActive,v=(0,a.useRef)(l),b=(0,a.useRef)(u),x=(0,a.useRef)(s),w=(0,a.useRef)(c),M=ZU((0,a.useMemo)(()=>({x:s,y:c,width:l,height:u,radius:d}),[s,c,l,u,d]),"rectangle-");if(s!==+s||c!==+c||l!==+l||u!==+u||0===l||0===u)return null;var j=jc("recharts-rectangle",f);if(!y){var O=Gz(t),N=(O.radius,kW(O,MW));return a.createElement("path",EW({},N,{x:Ux(s),y:Ux(c),width:Ux(l),height:Ux(u),radius:"number"==typeof d?d:void 0,className:j,d:AW(s,c,l,u,d)}))}var S=v.current,E=b.current,k=x.current,D=w.current,I="0px ".concat(-1===i?1:i,"px"),A="".concat(i,"px ").concat(i,"px"),T=((e,t,n)=>["strokeDasharray"].map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","))(0,h,"string"==typeof p?p:TW.animationEasing);return a.createElement(KU,{animationId:M,key:M,canBegin:i>0,duration:h,easing:p,isActive:y,begin:m},e=>{var r,i=Kx(S,l,e),o=Kx(E,u,e),f=Kx(k,s,e),p=Kx(D,c,e);n.current&&(v.current=i,b.current=o,x.current=f,w.current=p),r=g?e>0?{transition:T,strokeDasharray:A}:{strokeDasharray:I}:{strokeDasharray:A};var h=Gz(t),m=(h.radius,kW(h,jW));return a.createElement("path",EW({},m,{radius:"number"==typeof d?d:void 0,className:j,d:AW(f,p,i,o,d),ref:n,style:NW(NW({},r),t.style)}))})};function PW(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle;return{points:[oO(t,n,r,i),oO(t,n,r,o)],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function zW(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(sL(t)){if("centric"===e){var r=t.cx,i=t.cy,o=t.innerRadius,a=t.outerRadius,s=t.angle,c=oO(r,i,o,s),l=oO(r,i,a,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return PW(t)}}function _W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_W(Object(n),!0).forEach(function(t){LW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UW(){return UW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UW.apply(null,arguments)}function YW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YW(Object(n),!0).forEach(function(t){WW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BW(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return(0,a.isValidElement)(t)?(0,a.cloneElement)(t,r):(0,a.createElement)(n,r)}function QW(e){var t,n,r,i,o=e.coordinate,s=e.payload,c=e.index,l=e.offset,u=e.tooltipAxisBandSize,d=e.layout,f=e.cursor,p=e.tooltipEventType,h=e.chartName,m=o,g=s,y=c;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)n=m,r=wW,i=lO.cursorLine;else if("BarChart"===h)n=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,l,u),r=CW,i=lO.cursorRectangle;else if("radial"===d&&sL(m)){var v=PW(m),b=v.cx,x=v.cy,w=v.radius;n={cx:b,cy:x,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:w,outerRadius:w},r=TL,i=lO.cursorLine}else n={points:zW(d,m,l)},r=SL,i=lO.cursorLine;var M="object"==typeof f&&"className"in f?f.className:void 0,j=FW(FW(FW(FW({stroke:"#ccc",pointerEvents:"none"},l),n),qz(f)),{},{payload:g,payloadIndex:y,className:jc("recharts-tooltip-cursor",M)});return a.createElement(gY,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:i},a.createElement(BW,{cursor:f,cursorComp:r,cursorProps:j}))}function qW(e){var t,n,r,i=(t=sM(zI),n=sM(nC),r=sM(JT),qM(t&&r?RW(RW({},t),{},{scale:r}):void 0,n)),o=mj(),s=bj(),c=sM(Kj);return null==i||null==o||null==s||null==c?null:a.createElement(QW,UW({},e,{offset:o,layout:s,tooltipAxisBandSize:i,chartName:c}))}function GW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GW(Object(n),!0).forEach(function(t){HW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HW(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KW(e){return e.dataKey}var ZW=[],XW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function JW(e){var t,n,r=W_(e,XW),i=r.active,s=r.allowEscapeViewBox,c=r.animationDuration,l=r.animationEasing,u=r.content,d=r.filterNull,f=r.isAnimationActive,p=r.offset,h=r.payloadUniqBy,m=r.position,g=r.reverseDirection,y=r.useTranslate3d,v=r.wrapperStyle,b=r.cursor,x=r.shared,w=r.trigger,M=r.defaultIndex,j=r.portal,O=r.axisId,N=rM(),S="number"==typeof M?String(M):M;(0,a.useEffect)(()=>{N(Cw({shared:x,trigger:w,axisId:O,active:i,defaultIndex:S}))},[N,x,w,O,i,S]);var E=pj(),k=Lz(),D=function(e){return sM(t=>oT(t,e))}(x),I=null!==(t=sM(e=>TC(e,D,w,S)))&&void 0!==t?t:{},A=I.activeIndex,T=I.isActive,C=sM(e=>AC(e,D,w,S)),P=sM(e=>IC(e,D,w,S)),z=sM(e=>DC(e,D,w,S)),_=C,R=(0,a.useContext)(g_),L=null!==(n=null!=i?i:T)&&void 0!==n&&n,U=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return VW(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VW(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(oW([_,L]),2),Y=U[0],F=U[1],W="axis"===D?P:void 0;!function(e,t,n,r,i,o){var s=sM(n=>((e,t,n)=>{if(null!=t){var r=mT(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(n,e,t)),c=sM(uC),l=sM(Jj),u=sM(Zj),d=sM(Xj),f=sM(l_),p=null!=(null==f?void 0:f.sourceViewBox),h=pj();(0,a.useEffect)(()=>{if(!p&&null!=u&&null!=l){var e=Yw({active:o,coordinate:n,dataKey:s,index:i,label:"number"==typeof r?String(r):r,sourceViewBox:h,graphicalItemId:c});a_.emit(s_,u,e,l)}},[p,n,s,c,i,r,l,u,d,o,h])}(D,w,z,W,A,L);var B=null!=j?j:R;if(null==B||null==E||null==D)return null;var Q=null!=_?_:ZW;L||(Q=ZW),d&&Q.length&&(Q=tW(Q.filter(e=>null!=e.value&&(!0!==e.hide||r.includeHidden)),h,KW));var q=Q.length>0,G=$W($W({},r),{},{payload:Q,label:W,active:L,activeIndex:A,coordinate:z,accessibilityLayer:k}),$=a.createElement(zF,{allowEscapeViewBox:s,animationDuration:c,animationEasing:l,isAnimationActive:f,active:L,coordinate:z,hasPayload:q,offset:p,position:m,reverseDirection:g,useTranslate3d:y,viewBox:E,wrapperStyle:v,lastBoundingBox:Y,innerRef:F,hasPortalFromProps:Boolean(j)},function(e,t){return a.isValidElement(e)?a.cloneElement(e,t):"function"==typeof e?a.createElement(e,t):a.createElement(OF,t)}(u,G));return a.createElement(a.Fragment,null,(0,o.createPortal)($,B),L&&a.createElement(qW,{cursor:b,tooltipEventType:D,coordinate:z,payload:Q,index:A}))}const eB={product:"#f16060",shipping:"#5895f7",bulk:"#9c74f7",bogo:"#f6ad2f",bundle:"#f68839",cart:"#44c1da",others:"#06b6fe"},tB=[{intent:"Product",revenue:0,orders:0,percentage:0},{intent:"Cart",revenue:0,orders:0,percentage:0},{intent:"Shipping",revenue:0,orders:0,percentage:0},{intent:"Bulk",revenue:0,orders:0,percentage:0},{intent:"BOGO",revenue:0,orders:0,percentage:0},{intent:"Bundle",revenue:0,orders:0,percentage:0},{intent:"Others",revenue:0,orders:0,percentage:0}];function nB(e,t){const n=e?.toLowerCase();return eB[n]??Object.values(eB)[t%Object.values(eB).length]}const rB=({active:e,payload:t})=>{if(!e||!t?.length)return null;const{name:n,value:r,payload:{color:i}}=t[0];return(0,Nl.jsxs)("div",{className:"disco-bg-white disco-border disco-border-[#e5e7eb] disco-rounded-lg disco-px-2 disco-py-1 disco-text-[10px] disco-shadow disco-z-50",children:[(0,Nl.jsxs)("span",{style:{color:i},children:[n,": "]}),(0,Nl.jsxs)("strong",{children:[r,"%"]})]})},iB=({className:e})=>{const t=gv(),n=D(ds),{data:r,isLoading:i}=Ix(n),o=r,a=tB.map(e=>{const t=(o?.data??[]).find(t=>t.intent.toLowerCase()===e.intent.toLowerCase());return{name:e.intent,value:t?t.percentage:0,color:nB(e.intent)}}),s=(o?.data??[]).map((e,t)=>({name:e.intent,value:e.percentage,color:nB(e.intent,t)})),c=o?.total_revenue??0,l=c?c>=1e3?`${xl((c/1e3).toFixed(2))}k`:`${xl(c.toFixed(2))}`:"--";return(0,Nl.jsxs)(Sx,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-2",e),children:[!t&&(0,Nl.jsx)(kv,{showIcon:!0,title:(0,yv.__)("Intent breakdown","disco"),label:(0,yv.__)("Unlock","disco")}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,yv.__)("Revenue by intent","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,yv.__)("Campaign type breakdown","disco")})]}),i?(0,Nl.jsx)("div",{className:"disco-h-[200px] disco-animate-pulse disco-rounded-lg disco-bg-[#f3f4f6]"}):(0,Nl.jsxs)("div",{className:"disco-flex disco-flex-col disco-items-center disco-gap-4",children:[(0,Nl.jsxs)("div",{className:"disco-relative disco-shrink-0",style:{width:160,height:160},children:[(0,Nl.jsx)(Mw,{width:"100%",height:"100%",children:(0,Nl.jsxs)(eR,{children:[(0,Nl.jsx)(gF,{data:s,cx:"50%",cy:"50%",innerRadius:52,outerRadius:78,dataKey:"value",strokeWidth:0,paddingAngle:1,children:s.map(({name:e,color:t})=>(0,Nl.jsx)(gU,{fill:t},e))}),(0,Nl.jsx)(JW,{wrapperStyle:{zIndex:999},content:(0,Nl.jsx)(rB,{})})]})}),(0,Nl.jsxs)("div",{className:"disco-absolute disco-inset-0 disco-flex disco-flex-col disco-items-center disco-justify-center disco-pointer-events-none",children:[(0,Nl.jsx)("span",{className:"disco-text-base disco-font-bold disco-text-[#111827]",children:l}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,yv.__)("revenue","disco")})]})]}),(0,Nl.jsx)("ul",{className:"disco-w-full disco-flex disco-flex-col disco-flex-1",children:a?.map(({name:e,value:t,color:n})=>(0,Nl.jsxs)("li",{className:"disco-flex disco-items-center disco-justify-between disco-text-xs",children:[(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-1.5 disco-text-[#4b5563]",children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-sm disco-shrink-0",style:{background:n}}),e]}),(0,Nl.jsxs)("span",{className:"disco-font-semibold disco-text-[#1f2937]",children:[t,"%"]})]},e))})]})]})};function oB(){return oB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oB.apply(null,arguments)}function aB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cB=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aB(Object(n),!0).forEach(function(t){sB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},vz),lB=(0,a.forwardRef)(function(e,t){var n,r=W_(e.categoricalChartProps,cB),i=e.chartName,o=e.defaultTooltipEventType,s=e.validateTooltipEventTypes,c=e.tooltipPayloadSearcher,l=e.categoricalChartProps,u={chartName:i,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:c,eventEmitter:void 0};return a.createElement(Ez,{preloadedState:{options:u},reduxStoreName:null!==(n=l.id)&&void 0!==n?n:i},a.createElement(kz,{chartData:l.data}),a.createElement(Cz,{layout:r.layout,margin:r.margin}),a.createElement(_z,{throttleDelay:r.throttleDelay,throttledEvents:r.throttledEvents}),a.createElement(Pz,{baseValue:r.baseValue,accessibilityLayer:r.accessibilityLayer,barCategoryGap:r.barCategoryGap,maxBarSize:r.maxBarSize,stackOffset:r.stackOffset,barGap:r.barGap,barSize:r.barSize,syncId:r.syncId,syncMethod:r.syncMethod,className:r.className,reverseStackOrder:r.reverseStackOrder}),a.createElement(U_,oB({},r,{ref:t})))}),uB=["axis"],dB=(0,a.forwardRef)((e,t)=>a.createElement(lB,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:uB,tooltipPayloadSearcher:jw,categoricalChartProps:e,ref:t}));function fB(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];void 0!==i&&n.push(i)}return n}function pB(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function hB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hB(Object(n),!0).forEach(function(t){gB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yB(e,t,n){var r,i=e.tick,o=e.ticks,a=e.viewBox,s=e.minTickGap,c=e.orientation,l=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!o||!o.length||!i)return[];if(Qx(l)||oz)return null!==(r=function(e,t){return fB(e,t+1)}(o,Qx(l)?l:0))&&void 0!==r?r:[];var p=[],h="top"===c||"bottom"===c?"width":"height",m=d&&"width"===h?YL(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(e,r)=>{var i="function"==typeof u?u(e.value,r):e.value;return"width"===h?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,o=Math.atan(n/t),a=i>o&&i<Math.PI-o?n/Math.sin(i):t/Math.cos(i);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}(YL(i,{fontSize:t,letterSpacing:n}),m,f):YL(i,{fontSize:t,letterSpacing:n})[h]},y=o[0],v=o[1],b=o.length>=2&&null!=y&&null!=v?Fx(v.coordinate-y.coordinate):1,x=function(e,t,n){var r="width"===n,i=e.x,o=e.y,a=e.width,s=e.height;return 1===t?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}(a,b,h);return"equidistantPreserveStart"===l?function(e,t,n,r,i){for(var o,a=(r||[]).slice(),s=t.start,c=t.end,l=0,u=1,d=s,f=function(){var t=null==r?void 0:r[l];if(void 0===t)return{v:fB(r,u)};var o,a=l,f=()=>(void 0===o&&(o=n(t,a)),o),p=t.coordinate,h=0===l||pB(e,p,f,d,c);h||(l=0,d=s,u+=1),h&&(d=p+e*(f()/2+i),l+=u)};u<=a.length;)if(o=f())return o.v;return[]}(b,x,g,o,s):"equidistantPreserveEnd"===l?function(e,t,n,r,i){var o=(r||[]).slice().length;if(0===o)return[];for(var a=t.start,s=t.end,c=1;c<=o;c++){for(var l,u=(o-1)%c,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var o,a=h,c=()=>(void 0===o&&(o=n(t,a)),o),l=t.coordinate,p=h===u||pB(e,l,c,d,s);if(!p)return f=!1,1;p&&(d=l+e*(c()/2+i))},h=u;h<o&&(0===(l=p())||1!==l);h+=c);if(f){for(var m=[],g=u;g<o;g+=c){var y=r[g];null!=y&&m.push(y)}return m}}return[]}(b,x,g,o,s):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,c=t.start,l=t.end;if(o){var u=r[s-1];if(null!=u){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);a[s-1]=u=mB(mB({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&pB(e,u.tickCoord,()=>d,c,l)&&(l=u.tickCoord-e*(d/2+i),a[s-1]=mB(mB({},u),{},{isShow:!0}))}}for(var p=o?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var o,s=r,u=()=>(void 0===o&&(o=n(r,t)),o);if(0===t){var d=e*(s.coordinate-e*u()/2-c);a[t]=s=mB(mB({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=mB(mB({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&pB(e,s.tickCoord,u,c,l)&&(c=s.tickCoord+e*(u()/2+i),a[t]=mB(mB({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,g,o,s,"preserveStartEnd"===l):function(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,s=t.start,c=t.end,l=function(t){var r=o[t];if(null==r)return 1;var l,u=r,d=()=>(void 0===l&&(l=n(r,t)),l);if(t===a-1){var f=e*(u.coordinate+e*d()/2-c);o[t]=u=mB(mB({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else o[t]=u=mB(mB({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&pB(e,u.tickCoord,d,s,c)&&(c=u.tickCoord-e*(d()/2+i),o[t]=mB(mB({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)l(u);return o}(b,x,g,o,s),p.filter(e=>e.isShow))}var vB=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function bB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return xB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xB(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wB(){return wB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wB.apply(null,arguments)}function MB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MB(Object(n),!0).forEach(function(t){OB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var NB={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:lO.axis};function SB(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.orientation,s=e.mirror,c=e.axisLine,l=e.otherSvgProps;if(!c)return null;var u=jB(jB(jB({},l),Qz(c)),{},{fill:"none"});if("top"===o||"bottom"===o){var d=+("top"===o&&!s||"bottom"===o&&s);u=jB(jB({},u),{},{x1:t,y1:n+d*i,x2:t+r,y2:n+d*i})}else{var f=+("left"===o&&!s||"right"===o&&s);u=jB(jB({},u),{},{x1:t+f*r,y1:n,x2:t+f*r,y2:n+i})}return a.createElement("line",wB({},u,{className:jc("recharts-cartesian-axis-line",Lx(c,"className"))}))}function EB(e){var t,n=e.option,r=e.tickProps,i=e.value,o=jc(r.className,"recharts-cartesian-axis-tick-value");if(a.isValidElement(n))t=a.cloneElement(n,jB(jB({},r),{},{className:o}));else if("function"==typeof n)t=n(jB(jB({},r),{},{className:o}));else{var s="recharts-cartesian-axis-tick-value";"boolean"!=typeof n&&(s=jc(s,$Y(n))),t=a.createElement(mU,wB({},r,{className:s}),i)}return t}function kB(e){var t=e.ticks,n=e.axisType,r=e.axisId,i=rM();return(0,a.useEffect)(()=>{if(null==r||null==n)return tw;var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(Oz({ticks:e,axisId:r,axisType:n})),()=>{i(Nz({axisId:r,axisType:n}))}},[i,t,r,n]),null}var DB=(0,a.forwardRef)((e,t)=>{var n=e.ticks,r=void 0===n?[]:n,i=e.tick,o=e.tickLine,s=e.stroke,c=e.tickFormatter,l=e.unit,u=e.padding,d=e.tickTextProps,f=e.orientation,p=e.mirror,h=e.x,m=e.y,g=e.width,y=e.height,v=e.tickSize,b=e.tickMargin,x=e.fontSize,w=e.letterSpacing,M=e.getTicksConfig,j=e.events,O=e.axisType,N=e.axisId,S=yB(jB(jB({},M),{},{ticks:r}),x,w),E=Qz(M),k=qz(i),D=cU(E.textAnchor)?E.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(f,p),I=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(f,p),A={};"object"==typeof o&&(A=o);var T=jB(jB({},E),{},{fill:"none"},A),C=S.map(e=>jB({entry:e},function(e,t,n,r,i,o,a,s,c){var l,u,d,f,p,h,m=s?-1:1,g=e.tickSize||a,y=Qx(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":l=u=e.coordinate,h=(d=(f=n+ +!s*i)-m*g)-m*c,p=y;break;case"left":d=f=e.coordinate,p=(l=(u=t+ +!s*r)-m*g)-m*c,h=y;break;case"right":d=f=e.coordinate,p=(l=(u=t+ +s*r)+m*g)+m*c,h=y;break;default:l=u=e.coordinate,h=(d=(f=n+ +s*i)+m*g)+m*c,p=y}return{line:{x1:l,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,h,m,g,y,f,v,p,b))),P=C.map(e=>{var t=e.entry,n=e.line;return a.createElement(OR,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},o&&a.createElement("line",wB({},T,n,{className:jc("recharts-cartesian-axis-tick-line",Lx(o,"className"))})))}),z=C.map((e,t)=>{var n,r,o=e.entry,f=e.tick,p=jB(jB(jB(jB({verticalAnchor:I},E),{},{textAnchor:D,stroke:"none",fill:s},f),{},{index:t,payload:o,visibleTicksCount:S.length,tickFormatter:c,padding:u},d),{},{angle:null!==(n=null!==(r=null==d?void 0:d.angle)&&void 0!==r?r:E.angle)&&void 0!==n?n:0}),h=jB(jB({},p),k);return a.createElement(OR,wB({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(o.value,"-").concat(o.coordinate,"-").concat(o.tickCoord)},lL(j,o,t)),i&&a.createElement(EB,{option:i,tickProps:h,value:"".concat("function"==typeof c?c(o.value,t):o.value).concat(l||"")}))});return a.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},a.createElement(kB,{ticks:S,axisId:N,axisType:O}),z.length>0&&a.createElement(gY,{zIndex:lO.label},a.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:t},z)),P.length>0&&a.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},P))}),IB=(0,a.forwardRef)((e,t)=>{var n=e.axisLine,r=e.width,i=e.height,o=e.className,s=e.hide,c=e.ticks,l=e.axisType,u=e.axisId,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,vB),f=bB((0,a.useState)(""),2),p=f[0],h=f[1],m=bB((0,a.useState)(""),2),g=m[0],y=m[1],v=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var t;return(e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,i=void 0===r?5:r,o=e.tickSize,a=void 0===o?0:o,s=e.tickMargin,c=void 0===s?0:s,l=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>l&&(l=t.width)}});var u=n?n.getBoundingClientRect().width:0,d=l+(a+c)+u+(n?i:0);return Math.round(d)}return 0})({ticks:v.current,label:null===(t=e.labelRef)||void 0===t?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var b=(0,a.useCallback)(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,o=r.letterSpacing;i===p&&o===g||(h(i),y(o))}}},[p,g]);return s||null!=r&&r<=0||null!=i&&i<=0?null:a.createElement(gY,{zIndex:e.zIndex},a.createElement(OR,{className:jc("recharts-cartesian-axis",o)},a.createElement(SB,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Qz(e)}),a.createElement(DB,{ref:b,axisType:l,events:d,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:g,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),a.createElement(kY,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},a.createElement(zY,{label:e.label,labelRef:e.labelRef}),e.children)))}),AB=a.forwardRef((e,t)=>{var n=W_(e,NB);return a.createElement(IB,wB({},n,{ref:t}))});AB.displayName="CartesianAxis";var TB=["x1","y1","x2","y2","key"],CB=["offset"],PB=["xAxisId","yAxisId"],zB=["xAxisId","yAxisId"];function _B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_B(Object(n),!0).forEach(function(t){LB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LB(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UB(){return UB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UB.apply(null,arguments)}function YB(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var FB=e=>{var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,i=e.y,o=e.width,s=e.height,c=e.ry;return a.createElement("rect",{x:r,y:i,ry:c,width:o,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function WB(e){var t,n=e.option,r=e.lineItemProps;if(a.isValidElement(n))t=a.cloneElement(n,r);else if("function"==typeof n)t=n(r);else{var i,o=r.x1,s=r.y1,c=r.x2,l=r.y2,u=r.key,d=null!==(i=Qz(YB(r,TB)))&&void 0!==i?i:{},f=(d.offset,YB(d,CB));t=a.createElement("line",UB({},f,{x1:o,y1:s,x2:c,y2:l,fill:"none",key:u}))}return t}function BB(e){var t=e.x,n=e.width,r=e.horizontal,i=void 0===r||r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=YB(e,PB),c=o.map((e,r)=>{var o=RB(RB({},s),{},{x1:t,y1:e,x2:t+n,y2:e,key:"line-".concat(r),index:r});return a.createElement(WB,{key:"line-".concat(r),option:i,lineItemProps:o})});return a.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function QB(e){var t=e.y,n=e.height,r=e.vertical,i=void 0===r||r,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=YB(e,zB),c=o.map((e,r)=>{var o=RB(RB({},s),{},{x1:e,y1:t,x2:e,y2:t+n,key:"line-".concat(r),index:r});return a.createElement(WB,{option:i,lineItemProps:o,key:"line-".concat(r)})});return a.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function qB(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,s=e.height,c=e.horizontalPoints,l=e.horizontal;if(void 0!==l&&!l||!t||!t.length||null==c)return null;var u=c.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,c)=>{var l=u[c+1],d=null==l?i+s-e:l-e;if(d<=0)return null;var f=c%t.length;return a.createElement("rect",{key:"react-".concat(c),y:e,x:r,height:d,width:o,stroke:"none",fill:t[f],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return a.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function GB(e){var t=e.vertical,n=void 0===t||t,r=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,c=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(e=>Math.round(e+o-o)).sort((e,t)=>e-t);o!==d[0]&&d.unshift(0);var f=d.map((e,t)=>{var n=d[t+1],u=null==n?o+c-e:n-e;if(u<=0)return null;var f=t%r.length;return a.createElement("rect",{key:"react-".concat(t),x:e,y:s,width:u,height:l,stroke:"none",fill:r[f],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return a.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var $B=(e,t)=>{var n=e.xAxis,r=e.width,i=e.height,o=e.offset;return LM(yB(RB(RB(RB({},NB),n),{},{ticks:UM(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},HB=(e,t)=>{var n=e.yAxis,r=e.width,i=e.height,o=e.offset;return LM(yB(RB(RB(RB({},NB),n),{},{ticks:UM(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},VB={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:lO.grid};function KB(e){var t=gj(),n=yj(),r=mj(),i=RB(RB({},W_(e,VB)),{},{x:Qx(e.x)?e.x:r.left,y:Qx(e.y)?e.y:r.top,width:Qx(e.width)?e.width:r.width,height:Qx(e.height)?e.height:r.height}),o=i.xAxisId,s=i.yAxisId,c=i.x,l=i.y,u=i.width,d=i.height,f=i.syncWithTicks,p=i.horizontalValues,h=i.verticalValues,m=lj(),g=sM(e=>VA(e,"xAxis",o,m)),y=sM(e=>VA(e,"yAxis",s,m));if(!(dw(u)&&dw(d)&&Qx(c)&&Qx(l)))return null;var v=i.verticalCoordinatesGenerator||$B,b=i.horizontalCoordinatesGenerator||HB,x=i.horizontalPoints,w=i.verticalPoints;if(!(x&&x.length||"function"!=typeof b)){var M=p&&p.length,j=b({yAxis:y?RB(RB({},y),{},{ticks:M?p:y.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:r},!!M||f);nw(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof j,"]")),Array.isArray(j)&&(x=j)}if(!(w&&w.length||"function"!=typeof v)){var O=h&&h.length,N=v({xAxis:g?RB(RB({},g),{},{ticks:O?h:g.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:r},!!O||f);nw(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(w=N)}return a.createElement(gY,{zIndex:i.zIndex},a.createElement("g",{className:"recharts-cartesian-grid"},a.createElement(FB,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),a.createElement(qB,UB({},i,{horizontalPoints:x})),a.createElement(GB,UB({},i,{verticalPoints:w})),a.createElement(BB,UB({},i,{offset:r,horizontalPoints:x,xAxis:g,yAxis:y})),a.createElement(QB,UB({},i,{offset:r,verticalPoints:w,xAxis:g,yAxis:y}))))}KB.displayName="CartesianGrid";var ZB=["domain","range"],XB=["domain","range"];function JB(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eQ(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&e[0]===t[0]&&e[1]===t[1]}function tQ(e,t){if(e===t)return!0;var n=e.domain,r=e.range,i=JB(e,ZB),o=t.domain,a=t.range,s=JB(t,XB);return!!eQ(n,o)&&!!eQ(r,a)&&Az(i,s)}var nQ=["type"],rQ=["dangerouslySetInnerHTML","ticks","scale"],iQ=["id","scale"];function oQ(){return oQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oQ.apply(null,arguments)}function aQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aQ(Object(n),!0).forEach(function(t){cQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cQ(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lQ(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uQ(e){var t=rM(),n=(0,a.useRef)(null),r=xj(),i=e.type,o=lQ(e,nQ),s=dO(r,"xAxis",i),c=(0,a.useMemo)(()=>{if(null!=s)return sQ(sQ({},o),{},{type:s})},[o,s]);return(0,a.useLayoutEffect)(()=>{null!=c&&(null===n.current?t(HC(c)):n.current!==c&&t(VC({prev:n.current,next:c})),n.current=c)},[c,t]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(KC(n.current)),n.current=null)},[t]),null}var dQ=e=>{var t=e.xAxisId,n=e.className,r=sM(sj),i=lj(),o="xAxis",s=sM(e=>KA(e,o,t,i)),c=sM(e=>FA(e,t)),l=sM(e=>QA(e,t)),u=sM(e=>rI(e,t));if(null==c||null==l||null==u)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var d=lQ(e,rQ),f=(u.id,u.scale,lQ(u,iQ));return a.createElement(AB,oQ({},d,f,{x:l.x,y:l.y,width:c.width,height:c.height,className:jc("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s,axisType:o,axisId:t}))},fQ={allowDataOverflow:nI.allowDataOverflow,allowDecimals:nI.allowDecimals,allowDuplicatedCategory:nI.allowDuplicatedCategory,angle:nI.angle,axisLine:NB.axisLine,height:nI.height,hide:!1,includeHidden:nI.includeHidden,interval:nI.interval,label:!1,minTickGap:nI.minTickGap,mirror:nI.mirror,orientation:nI.orientation,padding:nI.padding,reversed:nI.reversed,scale:nI.scale,tick:nI.tick,tickCount:nI.tickCount,tickLine:NB.tickLine,tickSize:NB.tickSize,type:nI.type,niceTicks:nI.niceTicks,xAxisId:0},pQ=e=>{var t=W_(e,fQ);return a.createElement(a.Fragment,null,a.createElement(uQ,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),a.createElement(dQ,t))},hQ=a.memo(pQ,tQ);hQ.displayName="XAxis";var mQ=["type"],gQ=["dangerouslySetInnerHTML","ticks","scale"],yQ=["id","scale"];function vQ(){return vQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vQ.apply(null,arguments)}function bQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bQ(Object(n),!0).forEach(function(t){wQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wQ(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MQ(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jQ(e){var t=rM(),n=(0,a.useRef)(null),r=xj(),i=e.type,o=MQ(e,mQ),s=dO(r,"yAxis",i),c=(0,a.useMemo)(()=>{if(null!=s)return xQ(xQ({},o),{},{type:s})},[s,o]);return(0,a.useLayoutEffect)(()=>{null!=c&&(null===n.current?t(ZC(c)):n.current!==c&&t(XC({prev:n.current,next:c})),n.current=c)},[c,t]),(0,a.useLayoutEffect)(()=>()=>{n.current&&(t(JC(n.current)),n.current=null)},[t]),null}function OQ(e){var t=e.yAxisId,n=e.className,r=e.width,i=e.label,o=(0,a.useRef)(null),s=(0,a.useRef)(null),c=sM(sj),l=lj(),u=rM(),d="yAxis",f=sM(e=>GA(e,t)),p=sM(e=>qA(e,t)),h=sM(e=>KA(e,d,t,l)),m=sM(e=>aI(e,t));if((0,a.useLayoutEffect)(()=>{if("auto"===r&&f&&!AY(i)&&!(0,a.isValidElement)(i)&&null!=m){var e=o.current;if(e){var n=e.getCalculatedWidth();Math.round(f.width)!==Math.round(n)&&u(eP({id:t,width:n}))}}},[h,f,u,i,t,r,m]),null==f||null==p||null==m)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var g=MQ(e,gQ),y=(m.id,m.scale,MQ(m,yQ));return a.createElement(AB,vQ({},g,y,{ref:o,labelRef:s,x:p.x,y:p.y,tickTextProps:"auto"===r?{width:void 0}:{width:r},width:f.width,height:f.height,className:jc("recharts-".concat(d," ").concat(d),n),viewBox:c,ticks:h,axisType:d,axisId:t}))}var NQ={allowDataOverflow:oI.allowDataOverflow,allowDecimals:oI.allowDecimals,allowDuplicatedCategory:oI.allowDuplicatedCategory,angle:oI.angle,axisLine:NB.axisLine,hide:!1,includeHidden:oI.includeHidden,interval:oI.interval,label:!1,minTickGap:oI.minTickGap,mirror:oI.mirror,orientation:oI.orientation,padding:oI.padding,reversed:oI.reversed,scale:oI.scale,tick:oI.tick,tickCount:oI.tickCount,tickLine:NB.tickLine,tickSize:NB.tickSize,type:oI.type,niceTicks:oI.niceTicks,width:oI.width,yAxisId:0},SQ=e=>{var t=W_(e,NQ);return a.createElement(a.Fragment,null,a.createElement(jQ,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),a.createElement(OQ,t))},EQ=a.memo(SQ,tQ);EQ.displayName="YAxis",Math.abs,Math.atan2;const kQ=Math.cos,DQ=(Math.max,Math.min,Math.sin),IQ=Math.sqrt,AQ=Math.PI,TQ=2*AQ,CQ={draw(e,t){const n=IQ(t/AQ);e.moveTo(n,0),e.arc(0,0,n,0,TQ)}},PQ={draw(e,t){const n=IQ(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},zQ=IQ(1/3),_Q=2*zQ,RQ={draw(e,t){const n=IQ(t/_Q),r=n*zQ;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},LQ={draw(e,t){const n=IQ(t),r=-n/2;e.rect(r,r,n,n)}},UQ=DQ(AQ/10)/DQ(7*AQ/10),YQ=DQ(TQ/10)*UQ,FQ=-kQ(TQ/10)*UQ,WQ={draw(e,t){const n=IQ(.8908130915292852*t),r=YQ*n,i=FQ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=TQ*t/5,a=kQ(o),s=DQ(o);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}},BQ=IQ(3),QQ={draw(e,t){const n=-IQ(t/(3*BQ));e.moveTo(0,2*n),e.lineTo(-BQ*n,-n),e.lineTo(BQ*n,-n),e.closePath()}},qQ=-.5,GQ=IQ(3)/2,$Q=1/IQ(12),HQ=3*($Q/2+1),VQ={draw(e,t){const n=IQ(t/HQ),r=n/2,i=n*$Q,o=r,a=n*$Q+n,s=-o,c=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,c),e.lineTo(qQ*r-GQ*i,GQ*r+qQ*i),e.lineTo(qQ*o-GQ*a,GQ*o+qQ*a),e.lineTo(qQ*s-GQ*c,GQ*s+qQ*c),e.lineTo(qQ*r+GQ*i,qQ*i-GQ*r),e.lineTo(qQ*o+GQ*a,qQ*a-GQ*o),e.lineTo(qQ*s+GQ*c,qQ*c-GQ*s),e.closePath()}};var KQ=["type","size","sizeType"];function ZQ(){return ZQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZQ.apply(null,arguments)}function XQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XQ(Object(n),!0).forEach(function(t){eq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tq={symbolCircle:CQ,symbolCross:PQ,symbolDiamond:RQ,symbolSquare:LQ,symbolStar:WQ,symbolTriangle:QQ,symbolWye:VQ},nq=Math.PI/180,rq=e=>{var t=e.type,n=void 0===t?"circle":t,r=e.size,i=void 0===r?64:r,o=e.sizeType,s=void 0===o?"area":o,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,KQ),l=JQ(JQ({},c),{},{type:n,size:i,sizeType:s}),u="circle";"string"==typeof n&&(u=n);var d=l.className,f=l.cx,p=l.cy,h=Gz(l);return Qx(f)&&Qx(p)&&Qx(i)?a.createElement("path",ZQ({},h,{className:jc("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:(()=>{var e=(e=>{var t="symbol".concat(Jx(e));return tq[t]||CQ})(u),t=function(e,t){let n=null,r=nL(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:EM(e||CQ),t="function"==typeof t?t:EM(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:EM(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:EM(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*nq;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(i,s,u)),n=t();if(null!==n)return n})()})):null};function iq(){return iq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iq.apply(null,arguments)}function oq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oq(Object(n),!0).forEach(function(t){sq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rq.registerSymbol=(e,t)=>{tq["symbol".concat(Jx(e))]=t};var cq=32,lq={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function uq(e){if("object"==typeof e&&null!==e&&"strokeDasharray"in e)return String(e.strokeDasharray)}function dq(e){var t=e.data,n=e.iconType,r=e.inactiveColor,i=16,o=cq/6,s=cq/3,c=t.inactive?r:t.color,l=null!=n?n:t.type;if("none"===l)return null;if("plainline"===l)return a.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:uq(t.payload),x1:0,y1:i,x2:cq,y2:i,className:"recharts-legend-icon"});if("line"===l)return a.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(s,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,"\n H").concat(cq,"M").concat(2*s,",").concat(i,"\n A").concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if("rect"===l)return a.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(4,"h").concat(cq,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(a.isValidElement(t.legendIcon)){var u=aq({},t);return delete u.legendIcon,a.cloneElement(t.legendIcon,u)}return a.createElement(rq,{fill:c,cx:i,cy:i,size:cq,sizeType:"diameter",type:l})}function fq(e){var t=e.payload,n=e.iconSize,r=e.layout,i=e.formatter,o=e.inactiveColor,s=e.iconType,c=e.labelStyle,l={x:0,y:0,width:cq,height:cq},u={display:"horizontal"===r?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((t,r)=>{var f=t.formatter||i,p=jc({"recharts-legend-item":!0,["legend-item-".concat(r)]:!0,inactive:t.inactive});if("none"===t.type)return null;var h="object"==typeof c?aq({},c):{};h.color=t.inactive?o:h.color||t.color;var m=f?f(t.value,t,r):t.value;return a.createElement("li",iq({className:p,style:u,key:"legend-item-".concat(r)},lL(e,t,r)),a.createElement(Vz,{width:n,height:n,viewBox:l,style:d,"aria-label":null==t.value?"legend icon":"".concat(t.value," legend icon")},a.createElement(dq,{data:t,iconType:s,inactiveColor:o})),a.createElement("span",{className:"recharts-legend-item-text",style:h},m))})}var pq=e=>{var t=W_(e,lq),n=t.payload,r=t.layout,i=t.align;if(!n||!n.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===r?i:"left"};return a.createElement("ul",{className:"recharts-default-legend",style:o},a.createElement(fq,iq({},t,{payload:n})))},hq=["contextPayload"];function mq(){return mq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mq.apply(null,arguments)}function gq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yq(Object(n),!0).forEach(function(t){bq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xq(e){return e.value}function wq(e){var t=e.contextPayload,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,hq),r=tW(t,e.payloadUniqBy,xq),i=vq(vq({},n),{},{payload:r});return a.isValidElement(e.content)?a.cloneElement(e.content,i):"function"==typeof e.content?a.createElement(e.content,i):a.createElement(pq,i)}function Mq(e){var t=e.align,n=e.layout,r=e.verticalAlign,i=e.itemSorter,o=rM();return(0,a.useLayoutEffect)(()=>{o(xP({align:t,layout:n,verticalAlign:r,itemSorter:i}))},[o,t,n,r,i]),null}function jq(e){var t=e.width,n=e.height,r=rM();return(0,a.useLayoutEffect)(()=>{r(bP({width:t,height:n}))},[r,t,n]),(0,a.useLayoutEffect)(()=>()=>{r(bP({width:0,height:0}))},[r]),null}var Oq={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",labelStyle:{},layout:"horizontal",verticalAlign:"bottom"};function Nq(e){var t=W_(e,Oq),n=sM(wM),r=(0,a.useContext)(y_),i=sM(e=>e.layout.margin),s=t.width,c=t.height,l=t.wrapperStyle,u=t.portal,d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gq(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(oW([n]),2),f=d[0],p=d[1],h=gj(),m=yj();if(null==h||null==m)return null;var g=h-((null==i?void 0:i.left)||0)-((null==i?void 0:i.right)||0),y=function(e,t,n,r){return"vertical"===e&&null!=t?{height:t}:"horizontal"===e?{width:n||r}:null}(t.layout,c,s,g),v=u?l:vq(vq({position:"absolute",width:(null==y?void 0:y.width)||s||"auto",height:(null==y?void 0:y.height)||c||"auto"},function(e,t,n,r,i,o){var a,s,c=t.layout,l=t.align,u=t.verticalAlign;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(a="center"===l&&"vertical"===c?{left:((r||0)-o.width)/2}:"right"===l?{right:n&&n.right||0}:{left:n&&n.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(s="middle"===u?{top:((i||0)-o.height)/2}:"bottom"===u?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),vq(vq({},a),s)}(l,t,i,h,m,f)),l),b=null!=u?u:r;if(null==b||null==n)return null;var x=a.createElement("div",{className:"recharts-legend-wrapper",style:v,ref:p},a.createElement(Mq,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!u&&a.createElement(jq,{width:f.width,height:f.height}),a.createElement(wq,mq({},t,y,{margin:i,chartWidth:h,chartHeight:m,contextPayload:n})));return(0,o.createPortal)(x,b)}var Sq=a.memo(Nq,Az);Sq.displayName="Legend";var Eq=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function kq(){return kq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kq.apply(null,arguments)}function Dq(e,t){return"".concat(t,"px ").concat(e,"px")}function Iq(e,t){for(var n=[],r=0;r<t;++r)n.push(...e);return n}function Aq(){return Aq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aq.apply(null,arguments)}var Tq=e=>{var t=e.cx,n=e.cy,r=e.r,i=jc("recharts-dot",e.className);return Qx(t)&&Qx(n)&&Qx(r)?a.createElement("circle",Aq({},Qz(e),cL(e),{className:i,cx:t,cy:n,r})):null},Cq=["points"];function Pq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pq(Object(n),!0).forEach(function(t){_q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _q(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rq(){return Rq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rq.apply(null,arguments)}function Lq(e){var t=e.option,n=e.dotProps,r=e.className;if((0,a.isValidElement)(t))return(0,a.cloneElement)(t,n);if("function"==typeof t)return t(n);var i=jc(r,"boolean"!=typeof t?t.className:""),o=null!=n?n:{},s=(o.points,function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(o,Cq));return a.createElement(Tq,Rq({},s,{className:i}))}function Uq(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,o=e.dataKey,s=e.baseProps,c=e.needClip,l=e.clipPathId,u=e.zIndex,d=void 0===u?lO.scatter:u;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(t,n))return null;var f,p=jU(n),h=null==(f=n)?null:(0,a.isValidElement)(f)?Gz(f.props):"object"!=typeof f||Array.isArray(f)?null:Gz(f),m=t.map((e,r)=>{var c,l,u=zq(zq(zq({r:3},s),h),{},{index:r,cx:null!==(c=e.x)&&void 0!==c?c:void 0,cy:null!==(l=e.y)&&void 0!==l?l:void 0,dataKey:o,value:e.value,payload:e.payload,points:t});return a.createElement(Lq,{key:"dot-".concat(r),option:n,dotProps:u,className:i})}),g={};return c&&null!=l&&(g.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(l,")")),a.createElement(gY,{zIndex:d},a.createElement(OR,Rq({className:r},g),m))}function Yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yq(Object(n),!0).forEach(function(t){Wq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wq(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bq=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,o=e.dataKey,s=e.clipPath;if(!1===i||null==t.x||null==t.y)return null;var c,l=Fq(Fq(Fq({},{index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:null!=r?r:"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value}),qz(i)),cL(i));return c=(0,a.isValidElement)(i)?(0,a.cloneElement)(i,l):"function"==typeof i?i(l):a.createElement(Tq,l),a.createElement(OR,{className:"recharts-active-dot",clipPath:s},c)};function Qq(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,o=e.clipPath,s=e.zIndex,c=void 0===s?lO.activeDot:s,l=sM(sC),u=sM(gC);if(null==t||null==u)return null;var d=t.find(e=>u.includes(e.payload));return Xx(d)?null:a.createElement(gY,{zIndex:c},a.createElement(Bq,{point:d,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r,clipPath:o}))}var qq=["children"],Gq={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},$q=(0,a.createContext)(Gq);function Hq(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,qq);return a.createElement($q.Provider,{value:n},t)}function Vq(e,t){var n,r,i=sM(t=>iI(t,e)),o=sM(e=>sI(e,t)),a=null!==(n=null==i?void 0:i.allowDataOverflow)&&void 0!==n?n:nI.allowDataOverflow,s=null!==(r=null==o?void 0:o.allowDataOverflow)&&void 0!==r?r:oI.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function Kq(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,i=C_(),o=Vq(t,n),s=o.needClipX,c=o.needClipY,l=o.needClip,u=sM(e=>SA(e,t,!1)),d=sM(e=>EA(e,n,!1));if(!l||!i)return null;var f=i.x,p=i.y,h=i.width,m=i.height,g=s&&u?Math.min(u[0],u[1]):f-h/2,y=c&&d?Math.min(d[0],d[1]):p-m/2,v=s&&u?Math.abs(u[1]-u[0]):2*h,b=c&&d?Math.abs(d[1]-d[0]):2*m;return a.createElement("clipPath",{id:"clipPath-".concat(r)},a.createElement("rect",{x:g,y,width:v,height:b}))}var Zq=(e,t,n,r)=>XA(e,"xAxis",t,r),Xq=(e,t,n,r)=>ZA(e,"xAxis",t,r),Jq=(e,t,n,r)=>XA(e,"yAxis",n,r),eG=(e,t,n,r)=>ZA(e,"yAxis",n,r),tG=ki([vj,Zq,Jq,Xq,eG],(e,t,n,r,i)=>RM(e,"xAxis")?qM(t,r,!1):qM(n,i,!1));function nG(e){return"line"===e.type}var rG=ki([hI,(e,t,n,r,i)=>i],(e,t)=>e.filter(nG).find(e=>e.id===t)),iG=ki([vj,Zq,Jq,Xq,eG,rG,tG,Ej],(e,t,n,r,i,o,a,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(null!=o&&null!=t&&null!=n&&null!=r&&null!=i&&0!==r.length&&0!==i.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,f=o.dataKey,p=o.data;if(null!=(d=null!=p&&p.length>0?p:null==c?void 0:c.slice(l,u+1)))return function(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=_M(e,a);if("horizontal"===t){var _x=WM({axis:n,ticks:i,bandSize:s,entry:e,index:c}),u=Xx(l)?null:r.scale.map(l);return{x:_x,y:null!=u?u:null,value:l,payload:e}}var d=Xx(l)?null:n.scale.map(l),f=WM({axis:r,ticks:o,bandSize:s,entry:e,index:c});return null==d||null==f?null:{x:d,y:f,value:l,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:a,displayedData:d})}}),oG=["id"],aG=["type","layout","connectNulls","needClip","shape","strokeDasharray"],sG=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function cG(){return cG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cG.apply(null,arguments)}function lG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uG(Object(n),!0).forEach(function(t){fG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fG(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pG={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];if(1===t)return e.flatMap(e=>"removed"===e.status?[]:[e.next]);var n=function(e){var t=0,n=0;for(var r of e)"matched"===r.status&&null!=r.prev.x&&null!=r.next.x&&(t+=r.next.x-r.prev.x,n++);return n>0?t/n:0}(e),r=[];for(var i of e)if("matched"===i.status)r.push(dG(dG({},i.next),{},{x:Kx(i.prev.x,i.next.x,t),y:Kx(i.prev.y,i.next.y,t)}));else if("added"===i.status)if(null!=i.next.x){var o=i.next.x-n;r.push(dG(dG({},i.next),{},{x:Kx(o,i.next.x,t),y:i.next.y}))}else r.push(i.next);else if("removed"===i.status&&null!=i.prev.x){var a=i.prev.x+n;r.push(dG(dG({},i.prev),{},{x:Kx(i.prev.x,a,t),y:i.prev.y}))}return r},animationMatchBy:tY,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:function(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t,n=e.visibleLength,r=e.strokeDasharray,i=e.connectNulls,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Eq),s=null!=i&&i;if(null!=n){var c,l=o.pathRef;t=function(e,t,n){return e?function(e,t,n){var r=function(e){return e.length%2!=0?[...e,...e]:e}(n),i=r.reduce((e,t)=>e+t,0);if(!i)return Dq(t,e);for(var o=Math.floor(e/i),a=e%i,s=[],c=0,l=0;c<r.length;l+=null!==(u=r[c])&&void 0!==u?u:0,++c){var u,d=r[c];if(null!=d&&l+d>a){s=[...r.slice(0,c),a-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Iq(r,o),...s,...f].map(e=>"".concat(e,"px")).join(", ")}(n,t,"".concat(e).split(/[,\s]+/gim).map(e=>parseFloat(e))):Dq(t,n)}(r,function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(null!==(c=null==l?void 0:l.current)&&void 0!==c?c:null),n)}else null!=r&&(t=String(r));return a.createElement(SL,kq({},o,{connectNulls:s,strokeDasharray:t}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:lO.line,type:"linear"},hG=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:$M(n,t),payload:e}]},mG=a.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,o=e.fill,s=e.name,c=e.hide,l=e.unit,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:tw,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$M(s,t),hide:c,type:d,color:r,unit:l,formatter:u,graphicalItemId:f}};return a.createElement(DU,{tooltipEntrySettings:p})});function gG(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,o=r.dataKey,s=r.needClip,c=(r.id,Qz(lG(r,oG)));return a.createElement(Uq,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:c,needClip:s,clipPathId:t})}function yG(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,a.useMemo)(()=>null==r?void 0:r.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return dG(dG({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[r]);return a.createElement(WY,{value:t?i:void 0},n)}function vG(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=e.visibleLength,u=i.type,d=i.layout,f=i.connectNulls,p=i.needClip,h=i.shape,m=i.strokeDasharray,g=dG(dG({},Gz(lG(i,aG))),{},{fill:"none",className:"recharts-line-curve",clipPath:p?"url(#clipPath-".concat(t,")"):void 0,points:r,type:u,layout:d,connectNulls:f,strokeDasharray:null!=m?m:i.strokeDasharray,pathRef:n,animationElapsedTime:o,isAnimating:s,isEntrance:!!i.animateNewValues&&c,visibleLength:l});return a.createElement(a.Fragment,null,(null==r?void 0:r.length)>1&&a.createElement(kU,{option:h,DefaultShape:pG.shape,shapeProps:g}),a.createElement(gG,{points:r,clipPathId:t,props:i}))}function bG(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,o=n.points,s=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,u=n.animationEasing,d=n.animationMatchBy,f=n.animationInterpolateFn,p=n.layout,h=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(r.current),m=aY(n.onAnimationStart,n.onAnimationEnd),g=m.isAnimating,y=m.handleAnimationStart,v=m.handleAnimationEnd,b=!g,x=function(e){var t=(0,a.useRef)(0),n=(0,a.useRef)(0),r=(0,a.useRef)(!1),i=(0,a.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,a.useCallback)((e,i)=>{if(r.current)return null;var o=Math.min(Ux(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,o),o>=i)?(r.current=!0,null):o},[])}(o),w=(0,a.useCallback)(e=>e>0&&h>0,[h]);return a.createElement(yG,{points:o,showLabels:b},n.children,a.createElement(sY,{animationInput:o,animationIdPrefix:"recharts-line-",items:o,previousItemsRef:i,isAnimationActive:s,animationBegin:c,animationDuration:l,animationEasing:u,onAnimationStart:y,onAnimationEnd:v,animationInterpolateFn:f,animationMatchBy:d,shouldUpdatePreviousRef:w,layout:p},(e,i,o)=>{var s=g||i<1,c=s?x(i,h):null;return a.createElement(vG,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:s,isEntrance:o,visibleLength:c})}),a.createElement(GY,{label:n.label}))}function xG(e){var t=e.clipPathId,n=e.props,r=(0,a.useRef)(null),i=(0,a.useRef)(null);return a.createElement(bG,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var wG=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:_M(e.payload,t)}};class MG extends a.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,o=e.xAxisId,s=e.yAxisId,c=e.top,l=e.left,u=e.width,d=e.height,f=e.id,p=e.needClip,h=e.zIndex;if(t)return null;var m=jc("recharts-line",i),g=f,y=function(e){var t=qz(e);if(null!=t){var n=t.r,r=t.strokeWidth,i=Number(n),o=Number(r);return(Number.isNaN(i)||i<0)&&(i=3),(Number.isNaN(o)||o<0)&&(o=2),{r:i,strokeWidth:o}}return{r:3,strokeWidth:2}}(n),v=y.r,b=y.strokeWidth,x=jU(n),w=2*v+b,M=p?"url(#clipPath-".concat(x?"":"dots-").concat(g,")"):void 0;return a.createElement(gY,{zIndex:h},a.createElement(OR,{className:m},p&&a.createElement("defs",null,a.createElement(Kq,{clipPathId:g,xAxisId:o,yAxisId:s}),!x&&a.createElement("clipPath",{id:"clipPath-dots-".concat(g)},a.createElement("rect",{x:l-w/2,y:c-w/2,width:u+w,height:d+w}))),a.createElement(Hq,{xAxisId:o,yAxisId:s,data:r,dataPointFormatter:wG,errorBarOffset:0},a.createElement(xG,{props:this.props,clipPathId:g}))),a.createElement(Qq,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:M}))}}function jG(e){var t=W_(e,pG),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.connectNulls,l=t.dot,u=t.hide,d=t.isAnimationActive,f=t.label,p=t.legendType,h=t.xAxisId,m=t.yAxisId,g=t.id,y=lG(t,sG),v=Vq(h,m).needClip,b=C_(),x=bj(),w=lj(),M=sM(e=>iG(e,h,m,w,g));if("horizontal"!==x&&"vertical"!==x||null==M||null==b)return null;var j=b.height,O=b.width,N=b.x,S=b.y;return a.createElement(MG,cG({},y,{id:g,connectNulls:c,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:m,points:M,layout:x,height:j,width:O,left:N,top:S,needClip:v}))}function OG(e){var t=W_(e,pG),n=lj();return a.createElement(dY,{id:t.id,type:"line"},e=>a.createElement(a.Fragment,null,a.createElement(IU,{legendPayload:hG(t)}),a.createElement(mG,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),a.createElement(pY,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),a.createElement(jG,cG({},t,{id:e}))))}var NG=a.memo(OG,Az);NG.displayName="Line";const SG=({active:e,payload:t,label:n,interval:r})=>e&&t?.length?(0,Nl.jsxs)("div",{className:"disco-bg-[#1e2327] disco-text-white disco-rounded-lg disco-p-2 disco-text-[10px] disco-shadow-lg",children:[(0,Nl.jsx)("p",{className:"disco-text-[#bbcfff] disco-mb-1",children:Ml(n,r)}),t.map(e=>(0,Nl.jsxs)("p",{style:{color:e.color},children:["net_sales"===e.name?"Net Sales":"Discount Sales",":"," ",(0,Nl.jsx)("strong",{className:"disco-text-white",children:xl(e.value)})]},e.name))]}):null,EG=({className:e})=>{const t=D(ds),{data:n,isLoading:r}=Dx(t),i=n?.data??[],o=n?.interval??"day",a=(new Date(t.date_to)-new Date(t.date_from))/864e5>90;return(0,Nl.jsxs)(Sx,{className:bl("disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-2",e),children:[(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,yv.__)("Revenue over time","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af]",children:(0,yv.__)("Net revenue vs disco","disco")})]}),r?(0,Nl.jsx)("div",{className:"disco-h-[280px] disco-animate-pulse disco-rounded-lg disco-bg-[#f3f4f6]"}):(0,Nl.jsx)(Mw,{width:"100%",height:280,children:(0,Nl.jsxs)(dB,{data:i,margin:{top:8,right:8,left:-16,bottom:0},children:[(0,Nl.jsx)(KB,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),(0,Nl.jsx)(hQ,{dataKey:"date",tick:{fontSize:9,fill:"#637381"},tickLine:!1,axisLine:!1,tickFormatter:e=>function(e,t){const n=new Date(e+"T00:00:00");return t?`${n.toLocaleDateString("en-US",{month:"short"})} ${String(n.getFullYear()).slice(-2)}`:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}(e,a)}),(0,Nl.jsx)(EQ,{tick:{fontSize:9,fill:"#637381"},tickLine:!1,axisLine:!1,tickFormatter:e=>`${xl(e)}`}),(0,Nl.jsx)(JW,{content:(0,Nl.jsx)(SG,{interval:o})}),(0,Nl.jsx)(Sq,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:"11px",color:"#6b7280"},formatter:e=>"net_sales"===e?"Net Sale":"Discount Sale"}),(0,Nl.jsx)(NG,{type:"monotone",dataKey:"net_sales",stroke:"#47cd89",strokeWidth:2,dot:!1,name:"net_sales"}),(0,Nl.jsx)(NG,{type:"monotone",dataKey:"discount_sales",stroke:"#f59e0b",strokeWidth:2,dot:!1,name:"discount_sales"})]})})]})},kG=Sc("disco-group/badge disco-inline-flex disco-h-5 disco-w-fit disco-shrink-0 disco-items-center disco-justify-center disco-gap-1 disco-overflow-hidden disco-rounded-4xl disco-border disco-border-transparent disco-px-2 disco-py-0.5 disco-text-xs disco-font-medium disco-whitespace-nowrap disco-transition-all focus-visible:disco-border-ring focus-visible:disco-ring-[3px] focus-visible:disco-ring-ring/50 has-data-[icon=inline-end]:disco-pr-1.5 has-data-[icon=inline-start]:disco-pl-1.5 aria-invalid:disco-border-destructive aria-invalid:disco-ring-destructive/20 dark:aria-invalid:disco-ring-destructive/40 [&>svg]:disco-pointer-events-none [&>svg]:disco-size-3!",{variants:{variant:{default:"disco-bg-primary disco-text-primary-foreground [a]:hover:disco-bg-primary/80",secondary:"disco-bg-secondary disco-text-secondary-foreground [a]:hover:disco-bg-secondary/80",destructive:"disco-bg-destructive/10 disco-text-destructive focus-visible:disco-ring-destructive/20 dark:disco-bg-destructive/20 dark:focus-visible:disco-ring-destructive/40 [a]:hover:disco-bg-destructive/20",outline:"disco-border-border disco-text-foreground [a]:hover:disco-bg-muted [a]:hover:disco-text-muted-foreground",ghost:"hover:disco-bg-muted hover:disco-text-muted-foreground dark:hover:disco-bg-muted/50",link:"disco-text-primary disco-underline-offset-4 hover:disco-underline"}},defaultVariants:{variant:"default"}});function DG({className:e,variant:t="default",render:n,...r}){return kl({defaultTagName:"span",props:Vs({className:bl(kG({variant:t}),e)},r),render:n,state:{slot:"badge",variant:t}})}const IG={campaigns:"disco-bg-[#f3efff]",net:"disco-bg-[#f6fff9]",discount:"disco-bg-[#fff8ec]",orders:"disco-bg-[#e5eeff]",discountOrders:"disco-bg-[#e9ffff]",customers:"disco-bg-[#eeffe6]"},AG=({title:e,subtitle:t,value:n,trend:r,icon:i,variant:o="net",isLoading:a,isTrendUp:s})=>(0,Nl.jsxs)("div",{className:bl("disco-relative disco-overflow-hidden disco-rounded-[10px] disco-border-2 disco-border-[#e5e7eb] disco-p-4 disco-flex-1 disco-min-w-[240px]",IG[o]),children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-start disco-justify-between disco-mb-2",children:[(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-text-xs disco-font-semibold disco-uppercase disco-tracking-[0.5px] disco-text-black",children:e}),t&&(0,Nl.jsx)("p",{className:"disco-text-[8px] disco-text-[#575757]",children:t})]}),(0,Nl.jsx)("img",{src:i,alt:e,className:"disco-w-6 disco-h-6"})]}),a?(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("div",{className:"disco-h-8 disco-w-24 disco-bg-gray-300/50 disco-rounded disco-mb-2 disco-animate-pulse"}),(0,Nl.jsx)("div",{className:"disco-h-5 disco-w-32 disco-bg-gray-300/50 disco-rounded-full disco-animate-pulse"})]}):(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("p",{className:"disco-text-2xl disco-font-bold disco-text-[#111827] disco-tracking-tight disco-mb-2",children:n}),r&&(0,Nl.jsx)(DG,{className:(s?"!disco-bg-[#dcfce7] disco-text-[#15803d]":"!disco-bg-[#FFE0DE] disco-text-[#DC5243]")+" disco-text-[8px] disco-font-medium disco-rounded-full disco-px-2 disco-py-0.5 disco-border-0",children:r})]})]});function TG(e){if(!e)return"-- vs last period";const{change_percent:t,trend:n,previous:r,current:i}=e;if(null===t&&0===r&&0===i)return"↓ 0% vs last period";if(null===t&&0===r&&i>0)return"↑ 100%+ vs last period";const o=Math.abs(t).toFixed(1);return"up"===n?`↑ +${o}% vs last period`:`↓ -${o}% vs last period`}const CG=[{title:(0,yv.__)("Active Campaigns","disco"),icon:n(789).A,variant:"campaigns",getValue:e=>e?.active_campaigns?.current??"--",isTrendUp:e=>"up"===e?.active_campaigns?.trend},{title:(0,yv.__)("Net Sale","disco"),subtitle:"(Woo + Disco)",icon:n(606).A,variant:"net",getValue:e=>xl(e?.net_sales?.current),getTrend:e=>TG(e?.net_sales),isTrendUp:e=>"up"===e?.net_sales?.trend},{title:(0,yv.__)("Discount Sale","disco"),subtitle:"(By Disco)",icon:n(675).A,variant:"discount",getValue:e=>xl(e?.discount_sales?.current),getTrend:e=>TG(e?.discount_sales),isTrendUp:e=>"up"===e?.discount_sales?.trend},{title:(0,yv.__)("Total Orders","disco"),subtitle:"(Woo + Disco)",icon:n(149).A,variant:"orders",getValue:e=>e?.total_orders?.current??"--",getTrend:e=>TG(e?.total_orders),isTrendUp:e=>"up"===e?.total_orders?.trend},{title:(0,yv.__)("Orders with Discount","disco"),subtitle:"(Disco)",icon:n(146).A,variant:"discountOrders",getValue:e=>e?.disco_orders?.current??"--",getTrend:e=>TG(e?.disco_orders),isTrendUp:e=>"up"===e?.disco_orders?.trend},{title:(0,yv.__)("Customers","disco"),subtitle:"(Disco)",icon:n(530).A,variant:"customers",getValue:e=>e?.customers?.current??"--",getTrend:e=>TG(e?.customers),isTrendUp:e=>"up"===e?.customers?.trend}],PG=()=>{const e=D(ds),{data:t,isLoading:n,isFetching:r}=kx(e),i=t?.data;return(0,Nl.jsx)("div",{className:"disco-grid disco-grid-cols-4 disco-gap-2.5 disco-mb-3",children:CG.map(({title:e,subtitle:t,icon:o,variant:a,getValue:s,getTrend:c,isTrendUp:l})=>(0,Nl.jsx)(AG,{title:e,subtitle:t,value:s(i),trend:c?c(i):null,icon:o,variant:a,isLoading:n||r,isTrendUp:l(i)},e))})},zG=["#ef4444","#3b82f6","#8b5cf6","#f59e0b","#10b981"],_G=({className:e})=>{const t=gv(),n=D(ds),{data:r,isLoading:i}=ql({...n,limit:5,sort_by:"revenue",order:"desc"}),o=r?.data??[];return i||0!==o.length?(0,Nl.jsxs)(Sx,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-0",e),children:[!t&&!i&&(0,Nl.jsx)(kv,{label:(0,yv.__)("Upgrade to See All","disco"),position:"disco-inset-x-0 disco-bottom-0 disco-h-[55%]",rounded:"disco-rounded-b-[10px]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between",children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,yv.__)("Top campaigns","disco")}),(0,Nl.jsxs)(St,{to:"/campaigns-reports",className:"disco-text-xs disco-font-medium disco-text-primary hover:disco-underline hover:disco-text-primary",children:[(0,yv.__)("View all","disco")," →"]})]}),i?(0,Nl.jsx)("div",{className:"disco-space-y-2",children:Array.from({length:5}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-h-8 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"},t))}):(0,Nl.jsx)("ul",{children:o.map(({campaign_id:e,campaign_name:t,revenue:n},r)=>(0,Nl.jsxs)("li",{className:"disco-flex disco-items-center disco-justify-between disco-py-2 disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:[(0,Nl.jsxs)("span",{className:"disco-flex disco-items-center disco-gap-2 disco-text-xs disco-font-medium disco-text-[#1f2937]",children:[(0,Nl.jsx)("span",{className:"disco-size-[6px] disco-rounded-[3px] disco-shrink-0",style:{background:zG[r%zG.length]}}),jl(t,30)]}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-semibold disco-text-[#111827]",children:xl(n)})]},e))})]}):(0,Nl.jsx)(Sv,{})},RG=({className:e})=>{const t=gv(),n=D(ds),{data:r,isLoading:i}=ib({...n,limit:5,sort_by:"revenue",order:"desc"}),o=r?.data??[];return i||0!==o.length?(0,Nl.jsxs)(Sx,{className:bl("disco-relative disco-ring-0 disco-border-2 disco-border-[#e5e7eb] disco-rounded-[10px] disco-p-4 disco-gap-0",e),children:[!t&&!i&&(0,Nl.jsx)(kv,{label:(0,yv.__)("Upgrade to See All","disco"),position:"disco-inset-x-0 disco-bottom-0 disco-h-[50%]",rounded:"disco-rounded-b-[10px]"}),(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between",children:[(0,Nl.jsx)("h3",{className:"disco-text-base disco-font-semibold disco-text-[#1f2937]",children:(0,yv.__)("Top products by revenue","disco")}),(0,Nl.jsxs)(St,{to:"/products",className:"disco-text-xs disco-font-medium disco-text-primary hover:disco-underline hover:disco-text-primary",children:[(0,yv.__)("View all","disco")," →"]})]}),i?(0,Nl.jsx)("div",{className:"disco-space-y-3",children:Array.from({length:5}).map((e,t)=>(0,Nl.jsx)("div",{className:"disco-h-8 disco-animate-pulse disco-rounded disco-bg-[#f3f4f6]"},t))}):(0,Nl.jsx)("ul",{children:o.map(({id:e,name:t,total_revenue:n,image:r})=>(0,Nl.jsx)("li",{className:"disco-py-2 disco-border-b disco-border-[#f3f4f6] last:disco-border-0",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-justify-between disco-mb-1",children:[(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2",children:[r?(0,Nl.jsx)("img",{src:r,alt:t,className:"disco-size-5 disco-rounded-lg "}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:t?.charAt(0)??"?"}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-medium disco-text-[#1f2937]",children:jl(t,40)})]}),(0,Nl.jsx)("span",{className:"disco-text-xs disco-font-semibold disco-text-[#111827]",children:xl(n)})]})},e))})]}):(0,Nl.jsx)(Sv,{title:"Top products not found!"})},LG=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)("div",{className:"disco-mb-5",children:(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Analytics Dashboard","disco")})}),(0,Nl.jsx)(PG,{}),(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-2.5 disco-mb-3",children:[(0,Nl.jsx)(EG,{className:"disco-flex-[2]"}),(0,Nl.jsx)(iB,{className:"disco-flex-1"})]}),(0,Nl.jsxs)("div",{className:"disco-flex disco-gap-2.5",children:[(0,Nl.jsx)(_G,{className:"disco-flex-1"}),(0,Nl.jsx)(RG,{className:"disco-flex-1"})]})]}),UG=_l("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]),YG=()=>(0,Nl.jsxs)("div",{className:"disco-min-h-[60vh] disco-flex disco-flex-col disco-items-center disco-justify-center disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsx)(UG,{className:"disco-size-12 disco-text-[#d1d5db] disco-mb-4"}),(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Page not found","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-1",children:(0,yv.__)("The page you're looking for doesn't exist or has been moved.","disco")}),(0,Nl.jsx)(St,{to:"/",className:"disco-mt-4 disco-inline-flex disco-items-center disco-px-3 disco-py-1.5 disco-text-xs disco-font-medium disco-text-white disco-bg-primary disco-rounded-lg disco-no-underline hover:disco-bg-primary-dark hover:disco-text-white disco-transition-colors",children:(0,yv.__)("Back to Dashboard","disco")})]}),FG=[{key:"id",label:"Order"},{key:"customer",label:"Customer"},{key:"total_spent",label:"Total Spent",sortable:!0},{key:"campaign",label:"Campaign"},{key:"products",label:"Products"},{key:"date",label:"Date",sortable:!0}],WG=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-mono disco-text-[#9ca3af]",children:e.id}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#111827] disco-whitespace-nowrap",children:e.customer}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.total_spent}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-medium disco-text-[#2fa86d] disco-whitespace-nowrap",children:jl(e.campaign,30)}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(px,{title:"Products",items:e.products})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#9ca3af] disco-whitespace-nowrap",children:e.date})]},e.id),BG=({orders:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:i="date",sortDir:o="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=gv();return(0,Nl.jsx)(Yv,{columns:FG,data:e,renderRow:WG,title:"Recent Orders",total:l,searchPlaceholder:"Search orders...",search:n,onSearchChange:r,sortKey:i,sortDir:o,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to access your complete order history — every order that used a discount campaign, with full revenue and attribution data.","disco")]})}})},QG={revenue:"revenue",date:"date"},qG=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,i]=(0,a.useState)("date"),[o,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=gv(),{data:d,isLoading:f,isFetching:p}=Bb({...e,limit:u?20:10,sort_by:QG[r]??"revenue",order:o,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map(e=>{return{id:`#${e.id}`,customer:e.customer_name||"—",campaign:(e.campaigns??[]).map(e=>e.name).join(", ")||"—",products:e.products??[],total_spent:xl(e.total_spent),quantity:e.quantity,date:(t=e.date,t?new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—")};var t}),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Orders","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,yv.__)("Orders influenced by Disco campaigns","disco")})]}),(0,Nl.jsx)(BG,{orders:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:o,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(i(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})},GG=[{key:"name",label:"Product"},{key:"revenue",label:"Net Sale",sortable:!0},{key:"category",label:"Category"},{key:"campaigns",label:"Campaigns"},{key:"orders",label:"Orders",sortable:!0},{key:"customers",label:"Customers",sortable:!0}],$G=({category:e})=>(0,Nl.jsx)("span",{className:"disco-inline-flex disco-items-center disco-px-2 disco-py-0.5 disco-rounded disco-text-[10px] disco-text-[#4b5563] disco-bg-[#f3f4f6] disco-whitespace-nowrap",children:e}),HG=e=>(0,Nl.jsxs)("tr",{className:"disco-border-b disco-border-[#f3f4f6] last:disco-border-0 hover:disco-bg-[#f9fafb] disco-cursor-pointer disco-transition-colors",children:[(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsxs)("div",{className:"disco-flex disco-items-center disco-gap-2.5",children:[e.image?(0,Nl.jsx)("img",{src:e.image,alt:e.name,className:"disco-size-7 disco-rounded-lg disco-object-cover disco-shrink-0"}):(0,Nl.jsx)("span",{className:"disco-size-7 disco-flex disco-items-center disco-justify-center disco-rounded-lg disco-bg-[#f3f4f6] disco-text-sm disco-shrink-0",children:e.name?.charAt(0)??"?"}),(0,Nl.jsxs)("div",{children:[(0,Nl.jsx)("p",{className:"disco-font-medium disco-text-[#111827] disco-leading-tight",children:jl(e.name,40)}),(0,Nl.jsx)("p",{className:"disco-text-[#9ca3af] disco-text-[10px] disco-mt-0.5",children:e.unitPrice})]})]})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-font-semibold disco-text-[#111827]",children:e.revenue}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3",children:(0,Nl.jsx)($G,{category:e.category})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#6b7280]",children:(0,Nl.jsx)(px,{title:"Campaigns",items:e.campaigns})}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.orders}),(0,Nl.jsx)("td",{className:"disco-px-4 disco-py-3 disco-text-[#374151]",children:e.customers})]},e.id),VG=({products:e=[],isLoading:t=!1,search:n="",onSearchChange:r,sortKey:i="revenue",sortDir:o="desc",onSort:a,page:s=1,totalPages:c=1,total:l=0,onPageChange:u})=>{const d=gv();return(0,Nl.jsx)(Yv,{columns:GG,data:e,renderRow:HG,title:"All Products",total:l,searchPlaceholder:"Search products...",search:n,onSearchChange:r,sortKey:i,sortDir:o,onSort:a,page:s,totalPages:c,onPageChange:u,isLoading:t,locked:!d,lockOverlay:{size:"lg",label:(0,yv.__)("Upgrade to pro","disco"),titleClassName:"disco-max-w-md disco-text-base disco-font-normal disco-text-[#111827] disco-leading-snug",title:(0,Nl.jsxs)(Nl.Fragment,{children:[(0,Nl.jsx)("strong",{className:"disco-font-semibold",children:(0,yv.__)("Upgrade to Disco Pro","disco")})," ",(0,yv.__)("to see which products respond best to discounts — and which ones you're over-discounting.","disco")]})}})},KG={orders:"orders",customers:"customers",revenue:"revenue"},ZG=()=>{const e=D(ds),[t,n]=(0,a.useState)(1),[r,i]=(0,a.useState)("revenue"),[o,s]=(0,a.useState)("desc"),[c,l]=(0,a.useState)(""),u=gv(),{data:d,isLoading:f,isFetching:p}=ib({...e,limit:u?20:10,sort_by:KG[r]??"revenue",order:o,page:t,...c?{search:c}:{}}),h=(d?.data??[]).map(e=>({id:e.id,image:e.image,name:e.name,unitPrice:`${xl(e.unit_price)} unit price`,category:(e.categories??[]).map(e=>e.name).join(", ")||"—",campaigns:Ol([...e.campaigns]),orders:e.total_orders,customers:e.total_customers,revenue:xl(e.total_revenue)})),m=d?.collection?.total??0,g=d?.collection?.total_pages??1,y=d?.collection?.count??0;return(0,Nl.jsxs)("div",{className:"disco-min-h-screen disco-bg-[#f9fafb] disco-p-6",children:[(0,Nl.jsxs)("div",{className:"disco-mb-5",children:[(0,Nl.jsx)("h1",{className:"disco-text-lg disco-font-bold disco-text-[#111827] disco-tracking-tight",children:(0,yv.__)("Products","disco")}),(0,Nl.jsx)("p",{className:"disco-text-xs disco-text-[#9ca3af] disco-mt-0.5",children:(0,yv.__)("Revenue and discount performance by product","disco")})]}),(0,Nl.jsx)(VG,{products:h,isLoading:f||p,search:c,onSearchChange:e=>{l(e),n(1)},sortKey:r,sortDir:o,onSort:e=>{r===e?s(e=>"asc"===e?"desc":"asc"):(i(e),s("desc")),n(1)},page:t,totalPages:g,total:m,count:y,onPageChange:n})]})};function XG(){return(0,Nl.jsx)(x,{store:ps,children:(0,Nl.jsxs)(Nt,{basename:"/",children:[(0,Nl.jsx)(Tt,{}),(0,Nl.jsx)(tt,{children:(0,Nl.jsxs)(Je,{path:"/",element:(0,Nl.jsx)(mv,{}),children:[(0,Nl.jsx)(Je,{index:!0,element:(0,Nl.jsx)(LG,{})}),(0,Nl.jsx)(Je,{path:"/campaigns-reports",element:(0,Nl.jsx)(bb,{})}),(0,Nl.jsx)(Je,{path:"/campaigns-reports/:campaignId",element:(0,Nl.jsx)(pb,{})}),(0,Nl.jsx)(Je,{path:"/products",element:(0,Nl.jsx)(ZG,{})}),(0,Nl.jsx)(Je,{path:"/products/:productId",element:(0,Nl.jsx)(ZG,{})}),(0,Nl.jsx)(Je,{path:"/orders",element:(0,Nl.jsx)(qG,{})}),(0,Nl.jsx)(Je,{path:"/customers",element:(0,Nl.jsx)(Nx,{})}),(0,Nl.jsx)(Je,{path:"/customers/:customerId",element:(0,Nl.jsx)(vx,{})}),(0,Nl.jsx)(Je,{path:"*",element:(0,Nl.jsx)(YG,{})})]})})]})})}const JG=document.getElementById("disco-analytics");(0,o.createRoot)(JG).render((0,Nl.jsx)(XG,{}))})()})();