From b216ddc5e714e7a69fffed1916f939313666cc18 Mon Sep 17 00:00:00 2001 From: Eddie Kohler Date: Thu, 14 Mar 2024 12:30:43 -0400 Subject: [PATCH] Prepare version 3.0.0. --- NEWS.md | 199 +++++++++++++++++++++------------------ batch/makedist.sh | 10 +- devel/manual/index.md | 1 + devel/manual/oauth.md | 2 +- scripts/d3-hotcrp.min.js | 2 +- src/init.php | 2 +- 6 files changed, 120 insertions(+), 96 deletions(-) diff --git a/NEWS.md b/NEWS.md index f7cfd07b2..d9e11e268 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,12 +1,13 @@ HotCRP NEWS =========== -## Version 3.0xx +## Version 3.0.0 – 14.Mar.2024 * Upgrade notes - * PHP 8.2 and 8.3 are supported, PHP 7.0 is not. + * PHP 8.2 and 8.3 are supported, PHP 7.0 and 7.1 are not. * Remove support for `#perm` tags. + * Prefer `$Opt["oAuthProviders"]` (not `$Opt["oAuthTypes"]`). * Batch scripts @@ -17,6 +18,9 @@ HotCRP NEWS * Add support for multiple submission classes! Different deadlines for different kinds of submission. + * Submission updates are transactional. Conflicting parallel updates + should be caught by the system; users get the submission form back and + can try again. * Reviews @@ -26,19 +30,34 @@ HotCRP NEWS and other systems may “click” those links automatically. * Fix longstanding bug with accepting a review with clickthrough terms. (Infinite recursion.) + * Comments being edited pop out when the user scrolls up, so you can + edit a comment and read reviews in parallel. * Search * Deprecated shorthand score searches `ovemer:X...Y`, `ovemer:X-Y`. Instead be explicit: `ovemer:all:X-Y` and `ovemer:span:X-Y`. + * Add `sort:color`. -* Navigation: Support deployment within Apache, proxied or not. +* Signin + + * Improve OAuth signin support, and add support to be an OAuth provider. + +* Navigation + + * Support deployment within Apache, proxied or not. + * Validate redirect parameters to avoid open redirect vulnerabilities. * Support decision variants: “Desk-reject” decisions are immediately visible to authors, regardless of other settings. There is also support for “other” decisions, which are neither acceptish nor rejectish. -* More internal improvements; for example, the autoassigner is extensible. +* Add initial developer manual. + +* More internal improvements; for example, allow autoassigner extensions, and + support TLS database connections. + +* Many, many, many bug fixes and other improvements. ## Version 3.0b3 – 30.Aug.2022 @@ -48,7 +67,7 @@ HotCRP NEWS * Add dropdown menu for help, settings, and accounts. -## Version 3.0b2 - 22.Aug.2022 +## Version 3.0b2 – 22.Aug.2022 * Upgrade notes @@ -129,7 +148,7 @@ HotCRP NEWS * Add support for bearer-token API access. -## Version 3.0b1 - 12.Nov.2020 +## Version 3.0b1 – 12.Nov.2020 * Upgrade notes @@ -280,7 +299,7 @@ HotCRP NEWS * Many other bug fixes, tests, and improvements. -## Version 2.102 - 9.Aug.2018 +## Version 2.102 – 9.Aug.2018 * Support integration with Lutz Prechelt’s [Review Quality Collector][]. @@ -325,7 +344,7 @@ HotCRP NEWS * Support PHP 7.2; stop supporting PHP 5.5. -## Version 2.101 - 18.Oct.2017 +## Version 2.101 – 18.Oct.2017 * Support metareviewers. @@ -381,7 +400,7 @@ HotCRP NEWS * Thanks for feature requests and bug reports to many users. -## Version 2.100 - 15.Jun.2016 +## Version 2.100 – 15.Jun.2016 * Sort reviews & comments by post time, rather than putting all the reviews first and all the comments later. @@ -432,14 +451,14 @@ HotCRP NEWS Oleg Vaskevich, Eijiro Sumii, Marcos Aguilera. -## Version 2.99 - 21.Nov.2015 +## Version 2.99 – 21.Nov.2015 * Support real-valued tag indexes and tag indexes for PC members. * Fix some bugs in 2.98. -## Version 2.98 - 19.Nov.2015 +## Version 2.98 – 19.Nov.2015 * MySQL improvements: Use InnoDB; set the connection charset to binary, which is required on newer MySQL instances; support emoji in reviews. @@ -452,7 +471,7 @@ HotCRP NEWS and improvements. -## Version 2.97 - 28.Sep.2015 +## Version 2.97 – 28.Sep.2015 * Add `re:words` search term and formula term. @@ -460,7 +479,7 @@ HotCRP NEWS (a regular expression's backtracking went exponential). -## Version 2.96 - 24.Sep.2015 +## Version 2.96 – 24.Sep.2015 * New improved look. @@ -489,7 +508,7 @@ HotCRP NEWS Emery Berger also suggested a feature or two. -## Version 2.95 - 19.Jun.2015 +## Version 2.95 – 19.Jun.2015 * Graphs!!!!! @@ -515,7 +534,7 @@ HotCRP NEWS * Hundreds of bug fixes and minor improvements, and some performance work. -## Version 2.94 - 15.Mar.2015 +## Version 2.94 – 15.Mar.2015 * Add buzzer, a discussion status page based on the tracker. Many tracker stability improvements. @@ -534,7 +553,7 @@ HotCRP NEWS Dan Tsafrir, Peter Sewell, Gail Murphy, George Candea, and others. -## Version 2.93 - 2.Oct.2014 +## Version 2.93 – 2.Oct.2014 * Improve autoassigner to spread out user unhappiness. @@ -573,19 +592,19 @@ HotCRP NEWS Douglis, and others. -## Version 2.92 - 13.May.2014 +## Version 2.92 – 13.May.2014 * Bug fixes for bugs reported by Shriram Krishnamurthi, Aditya Akella, Yoshi Kohno, Garth Gibson. -## Version 2.91 - 1.May.2014 +## Version 2.91 – 1.May.2014 * Bug fixes to profile editing and submission options problems reported by Lars Eggert and Kevin Fu. -## Version 2.90 - 25.Apr.2014 +## Version 2.90 – 25.Apr.2014 * Major refactoring release. @@ -620,7 +639,7 @@ HotCRP NEWS Kevin Fu, Soheil Hassas Yeganeh, Robby Findler, and Johannes Dahse. -## Version 2.61 - 14.Aug.2013 +## Version 2.61 – 14.Aug.2013 * Correct some XSS errors and one SQL injection error reported by Johannes Dahse using a static checking tool of his design. The XSS @@ -633,7 +652,7 @@ HotCRP NEWS Thanks to Anil Madhavapeddy and Peter Sewell. -## Version 2.60 - 19.Jul.2013 +## Version 2.60 – 19.Jul.2013 * Major new feature: Paper managers. Administrators can assign PC members to "manage" individual papers. These PC members gain admin @@ -658,7 +677,7 @@ HotCRP NEWS and Jeff Mogul. -## Version 2.59 - 14.Jun.2013 +## Version 2.59 – 14.Jun.2013 * Bug fix: "Monitor external reviews" works. Reported by Peter Sewell. @@ -668,14 +687,14 @@ HotCRP NEWS papers" searches. Reported by Nickolai Zeldovich and Jeff Mogul. -## Version 2.58 - 23.Mar.2013 +## Version 2.58 – 23.Mar.2013 * More information leak plugging: explicit search for review fields that should be hidden from authors, and review rounds. Reported by John Heidemann. -## Version 2.57 - 16.Mar.2013 +## Version 2.57 – 16.Mar.2013 * Bug fix: The search page's score graphs exposed score values for authored papers during the rebuttal phase. This is normally OK, but @@ -687,7 +706,7 @@ HotCRP NEWS * Add a random-walk-based paper ranking method (John Douceur). -## Version 2.56 - 29.Jan.2013 +## Version 2.56 – 29.Jan.2013 * This is a major refactoring release. Internals, particularly for paper list display, are cleaner and more extensible. But bugs are @@ -724,12 +743,12 @@ HotCRP NEWS * Thanks to Jeff Mogul and John Douceur. -## Version 2.55 - 31.Dec.2012 +## Version 2.55 – 31.Dec.2012 * Minor bugfix release. -## Version 2.54 - 30.Dec.2012 +## Version 2.54 – 30.Dec.2012 * Fix bug in 2.53 where long papers could not be uploaded. Kamin Whitehouse report. @@ -739,7 +758,7 @@ HotCRP NEWS * Some other bug fixes. -## Version 2.53 - 26.Dec.2012 +## Version 2.53 – 26.Dec.2012 * Support sending mail to PC members about their new review assignments. @@ -751,14 +770,14 @@ HotCRP NEWS Petros Maniatis, Jeff Mogul, Antoine Picard, and Anthony Riley. -## Version 2.52 - 23.Jul.2012 +## Version 2.52 – 23.Jul.2012 * Allow chairs to change all PC conflicts on papers' Edit screens. * Other bug fixes and improvements. -## Version 2.51 - 22.Jun.2012 +## Version 2.51 – 22.Jun.2012 * Fix bug with setting tags on per-paper pages (caused by cross-site request forgery protection). @@ -766,7 +785,7 @@ HotCRP NEWS * Other fixes and improvements. -## Version 2.50 - 10.May.2012 +## Version 2.50 – 10.May.2012 * Fix database error on response submissions (a problem since v2.48). Problem reported by Robby Findler. @@ -778,7 +797,7 @@ HotCRP NEWS * Thanks to Dan Tsafrir, Wilson Hsieh, Giuliano Casale, and Geoff Voelker. -## Version 2.49 - 29.Mar.2012 +## Version 2.49 – 29.Mar.2012 * Add update notification. Chairs' browsers contact an updates server, hotcrp.lcdf.org/updates, to check whether the HotCRP installation should @@ -786,7 +805,7 @@ HotCRP NEWS with version information, set `$Opt["updatesSite"] = false`. -## Version 2.48 - 28.Mar.2012 +## Version 2.48 – 28.Mar.2012 * Correct major information exposure with author-view capabilities. Author-view capability URLs, when entered by users not otherwise logged @@ -804,7 +823,7 @@ HotCRP NEWS Jane-Ellen Long, and others. -## Version 2.47 - 14.Dec.2011 +## Version 2.47 – 14.Dec.2011 * Add author-view capabilities. These parameters, when appended to any HotCRP URL, grant the client the right to view a paper like an author. @@ -835,7 +854,7 @@ HotCRP NEWS Mogul, Clay Shepard, Gareth Gale, and Amit Sahai. -## Version 2.46 - 5.Aug.2011 +## Version 2.46 – 5.Aug.2011 * Support multiple final-version uploads. @@ -846,7 +865,7 @@ HotCRP NEWS * Other bug fixes. -## Version 2.45 - 24.Apr.2011 +## Version 2.45 – 24.Apr.2011 * New, improved visual appearance for paper pages. @@ -873,7 +892,7 @@ HotCRP NEWS Stamatogiannakis, and Michael Hicks. -## Version 2.44 - 8.Feb.2011 +## Version 2.44 – 8.Feb.2011 * Correct recent bugs: improve Ajax return values (which lacked "b" characters due to a quoting mishap); do not ask authors for responses @@ -886,14 +905,14 @@ HotCRP NEWS * Thanks especially to Jeff Mogul and John Byers. -## Version 2.43 - 3.Jan.2011 +## Version 2.43 – 3.Jan.2011 * Correct 2.41 bug that could cause SQL errors on the home page when users had many comments to view. Double ouch! Apologies to Tony Del Porto and Usenix. -## Version 2.42 - 2.Jan.2011 +## Version 2.42 – 2.Jan.2011 * Correct 2.41 bug that broke `ovemer:3` searches (ouch). @@ -903,7 +922,7 @@ HotCRP NEWS * Style nits (paragraph breaks in abstracts, reviewer icon alignment). -## Version 2.41 - 13.Dec.2010 +## Version 2.41 – 13.Dec.2010 * The "Recent activity" on the home page includes information about submitted reviews as well as submitted comments (frequent request, @@ -957,7 +976,7 @@ HotCRP NEWS Andersen. -## Version 2.40 - 30.Jul.2010 +## Version 2.40 – 30.Jul.2010 * Search expression improvements: Allow parenthesized expressions, `AND` keywords, and `THEN` searches. `THEN` is the lowest precedence operator. @@ -980,7 +999,7 @@ HotCRP NEWS Long, and Dana Randall. -## Version 2.39 - 20.May.2010 +## Version 2.39 – 20.May.2010 * PC member tags. Each PC member can be associated with a list of tags, which use the same format as paper tags. This list is only set by @@ -998,7 +1017,7 @@ HotCRP NEWS * Thanks especially to Jeff Mogul and Ian Goldberg. -## Version 2.38 - 27.Jan.2010 +## Version 2.38 – 27.Jan.2010 * Add "Recent comments" section to the home page for PC members. This lists recent viewable comments, newest comments first. @@ -1018,12 +1037,12 @@ HotCRP NEWS Tony Del Porto, Jane-Ellen Long, and Casey Henderson. -## Version 2.37 - 19.Dec.2009 +## Version 2.37 – 19.Dec.2009 * Bug-fix release. -## Version 2.36 - 17.Dec.2009 +## Version 2.36 – 17.Dec.2009 * Formulas @@ -1067,7 +1086,7 @@ HotCRP NEWS and John P. John. -## Version 2.35 - 7.Oct.2009 +## Version 2.35 – 7.Oct.2009 * Paper options: Support numeric values, text values, and PDF uploads. @@ -1099,7 +1118,7 @@ HotCRP NEWS addition to bug reports and feature requests. -## Version 2.34 - 21.Mar.2009 +## Version 2.34 – 21.Mar.2009 * Tag colors! After a Dan Wallach suggestion. Tag a paper "red" and it shows up as red in paper lists. Or instruct the system that "reject" @@ -1124,12 +1143,12 @@ HotCRP NEWS * Thanks to Stefan Lorenz and John Wilkes. -## Version 2.33 - 15.Feb.2009 +## Version 2.33 – 15.Feb.2009 * Re-fix "Don't assign (X) and (Y) to the same paper." -## Version 2.32 - 15.Feb.2009 +## Version 2.32 – 15.Feb.2009 * Add `au:pc` search, which returns papers whose contact authors contain at least one PC member. @@ -1143,7 +1162,7 @@ HotCRP NEWS * Thanks to John Wilkes, Jeff Mogul, Stefan Lorenz, and Benjamin Pierce. -## Version 2.31 - 26.Jan.2009 +## Version 2.31 – 26.Jan.2009 * Administrators can delete users. @@ -1155,7 +1174,7 @@ HotCRP NEWS Slightly better support for browsers without Javascript. -## Version 2.30 - 7.Jan.2009 +## Version 2.30 – 7.Jan.2009 * Add chair-only tags: double-twiddle tags, like `~~tag`, are only visible to and changeable by chairs and administrators. Andrew Myers idea. @@ -1167,18 +1186,18 @@ HotCRP NEWS `$Opt["noPapers"]` (C. Craig Ross). -## Version 2.29 - 1.Jan.2009 +## Version 2.29 – 1.Jan.2009 * Bug fix release. Fixes bugs in tag search and tag setting, some reported by John Wilkes. -## Version 2.28 - 20.Dec.2008 +## Version 2.28 – 20.Dec.2008 * Allow periods in email addresses (Jeff Mogul). -## Version 2.27 - 16.Dec.2008 +## Version 2.27 – 16.Dec.2008 * Search results: Add tons of Display options, load them all by Ajax, and chairs gain a "Make these options the default" link. @@ -1200,7 +1219,7 @@ HotCRP NEWS Gebhart, Paolo Faraboschi, John Wilkes, Dina Papagiannaki, and others. -## Version 2.26 - 27.Oct.2008 +## Version 2.26 – 27.Oct.2008 * Submitters can be forced to define what type of conflict a PC member has. Requested by Dina Papagiannaki. @@ -1225,7 +1244,7 @@ HotCRP NEWS * Many help and usability improvements inspired by Benjamin Pierce requests. -## Version 2.25 - 22.Sep.2008 +## Version 2.25 – 22.Sep.2008 * Many bug fixes for new-style paper views. @@ -1260,7 +1279,7 @@ HotCRP NEWS * Thanks also to Benjamin Pierce, Richard Gass, Michael Vrable, and others. -## Version 2.24 - 22.Aug.2008 +## Version 2.24 – 22.Aug.2008 * Major changes @@ -1380,7 +1399,7 @@ HotCRP NEWS * Special thanks to Robbert van Renesse. -## Version 2.23 - 22.Jul.2008 +## Version 2.23 – 22.Jul.2008 * Do not infinite loop when sending mail to non-ASCII names associated with long email addresses. Reported by Robbert van Renesse and Rich Draves. @@ -1392,7 +1411,7 @@ HotCRP NEWS Jeonghee Shin. -## Version 2.22 - 15.Jul.2008 +## Version 2.22 – 15.Jul.2008 * Appearance fixes: use default controls in most cases. @@ -1410,12 +1429,12 @@ HotCRP NEWS * Improve some messages and help text. -## Version 2.21 - 11.May.2008 +## Version 2.21 – 11.May.2008 * Further improve validation and Internet Explorer 6 compatibility. -## Version 2.20 - 11.May.2008 +## Version 2.20 – 11.May.2008 * Improve Internet Explorer 6 compatibility. Reported by Terence Kelly. Includes Drew McLellan's supersleight for transparent PNG support @@ -1430,7 +1449,7 @@ HotCRP NEWS * Bug fixes to preference list, English, and createdb script. -## Version 2.19 - 6.May.2008 +## Version 2.19 – 6.May.2008 * Provide visible feedback on Ajax forms. @@ -1438,7 +1457,7 @@ HotCRP NEWS Isaacs). -## Version 2.18 - 5.May.2008 +## Version 2.18 – 5.May.2008 * Record PC feedback about whether reviews were helpful. PC members and, optionally, external reviewers can rate one another's reviews. Hopefully @@ -1465,7 +1484,7 @@ HotCRP NEWS reviews (Stefan Savage). -## Version 2.17 - 23.Apr.2008 +## Version 2.17 – 23.Apr.2008 * IMPORTANT: Continue reviewer identity leak fix via search rewrite. @@ -1481,7 +1500,7 @@ HotCRP NEWS than "0/1"). -## Version 2.16 - 21.Apr.2008 +## Version 2.16 – 21.Apr.2008 * IMPORTANT: Reviewer identity leak fix. @@ -1489,7 +1508,7 @@ HotCRP NEWS John Wilkes). -## Version 2.15 - 9.Apr.2008 +## Version 2.15 – 9.Apr.2008 * Improve homepage with a right-hand sidebar. @@ -1520,7 +1539,7 @@ HotCRP NEWS * Bug fix: Searching for `cre:>0`, etc. works. -## Version 2.14 - 12.Mar.2008 +## Version 2.14 – 12.Mar.2008 * Review field options can take lettered values, such as A-D or X-Z, as well as numeric values. @@ -1550,7 +1569,7 @@ HotCRP NEWS * Thanks to Michael Vrable, Stefan Savage, and Scott Rose. -## Version 2.13 - 22.Jan.2008 +## Version 2.13 – 22.Jan.2008 * Add support for paper format checking with Geoff Voelker's banal script. Thanks to Geoff for the script and debugging support, and to Harald @@ -1575,7 +1594,7 @@ HotCRP NEWS * Thanks also to Matthew Frank, Joseph Tucek, and Bernhard Ager. -## Version 2.12 - 30.Dec.2007 +## Version 2.12 – 30.Dec.2007 * Introduce "twiddle tags", such as `~tag`, which are visible only to the PC members that created them. Based on a request from Matthew Frank. @@ -1602,7 +1621,7 @@ HotCRP NEWS Birman, and Jon Crowcroft. -## Version 2.11 - 27.Oct.2007 +## Version 2.11 – 27.Oct.2007 * Mail tool allows sending mail to contact authors or reviewers for selected papers. @@ -1614,7 +1633,7 @@ HotCRP NEWS paper downloads when submissions are closed (bug report from V. Arun). -## Version 2.10 - 24.Oct.2007 +## Version 2.10 – 24.Oct.2007 * Add some support for MIME extensions; message bodies are marked UTF-8, and message headers containing UTF-8 characters are quoted according to @@ -1624,7 +1643,7 @@ HotCRP NEWS unrequested reviews, and other things. -## Version 2.9 - 20.Oct.2007 +## Version 2.9 – 20.Oct.2007 * Add a setting allowing PC members to see tags even for conflicted papers. @@ -1637,7 +1656,7 @@ HotCRP NEWS * Setting description improvements. -## Version 2.8 - 11.Oct.2007 +## Version 2.8 – 11.Oct.2007 * Bug fix: Do not reveal authors' identities via responses. @@ -1658,7 +1677,7 @@ HotCRP NEWS * Other behavior improvements. -## Version 2.7 - 23.Aug.2007 +## Version 2.7 – 23.Aug.2007 * Email notification for comments. Authors, reviewers, and PC members can request email notification when comments are added to a paper they are @@ -1683,7 +1702,7 @@ HotCRP NEWS bugs. -## Version 2.6 - 20.Aug.2007 +## Version 2.6 – 20.Aug.2007 * New way to collect author information. Author information is entered using separate text fields for Name, Email, and Affiliation. If a user's @@ -1698,12 +1717,12 @@ HotCRP NEWS * Style changes, especially on settings pages. -## Version 2.5 - 12.Aug.2007 +## Version 2.5 – 12.Aug.2007 * Optionally collect users' addresses and phone numbers. -## Version 2.4 - 12.Aug.2007 +## Version 2.4 – 12.Aug.2007 * Allow setting an info message that appears on the homepage. @@ -1715,7 +1734,7 @@ HotCRP NEWS * Style changes. -## Version 2.3 - 16.Jul.2007 +## Version 2.3 – 16.Jul.2007 * New action log display includes search. @@ -1724,19 +1743,19 @@ HotCRP NEWS * Other fixes. -## Version 2.2 - 11.Jul.2007 +## Version 2.2 – 11.Jul.2007 * Download a text file with reviewer names and emails (Frans). * Better offline reviewing. -## Version 2.1 - 10.Jul.2007 +## Version 2.1 – 10.Jul.2007 * IE compatibility. -## Version 2.0 - 9.Jul.2007 +## Version 2.0 – 9.Jul.2007 * New mail system. @@ -1752,7 +1771,7 @@ HotCRP NEWS * Thanks to Akos Ledeczi. -## Version 2.0b9 - 16.Jun.2007 +## Version 2.0b9 – 16.Jun.2007 * More Ajax. @@ -1778,7 +1797,7 @@ HotCRP NEWS * Thanks to Bernhard Ager, Frans Kaashoek, and Fernando Pereira. -## Version 2.0b8 - 11.Mar.2007 +## Version 2.0b8 – 11.Mar.2007 * Fix policy leak: Do not reveal reviewer identities if reviews are always anonymous! @@ -1788,7 +1807,7 @@ HotCRP NEWS * Thanks to Jeff Chase. -## Version 2.0b7 - 3.Mar.2007 +## Version 2.0b7 – 3.Mar.2007 * Fix policy leak: When sending email, include only information the recipient can see. @@ -1809,7 +1828,7 @@ HotCRP NEWS * Thanks to Bernhard Ager, Jeff Chase, Frans Kaashoek, and Andrew Myers. -## Version 2.0b6 - 1.Feb.2007 +## Version 2.0b6 – 1.Feb.2007 * Fix policy leak: PC members cannot see PC-only fields on review forms for their authored papers. @@ -1820,7 +1839,7 @@ HotCRP NEWS * Other fixes. -## Version 2.0b5 - 27.Jan.2007 +## Version 2.0b5 – 27.Jan.2007 * Improve tags and help. @@ -1831,7 +1850,7 @@ HotCRP NEWS * Other fixes. -## Version 2.0b4 - 13.Jan.2007 +## Version 2.0b4 – 13.Jan.2007 * Add automatic assignments. @@ -1848,7 +1867,7 @@ HotCRP NEWS * Other fixes. -## Version 2.0b3 - 10.Dec.2006 +## Version 2.0b3 – 10.Dec.2006 * Move to Conference Settings pages from deadline settings. @@ -1861,12 +1880,12 @@ HotCRP NEWS * Other fixes. -## Version 2.0b2 - 1.Dec.2006 +## Version 2.0b2 – 1.Dec.2006 * Internal updates. -## Version 2.0b1 - 28.Nov.2006 +## Version 2.0b1 – 28.Nov.2006 * Initial release. diff --git a/batch/makedist.sh b/batch/makedist.sh index 2413a4cb1..f76ea5d6f 100755 --- a/batch/makedist.sh +++ b/batch/makedist.sh @@ -1,4 +1,4 @@ -export VERSION=3.0b3 +export VERSION=3.0.0 # check that schema.sql and updateschema.php agree on schema version updatenum=`grep 'settings.*allowPaperOption.*=\|update_schema_version' src/updateschema.php | tail -n 1 | sed 's/.*= *//;s/.*[(] *//;s/[;)].*//'` @@ -155,6 +155,7 @@ lib/hashanalysis.php lib/hclcolor.php lib/ht.php lib/icons.php +lib/isovideomimetype.php lib/json.php lib/jsonexception.php lib/jsonparser.php @@ -198,6 +199,7 @@ src/api/api_events.php src/api/api_follow.php src/api/api_formatcheck.php src/api/api_graphdata.php +src/api/api_job.php src/api/api_mail.php src/api/api_paper.php src/api/api_paperpc.php @@ -240,6 +242,7 @@ src/backuppattern.php src/banal src/capabilities/cap_authorview.php src/capabilities/cap_bearer.php +src/capabilities/cap_job.php src/capabilities/cap_reviewaccept.php src/checkformat.php src/commentinfo.php @@ -287,6 +290,7 @@ src/formulas/f_topic.php src/formulas/f_topicscore.php src/help/h_bulkassign.php src/help/h_chairsguide.php +src/help/h_developer.php src/help/h_formulas.php src/help/h_jsonsettings.php src/help/h_keywords.php @@ -572,12 +576,12 @@ images/view48.png images/viewas.png scripts/.htaccess -scripts/d3-hotcrp.min.js scripts/buzzer.js +scripts/d3-hotcrp.min.js scripts/emojicodes.json scripts/graph.js scripts/jquery-1.12.4.min.js -scripts/jquery-3.6.4.min.js +scripts/jquery-3.7.1.min.js scripts/script.js scripts/settings.js diff --git a/devel/manual/index.md b/devel/manual/index.md index 2e293f467..337ac7e18 100644 --- a/devel/manual/index.md +++ b/devel/manual/index.md @@ -17,3 +17,4 @@ configuring features inaccessible through the public settings UI. ## Notes * [CSS notes](./css.md) +* [Sessions](./sessions.md) diff --git a/devel/manual/oauth.md b/devel/manual/oauth.md index 4e3ca4cf7..fd21dcb9b 100644 --- a/devel/manual/oauth.md +++ b/devel/manual/oauth.md @@ -5,7 +5,7 @@ Configure HotCRP’s `$Opt["oAuthProviders"]` setting in `conf/options.php` to u ## `oAuthProviders` format -The `oAuthProviders` option is a list of [components][] defining supported OAuth +The `oAuthProviders` option is a [component list][components] of OAuth authentication providers. Each `oAuthProviders` component should define: * `name`: The name of the provider. Each provider must have a distinct name. diff --git a/scripts/d3-hotcrp.min.js b/scripts/d3-hotcrp.min.js index b880c1054..50435d2f4 100644 --- a/scripts/d3-hotcrp.min.js +++ b/scripts/d3-hotcrp.min.js @@ -1 +1 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function u(t){var n=r(t);return(n.local?o:i)(n)}function a(){}function c(t){return null==t?a:function(){return this.querySelector(t)}}function l(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function s(){return[]}function f(t){return null==t?s:function(){return this.querySelectorAll(t)}}function h(t){return function(){return this.matches(t)}}function g(t){return function(n){return n.matches(t)}}var p=Array.prototype.find;function d(){return this.firstElementChild}var y=Array.prototype.filter;function m(){return Array.from(this.children)}function v(t){return new Array(t.length)}function w(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function x(t,n,e,r,i,o){for(var u,a=0,c=n.length,l=o.length;an?1:t>=n?0:NaN}function N(t){return function(){this.removeAttribute(t)}}function T(t){return function(){this.removeAttributeNS(t.space,t.local)}}function k(t,n){return function(){this.setAttribute(t,n)}}function C(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function $(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function S(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function D(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function E(t,n,e){return function(){this.style.setProperty(t,n,e)}}function F(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function q(t,n){return t.style.getPropertyValue(n)||D(t).getComputedStyle(t,null).getPropertyValue(n)}function H(t){return function(){delete this[t]}}function L(t,n){return function(){this[t]=n}}function Y(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function R(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new I(t)}function I(t){this._node=t,this._names=R(t.getAttribute("class")||"")}function j(t,n){for(var e=O(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var st=[null];function ft(t,n){this._groups=t,this._parents=n}function ht(){return new ft([[document.documentElement]],st)}function gt(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],st)}ft.prototype=ht.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=A&&(A=w+1);!(v=y[A])&&++A=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=A);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?U:"function"==typeof n?F:E)(t,n,null==e?"":e)):q(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?H:"function"==typeof n?Y:L)(t,n)):this.node()[t]},classed:function(t,n){var e=R(t+"");if(arguments.length<2){for(var r=O(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ut:ot,r=0;r+t(n)}function Ct(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function $t(){return!this.__axis}function St(t,n){var e=[],r=null,i=null,o=6,u=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=t===xt||t===bt?-1:1,s=t===bt||t===_t?"x":"y",f=t===xt||t===Mt?Nt:Tt;function h(h){var g=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):wt:i,d=Math.max(o,0)+a,y=n.range(),m=+y[0]+c,v=+y[y.length-1]+c,w=(n.bandwidth?Ct:kt)(n.copy(),c),x=h.selection?h.selection():h,_=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(g,n).order(),b=M.exit(),A=M.enter().append("g").attr("class","tick"),N=M.select("line"),T=M.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(A),N=N.merge(A.append("line").attr("stroke","currentColor").attr(s+"2",l*o)),T=T.merge(A.append("text").attr("fill","currentColor").attr(s,l*d).attr("dy",t===xt?"0em":t===Mt?"0.71em":"0.32em")),h!==x&&(_=_.transition(h),M=M.transition(h),N=N.transition(h),T=T.transition(h),b=b.transition(h).attr("opacity",At).attr("transform",(function(t){return isFinite(t=w(t))?f(t+c):this.getAttribute("transform")})),A.attr("opacity",At).attr("transform",(function(t){var n=this.parentNode.__axis;return f((n&&isFinite(n=n(t))?n:w(t))+c)}))),b.remove(),_.attr("d",t===bt||t===_t?u?"M"+l*u+","+m+"H"+c+"V"+v+"H"+l*u:"M"+c+","+m+"V"+v:u?"M"+m+","+l*u+"V"+c+"H"+v+"V"+l*u:"M"+m+","+c+"H"+v),M.attr("opacity",1).attr("transform",(function(t){return f(w(t)+c)})),N.attr(s+"2",l*o),T.attr(s,l*d).text(p),x.filter($t).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_t?"start":t===bt?"end":"middle"),x.each((function(){this.__axis=w}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=u=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(u=+t,h):u},h.tickPadding=function(t){return arguments.length?(a=+t,h):a},h.offset=function(t){return arguments.length?(c=+t,h):c},h}function Dt(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,c,l,s,f,h,g=t._root,p={data:r},d=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!g)return t._root=p,t;for(;g.length;)if((l=n>=(o=(d+m)/2))?d=o:m=o,(s=e>=(u=(y+v)/2))?y=u:v=u,i=g,!(g=g[f=s<<1|l]))return i[f]=p,t;if(a=+t._x.call(null,g.data),c=+t._y.call(null,g.data),n===a&&e===c)return p.next=g,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=n>=(o=(d+m)/2))?d=o:m=o,(s=e>=(u=(y+v)/2))?y=u:v=u}while((f=s<<1|l)==(h=(c>=u)<<1|a>=o));return i[h]=g,i[f]=p,t}function Ut(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Et(t){return t[0]}function Ft(t){return t[1]}function qt(t,n,e){var r=new Ht(null==n?Et:n,null==e?Ft:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ht(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Lt(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Yt=qt.prototype=Ht.prototype;function Rt(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function Ot(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function It(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<0?i=n+1:o=n}while(iRt(t(n),e),r=(n,e)=>t(n)-e):(n=t===Rt||t===Ot?t:jt,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const u=i(t,n,e,o-1);return u>e&&r(t[u-1],n)>-r(t[u],n)?u-1:u},right:function(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<=0?i=n+1:o=n}while(i=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}Yt.copy=function(){var t,n,e=new Ht(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Lt(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Lt(n));return e},Yt.add=function(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return Dt(this.cover(n,e),n,e,t)},Yt.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,l=1/0,s=-1/0,f=-1/0;for(e=0;es&&(s=r),if&&(f=i));if(c>s||l>f)return this;for(this.cover(c,l).cover(s,f),e=0;et||t>=i||r>n||n>=o;)switch(a=(nh||(o=c.y0)>g||(u=c.x1)=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,d.data),w=n-+this._y.call(null,d.data),x=v*v+w*w;if(x=(a=(p+y)/2))?p=a:y=a,(s=u>=(c=(d+m)/2))?d=c:m=c,n=g,!(g=g[f=s<<1|l]))return this;if(!g.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;g.data!==t;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(g=n[0]||n[1]||n[2]||n[3])&&g===(n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[h]=g:this._root=g),this):(this._root=i,this)},Yt.removeAll=function(t){for(var n=0,e=t.length;n{n(t,e,(r<<=2)+0,(i<<=2)+0,o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function Jt(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:u}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((u=Math.floor(void 0!==u?u:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!u||!e&&!r)return n;const a=e&&t(e),c=r&&t(r),l=i.slice();return a&&c?(Kt(a,l,i,o,u),Kt(a,i,l,o,u),Kt(a,l,i,o,u),tn(c,i,l,o,u),tn(c,l,i,o,u),tn(c,i,l,o,u)):a?(Kt(a,i,l,o,u),Kt(a,l,i,o,u),Kt(a,i,l,o,u)):c&&(tn(c,i,l,o,u),tn(c,l,i,o,u),tn(c,i,l,o,u)),n}}function Kt(t,n,e,r,i){for(let o=0,u=r*i;o{if(!((o-=u)>=i))return;let a=t*r[i];const c=u*t;for(let t=i,n=i+c;t{if(!((u-=a)>=o))return;let c=n*i[o];const l=a*n,s=l+a;for(let t=o,n=o+l;t=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function rn(t){return 0|t.length}function on(t){return!(t>0)}function un(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function an(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let u=-1;for(let a of t)null!=(a=n(a,++u,t))&&(a=+a)>=a&&(e=a-i,i+=e/++r,o+=e*(a-i))}if(r>1)return o/(r-1)}function cn(t,n){const e=an(t,n);return e?Math.sqrt(e):e}function ln(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r=o&&(e=r=o):(e>o&&(e=o),r0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=pn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(fn(this,t))}has(t){return super.has(fn(this,t))}set(t,n){return super.set(hn(this,t),n)}delete(t){return super.delete(gn(this,t))}}class InternSet extends Set{constructor(t,n=pn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(fn(this,t))}add(t){return super.add(hn(this,t))}delete(t){return super.delete(gn(this,t))}}function fn({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function hn({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function gn({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function pn(t){return null!==t&&"object"==typeof t?t.valueOf():t}function dn(t){return t}function yn(t,...n){return Mn(t,dn,dn,n)}function mn(t,...n){return Mn(t,Array.from,dn,n)}function vn(t,n){for(let e=1,r=n.length;et.pop().map((([n,e])=>[...t,n,e]))));return t}function wn(t,n,...e){return Mn(t,dn,n,e)}function xn(t,n,...e){return Mn(t,Array.from,n,e)}function _n(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function Mn(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const u=new InternMap,a=r[o++];let c=-1;for(const t of i){const n=a(t,++c,i),e=u.get(n);e?e.push(t):u.set(n,[t])}for(const[n,e]of u)u.set(n,t(e,o));return n(u)}(t,0)}function bn(t,n){return Array.from(n,(n=>t[n]))}function An(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=Tn(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>Tn(e[t],e[n])))),bn(t,r)}return t.sort(Nn(e))}function Nn(t=Rt){if(t===Rt)return Tn;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function Tn(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}var kn=Array.prototype.slice;function Cn(t){return()=>t}const $n=Math.sqrt(50),Sn=Math.sqrt(10),Dn=Math.sqrt(2);function Un(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),u=o>=$n?10:o>=Sn?5:o>=Dn?2:1;let a,c,l;return i<0?(l=Math.pow(10,-i)/u,a=Math.round(t*l),c=Math.round(n*l),a/ln&&--c,l=-l):(l=Math.pow(10,i)*u,a=Math.round(t/l),c=Math.round(n/l),a*ln&&--c),c0))return[];if((t=+t)===(n=+n))return[t];const r=n=i))return[];const a=o-i+1,c=new Array(a);if(r)if(u<0)for(let t=0;t0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function Ln(t){return Math.max(1,Math.ceil(Math.log(en(t))/Math.LN2)+1)}function Yn(){var t=dn,n=ln,e=Ln;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,u,a=r.length,c=new Array(a);for(i=0;i=f)if(t>=f&&n===ln){const t=Fn(s,f,e);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else h.pop()}for(var g=h.length,p=0,d=g;h[p]<=s;)++p;for(;h[d-1]>f;)--d;(p||d0?h[i-1]:s,y.x1=i0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function On(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e=o)&&(e=o,r=i);return r}function In(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function jn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function Pn(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=void 0===i?Tn:Nn(i);r>e;){if(r-e>600){const o=r-e+1,u=n-e+1,a=Math.log(o),c=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*c*(o-c)/o)*(u-o/2<0?-1:1);Pn(t,n,Math.max(e,Math.floor(n-u*c/o+l)),Math.min(r,Math.floor(n+(o-u)*c/o+l)),i)}const o=t[n];let u=e,a=r;for(Vn(t,e,n),i(t[r],o)>0&&Vn(t,e,r);u0;)--a}0===i(t[e],o)?Vn(t,e,a):(++a,Vn(t,a,r)),a<=n&&(e=a+1),n<=a&&(r=a-1)}return t}function Vn(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function zn(t,n=Rt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?Rt(t,i)>0:0===Rt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)>0:0===n(i,i))&&(e=i,r=!0);return e}function Bn(t,n,e){if((r=(t=Float64Array.from(Vt(t,e))).length)&&!isNaN(n=+n)){if(n<=0||r<2)return In(t);if(n>=1)return Rn(t);var r,i=(r-1)*n,o=Math.floor(i),u=Rn(Pn(t,o).subarray(0,o+1));return u+(In(t.subarray(o+1))-u)*(i-o)}}function Zn(t,n,e=Pt){if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}}function Xn(t,n,e){if((r=(t=Float64Array.from(Vt(t,e))).length)&&!isNaN(n=+n)){if(n<=0||r<2)return jn(t);if(n>=1)return On(t);var r,i=Math.floor((r-1)*n),o=Pn(Uint32Array.from(t,((t,n)=>n)),i,0,r-1,((n,e)=>Tn(t[n],t[e])));return zn(o.subarray(0,i+1),(n=>t[n]))}}function Qn(t,n){return[t,n]}function Wn(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?De(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?De(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=xe.exec(t))?new Ee(n[1],n[2],n[3],1):(n=_e.exec(t))?new Ee(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Me.exec(t))?De(n[1],n[2],n[3],n[4]):(n=be.exec(t))?De(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Ae.exec(t))?Re(n[1],n[2]/100,n[3]/100,1):(n=Ne.exec(t))?Re(n[1],n[2]/100,n[3]/100,n[4]):Te.hasOwnProperty(t)?Se(Te[t]):"transparent"===t?new Ee(NaN,NaN,NaN,0):null}function Se(t){return new Ee(t>>16&255,t>>8&255,255&t,1)}function De(t,n,e,r){return r<=0&&(t=n=e=NaN),new Ee(t,n,e,r)}function Ue(t,n,e,r){return 1===arguments.length?((i=t)instanceof ge||(i=$e(i)),i?new Ee((i=i.rgb()).r,i.g,i.b,i.opacity):new Ee):new Ee(t,n,e,null==r?1:r);var i}function Ee(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Fe(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}`}function qe(){const t=He(this.opacity);return`${1===t?"rgb(":"rgba("}${Le(this.r)}, ${Le(this.g)}, ${Le(this.b)}${1===t?")":`, ${t})`}`}function He(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Le(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ye(t){return((t=Le(t))<16?"0":"")+t.toString(16)}function Re(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ie(t,n,e,r)}function Oe(t){if(t instanceof Ie)return new Ie(t.h,t.s,t.l,t.opacity);if(t instanceof ge||(t=$e(t)),!t)return new Ie;if(t instanceof Ie)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new Ie(u,a,c,t.opacity)}function Ie(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function je(t){return(t=(t||0)%360)<0?t+360:t}function Pe(t){return Math.max(0,Math.min(1,t||0))}function Ve(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}fe(ge,$e,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ke,formatHex:ke,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Oe(this).formatHsl()},formatRgb:Ce,toString:Ce}),fe(Ee,Ue,he(ge,{brighter(t){return t=null==t?de:Math.pow(de,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?pe:Math.pow(pe,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ee(Le(this.r),Le(this.g),Le(this.b),He(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:Fe,formatHex:Fe,formatHex8:function(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}${Ye(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:qe,toString:qe})),fe(Ie,(function(t,n,e,r){return 1===arguments.length?Oe(t):new Ie(t,n,e,null==r?1:r)}),he(ge,{brighter(t){return t=null==t?de:Math.pow(de,t),new Ie(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?pe:Math.pow(pe,t),new Ie(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Ee(Ve(t>=240?t-240:t+120,i,r),Ve(t,i,r),Ve(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ie(je(this.h),Pe(this.s),Pe(this.l),He(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 t=He(this.opacity);return`${1===t?"hsl(":"hsla("}${je(this.h)}, ${100*Pe(this.s)}%, ${100*Pe(this.l)}%${1===t?")":`, ${t})`}`}}));var ze=t=>()=>t;function Be(t){return 1==(t=+t)?Ze:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ze(isNaN(n)?e:n)}}function Ze(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):ze(isNaN(t)?n:t)}var Xe=function t(n){var e=Be(n);function r(t,n){var r=e((t=Ue(t)).r,(n=Ue(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Ze(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function Qe(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:Je(e,r)})),o=nr.lastIndex;return on&&(e=t,t=n,n=e),l=function(e){return Math.max(t,Math.min(n,e))}),r=c>2?fr:sr,i=o=null,f}function f(n){return null==n||isNaN(n=+n)?e:(i||(i=r(u.map(t),a,c)))(t(l(n)))}return f.invert=function(e){return l(n((o||(o=r(a,u.map(t),Je)))(e)))},f.domain=function(t){return arguments.length?(u=Array.from(t,ur),s()):u.slice()},f.range=function(t){return arguments.length?(a=Array.from(t),s()):a.slice()},f.rangeRound=function(t){return a=Array.from(t),c=ir,s()},f.clamp=function(t){return arguments.length?(l=!!t||cr,s()):l!==cr},f.interpolate=function(t){return arguments.length?(c=t,s()):c},f.unknown=function(t){return arguments.length?(e=t,f):e},function(e,r){return t=e,n=r,s()}}function pr(){return gr()(cr,cr)}function dr(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function yr(t){return(t=dr(Math.abs(t)))?t[1]:NaN}var mr,vr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wr(t){if(!(n=vr.exec(t)))throw new Error("invalid format: "+t);var n;return new xr({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function xr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _r(t,n){var e=dr(t,n);if(!e)return t+"";var r=e[0],i=e[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")}wr.prototype=xr.prototype,xr.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};var Mr={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>_r(100*t,n),r:_r,s:function(t,n){var e=dr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(mr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+dr(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function br(t){return t}var Ar,Nr,Tr,kr=Array.prototype.map,Cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $r(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?br:(n=kr.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?br:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(kr.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=wr(t)).fill,e=t.align,f=t.sign,h=t.symbol,g=t.zero,p=t.width,d=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(d=!0,v="g"):Mr[v]||(void 0===y&&(y=12),m=!0,v="g"),(g||"0"===n&&"="===e)&&(g=!0,n="0",e="=");var w="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?c:"",_=Mr[v],M=/[defgprs%]/.test(v);function b(t){var i,o,c,h=w,b=x;if("c"===v)b=_(t)+b,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:_(Math.abs(t),y),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),A&&0==+t&&"+"!==f&&(A=!1),h=(A?"("===f?f:l:"-"===f||"("===f?"":f)+h,b=("s"===v?Cr[8+mr/3]:"")+b+(A&&"("===f?")":""),M)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){b=(46===c?u+t.slice(i+1):t.slice(i))+b,t=t.slice(0,i);break}}d&&!g&&(t=r(t,1/0));var N=h.length+t.length+b.length,T=N>1)+h+t+b+T.slice(N);break;default:t=T+h+t+b}return a(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),b.toString=function(){return t+""},b}return{format:f,formatPrefix:function(t,n){var e=f(((t=wr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(yr(n)/3))),i=Math.pow(10,-r),o=Cr[8+r/3];return function(t){return e(i*t)+o}}}}function Sr(t,n,e,r){var i,o=qn(t,n,e);switch((r=wr(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yr(n)/3)))-yr(Math.abs(t)))}(o,u))||(r.precision=i),Tr(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,yr(n)-yr(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-yr(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Nr(r)}function Dr(t){var n=t.domain;return t.ticks=function(t){var e=n();return En(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Sr(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),u=0,a=o.length-1,c=o[u],l=o[a],s=10;for(l0;){if((i=Fn(c,l,e))===r)return o[u]=c,o[a]=l,n(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 t},t}function Ur(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u-t(-n,e)}function Rr(t){const n=t(Er,Fr),e=n.domain;let r,i,o=10;function u(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),i=function(t){return 10===t?Lr:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),e()[0]<0?(r=Yr(r),i=Yr(i),t(qr,Hr)):t(Er,Fr),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(e(t),u()):e()},n.ticks=t=>{const n=e();let u=n[0],a=n[n.length-1];const c=a0){for(;f<=h;++f)for(l=1;la)break;p.push(s)}}else for(;f<=h;++f)for(l=o-1;l>=1;--l)if(s=f>0?l/i(-f):l*i(f),!(sa)break;p.push(s)}2*p.length{if(null==t&&(t=10),null==e&&(e=10===o?"s":","),"function"!=typeof e&&(o%1||null!=(e=wr(e)).precision||(e.trim=!0),e=Nr(e)),t===1/0)return e;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/i(Math.round(r(t)));return n*oe(Ur(e(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),n}function Or(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Ir(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function jr(t){var n=1,e=t(Or(n),Ir(n));return e.constant=function(e){return arguments.length?t(Or(n=+e),Ir(n)):n},Dr(e)}function Pr(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Vr(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function zr(t){return t<0?-t*t:t*t}function Br(t){var n=t(cr,cr),e=1;return n.exponent=function(n){return arguments.length?1===(e=+n)?t(cr,cr):.5===e?t(Vr,zr):t(Pr(e),Pr(1/e)):e},Dr(n)}function Zr(){var t=Br(gr());return t.copy=function(){return hr(t,Zr()).exponent(t.exponent())},oe.apply(t,arguments),t}function Xr(t){return Math.sign(t)*t*t}Ar=$r({thousands:",",grouping:[3],currency:["$",""]}),Nr=Ar.format,Tr=Ar.formatPrefix;const Qr=new Date,Wr=new Date;function Gr(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=n=>(t(n=new Date(+n)),n),i.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),i.round=t=>{const n=i(t),e=i.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),i.range=(e,r,o)=>{const u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e0))return u;let a;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(aGr((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})),e&&(i.count=(n,r)=>(Qr.setTime(+n),Wr.setTime(+r),t(Qr),t(Wr),Math.floor(e(Qr,Wr))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?n=>r(n)%t==0:n=>i.count(0,n)%t==0):i:null)),i}const Jr=Gr((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Jr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Gr((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):Jr:null),Jr.range;const Kr=1e3,ti=6e4,ni=36e5,ei=864e5,ri=6048e5,ii=2592e6,oi=31536e6,ui=Gr((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Kr)}),((t,n)=>(n-t)/Kr),(t=>t.getUTCSeconds()));ui.range;const ai=Gr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kr)}),((t,n)=>{t.setTime(+t+n*ti)}),((t,n)=>(n-t)/ti),(t=>t.getMinutes()));ai.range;const ci=Gr((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*ti)}),((t,n)=>(n-t)/ti),(t=>t.getUTCMinutes()));ci.range;const li=Gr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kr-t.getMinutes()*ti)}),((t,n)=>{t.setTime(+t+n*ni)}),((t,n)=>(n-t)/ni),(t=>t.getHours()));li.range;const si=Gr((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*ni)}),((t,n)=>(n-t)/ni),(t=>t.getUTCHours()));si.range;const fi=Gr((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ti)/ei),(t=>t.getDate()-1));fi.range;const hi=Gr((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ei),(t=>t.getUTCDate()-1));hi.range;const gi=Gr((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ei),(t=>Math.floor(t/ei)));function pi(t){return Gr((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ti)/ri))}gi.range;const di=pi(0),yi=pi(1),mi=pi(2),vi=pi(3),wi=pi(4),xi=pi(5),_i=pi(6);function Mi(t){return Gr((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/ri))}di.range,yi.range,mi.range,vi.range,wi.range,xi.range,_i.range;const bi=Mi(0),Ai=Mi(1),Ni=Mi(2),Ti=Mi(3),ki=Mi(4),Ci=Mi(5),$i=Mi(6);bi.range,Ai.range,Ni.range,Ti.range,ki.range,Ci.range,$i.range;const Si=Gr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Si.range;const Di=Gr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Di.range;const Ui=Gr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Ui.every=t=>isFinite(t=Math.floor(t))&&t>0?Gr((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null,Ui.range;const Ei=Gr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Fi(t,n,e,r,i,o){const u=[[ui,1,Kr],[ui,5,5e3],[ui,15,15e3],[ui,30,3e4],[o,1,ti],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,ni],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,ei],[r,2,1728e5],[e,1,ri],[n,1,ii],[n,3,7776e6],[t,1,oi]];function a(n,e,r){const i=Math.abs(e-n)/r,o=It((([,,t])=>t)).right(u,i);if(o===u.length)return t.every(qn(n/oi,e/oi,r));if(0===o)return Jr.every(Math.max(qn(n,e,r),1));const[a,c]=u[i/u[o-1][2]isFinite(t=Math.floor(t))&&t>0?Gr((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null,Ei.range;const[qi,Hi]=Fi(Ei,Di,bi,gi,si,ci),[Li,Yi]=Fi(Ui,Si,di,fi,li,ai);function Ri(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Oi(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ii(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var ji,Pi,Vi,zi={"-":"",_:" ",0:"0"},Bi=/^\s*\d+/,Zi=/^%/,Xi=/[\\^$*+?|[\]().{}]/g;function Qi(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),n])))}function Ki(t,n,e){var r=Bi.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function to(t,n,e){var r=Bi.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function no(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function eo(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function ro(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function io(t,n,e){var r=Bi.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function oo(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function uo(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function ao(t,n,e){var r=Bi.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function co(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function lo(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function so(t,n,e){var r=Bi.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function fo(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ho(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function go(t,n,e){var r=Bi.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function po(t,n,e){var r=Bi.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function yo(t,n,e){var r=Bi.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function mo(t,n,e){var r=Zi.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function vo(t,n,e){var r=Bi.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function wo(t,n,e){var r=Bi.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function xo(t,n){return Qi(t.getDate(),n,2)}function _o(t,n){return Qi(t.getHours(),n,2)}function Mo(t,n){return Qi(t.getHours()%12||12,n,2)}function bo(t,n){return Qi(1+fi.count(Ui(t),t),n,3)}function Ao(t,n){return Qi(t.getMilliseconds(),n,3)}function No(t,n){return Ao(t,n)+"000"}function To(t,n){return Qi(t.getMonth()+1,n,2)}function ko(t,n){return Qi(t.getMinutes(),n,2)}function Co(t,n){return Qi(t.getSeconds(),n,2)}function $o(t){var n=t.getDay();return 0===n?7:n}function So(t,n){return Qi(di.count(Ui(t)-1,t),n,2)}function Do(t){var n=t.getDay();return n>=4||0===n?wi(t):wi.ceil(t)}function Uo(t,n){return t=Do(t),Qi(wi.count(Ui(t),t)+(4===Ui(t).getDay()),n,2)}function Eo(t){return t.getDay()}function Fo(t,n){return Qi(yi.count(Ui(t)-1,t),n,2)}function qo(t,n){return Qi(t.getFullYear()%100,n,2)}function Ho(t,n){return Qi((t=Do(t)).getFullYear()%100,n,2)}function Lo(t,n){return Qi(t.getFullYear()%1e4,n,4)}function Yo(t,n){var e=t.getDay();return Qi((t=e>=4||0===e?wi(t):wi.ceil(t)).getFullYear()%1e4,n,4)}function Ro(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Qi(n/60|0,"0",2)+Qi(n%60,"0",2)}function Oo(t,n){return Qi(t.getUTCDate(),n,2)}function Io(t,n){return Qi(t.getUTCHours(),n,2)}function jo(t,n){return Qi(t.getUTCHours()%12||12,n,2)}function Po(t,n){return Qi(1+hi.count(Ei(t),t),n,3)}function Vo(t,n){return Qi(t.getUTCMilliseconds(),n,3)}function zo(t,n){return Vo(t,n)+"000"}function Bo(t,n){return Qi(t.getUTCMonth()+1,n,2)}function Zo(t,n){return Qi(t.getUTCMinutes(),n,2)}function Xo(t,n){return Qi(t.getUTCSeconds(),n,2)}function Qo(t){var n=t.getUTCDay();return 0===n?7:n}function Wo(t,n){return Qi(bi.count(Ei(t)-1,t),n,2)}function Go(t){var n=t.getUTCDay();return n>=4||0===n?ki(t):ki.ceil(t)}function Jo(t,n){return t=Go(t),Qi(ki.count(Ei(t),t)+(4===Ei(t).getUTCDay()),n,2)}function Ko(t){return t.getUTCDay()}function tu(t,n){return Qi(Ai.count(Ei(t)-1,t),n,2)}function nu(t,n){return Qi(t.getUTCFullYear()%100,n,2)}function eu(t,n){return Qi((t=Go(t)).getUTCFullYear()%100,n,2)}function ru(t,n){return Qi(t.getUTCFullYear()%1e4,n,4)}function iu(t,n){var e=t.getUTCDay();return Qi((t=e>=4||0===e?ki(t):ki.ceil(t)).getUTCFullYear()%1e4,n,4)}function ou(){return"+0000"}function uu(){return"%"}function au(t){return+t}function cu(t){return Math.floor(+t/1e3)}function lu(t){return new Date(t)}function su(t){return t instanceof Date?+t:+new Date(+t)}function fu(t,n,e,r,i,o,u,a,c,l){var s=pr(),f=s.invert,h=s.domain,g=l(".%L"),p=l(":%S"),d=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),v=l("%b %d"),w=l("%B"),x=l("%Y");function _(t){return(c(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:au,s:cu,S:Co,u:$o,U:So,V:Uo,w:Eo,W:Fo,x:null,X:null,y:qo,Y:Lo,Z:Ro,"%":uu},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Oo,e:Oo,f:zo,g:eu,G:iu,H:Io,I:jo,j:Po,L:Vo,m:Bo,M:Zo,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:au,s:cu,S:Xo,u:Qo,U:Wo,V:Jo,w:Ko,W:tu,x:null,X:null,y:nu,Y:ru,Z:ou,"%":uu},_={a:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=m.exec(n.slice(e));return r?(t.m=v.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:lo,e:lo,f:yo,g:oo,G:io,H:fo,I:fo,j:so,L:po,m:co,M:ho,p:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:ao,Q:vo,s:wo,S:go,u:to,U:no,V:eo,w:Ki,W:ro,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:oo,Y:io,Z:uo,"%":mo};function M(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,l=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Oi(Ii(o.y,0,1))).getUTCDay(),r=i>4||0===i?Ai.ceil(r):Ai(r),r=hi.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ri(Ii(o.y,0,1))).getDay(),r=i>4||0===i?yi.ceil(r):yi(r),r=fi.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?Oi(Ii(o.y,0,1)).getUTCDay():Ri(Ii(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,Oi(o)):Ri(o)}}function A(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=_[i in zi?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return w.x=M(e,w),w.X=M(r,w),w.c=M(n,w),x.x=M(e,x),x.X=M(r,x),x.c=M(n,x),{format:function(t){var n=M(t+="",w);return n.toString=function(){return t},n},parse:function(t){var n=b(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=b(t+="",!0);return n.toString=function(){return t},n}}}(t),Pi=ji.format,ji.parse,Vi=ji.utcFormat,ji.utcParse}({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"]});const vu=Math.abs,wu=Math.atan2,xu=Math.cos,_u=Math.max,Mu=Math.min,bu=Math.sin,Au=Math.sqrt,Nu=1e-12,Tu=Math.PI,ku=Tu/2,Cu=2*Tu;function $u(t){return t>=1?ku:t<=-1?-ku:Math.asin(t)}const Su=Math.PI,Du=2*Su,Uu=1e-6,Eu=Du-Uu;function Fu(t){this._+=t[0];for(let n=1,e=t.length;n=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Fu;const e=10**n;return function(t){this._+=t[0];for(let n=1,r=t.length;nUu)if(Math.abs(s*a-c*l)>Uu&&i){let h=e-o,g=r-u,p=a*a+c*c,d=h*h+g*g,y=Math.sqrt(p),m=Math.sqrt(f),v=i*Math.tan((Su-Math.acos((p+f-d)/(2*y*m)))/2),w=v/m,x=v/y;Math.abs(w-1)>Uu&&this._append`L${t+w*l},${n+w*s}`,this._append`A${i},${i},0,0,${+(s*h>l*g)},${this._x1=t+x*a},${this._y1=n+x*c}`}else this._append`L${this._x1=t},${this._y1=n}`;else;}arc(t,n,e,r,i,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let u=e*Math.cos(r),a=e*Math.sin(r),c=t+u,l=n+a,s=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Uu||Math.abs(this._y1-l)>Uu)&&this._append`L${c},${l}`,e&&(f<0&&(f=f%Du+Du),f>Eu?this._append`A${e},${e},0,1,${s},${t-u},${n-a}A${e},${e},0,1,${s},${this._x1=c},${this._y1=l}`:f>Uu&&this._append`A${e},${e},0,${+(f>=Su)},${s},${this._x1=t+e*Math.cos(i)},${this._y1=n+e*Math.sin(i)}`)}rect(t,n,e,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+r}h${-e}Z`}toString(){return this._}}function Hu(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new qu(n)}function Lu(t){return t.innerRadius}function Yu(t){return t.outerRadius}function Ru(t){return t.startAngle}function Ou(t){return t.endAngle}function Iu(t){return t&&t.padAngle}function ju(t,n,e,r,i,o,u){var a=t-e,c=n-r,l=(u?o:-o)/Au(a*a+c*c),s=l*c,f=-l*a,h=t+s,g=n+f,p=e+s,d=r+f,y=(h+p)/2,m=(g+d)/2,v=p-h,w=d-g,x=v*v+w*w,_=i-o,M=h*d-p*g,b=(w<0?-1:1)*Au(_u(0,_*_*x-M*M)),A=(M*w-v*b)/x,N=(-M*v-w*b)/x,T=(M*w+v*b)/x,k=(-M*v+w*b)/x,C=A-y,$=N-m,S=T-y,D=k-m;return C*C+$*$>S*S+D*D&&(A=T,N=k),{cx:A,cy:N,x01:-s,y01:-f,x11:A*(i/_-1),y11:N*(i/_-1)}}function Pu(t){this._context=t}function Vu(t){return new Pu(t)}function zu(t){return t[0]}function Bu(t){return t[1]}Pu.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},t.Adder=sn,t.InternMap=InternMap,t.InternSet=InternSet,t.arc=function(){var t=Lu,n=Yu,e=mu(0),r=null,i=Ru,o=Ou,u=Iu,a=null,c=Hu(l);function l(){var l,s,f=+t.apply(this,arguments),h=+n.apply(this,arguments),g=i.apply(this,arguments)-ku,p=o.apply(this,arguments)-ku,d=vu(p-g),y=p>g;if(a||(a=l=c()),hNu)if(d>Cu-Nu)a.moveTo(h*xu(g),h*bu(g)),a.arc(0,0,h,g,p,!y),f>Nu&&(a.moveTo(f*xu(p),f*bu(p)),a.arc(0,0,f,p,g,y));else{var m,v,w=g,x=p,_=g,M=p,b=d,A=d,N=u.apply(this,arguments)/2,T=N>Nu&&(r?+r.apply(this,arguments):Au(f*f+h*h)),k=Mu(vu(h-f)/2,+e.apply(this,arguments)),C=k,$=k;if(T>Nu){var S=$u(T/f*bu(N)),D=$u(T/h*bu(N));(b-=2*S)>Nu?(_+=S*=y?1:-1,M-=S):(b=0,_=M=(g+p)/2),(A-=2*D)>Nu?(w+=D*=y?1:-1,x-=D):(A=0,w=x=(g+p)/2)}var U=h*xu(w),E=h*bu(w),F=f*xu(M),q=f*bu(M);if(k>Nu){var H,L=h*xu(x),Y=h*bu(x),R=f*xu(_),O=f*bu(_);if(d1?0:t<-1?Tu:Math.acos(t)}((I*P+j*V)/(Au(I*I+j*j)*Au(P*P+V*V)))/2),B=Au(H[0]*H[0]+H[1]*H[1]);C=Mu(k,(f-B)/(z-1)),$=Mu(k,(h-B)/(z+1))}else C=$=0}A>Nu?$>Nu?(m=ju(R,O,U,E,h,$,y),v=ju(L,Y,F,q,h,$,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),$Nu&&b>Nu?C>Nu?(m=ju(F,q,L,Y,f,-C,y),v=ju(U,E,R,O,f,-C,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),C=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=nn(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t},t.blur2=Wt,t.blurImage=Gt,t.count=en,t.create=function(t){return gt(u(t).call(document.documentElement))},t.creator=u,t.cross=function(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(un)).map(rn),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(on))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let u=r;for(;++i[u]===e[u];){if(0===u)return n?o.map(n):o;i[u--]=0}}},t.cumsum=function(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)},t.descending=Ot,t.deviation=cn,t.difference=function(t,...n){t=new InternSet(t);for(const e of n)for(const n of e)t.delete(n);return t},t.disjoint=function(t,n){const e=n[Symbol.iterator](),r=new InternSet;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0},t.every=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0},t.extent=ln,t.fcumsum=function(t,n){const e=new sn;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))},t.filter=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e},t.flatGroup=function(t,...n){return vn(mn(t,...n),n)},t.flatRollup=function(t,n,...e){return vn(xn(t,n,...e),e)},t.fsum=function(t,n){const e=new sn;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e},t.greatest=zn,t.greatestIndex=function(t,n=Rt){if(1===n.length)return On(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)>0)&&(e=o,r=i);return r},t.group=yn,t.groupSort=function(t,n,e){return(2!==n.length?An(wn(t,n,e),(([t,n],[e,r])=>Rt(n,r)||Rt(t,e))):An(yn(t,e),(([t,e],[r,i])=>n(e,i)||Rt(t,r)))).map((([t])=>t))},t.groups=mn,t.histogram=Yn,t.index=function(t,...n){return Mn(t,dn,_n,n)},t.indexes=function(t,...n){return Mn(t,Array.from,_n,n)},t.intersection=function(t,...n){t=new InternSet(t),n=n.map(ee);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t},t.least=function(t,n=Rt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?Rt(t,i)<0:0===Rt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)<0:0===n(i,i))&&(e=i,r=!0);return e},t.leastIndex=Gn,t.line=function(t,n){var e=mu(!0),r=null,i=Vu,o=null,u=Hu(a);function a(a){var c,l,s,f=(a=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(a)).length,h=!1;for(null==r&&(o=i(s=u())),c=0;c<=f;++c)!(cn(e,r,t)))},t.matcher=h,t.max=Rn,t.maxIndex=On,t.mean=function(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e},t.median=function(t,n){return Bn(t,.5,n)},t.medianIndex=function(t,n){return Xn(t,.5,n)},t.merge=function(t){return Array.from(function*(t){for(const n of t)yield*n}(t))},t.min=In,t.minIndex=jn,t.mode=function(t,n){const e=new InternMap;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r},t.namespace=r,t.namespaces=e,t.nice=Hn,t.pairs=function(t,n=Qn){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e},t.permute=bn,t.pointer=vt,t.pointers=function(t,n){return t.target&&(t=mt(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>vt(t,n)))},t.quadtree=qt,t.quantile=Bn,t.quantileIndex=Xn,t.quantileSorted=Zn,t.quickselect=Pn,t.range=Wn,t.rank=function(t,n=Rt){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let e=Array.from(t);const r=new Float64Array(e.length);2!==n.length&&(e=e.map(n),n=Rt);const i=(t,r)=>n(e[t],e[r]);let o,u;return(t=Uint32Array.from(e,((t,n)=>n))).sort(n===Rt?(t,n)=>Tn(e[t],e[n]):Nn(i)),t.forEach(((t,n)=>{const e=i(t,void 0===o?t:o);e>=0?((void 0===o||e>0)&&(o=t,u=n),r[t]=u):r[t]=NaN})),r},t.reduce=function(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,u=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++u}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++u,t);return e},t.reverse=function(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()},t.rollup=wn,t.rollups=xn,t.scaleBand=le,t.scaleDiverging=function t(){var n=Dr(du()(cr));return n.copy=function(){return gu(n,t())},ue.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=Rr(du()).domain([.1,1,10]);return n.copy=function(){return gu(n,t()).base(n.base())},ue.apply(n,arguments)},t.scaleDivergingPow=yu,t.scaleDivergingSqrt=function(){return yu.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=jr(du());return n.copy=function(){return gu(n,t()).constant(n.constant())},ue.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return null==t||isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Array.from(t,ur),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Array.from(n,ur):[0,1],Dr(r)},t.scaleImplicit=ae,t.scaleLinear=function t(){var n=pr();return n.copy=function(){return hr(n,t())},oe.apply(n,arguments),Dr(n)},t.scaleLog=function t(){const n=Rr(gr()).domain([1,10]);return n.copy=()=>hr(n,t()).base(n.base()),oe.apply(n,arguments),n},t.scaleOrdinal=ce,t.scalePoint=function(){return se(le.apply(null,arguments).paddingInner(1))},t.scalePow=Zr,t.scaleQuantile=function t(){var n,e=[],r=[],i=[];function o(){var t=0,n=Math.max(1,r.length);for(i=new Array(n-1);++t0?i[n-1]:e[0],n=i?[o[i-1],r]:[o[n-1],o[n]]},a.unknown=function(t){return arguments.length?(n=t,a):a},a.thresholds=function(){return o.slice()},a.copy=function(){return t().domain([e,r]).range(u).unknown(n)},oe.apply(Dr(a),arguments)},t.scaleRadial=function t(){var n,e=pr(),r=[0,1],i=!1;function o(t){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(r)?n:i?Math.round(r):r}return o.invert=function(t){return e.invert(Xr(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((r=Array.from(t,ur)).map(Xr)),o):r.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(i=!!t,o):i},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),r).round(i).clamp(e.clamp()).unknown(n)},oe.apply(o,arguments),Dr(o)},t.scaleSequential=function t(){var n=Dr(hu()(cr));return n.copy=function(){return gu(n,t())},ue.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=Rr(hu()).domain([1,10]);return n.copy=function(){return gu(n,t()).base(n.base())},ue.apply(n,arguments)},t.scaleSequentialPow=pu,t.scaleSequentialQuantile=function t(){var n=[],e=cr;function r(t){if(null!=t&&!isNaN(t=+t))return e((Qt(n,t,1)-1)/(n.length-1))}return r.domain=function(t){if(!arguments.length)return n.slice();n=[];for(let e of t)null==e||isNaN(e=+e)||n.push(e);return n.sort(Rt),r},r.interpolator=function(t){return arguments.length?(e=t,r):e},r.range=function(){return n.map(((t,r)=>e(r/(n.length-1))))},r.quantiles=function(t){return Array.from({length:t+1},((e,r)=>Bn(n,r/t)))},r.copy=function(){return t(e).domain(n)},ue.apply(r,arguments)},t.scaleSequentialSqrt=function(){return pu.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=jr(hu());return n.copy=function(){return gu(n,t()).constant(n.constant())},ue.apply(n,arguments)},t.scaleSqrt=function(){return Zr.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=jr(gr());return n.copy=function(){return hr(n,t()).constant(n.constant())},oe.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],i=1;function o(t){return null!=t&&t<=t?r[Qt(e,t,0,i)]:n}return o.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),o):e.slice()},o.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t().domain(e).range(r).unknown(n)},oe.apply(o,arguments)},t.scaleTime=function(){return oe.apply(fu(Li,Yi,Ui,Si,di,fi,li,ai,ui,Pi).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return oe.apply(fu(qi,Hi,Ei,Di,bi,hi,si,ci,ui,Vi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,n){const e=Gn(t,n);return e<0?void 0:e},t.select=gt,t.selectAll=function(t){return"string"==typeof t?new ft([document.querySelectorAll(t)],[document.documentElement]):new ft([l(t)],st)},t.selection=ht,t.selector=c,t.selectorAll=f,t.shuffle=Jn,t.shuffler=Kn,t.some=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1},t.sort=An,t.style=q,t.subset=function(t,n){return re(n,t)},t.sum=function(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e},t.superset=re,t.thresholdFreedmanDiaconis=function(t,n,e){const r=en(t),i=Bn(t,.75)-Bn(t,.25);return r&&i?Math.ceil((e-n)/(2*i*Math.pow(r,-1/3))):1},t.thresholdScott=function(t,n,e){const r=en(t),i=cn(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1},t.thresholdSturges=Ln,t.tickFormat=Sr,t.tickIncrement=Fn,t.tickStep=qn,t.ticks=En,t.transpose=te,t.union=function(...t){const n=new InternSet;for(const e of t)for(const t of e)n.add(t);return n},t.variance=an,t.window=D,t.zip=function(){return te(arguments)}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function u(t){var n=r(t);return(n.local?o:i)(n)}function a(){}function c(t){return null==t?a:function(){return this.querySelector(t)}}function l(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function s(){return[]}function f(t){return null==t?s:function(){return this.querySelectorAll(t)}}function h(t){return function(){return this.matches(t)}}function g(t){return function(n){return n.matches(t)}}var p=Array.prototype.find;function d(){return this.firstElementChild}var y=Array.prototype.filter;function m(){return Array.from(this.children)}function v(t){return new Array(t.length)}function w(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function x(t,n,e,r,i,o){for(var u,a=0,c=n.length,l=o.length;an?1:t>=n?0:NaN}function N(t){return function(){this.removeAttribute(t)}}function T(t){return function(){this.removeAttributeNS(t.space,t.local)}}function k(t,n){return function(){this.setAttribute(t,n)}}function C(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function $(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function S(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function D(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function E(t,n,e){return function(){this.style.setProperty(t,n,e)}}function F(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function q(t,n){return t.style.getPropertyValue(n)||D(t).getComputedStyle(t,null).getPropertyValue(n)}function H(t){return function(){delete this[t]}}function L(t,n){return function(){this[t]=n}}function Y(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function R(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new I(t)}function I(t){this._node=t,this._names=R(t.getAttribute("class")||"")}function j(t,n){for(var e=O(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var st=[null];function ft(t,n){this._groups=t,this._parents=n}function ht(){return new ft([[document.documentElement]],st)}function gt(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],st)}ft.prototype=ht.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=A&&(A=w+1);!(v=y[A])&&++A=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=A);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?U:"function"==typeof n?F:E)(t,n,null==e?"":e)):q(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?H:"function"==typeof n?Y:L)(t,n)):this.node()[t]},classed:function(t,n){var e=R(t+"");if(arguments.length<2){for(var r=O(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ut:ot,r=0;r+t(n)}function Ct(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function $t(){return!this.__axis}function St(t,n){var e=[],r=null,i=null,o=6,u=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=t===xt||t===bt?-1:1,s=t===bt||t===_t?"x":"y",f=t===xt||t===Mt?Nt:Tt;function h(h){var g=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):wt:i,d=Math.max(o,0)+a,y=n.range(),m=+y[0]+c,v=+y[y.length-1]+c,w=(n.bandwidth?Ct:kt)(n.copy(),c),x=h.selection?h.selection():h,_=x.selectAll(".domain").data([null]),M=x.selectAll(".tick").data(g,n).order(),b=M.exit(),A=M.enter().append("g").attr("class","tick"),N=M.select("line"),T=M.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(A),N=N.merge(A.append("line").attr("stroke","currentColor").attr(s+"2",l*o)),T=T.merge(A.append("text").attr("fill","currentColor").attr(s,l*d).attr("dy",t===xt?"0em":t===Mt?"0.71em":"0.32em")),h!==x&&(_=_.transition(h),M=M.transition(h),N=N.transition(h),T=T.transition(h),b=b.transition(h).attr("opacity",At).attr("transform",(function(t){return isFinite(t=w(t))?f(t+c):this.getAttribute("transform")})),A.attr("opacity",At).attr("transform",(function(t){var n=this.parentNode.__axis;return f((n&&isFinite(n=n(t))?n:w(t))+c)}))),b.remove(),_.attr("d",t===bt||t===_t?u?"M"+l*u+","+m+"H"+c+"V"+v+"H"+l*u:"M"+c+","+m+"V"+v:u?"M"+m+","+l*u+"V"+c+"H"+v+"V"+l*u:"M"+m+","+c+"H"+v),M.attr("opacity",1).attr("transform",(function(t){return f(w(t)+c)})),N.attr(s+"2",l*o),T.attr(s,l*d).text(p),x.filter($t).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_t?"start":t===bt?"end":"middle"),x.each((function(){this.__axis=w}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=u=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(u=+t,h):u},h.tickPadding=function(t){return arguments.length?(a=+t,h):a},h.offset=function(t){return arguments.length?(c=+t,h):c},h}function Dt(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,c,l,s,f,h,g=t._root,p={data:r},d=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!g)return t._root=p,t;for(;g.length;)if((l=n>=(o=(d+m)/2))?d=o:m=o,(s=e>=(u=(y+v)/2))?y=u:v=u,i=g,!(g=g[f=s<<1|l]))return i[f]=p,t;if(a=+t._x.call(null,g.data),c=+t._y.call(null,g.data),n===a&&e===c)return p.next=g,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=n>=(o=(d+m)/2))?d=o:m=o,(s=e>=(u=(y+v)/2))?y=u:v=u}while((f=s<<1|l)==(h=(c>=u)<<1|a>=o));return i[h]=g,i[f]=p,t}function Ut(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Et(t){return t[0]}function Ft(t){return t[1]}function qt(t,n,e){var r=new Ht(null==n?Et:n,null==e?Ft:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ht(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Lt(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Yt=qt.prototype=Ht.prototype;function Rt(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function Ot(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function It(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<0?i=n+1:o=n}while(iRt(t(n),e),r=(n,e)=>t(n)-e):(n=t===Rt||t===Ot?t:jt,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const u=i(t,n,e,o-1);return u>e&&r(t[u-1],n)>-r(t[u],n)?u-1:u},right:function(t,r,i=0,o=t.length){if(i>>1;e(t[n],r)<=0?i=n+1:o=n}while(is&&(s=r),if&&(f=i));if(c>s||l>f)return this;for(this.cover(c,l).cover(s,f),e=0;et||t>=i||r>n||n>=o;)switch(a=(nh||(o=c.y0)>g||(u=c.x1)=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,d.data),w=n-+this._y.call(null,d.data),x=v*v+w*w;if(x=(a=(p+y)/2))?p=a:y=a,(s=u>=(c=(d+m)/2))?d=c:m=c,n=g,!(g=g[f=s<<1|l]))return this;if(!g.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;g.data!==t;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(g=n[0]||n[1]||n[2]||n[3])&&g===(n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[h]=g:this._root=g),this):(this._root=i,this)},Yt.removeAll=function(t){for(var n=0,e=t.length;n{n(t,e,(r<<=2)+0,(i<<=2)+0,o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function Gt(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:u}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((u=Math.floor(void 0!==u?u:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!u||!e&&!r)return n;const a=e&&t(e),c=r&&t(r),l=i.slice();return a&&c?(Jt(a,l,i,o,u),Jt(a,i,l,o,u),Jt(a,l,i,o,u),Kt(c,i,l,o,u),Kt(c,l,i,o,u),Kt(c,i,l,o,u)):a?(Jt(a,i,l,o,u),Jt(a,l,i,o,u),Jt(a,i,l,o,u)):c&&(Kt(c,i,l,o,u),Kt(c,l,i,o,u),Kt(c,i,l,o,u)),n}}function Jt(t,n,e,r,i){for(let o=0,u=r*i;o{if(!((o-=u)>=i))return;let a=t*r[i];const c=u*t;for(let t=i,n=i+c;t{if(!((u-=a)>=o))return;let c=n*i[o];const l=a*n,s=l+a;for(let t=o,n=o+l;t=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function en(t){return 0|t.length}function rn(t){return!(t>0)}function on(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function un(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let u=-1;for(let a of t)null!=(a=n(a,++u,t))&&(a=+a)>=a&&(e=a-i,i+=e/++r,o+=e*(a-i))}if(r>1)return o/(r-1)}function an(t,n){const e=un(t,n);return e?Math.sqrt(e):e}function cn(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r=o&&(e=r=o):(e>o&&(e=o),r0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=gn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(sn(this,t))}has(t){return super.has(sn(this,t))}set(t,n){return super.set(fn(this,t),n)}delete(t){return super.delete(hn(this,t))}}class InternSet extends Set{constructor(t,n=gn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(sn(this,t))}add(t){return super.add(fn(this,t))}delete(t){return super.delete(hn(this,t))}}function sn({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function fn({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function hn({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function gn(t){return null!==t&&"object"==typeof t?t.valueOf():t}function pn(t){return t}function dn(t,...n){return _n(t,pn,pn,n)}function yn(t,...n){return _n(t,Array.from,pn,n)}function mn(t,n){for(let e=1,r=n.length;et.pop().map((([n,e])=>[...t,n,e]))));return t}function vn(t,n,...e){return _n(t,pn,n,e)}function wn(t,n,...e){return _n(t,Array.from,n,e)}function xn(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function _n(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const u=new InternMap,a=r[o++];let c=-1;for(const t of i){const n=a(t,++c,i),e=u.get(n);e?e.push(t):u.set(n,[t])}for(const[n,e]of u)u.set(n,t(e,o));return n(u)}(t,0)}function Mn(t,n){return Array.from(n,(n=>t[n]))}function bn(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=Nn(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>Nn(e[t],e[n])))),Mn(t,r)}return t.sort(An(e))}function An(t=Rt){if(t===Rt)return Nn;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function Nn(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}var Tn=Array.prototype.slice;function kn(t){return()=>t}const Cn=Math.sqrt(50),$n=Math.sqrt(10),Sn=Math.sqrt(2);function Dn(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),u=o>=Cn?10:o>=$n?5:o>=Sn?2:1;let a,c,l;return i<0?(l=Math.pow(10,-i)/u,a=Math.round(t*l),c=Math.round(n*l),a/ln&&--c,l=-l):(l=Math.pow(10,i)*u,a=Math.round(t/l),c=Math.round(n/l),a*ln&&--c),c0))return[];if((t=+t)===(n=+n))return[t];const r=n=i))return[];const a=o-i+1,c=new Array(a);if(r)if(u<0)for(let t=0;t0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function Hn(t){return Math.max(1,Math.ceil(Math.log(nn(t))/Math.LN2)+1)}function Ln(){var t=pn,n=cn,e=Hn;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,u,a=r.length,c=new Array(a);for(i=0;i=f)if(t>=f&&n===cn){const t=En(s,f,e);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else h.pop()}for(var g=h.length,p=0,d=g;h[p]<=s;)++p;for(;h[d-1]>f;)--d;(p||d0?h[i-1]:s,y.x1=i0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function Rn(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e=o)&&(e=o,r=i);return r}function On(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function In(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function jn(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=void 0===i?Nn:An(i);r>e;){if(r-e>600){const o=r-e+1,u=n-e+1,a=Math.log(o),c=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*c*(o-c)/o)*(u-o/2<0?-1:1);jn(t,n,Math.max(e,Math.floor(n-u*c/o+l)),Math.min(r,Math.floor(n+(o-u)*c/o+l)),i)}const o=t[n];let u=e,a=r;for(Pn(t,e,n),i(t[r],o)>0&&Pn(t,e,r);u0;)--a}0===i(t[e],o)?Pn(t,e,a):(++a,Pn(t,a,r)),a<=n&&(e=a+1),n<=a&&(r=a-1)}return t}function Pn(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Vn(t,n=Rt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?Rt(t,i)>0:0===Rt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)>0:0===n(i,i))&&(e=i,r=!0);return e}function zn(t,n,e){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}(t,e)),(r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return On(t);if(n>=1)return Yn(t);var r,i=(r-1)*n,o=Math.floor(i),u=Yn(jn(t,o).subarray(0,o+1));return u+(On(t.subarray(o+1))-u)*(i-o)}}function Bn(t,n,e=Pt){if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}}function Zn(t,n,e=Pt){if(!isNaN(n=+n)){if(r=Float64Array.from(t,((n,r)=>Pt(e(t[r],r,t)))),n<=0)return In(r);if(n>=1)return Rn(r);var r,i=Uint32Array.from(t,((t,n)=>n)),o=r.length-1,u=Math.floor(o*n);return jn(i,u,0,o,((t,n)=>Nn(r[t],r[n]))),(u=Vn(i.subarray(0,u+1),(t=>r[t])))>=0?u:-1}}function Xn(t,n){return[t,n]}function Qn(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Se(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Se(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=we.exec(t))?new Ue(n[1],n[2],n[3],1):(n=xe.exec(t))?new Ue(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=_e.exec(t))?Se(n[1],n[2],n[3],n[4]):(n=Me.exec(t))?Se(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=be.exec(t))?Ye(n[1],n[2]/100,n[3]/100,1):(n=Ae.exec(t))?Ye(n[1],n[2]/100,n[3]/100,n[4]):Ne.hasOwnProperty(t)?$e(Ne[t]):"transparent"===t?new Ue(NaN,NaN,NaN,0):null}function $e(t){return new Ue(t>>16&255,t>>8&255,255&t,1)}function Se(t,n,e,r){return r<=0&&(t=n=e=NaN),new Ue(t,n,e,r)}function De(t,n,e,r){return 1===arguments.length?((i=t)instanceof he||(i=Ce(i)),i?new Ue((i=i.rgb()).r,i.g,i.b,i.opacity):new Ue):new Ue(t,n,e,null==r?1:r);var i}function Ue(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ee(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}`}function Fe(){const t=qe(this.opacity);return`${1===t?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${1===t?")":`, ${t})`}`}function qe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function He(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Le(t){return((t=He(t))<16?"0":"")+t.toString(16)}function Ye(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Oe(t,n,e,r)}function Re(t){if(t instanceof Oe)return new Oe(t.h,t.s,t.l,t.opacity);if(t instanceof he||(t=Ce(t)),!t)return new Oe;if(t instanceof Oe)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new Oe(u,a,c,t.opacity)}function Oe(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ie(t){return(t=(t||0)%360)<0?t+360:t}function je(t){return Math.max(0,Math.min(1,t||0))}function Pe(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}se(he,Ce,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Re(this).formatHsl()},formatRgb:ke,toString:ke}),se(Ue,De,fe(he,{brighter(t){return t=null==t?pe:Math.pow(pe,t),new Ue(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ge:Math.pow(ge,t),new Ue(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ue(He(this.r),He(this.g),He(this.b),qe(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:Ee,formatHex:Ee,formatHex8:function(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}${Le(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Fe,toString:Fe})),se(Oe,(function(t,n,e,r){return 1===arguments.length?Re(t):new Oe(t,n,e,null==r?1:r)}),fe(he,{brighter(t){return t=null==t?pe:Math.pow(pe,t),new Oe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ge:Math.pow(ge,t),new Oe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Ue(Pe(t>=240?t-240:t+120,i,r),Pe(t,i,r),Pe(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Oe(Ie(this.h),je(this.s),je(this.l),qe(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 t=qe(this.opacity);return`${1===t?"hsl(":"hsla("}${Ie(this.h)}, ${100*je(this.s)}%, ${100*je(this.l)}%${1===t?")":`, ${t})`}`}}));var Ve=t=>()=>t;function ze(t){return 1==(t=+t)?Be:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Ve(isNaN(n)?e:n)}}function Be(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):Ve(isNaN(t)?n:t)}var Ze=function t(n){var e=ze(n);function r(t,n){var r=e((t=De(t)).r,(n=De(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Be(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function Xe(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:Ge(e,r)})),o=tr.lastIndex;return on&&(e=t,t=n,n=e),l=function(e){return Math.max(t,Math.min(n,e))}),r=c>2?sr:lr,i=o=null,f}function f(n){return null==n||isNaN(n=+n)?e:(i||(i=r(u.map(t),a,c)))(t(l(n)))}return f.invert=function(e){return l(n((o||(o=r(a,u.map(t),Ge)))(e)))},f.domain=function(t){return arguments.length?(u=Array.from(t,or),s()):u.slice()},f.range=function(t){return arguments.length?(a=Array.from(t),s()):a.slice()},f.rangeRound=function(t){return a=Array.from(t),c=rr,s()},f.clamp=function(t){return arguments.length?(l=!!t||ar,s()):l!==ar},f.interpolate=function(t){return arguments.length?(c=t,s()):c},f.unknown=function(t){return arguments.length?(e=t,f):e},function(e,r){return t=e,n=r,s()}}function gr(){return hr()(ar,ar)}function pr(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function dr(t){return(t=pr(Math.abs(t)))?t[1]:NaN}var yr,mr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vr(t){if(!(n=mr.exec(t)))throw new Error("invalid format: "+t);var n;return new wr({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function wr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function xr(t,n){var e=pr(t,n);if(!e)return t+"";var r=e[0],i=e[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")}vr.prototype=wr.prototype,wr.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};var _r={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>xr(100*t,n),r:xr,s:function(t,n){var e=pr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(yr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pr(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Mr(t){return t}var br,Ar,Nr,Tr=Array.prototype.map,kr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Cr(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Mr:(n=Tr.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Mr:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Tr.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=vr(t)).fill,e=t.align,f=t.sign,h=t.symbol,g=t.zero,p=t.width,d=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(d=!0,v="g"):_r[v]||(void 0===y&&(y=12),m=!0,v="g"),(g||"0"===n&&"="===e)&&(g=!0,n="0",e="=");var w="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?c:"",_=_r[v],M=/[defgprs%]/.test(v);function b(t){var i,o,c,h=w,b=x;if("c"===v)b=_(t)+b,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:_(Math.abs(t),y),m&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),A&&0==+t&&"+"!==f&&(A=!1),h=(A?"("===f?f:l:"-"===f||"("===f?"":f)+h,b=("s"===v?kr[8+yr/3]:"")+b+(A&&"("===f?")":""),M)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){b=(46===c?u+t.slice(i+1):t.slice(i))+b,t=t.slice(0,i);break}}d&&!g&&(t=r(t,1/0));var N=h.length+t.length+b.length,T=N>1)+h+t+b+T.slice(N);break;default:t=T+h+t+b}return a(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),b.toString=function(){return t+""},b}return{format:f,formatPrefix:function(t,n){var e=f(((t=vr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(dr(n)/3))),i=Math.pow(10,-r),o=kr[8+r/3];return function(t){return e(i*t)+o}}}}function $r(t,n,e,r){var i,o=Fn(t,n,e);switch((r=vr(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(dr(n)/3)))-dr(Math.abs(t)))}(o,u))||(r.precision=i),Nr(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,dr(n)-dr(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-dr(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Ar(r)}function Sr(t){var n=t.domain;return t.ticks=function(t){var e=n();return Un(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return $r(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),u=0,a=o.length-1,c=o[u],l=o[a],s=10;for(l0;){if((i=En(c,l,e))===r)return o[u]=c,o[a]=l,n(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 t},t}function Dr(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u-t(-n,e)}function Yr(t){const n=t(Ur,Er),e=n.domain;let r,i,o=10;function u(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),i=function(t){return 10===t?Hr:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),e()[0]<0?(r=Lr(r),i=Lr(i),t(Fr,qr)):t(Ur,Er),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(e(t),u()):e()},n.ticks=t=>{const n=e();let u=n[0],a=n[n.length-1];const c=a0){for(;f<=h;++f)for(l=1;la)break;p.push(s)}}else for(;f<=h;++f)for(l=o-1;l>=1;--l)if(s=f>0?l/i(-f):l*i(f),!(sa)break;p.push(s)}2*p.length{if(null==t&&(t=10),null==e&&(e=10===o?"s":","),"function"!=typeof e&&(o%1||null!=(e=vr(e)).precision||(e.trim=!0),e=Ar(e)),t===1/0)return e;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/i(Math.round(r(t)));return n*oe(Dr(e(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),n}function Rr(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Or(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Ir(t){var n=1,e=t(Rr(n),Or(n));return e.constant=function(e){return arguments.length?t(Rr(n=+e),Or(n)):n},Sr(e)}function jr(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Pr(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Vr(t){return t<0?-t*t:t*t}function zr(t){var n=t(ar,ar),e=1;return n.exponent=function(n){return arguments.length?1===(e=+n)?t(ar,ar):.5===e?t(Pr,Vr):t(jr(e),jr(1/e)):e},Sr(n)}function Br(){var t=zr(hr());return t.copy=function(){return fr(t,Br()).exponent(t.exponent())},ie.apply(t,arguments),t}function Zr(t){return Math.sign(t)*t*t}br=Cr({thousands:",",grouping:[3],currency:["$",""]}),Ar=br.format,Nr=br.formatPrefix;const Xr=new Date,Qr=new Date;function Wr(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=n=>(t(n=new Date(+n)),n),i.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),i.round=t=>{const n=i(t),e=i.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),i.range=(e,r,o)=>{const u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e0))return u;let a;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(aWr((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})),e&&(i.count=(n,r)=>(Xr.setTime(+n),Qr.setTime(+r),t(Xr),t(Qr),Math.floor(e(Xr,Qr))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?n=>r(n)%t==0:n=>i.count(0,n)%t==0):i:null)),i}const Gr=Wr((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Gr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Wr((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):Gr:null),Gr.range;const Jr=1e3,Kr=6e4,ti=36e5,ni=864e5,ei=6048e5,ri=2592e6,ii=31536e6,oi=Wr((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Jr)}),((t,n)=>(n-t)/Jr),(t=>t.getUTCSeconds()));oi.range;const ui=Wr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Jr)}),((t,n)=>{t.setTime(+t+n*Kr)}),((t,n)=>(n-t)/Kr),(t=>t.getMinutes()));ui.range;const ai=Wr((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*Kr)}),((t,n)=>(n-t)/Kr),(t=>t.getUTCMinutes()));ai.range;const ci=Wr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Jr-t.getMinutes()*Kr)}),((t,n)=>{t.setTime(+t+n*ti)}),((t,n)=>(n-t)/ti),(t=>t.getHours()));ci.range;const li=Wr((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*ti)}),((t,n)=>(n-t)/ti),(t=>t.getUTCHours()));li.range;const si=Wr((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Kr)/ni),(t=>t.getDate()-1));si.range;const fi=Wr((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ni),(t=>t.getUTCDate()-1));fi.range;const hi=Wr((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ni),(t=>Math.floor(t/ni)));function gi(t){return Wr((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Kr)/ei))}hi.range;const pi=gi(0),di=gi(1),yi=gi(2),mi=gi(3),vi=gi(4),wi=gi(5),xi=gi(6);function _i(t){return Wr((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/ei))}pi.range,di.range,yi.range,mi.range,vi.range,wi.range,xi.range;const Mi=_i(0),bi=_i(1),Ai=_i(2),Ni=_i(3),Ti=_i(4),ki=_i(5),Ci=_i(6);Mi.range,bi.range,Ai.range,Ni.range,Ti.range,ki.range,Ci.range;const $i=Wr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()));$i.range;const Si=Wr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Si.range;const Di=Wr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Di.every=t=>isFinite(t=Math.floor(t))&&t>0?Wr((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null,Di.range;const Ui=Wr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Ei(t,n,e,r,i,o){const u=[[oi,1,Jr],[oi,5,5e3],[oi,15,15e3],[oi,30,3e4],[o,1,Kr],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,ti],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,ni],[r,2,1728e5],[e,1,ei],[n,1,ri],[n,3,7776e6],[t,1,ii]];function a(n,e,r){const i=Math.abs(e-n)/r,o=It((([,,t])=>t)).right(u,i);if(o===u.length)return t.every(Fn(n/ii,e/ii,r));if(0===o)return Gr.every(Math.max(Fn(n,e,r),1));const[a,c]=u[i/u[o-1][2]isFinite(t=Math.floor(t))&&t>0?Wr((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null,Ui.range;const[Fi,qi]=Ei(Ui,Si,Mi,hi,li,ai),[Hi,Li]=Ei(Di,$i,pi,si,ci,ui);function Yi(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ri(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Oi(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var Ii,ji,Pi,Vi={"-":"",_:" ",0:"0"},zi=/^\s*\d+/,Bi=/^%/,Zi=/[\\^$*+?|[\]().{}]/g;function Xi(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),n])))}function Ji(t,n,e){var r=zi.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Ki(t,n,e){var r=zi.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function to(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function no(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function eo(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function ro(t,n,e){var r=zi.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function io(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function oo(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function uo(t,n,e){var r=zi.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function ao(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function co(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function lo(t,n,e){var r=zi.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function so(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function fo(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ho(t,n,e){var r=zi.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function go(t,n,e){var r=zi.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function po(t,n,e){var r=zi.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function yo(t,n,e){var r=Bi.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function mo(t,n,e){var r=zi.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function vo(t,n,e){var r=zi.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function wo(t,n){return Xi(t.getDate(),n,2)}function xo(t,n){return Xi(t.getHours(),n,2)}function _o(t,n){return Xi(t.getHours()%12||12,n,2)}function Mo(t,n){return Xi(1+si.count(Di(t),t),n,3)}function bo(t,n){return Xi(t.getMilliseconds(),n,3)}function Ao(t,n){return bo(t,n)+"000"}function No(t,n){return Xi(t.getMonth()+1,n,2)}function To(t,n){return Xi(t.getMinutes(),n,2)}function ko(t,n){return Xi(t.getSeconds(),n,2)}function Co(t){var n=t.getDay();return 0===n?7:n}function $o(t,n){return Xi(pi.count(Di(t)-1,t),n,2)}function So(t){var n=t.getDay();return n>=4||0===n?vi(t):vi.ceil(t)}function Do(t,n){return t=So(t),Xi(vi.count(Di(t),t)+(4===Di(t).getDay()),n,2)}function Uo(t){return t.getDay()}function Eo(t,n){return Xi(di.count(Di(t)-1,t),n,2)}function Fo(t,n){return Xi(t.getFullYear()%100,n,2)}function qo(t,n){return Xi((t=So(t)).getFullYear()%100,n,2)}function Ho(t,n){return Xi(t.getFullYear()%1e4,n,4)}function Lo(t,n){var e=t.getDay();return Xi((t=e>=4||0===e?vi(t):vi.ceil(t)).getFullYear()%1e4,n,4)}function Yo(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Xi(n/60|0,"0",2)+Xi(n%60,"0",2)}function Ro(t,n){return Xi(t.getUTCDate(),n,2)}function Oo(t,n){return Xi(t.getUTCHours(),n,2)}function Io(t,n){return Xi(t.getUTCHours()%12||12,n,2)}function jo(t,n){return Xi(1+fi.count(Ui(t),t),n,3)}function Po(t,n){return Xi(t.getUTCMilliseconds(),n,3)}function Vo(t,n){return Po(t,n)+"000"}function zo(t,n){return Xi(t.getUTCMonth()+1,n,2)}function Bo(t,n){return Xi(t.getUTCMinutes(),n,2)}function Zo(t,n){return Xi(t.getUTCSeconds(),n,2)}function Xo(t){var n=t.getUTCDay();return 0===n?7:n}function Qo(t,n){return Xi(Mi.count(Ui(t)-1,t),n,2)}function Wo(t){var n=t.getUTCDay();return n>=4||0===n?Ti(t):Ti.ceil(t)}function Go(t,n){return t=Wo(t),Xi(Ti.count(Ui(t),t)+(4===Ui(t).getUTCDay()),n,2)}function Jo(t){return t.getUTCDay()}function Ko(t,n){return Xi(bi.count(Ui(t)-1,t),n,2)}function tu(t,n){return Xi(t.getUTCFullYear()%100,n,2)}function nu(t,n){return Xi((t=Wo(t)).getUTCFullYear()%100,n,2)}function eu(t,n){return Xi(t.getUTCFullYear()%1e4,n,4)}function ru(t,n){var e=t.getUTCDay();return Xi((t=e>=4||0===e?Ti(t):Ti.ceil(t)).getUTCFullYear()%1e4,n,4)}function iu(){return"+0000"}function ou(){return"%"}function uu(t){return+t}function au(t){return Math.floor(+t/1e3)}function cu(t){return new Date(t)}function lu(t){return t instanceof Date?+t:+new Date(+t)}function su(t,n,e,r,i,o,u,a,c,l){var s=gr(),f=s.invert,h=s.domain,g=l(".%L"),p=l(":%S"),d=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),v=l("%b %d"),w=l("%B"),x=l("%Y");function _(t){return(c(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:uu,s:au,S:ko,u:Co,U:$o,V:Do,w:Uo,W:Eo,x:null,X:null,y:Fo,Y:Ho,Z:Yo,"%":ou},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Ro,e:Ro,f:Vo,g:nu,G:ru,H:Oo,I:Io,j:jo,L:Po,m:zo,M:Bo,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:uu,s:au,S:Zo,u:Xo,U:Qo,V:Go,w:Jo,W:Ko,x:null,X:null,y:tu,Y:eu,Z:iu,"%":ou},_={a:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=m.exec(n.slice(e));return r?(t.m=v.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:co,e:co,f:po,g:io,G:ro,H:so,I:so,j:lo,L:go,m:ao,M:fo,p:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:uo,Q:mo,s:vo,S:ho,u:Ki,U:to,V:no,w:Ji,W:eo,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:io,Y:ro,Z:oo,"%":yo};function M(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,l=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ri(Oi(o.y,0,1))).getUTCDay(),r=i>4||0===i?bi.ceil(r):bi(r),r=fi.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Yi(Oi(o.y,0,1))).getDay(),r=i>4||0===i?di.ceil(r):di(r),r=si.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?Ri(Oi(o.y,0,1)).getUTCDay():Yi(Oi(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,Ri(o)):Yi(o)}}function A(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=_[i in Vi?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return w.x=M(e,w),w.X=M(r,w),w.c=M(n,w),x.x=M(e,x),x.X=M(r,x),x.c=M(n,x),{format:function(t){var n=M(t+="",w);return n.toString=function(){return t},n},parse:function(t){var n=b(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=M(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=b(t+="",!0);return n.toString=function(){return t},n}}}(t),ji=Ii.format,Ii.parse,Pi=Ii.utcFormat,Ii.utcParse}({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"]});const mu=Math.abs,vu=Math.atan2,wu=Math.cos,xu=Math.max,_u=Math.min,Mu=Math.sin,bu=Math.sqrt,Au=1e-12,Nu=Math.PI,Tu=Nu/2,ku=2*Nu;function Cu(t){return t>=1?Tu:t<=-1?-Tu:Math.asin(t)}const $u=Math.PI,Su=2*$u,Du=1e-6,Uu=Su-Du;function Eu(t){this._+=t[0];for(let n=1,e=t.length;n=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Eu;const e=10**n;return function(t){this._+=t[0];for(let n=1,r=t.length;nDu)if(Math.abs(s*a-c*l)>Du&&i){let h=e-o,g=r-u,p=a*a+c*c,d=h*h+g*g,y=Math.sqrt(p),m=Math.sqrt(f),v=i*Math.tan(($u-Math.acos((p+f-d)/(2*y*m)))/2),w=v/m,x=v/y;Math.abs(w-1)>Du&&this._append`L${t+w*l},${n+w*s}`,this._append`A${i},${i},0,0,${+(s*h>l*g)},${this._x1=t+x*a},${this._y1=n+x*c}`}else this._append`L${this._x1=t},${this._y1=n}`;else;}arc(t,n,e,r,i,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let u=e*Math.cos(r),a=e*Math.sin(r),c=t+u,l=n+a,s=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Du||Math.abs(this._y1-l)>Du)&&this._append`L${c},${l}`,e&&(f<0&&(f=f%Su+Su),f>Uu?this._append`A${e},${e},0,1,${s},${t-u},${n-a}A${e},${e},0,1,${s},${this._x1=c},${this._y1=l}`:f>Du&&this._append`A${e},${e},0,${+(f>=$u)},${s},${this._x1=t+e*Math.cos(i)},${this._y1=n+e*Math.sin(i)}`)}rect(t,n,e,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+r}h${-e}Z`}toString(){return this._}}function qu(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new Fu(n)}function Hu(t){return t.innerRadius}function Lu(t){return t.outerRadius}function Yu(t){return t.startAngle}function Ru(t){return t.endAngle}function Ou(t){return t&&t.padAngle}function Iu(t,n,e,r,i,o,u){var a=t-e,c=n-r,l=(u?o:-o)/bu(a*a+c*c),s=l*c,f=-l*a,h=t+s,g=n+f,p=e+s,d=r+f,y=(h+p)/2,m=(g+d)/2,v=p-h,w=d-g,x=v*v+w*w,_=i-o,M=h*d-p*g,b=(w<0?-1:1)*bu(xu(0,_*_*x-M*M)),A=(M*w-v*b)/x,N=(-M*v-w*b)/x,T=(M*w+v*b)/x,k=(-M*v+w*b)/x,C=A-y,$=N-m,S=T-y,D=k-m;return C*C+$*$>S*S+D*D&&(A=T,N=k),{cx:A,cy:N,x01:-s,y01:-f,x11:A*(i/_-1),y11:N*(i/_-1)}}function ju(t){this._context=t}function Pu(t){return new ju(t)}function Vu(t){return t[0]}function zu(t){return t[1]}ju.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},t.Adder=ln,t.InternMap=InternMap,t.InternSet=InternSet,t.arc=function(){var t=Hu,n=Lu,e=yu(0),r=null,i=Yu,o=Ru,u=Ou,a=null,c=qu(l);function l(){var l,s,f=+t.apply(this,arguments),h=+n.apply(this,arguments),g=i.apply(this,arguments)-Tu,p=o.apply(this,arguments)-Tu,d=mu(p-g),y=p>g;if(a||(a=l=c()),hAu)if(d>ku-Au)a.moveTo(h*wu(g),h*Mu(g)),a.arc(0,0,h,g,p,!y),f>Au&&(a.moveTo(f*wu(p),f*Mu(p)),a.arc(0,0,f,p,g,y));else{var m,v,w=g,x=p,_=g,M=p,b=d,A=d,N=u.apply(this,arguments)/2,T=N>Au&&(r?+r.apply(this,arguments):bu(f*f+h*h)),k=_u(mu(h-f)/2,+e.apply(this,arguments)),C=k,$=k;if(T>Au){var S=Cu(T/f*Mu(N)),D=Cu(T/h*Mu(N));(b-=2*S)>Au?(_+=S*=y?1:-1,M-=S):(b=0,_=M=(g+p)/2),(A-=2*D)>Au?(w+=D*=y?1:-1,x-=D):(A=0,w=x=(g+p)/2)}var U=h*wu(w),E=h*Mu(w),F=f*wu(M),q=f*Mu(M);if(k>Au){var H,L=h*wu(x),Y=h*Mu(x),R=f*wu(_),O=f*Mu(_);if(d1?0:t<-1?Nu:Math.acos(t)}((I*P+j*V)/(bu(I*I+j*j)*bu(P*P+V*V)))/2),B=bu(H[0]*H[0]+H[1]*H[1]);C=_u(k,(f-B)/(z-1)),$=_u(k,(h-B)/(z+1))}else C=$=0}A>Au?$>Au?(m=Iu(R,O,U,E,h,$,y),v=Iu(L,Y,F,q,h,$,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),$Au&&b>Au?C>Au?(m=Iu(F,q,L,Y,f,-C,y),v=Iu(U,E,R,O,f,-C,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),C=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=tn(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t},t.blur2=Qt,t.blurImage=Wt,t.count=nn,t.create=function(t){return gt(u(t).call(document.documentElement))},t.creator=u,t.cross=function(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(on)).map(en),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(rn))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let u=r;for(;++i[u]===e[u];){if(0===u)return n?o.map(n):o;i[u--]=0}}},t.cumsum=function(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)},t.descending=Ot,t.deviation=an,t.difference=function(t,...n){t=new InternSet(t);for(const e of n)for(const n of e)t.delete(n);return t},t.disjoint=function(t,n){const e=n[Symbol.iterator](),r=new InternSet;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0},t.every=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0},t.extent=cn,t.fcumsum=function(t,n){const e=new ln;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))},t.filter=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e},t.flatGroup=function(t,...n){return mn(yn(t,...n),n)},t.flatRollup=function(t,n,...e){return mn(wn(t,n,...e),e)},t.fsum=function(t,n){const e=new ln;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e},t.greatest=Vn,t.greatestIndex=function(t,n=Rt){if(1===n.length)return Rn(t,n);let e,r=-1,i=-1;for(const o of t)++i,(r<0?0===n(o,o):n(o,e)>0)&&(e=o,r=i);return r},t.group=dn,t.groupSort=function(t,n,e){return(2!==n.length?bn(vn(t,n,e),(([t,n],[e,r])=>Rt(n,r)||Rt(t,e))):bn(dn(t,e),(([t,e],[r,i])=>n(e,i)||Rt(t,r)))).map((([t])=>t))},t.groups=yn,t.histogram=Ln,t.index=function(t,...n){return _n(t,pn,xn,n)},t.indexes=function(t,...n){return _n(t,Array.from,xn,n)},t.intersection=function(t,...n){t=new InternSet(t),n=n.map(ne);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t},t.least=function(t,n=Rt){let e,r=!1;if(1===n.length){let i;for(const o of t){const t=n(o);(r?Rt(t,i)<0:0===Rt(t,t))&&(e=o,i=t,r=!0)}}else for(const i of t)(r?n(i,e)<0:0===n(i,i))&&(e=i,r=!0);return e},t.leastIndex=Wn,t.line=function(t,n){var e=yu(!0),r=null,i=Pu,o=null,u=qu(a);function a(a){var c,l,s,f=(a=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(a)).length,h=!1;for(null==r&&(o=i(s=u())),c=0;c<=f;++c)!(cn(e,r,t)))},t.matcher=h,t.max=Yn,t.maxIndex=Rn,t.mean=function(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e},t.median=function(t,n){return zn(t,.5,n)},t.medianIndex=function(t,n){return Zn(t,.5,n)},t.merge=function(t){return Array.from(function*(t){for(const n of t)yield*n}(t))},t.min=On,t.minIndex=In,t.mode=function(t,n){const e=new InternMap;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r},t.namespace=r,t.namespaces=e,t.nice=qn,t.pairs=function(t,n=Xn){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e},t.permute=Mn,t.pointer=vt,t.pointers=function(t,n){return t.target&&(t=mt(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>vt(t,n)))},t.quadtree=qt,t.quantile=zn,t.quantileIndex=Zn,t.quantileSorted=Bn,t.quickselect=jn,t.range=Qn,t.rank=function(t,n=Rt){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let e=Array.from(t);const r=new Float64Array(e.length);2!==n.length&&(e=e.map(n),n=Rt);const i=(t,r)=>n(e[t],e[r]);let o,u;return(t=Uint32Array.from(e,((t,n)=>n))).sort(n===Rt?(t,n)=>Nn(e[t],e[n]):An(i)),t.forEach(((t,n)=>{const e=i(t,void 0===o?t:o);e>=0?((void 0===o||e>0)&&(o=t,u=n),r[t]=u):r[t]=NaN})),r},t.reduce=function(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,u=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++u}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++u,t);return e},t.reverse=function(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()},t.rollup=vn,t.rollups=wn,t.scaleBand=ce,t.scaleDiverging=function t(){var n=Sr(pu()(ar));return n.copy=function(){return hu(n,t())},oe.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=Yr(pu()).domain([.1,1,10]);return n.copy=function(){return hu(n,t()).base(n.base())},oe.apply(n,arguments)},t.scaleDivergingPow=du,t.scaleDivergingSqrt=function(){return du.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=Ir(pu());return n.copy=function(){return hu(n,t()).constant(n.constant())},oe.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return null==t||isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Array.from(t,or),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Array.from(n,or):[0,1],Sr(r)},t.scaleImplicit=ue,t.scaleLinear=function t(){var n=gr();return n.copy=function(){return fr(n,t())},ie.apply(n,arguments),Sr(n)},t.scaleLog=function t(){const n=Yr(hr()).domain([1,10]);return n.copy=()=>fr(n,t()).base(n.base()),ie.apply(n,arguments),n},t.scaleOrdinal=ae,t.scalePoint=function(){return le(ce.apply(null,arguments).paddingInner(1))},t.scalePow=Br,t.scaleQuantile=function t(){var n,e=[],r=[],i=[];function o(){var t=0,n=Math.max(1,r.length);for(i=new Array(n-1);++t0?i[n-1]:e[0],n=i?[o[i-1],r]:[o[n-1],o[n]]},a.unknown=function(t){return arguments.length?(n=t,a):a},a.thresholds=function(){return o.slice()},a.copy=function(){return t().domain([e,r]).range(u).unknown(n)},ie.apply(Sr(a),arguments)},t.scaleRadial=function t(){var n,e=gr(),r=[0,1],i=!1;function o(t){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(r)?n:i?Math.round(r):r}return o.invert=function(t){return e.invert(Zr(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((r=Array.from(t,or)).map(Zr)),o):r.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(i=!!t,o):i},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),r).round(i).clamp(e.clamp()).unknown(n)},ie.apply(o,arguments),Sr(o)},t.scaleSequential=function t(){var n=Sr(fu()(ar));return n.copy=function(){return hu(n,t())},oe.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=Yr(fu()).domain([1,10]);return n.copy=function(){return hu(n,t()).base(n.base())},oe.apply(n,arguments)},t.scaleSequentialPow=gu,t.scaleSequentialQuantile=function t(){var n=[],e=ar;function r(t){if(null!=t&&!isNaN(t=+t))return e((Xt(n,t,1)-1)/(n.length-1))}return r.domain=function(t){if(!arguments.length)return n.slice();n=[];for(let e of t)null==e||isNaN(e=+e)||n.push(e);return n.sort(Rt),r},r.interpolator=function(t){return arguments.length?(e=t,r):e},r.range=function(){return n.map(((t,r)=>e(r/(n.length-1))))},r.quantiles=function(t){return Array.from({length:t+1},((e,r)=>zn(n,r/t)))},r.copy=function(){return t(e).domain(n)},oe.apply(r,arguments)},t.scaleSequentialSqrt=function(){return gu.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=Ir(fu());return n.copy=function(){return hu(n,t()).constant(n.constant())},oe.apply(n,arguments)},t.scaleSqrt=function(){return Br.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=Ir(hr());return n.copy=function(){return fr(n,t()).constant(n.constant())},ie.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],i=1;function o(t){return null!=t&&t<=t?r[Xt(e,t,0,i)]:n}return o.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),o):e.slice()},o.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t().domain(e).range(r).unknown(n)},ie.apply(o,arguments)},t.scaleTime=function(){return ie.apply(su(Hi,Li,Di,$i,pi,si,ci,ui,oi,ji).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return ie.apply(su(Fi,qi,Ui,Si,Mi,fi,li,ai,oi,Pi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,n){const e=Wn(t,n);return e<0?void 0:e},t.select=gt,t.selectAll=function(t){return"string"==typeof t?new ft([document.querySelectorAll(t)],[document.documentElement]):new ft([l(t)],st)},t.selection=ht,t.selector=c,t.selectorAll=f,t.shuffle=Gn,t.shuffler=Jn,t.some=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1},t.sort=bn,t.style=q,t.subset=function(t,n){return ee(n,t)},t.sum=function(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e},t.superset=ee,t.thresholdFreedmanDiaconis=function(t,n,e){const r=nn(t),i=zn(t,.75)-zn(t,.25);return r&&i?Math.ceil((e-n)/(2*i*Math.pow(r,-1/3))):1},t.thresholdScott=function(t,n,e){const r=nn(t),i=an(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1},t.thresholdSturges=Hn,t.tickFormat=$r,t.tickIncrement=En,t.tickStep=Fn,t.ticks=Un,t.transpose=Kn,t.union=function(...t){const n=new InternSet;for(const e of t)for(const t of e)n.add(t);return n},t.variance=un,t.window=D,t.zip=function(){return Kn(arguments)}})); diff --git a/src/init.php b/src/init.php index 9d073db8b..f169c9c2a 100644 --- a/src/init.php +++ b/src/init.php @@ -3,7 +3,7 @@ // Copyright (c) 2006-2024 Eddie Kohler; see LICENSE. declare(strict_types=1); -const HOTCRP_VERSION = "3.0b3"; +const HOTCRP_VERSION = "3.0.0"; // All positive review types must be 1 digit const REVIEW_META = 5;