govuk_publishing_components 17.21.0 → 18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +1 -1
- data/app/assets/stylesheets/component_guide/application.scss +5 -7
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +5 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -15
- data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +28 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +1 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +18 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +8 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +6 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +10 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +17 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +8 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +4 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +1 -1
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +14 -12
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_button.html.erb +16 -2
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +5 -1
- data/app/views/govuk_publishing_components/components/_details.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_title.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/button.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +4 -1
- data/app/views/govuk_publishing_components/components/docs/table.yml +1 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +2 -2
- data/config/initializers/assets.rb +3 -3
- data/config/locales/en.yml +0 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +4 -9
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +4 -5
- data/node_modules/govuk-frontend/{all-ie8.scss → govuk/all-ie8.scss} +0 -0
- data/node_modules/govuk-frontend/{all.js → govuk/all.js} +116 -63
- data/node_modules/govuk-frontend/{all.scss → govuk/all.scss} +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-mask-icon.svg +0 -0
- data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/{common.js → govuk/common.js} +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/_accordion.scss +48 -28
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/accordion.js +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro-options.json +8 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/accordion/template.njk +1 -3
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/_back-link.scss +17 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/back-link/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/_breadcrumbs.scss +10 -11
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/_button.scss +76 -46
- data/node_modules/govuk-frontend/{components → govuk/components}/button/button.js +168 -17
- data/node_modules/govuk-frontend/{components → govuk/components}/button/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/button/macro.njk +0 -0
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/_character-count.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/character-count.js +5 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/character-count/template.njk +2 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/_checkboxes.scss +4 -6
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/checkboxes.js +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/template.njk +18 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/_date-input.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/date-input/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/details/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/_details.scss +12 -13
- data/node_modules/govuk-frontend/{components → govuk/components}/details/details.js +3 -4
- data/node_modules/govuk-frontend/{components → govuk/components}/details/implementation.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/details/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/_error-message.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-message/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/_error-summary.scss +4 -17
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/error-summary.js +0 -10
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/_fieldset.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro-options.json +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +81 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/_footer.scss +47 -16
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro-options.json +5 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/header/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/header/_header.scss +34 -21
- data/node_modules/govuk-frontend/{components → govuk/components}/header/header.js +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/header/macro-options.json +2 -2
- data/node_modules/govuk-frontend/{components → govuk/components}/header/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/header/template.njk +6 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/_hint.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/hint/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/_input.scss +24 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/input/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/input/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/_inset-text.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/_label.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/label/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/_panel.scss +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/panel/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/_phase-banner.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/template.njk +5 -7
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/_radios.scss +7 -9
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/radios.js +24 -11
- data/node_modules/govuk-frontend/{components → govuk/components}/radios/template.njk +15 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/select/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/_select.scss +23 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/select/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/select/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/_skip-link.scss +6 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/_summary-list.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro-options.json +7 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/table/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/_table.scss +1 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/table/template.njk +14 -14
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +142 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/tabs.js +59 -5
- data/node_modules/govuk-frontend/{components → govuk/components}/tabs/template.njk +4 -6
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +44 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/tag/template.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/README.md +0 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +55 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro-options.json +6 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/textarea/template.njk +1 -1
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/README.md +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/_warning-text.scss +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro-options.json +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro.njk +0 -0
- data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/template.njk +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_global-styles.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_links.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_lists.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_section-break.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_template.scss +0 -0
- data/node_modules/govuk-frontend/{core → govuk/core}/_typography.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_all.scss +1 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_clearfix.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_colour.scss +23 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_device-pixels.scss +0 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +60 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_links.scss +15 -1
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_media-queries.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_shape-arrow.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_typography.scss +23 -5
- data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_visually-hidden.scss +4 -2
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_form-group.scss +0 -0
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_grid.scss +2 -2
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_main-wrapper.scss +15 -1
- data/node_modules/govuk-frontend/{objects → govuk/objects}/_width-container.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_display.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_typography.scss +0 -0
- data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_width.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_assets.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-applied.scss +9 -8
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-organisations.scss +1 -1
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +101 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +75 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_global-styles.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_ie8.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_measurements.scss +2 -2
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_media-queries.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_spacing.scss +0 -0
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font-families.scss +11 -1
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font.scss +27 -7
- data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-responsive.scss +9 -10
- data/node_modules/govuk-frontend/{template.njk → govuk/template.njk} +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_compatibility.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_exports.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_font-url.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_ie8.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_iff.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_image-url.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-em.scss +0 -0
- data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-rem.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_all.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_clearfix.scss +0 -0
- data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_visually-hidden.scss +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/_sass-mq.scss +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/DOMTokenList.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Document.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/classList.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/closest.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/matches.js +0 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +259 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +257 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Event.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Function/prototype/bind.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Object/defineProperty.js +0 -0
- data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Window.js +0 -0
- data/node_modules/govuk-frontend/package.json +21 -21
- data/node_modules/react-is/README.md +2 -12
- data/node_modules/react-is/build-info.json +5 -5
- data/node_modules/react-is/cjs/react-is.development.js +7 -2
- data/node_modules/react-is/cjs/react-is.production.min.js +6 -6
- data/node_modules/react-is/package.json +13 -13
- data/node_modules/react-is/umd/react-is.development.js +7 -2
- data/node_modules/react-is/umd/react-is.production.min.js +5 -5
- data/node_modules/type/CHANGELOG.md +62 -50
- data/node_modules/type/LICENSE +15 -0
- data/node_modules/type/README.md +19 -19
- data/node_modules/type/error/is.js +28 -7
- data/node_modules/type/package.json +36 -22
- data/node_modules/type/test/error/is.js +13 -5
- metadata +247 -344
- data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +0 -79
- data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +0 -41
- data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +0 -35
- data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +0 -49
- data/node_modules/accessible-autocomplete/CHANGELOG.md +0 -269
- data/node_modules/accessible-autocomplete/CONTRIBUTING.md +0 -150
- data/node_modules/accessible-autocomplete/LICENSE.txt +0 -20
- data/node_modules/accessible-autocomplete/Procfile +0 -1
- data/node_modules/accessible-autocomplete/README.md +0 -416
- data/node_modules/accessible-autocomplete/accessibility-criteria.md +0 -42
- data/node_modules/accessible-autocomplete/app.json +0 -15
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +0 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +0 -2
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +0 -1
- data/node_modules/accessible-autocomplete/examples/form.html +0 -671
- data/node_modules/accessible-autocomplete/examples/index.html +0 -665
- data/node_modules/accessible-autocomplete/examples/multiselect.html +0 -134
- data/node_modules/accessible-autocomplete/examples/preact/index.html +0 -346
- data/node_modules/accessible-autocomplete/examples/react/index.html +0 -347
- data/node_modules/accessible-autocomplete/package-lock.json +0 -14491
- data/node_modules/accessible-autocomplete/package.json +0 -173
- data/node_modules/accessible-autocomplete/preact.js +0 -1
- data/node_modules/accessible-autocomplete/react.js +0 -1
- data/node_modules/accessible-autocomplete/scripts/check-staged.js +0 -14
- data/node_modules/accessible-autocomplete/src/autocomplete.css +0 -192
- data/node_modules/accessible-autocomplete/src/autocomplete.js +0 -618
- data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +0 -11
- data/node_modules/accessible-autocomplete/src/status.js +0 -80
- data/node_modules/accessible-autocomplete/src/wrapper.js +0 -76
- data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +0 -44
- data/node_modules/accessible-autocomplete/test/functional/index.js +0 -485
- data/node_modules/accessible-autocomplete/test/functional/wrapper.js +0 -318
- data/node_modules/accessible-autocomplete/test/integration/index.js +0 -188
- data/node_modules/accessible-autocomplete/test/karma.config.js +0 -42
- data/node_modules/accessible-autocomplete/test/wdio.config.js +0 -80
- data/node_modules/accessible-autocomplete/webpack.config.babel.js +0 -193
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/components/button/template.njk +0 -35
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +0 -19
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +0 -130
- data/node_modules/govuk-frontend/components/tag/_tag.scss +0 -33
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +0 -32
- data/node_modules/govuk-frontend/helpers/_focusable.scss +0 -34
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +0 -67
- data/node_modules/govuk-frontend/helpers/_grid.scss +0 -107
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +0 -37
- data/node_modules/govuk-frontend/settings/_compatibility.scss +0 -51
- data/node_modules/preact/LICENSE +0 -21
- data/node_modules/preact/README.md +0 -592
- data/node_modules/preact/debug.js +0 -740
- data/node_modules/preact/debug.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.js +0 -2
- data/node_modules/preact/debug/dist/debug.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.mjs +0 -681
- data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
- data/node_modules/preact/debug/dist/debug.module.js +0 -2
- data/node_modules/preact/debug/dist/debug.module.js.map +0 -1
- data/node_modules/preact/debug/dist/debug.umd.js +0 -2
- data/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
- data/node_modules/preact/debug/index.js +0 -122
- data/node_modules/preact/devtools.js +0 -403
- data/node_modules/preact/devtools.js.map +0 -1
- data/node_modules/preact/devtools/devtools.js +0 -395
- data/node_modules/preact/devtools/index.js +0 -4
- data/node_modules/preact/dist/preact.d.ts +0 -1712
- data/node_modules/preact/dist/preact.dev.js +0 -727
- data/node_modules/preact/dist/preact.dev.js.map +0 -1
- data/node_modules/preact/dist/preact.js +0 -414
- data/node_modules/preact/dist/preact.js.flow +0 -25
- data/node_modules/preact/dist/preact.js.map +0 -1
- data/node_modules/preact/dist/preact.min.js +0 -2
- data/node_modules/preact/dist/preact.min.js.map +0 -1
- data/node_modules/preact/dist/preact.mjs +0 -724
- data/node_modules/preact/dist/preact.mjs.map +0 -1
- data/node_modules/preact/dist/preact.umd.js +0 -751
- data/node_modules/preact/dist/preact.umd.js.map +0 -1
- data/node_modules/preact/package.json +0 -226
- data/node_modules/preact/src/clone-element.js +0 -18
- data/node_modules/preact/src/component.js +0 -90
- data/node_modules/preact/src/constants.js +0 -17
- data/node_modules/preact/src/dom/index.js +0 -139
- data/node_modules/preact/src/h.js +0 -86
- data/node_modules/preact/src/options.js +0 -22
- data/node_modules/preact/src/preact.d.ts +0 -1712
- data/node_modules/preact/src/preact.js +0 -32
- data/node_modules/preact/src/preact.js.flow +0 -25
- data/node_modules/preact/src/render-queue.js +0 -27
- data/node_modules/preact/src/render.js +0 -22
- data/node_modules/preact/src/util.js +0 -30
- data/node_modules/preact/src/vdom/component-recycler.js +0 -48
- data/node_modules/preact/src/vdom/component.js +0 -296
- data/node_modules/preact/src/vdom/diff.js +0 -337
- data/node_modules/preact/src/vdom/index.js +0 -54
- data/node_modules/preact/src/vnode.js +0 -9
- data/node_modules/preact/typings.json +0 -5
@@ -1,740 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var n = require("preact"),
|
4
|
-
e = {};function t(e) {
|
5
|
-
return e.type === n.Fragment ? "Wrapper" : "function" == typeof e.type ? "Composite" : "string" == typeof e.type ? "Native" : "Text";
|
6
|
-
}function r(e) {
|
7
|
-
return e.type === n.Fragment ? "Fragment" : "function" == typeof e.type ? e.type.displayName || e.type.name : "string" == typeof e.type ? e.type : "#text";
|
8
|
-
}function o(n, e, t) {
|
9
|
-
var r = e.pop(),
|
10
|
-
o = e.reduce(function (n, e) {
|
11
|
-
return n ? n[e] : null;
|
12
|
-
}, n);o && (o[r] = t);
|
13
|
-
}function i(e) {
|
14
|
-
var i = e.__c,
|
15
|
-
u = null;null != i && i instanceof n.Component && (u = { setState: i.setState.bind(i), forceUpdate: i.forceUpdate.bind(i), setInState: function setInState(n, e) {
|
16
|
-
i.setState(function (t) {
|
17
|
-
return o(t, n, e), t;
|
18
|
-
});
|
19
|
-
}, setInProps: function setInProps(n, t) {
|
20
|
-
o(e.props, n, t), i.setState({});
|
21
|
-
}, setInContext: function setInContext(n, e) {
|
22
|
-
o(i.context, n, e), i.setState({});
|
23
|
-
} });var s = a(e),
|
24
|
-
c = e.endTime - e.startTime;return { nodeType: t(e), type: e.type, name: r(e), ref: e.ref || null, key: e.key || null, updater: u, text: null === e.type ? e.props : null, state: null != i && i instanceof n.Component ? i.state : null, props: e.props, children: null !== e.type ? null != s && 1 == s.length && null === s[0].type ? s[0].props : s : null, publicInstance: l(e), memoizedInteractions: [], actualDuration: c, actualStartTime: e.startTime, treeBaseDuration: c };
|
25
|
-
}function a(n) {
|
26
|
-
return null == n.__c ? null != n.__k ? n.__k.filter(Boolean) : [] : null != n.__k ? n.__k.filter(Boolean) : null;
|
27
|
-
}function u(e) {
|
28
|
-
return e.type === n.Fragment && null === e.__p;
|
29
|
-
}function l(e) {
|
30
|
-
return u(e) ? e.__k.length > 0 && null != e.__k[0] && null != e.__k[0].__e ? e.__k[0].__e.parentNode : e : null != e.__c ? e.__c : e.type === n.Fragment ? e.props : e.__e;
|
31
|
-
}function s(n, e, t) {
|
32
|
-
if (null == n || null == e) return !1;for (var r in n) {
|
33
|
-
if ((!t || "children" != r || null == e[r]) && n[r] !== e[r]) return !1;
|
34
|
-
}return Object.keys(n).length === Object.keys(e).length;
|
35
|
-
}function c(n) {
|
36
|
-
var e = n.props,
|
37
|
-
t = r(n),
|
38
|
-
o = "";if (e) for (var i in e) {
|
39
|
-
if (e.hasOwnProperty(i) && "children" !== i) {
|
40
|
-
var a = e[i];"function" == typeof a && (a = "function " + (a.displayName || a.name) + "() {}"), a = Object(a) !== a || a.toString ? a + "" : Object.prototype.toString.call(a), o += " " + i + "=" + JSON.stringify(a);
|
41
|
-
}
|
42
|
-
}var u = e.children;return "<" + t + o + (u && u.length ? ">..</" + t + ">" : " />");
|
43
|
-
}var f = function f(n, e) {
|
44
|
-
this.rid = e, this.hook = n, this.pending = [], this.inst2vnode = new WeakMap(), this.connected = !1;
|
45
|
-
};function d(n) {
|
46
|
-
return function (e) {
|
47
|
-
try {
|
48
|
-
return n(e);
|
49
|
-
} catch (n) {
|
50
|
-
console.error("The react devtools encountered an error"), console.error(n);
|
51
|
-
}
|
52
|
-
};
|
53
|
-
}f.prototype.markConnected = function () {
|
54
|
-
this.connected = !0, this.flushPendingEvents();
|
55
|
-
}, f.prototype.flushPendingEvents = function () {
|
56
|
-
if (this.connected) {
|
57
|
-
var n = this.pending;this.pending = [];for (var e = 0; e < n.length; e++) {
|
58
|
-
var t = n[e];this.hook.emit(t.type, t);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}, f.prototype.mount = function (n) {
|
62
|
-
this.inst2vnode.set(l(n), n);var e = i(n),
|
63
|
-
t = [{ internalInstance: n, data: e, renderer: this.rid, type: "mount" }];if (Array.isArray(e.children)) for (var r, o = e.children.slice(); null != (r = o.pop());) {
|
64
|
-
var s = a(r);o.push.apply(o, s), this.inst2vnode.set(l(r), r);var c = i(r);t.push({ internalInstance: r, data: c, renderer: this.rid, type: "mount" });
|
65
|
-
}for (var f = t.length; --f >= 0;) {
|
66
|
-
this.pending.push(t[f]);
|
67
|
-
}u(n) && this.pending.push({ internalInstance: n, data: e, renderer: this.rid, type: "root" });
|
68
|
-
}, f.prototype.update = function (n) {
|
69
|
-
var e = i(n);if (Array.isArray(e.children)) for (var t = 0; t < e.children.length; t++) {
|
70
|
-
var r = e.children[t],
|
71
|
-
o = l(r);null == this.inst2vnode.get(o) ? this.mount(r) : this.update(r), e.children[t] = this.inst2vnode.get(o);
|
72
|
-
}var a = this.inst2vnode.get(e.publicInstance);!function (n, e) {
|
73
|
-
return n.props !== e.props && !s(n.props, e.props, !0) || null != n.__c && !s(e.__c.__u, e.__c.state) || n.__e !== e.__e || n.ref !== e.ref;
|
74
|
-
}(a, n) ? this.pending.push({ internalInstance: a, data: e, renderer: this.rid, type: "updateProfileTimes" }) : this.pending.push({ internalInstance: a, data: e, renderer: this.rid, type: "update" });
|
75
|
-
}, f.prototype.handleCommitFiberRoot = function (n) {
|
76
|
-
var e = l(n);this.inst2vnode.has(e) ? this.update(n) : this.mount(n);var t = null;if (u(n)) n.treeBaseDuration = 0, t = n;else for (t = n; null != t.__p;) {
|
77
|
-
t = t.__p;
|
78
|
-
}return this.pending.push({ internalInstance: t, renderer: this.rid, data: i(t), type: "rootCommitted" }), this.flushPendingEvents(), n;
|
79
|
-
}, f.prototype.handleCommitFiberUnmount = function (n) {
|
80
|
-
var e = l(n);this.inst2vnode.delete(e), this.pending.push({ internalInstance: n, renderer: this.rid, type: "unmount" });
|
81
|
-
}, f.prototype.getNativeFromReactElement = function (n) {
|
82
|
-
return n.__e;
|
83
|
-
}, f.prototype.getReactElementFromNative = function (n) {
|
84
|
-
return this.inst2vnode.get(n) || null;
|
85
|
-
}, f.prototype.walkTree = function () {}, f.prototype.cleanup = function () {};var h = function h() {},
|
86
|
-
p = Date.now;try {
|
87
|
-
p = performance.now.bind(performance);
|
88
|
-
} catch (n) {}"development" === process.env.NODE_ENV && (function () {
|
89
|
-
var t = n.options.__b,
|
90
|
-
o = n.options.diffed,
|
91
|
-
i = n.options.vnode,
|
92
|
-
a = n.options.__e,
|
93
|
-
u = { useEffect: {}, useLayoutEffect: {}, lazyPropTypes: {} };n.options.__e = function (n, e, t) {
|
94
|
-
if (e && e.__c && "function" == typeof n.then) {
|
95
|
-
var o = n;n = new Error("Missing Suspense. The throwing component was: " + r(e));for (var i = e; i; i = i.__p) {
|
96
|
-
if (i.__c && i.__c.t) {
|
97
|
-
n = o;break;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}a(n, e, t);
|
101
|
-
}, n.options.__p = function (n, e) {
|
102
|
-
if (!e) throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch (e.nodeType) {case 1:case 11:case 9:
|
103
|
-
t = !0;break;default:
|
104
|
-
t = !1;}if (!t) throw new Error("\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived " + e + " instead: render(<" + (n.type.name || n.type) + " />, " + e + ");\n\t\t");
|
105
|
-
}, n.options.__b = function (n) {
|
106
|
-
if (null != n) {
|
107
|
-
var o,
|
108
|
-
i,
|
109
|
-
a,
|
110
|
-
l,
|
111
|
-
s = n.type,
|
112
|
-
f = function n(e) {
|
113
|
-
return e ? "function" == typeof e.type ? n(e.__p) : e : {};
|
114
|
-
}(n.__p);if (void 0 === s) throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports" + c(n));if (null != s && "object" == typeof s) {
|
115
|
-
if (void 0 !== s.o && void 0 !== s.__e) {
|
116
|
-
var d = "Did you accidentally pass a JSX literal as JSX twice?\n\n let My" + r(s) + " = " + c(s) + ";\n let vnode = <My" + r(s) + " />;\n\nThis usually happens when you export a JSX literal and not the component.";throw new Error("Invalid type passed to createElement(): " + s + "\n\n" + d + "\n");
|
117
|
-
}throw new Error("Invalid type passed to createElement(): " + (Array.isArray(s) ? "array" : s));
|
118
|
-
}if ("thead" !== s && "tfoot" !== s && "thead" !== s || "table" === f.type ? "tr" === s && "thead" !== f.type && "tfoot" !== f.type && "tbody" !== f.type && "table" !== f.type ? console.error("Improper nesting of table.Your <tr> should have a <thead/tbody/tfoot/table> parent." + c(n)) : "td" === s && "tr" !== f.type ? console.error("Improper nesting of table.Your <td> should have a <tr> parent." + c(n)) : "th" === s && "tr" !== f.type && console.error("Improper nesting of table.Your <th> should have a <tr>." + c(n)) : console.error("Improper nesting of table.Your <thead/tbody/tfoot> should have a <table> parent." + c(n)), void 0 !== n.ref && "function" != typeof n.ref && "object" != typeof n.ref && !("$$typeof" in n)) throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got [' + typeof n.ref + "] instead\n" + c(n));if ("string" == typeof n.type) for (var h in n.props) {
|
119
|
-
if ("o" === h[0] && "n" === h[1] && "function" != typeof n.props[h] && null != n.props[h]) throw new Error("Component's \"" + h + '" property should be a function, but got [' + typeof n.props[h] + "] instead\n" + c(n));
|
120
|
-
}if ("function" == typeof n.type && n.type.propTypes) {
|
121
|
-
if ("Lazy" === n.type.displayName && !u.lazyPropTypes[n.type]) {
|
122
|
-
var p = "PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try {
|
123
|
-
var v = n.type();u.lazyPropTypes[n.type] = !0, console.warn(p + "Component wrapped in lazy() is " + (v.type.displayName || v.type.name));
|
124
|
-
} catch (n) {
|
125
|
-
console.warn(p + "We will log the wrapped component's name once it is loaded.");
|
126
|
-
}
|
127
|
-
}o = n.type.propTypes, i = n.props, a = r(n), l = c(n), Object.keys(o).forEach(function (n) {
|
128
|
-
var t;try {
|
129
|
-
t = o[n](i, n, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
130
|
-
} catch (n) {
|
131
|
-
t = n;
|
132
|
-
}!t || t.message in e || (e[t.message] = !0, console.error("Failed " + a + " type: " + t.message));
|
133
|
-
});
|
134
|
-
}t && t(n);
|
135
|
-
}
|
136
|
-
}, n.options.__h = function (n) {
|
137
|
-
if (!n) throw new Error("Hook can only be invoked from render methods.");
|
138
|
-
};var l = function l(n, e) {
|
139
|
-
return { get: function get() {
|
140
|
-
throw new Error("getting vnode." + n + " is deprecated, " + e);
|
141
|
-
}, set: function set() {
|
142
|
-
throw new Error("setting vnode." + n + " is not allowed, " + e);
|
143
|
-
} };
|
144
|
-
},
|
145
|
-
s = { nodeName: l("nodeName", "use vnode.type"), attributes: l("attributes", "use vnode.props"), children: l("children", "use vnode.props.children") };n.options.vnode = function (n) {
|
146
|
-
var e, t;n.props && n.props.i && (e = n.props.i, delete n.props.i), n.props && n.props.u && (t = n.props.u, delete n.props.u), n.u = t, n.i = e, Object.defineProperties(n, s), i && i(n);
|
147
|
-
}, n.options.diffed = function (n) {
|
148
|
-
if (null != n) {
|
149
|
-
if (n.__c && n.__c.l) {
|
150
|
-
var e = n.__c.l;e.s.forEach(function (e) {
|
151
|
-
!e.h || e.p && Array.isArray(e.p) || console.warn("In " + (n.type.name || n.type) + " you are calling useMemo/useCallback without passing arguments.\nThis is a noop since it will not be able to memoize, it will execute it every render.");
|
152
|
-
}), e.v.length > 0 && e.v.forEach(function (e) {
|
153
|
-
e.p && Array.isArray(e.p) || u.useEffect[n.type] || (u.useEffect[n.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (n.type.name || n.type) + "."));
|
154
|
-
}), e.m.length > 0 && e.m.forEach(function (e) {
|
155
|
-
e.p && Array.isArray(e.p) || u.useLayoutEffect[n.type] || (u.useLayoutEffect[n.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useLayoutEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (n.type.name || n.type) + "."));
|
156
|
-
});
|
157
|
-
}if (null != n.__k) for (var t = [], r = 0; r < n.__k.length; r++) {
|
158
|
-
var i = n.__k[r];if (i && null != i.key) {
|
159
|
-
var a = i.key;if (-1 !== t.indexOf(a)) {
|
160
|
-
console.error('Following component has two or more children with the same key attribute: "' + a + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + c(n));break;
|
161
|
-
}t.push(a);
|
162
|
-
}
|
163
|
-
}o && o(n);
|
164
|
-
}
|
165
|
-
};
|
166
|
-
}(), function () {
|
167
|
-
var e = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if (null != e) {
|
168
|
-
var t = h,
|
169
|
-
r = h,
|
170
|
-
o = Math.random().toString(16).slice(2),
|
171
|
-
i = new f(e, o);d(function () {
|
172
|
-
var a = !1;try {
|
173
|
-
a = "production" !== process.env.NODE_ENV;
|
174
|
-
} catch (n) {}window.parent.postMessage({ source: "react-devtools-detector", reactBuildType: a ? "development" : "production" }, "*");var u = { bundleType: a ? 1 : 0, version: "16.5.2", rendererPackageName: "preact", findHostInstanceByFiber: function findHostInstanceByFiber(n) {
|
175
|
-
return n.__e;
|
176
|
-
}, findFiberByHostInstance: function findFiberByHostInstance(n) {
|
177
|
-
return i.inst2vnode.get(n) || null;
|
178
|
-
} };e._renderers[o] = u, Object.defineProperty(e.helpers, o, { get: function get() {
|
179
|
-
return i;
|
180
|
-
}, set: function set() {
|
181
|
-
i.connected || l.markConnected();
|
182
|
-
} });var l = e.helpers[o];e.emit("renderer-attached", { id: o, renderer: u, helpers: l }), t = d(function (t) {
|
183
|
-
if (t.type !== n.Fragment || 0 != t.__k.length) {
|
184
|
-
var r = e.getFiberRoots(o);t = l.handleCommitFiberRoot(t), r.has(t) || r.add(t);
|
185
|
-
}
|
186
|
-
}), r = d(function (n) {
|
187
|
-
e.onCommitFiberUnmount(o, n);
|
188
|
-
});
|
189
|
-
})();var a = n.options.vnode,
|
190
|
-
u = n.options.__c,
|
191
|
-
l = n.options.unmount,
|
192
|
-
s = n.options.__b,
|
193
|
-
c = n.options.diffed;n.options.vnode = function (n) {
|
194
|
-
n.startTime = NaN, n.endTime = NaN, n.startTime = 0, n.endTime = -1, a && a(n);
|
195
|
-
}, n.options.__b = function (n) {
|
196
|
-
n.startTime = p(), null != s && s(n);
|
197
|
-
}, n.options.diffed = function (n) {
|
198
|
-
n.endTime = p(), null != c && c(n);
|
199
|
-
}, n.options.__c = d(function (n) {
|
200
|
-
null != u && u(n), null != n && t(n);
|
201
|
-
}), n.options.unmount = d(function (n) {
|
202
|
-
null != l && l(n), r(n);
|
203
|
-
});var v = n.Component.prototype.setState;n.Component.prototype.setState = function (n, e) {
|
204
|
-
var t = this.__s !== this.state && this.__s || (this.__s = Object.assign({}, this.state));return this.__u = Object.assign({}, t), v.call(this, n, e);
|
205
|
-
};
|
206
|
-
}
|
207
|
-
}());
|
208
|
-
//# sourceMappingURL=debug.js.map
|
209
|
-
"use strict";
|
210
|
-
|
211
|
-
var _preact = require("preact");
|
212
|
-
|
213
|
-
var r = {};function o(n) {
|
214
|
-
return n.type === _preact.Fragment ? "Wrapper" : "function" == typeof n.type ? "Composite" : "string" == typeof n.type ? "Native" : "Text";
|
215
|
-
}function i(n) {
|
216
|
-
return n.type === _preact.Fragment ? "Fragment" : "function" == typeof n.type ? n.type.displayName || n.type.name : "string" == typeof n.type ? n.type : "#text";
|
217
|
-
}function a(n, e, t) {
|
218
|
-
var r = e.pop(),
|
219
|
-
o = e.reduce(function (n, e) {
|
220
|
-
return n ? n[e] : null;
|
221
|
-
}, n);o && (o[r] = t);
|
222
|
-
}function u(e) {
|
223
|
-
var t = e.__c,
|
224
|
-
r = null;null != t && t instanceof _preact.Component && (r = { setState: t.setState.bind(t), forceUpdate: t.forceUpdate.bind(t), setInState: function setInState(n, e) {
|
225
|
-
t.setState(function (t) {
|
226
|
-
return a(t, n, e), t;
|
227
|
-
});
|
228
|
-
}, setInProps: function setInProps(n, r) {
|
229
|
-
a(e.props, n, r), t.setState({});
|
230
|
-
}, setInContext: function setInContext(n, e) {
|
231
|
-
a(t.context, n, e), t.setState({});
|
232
|
-
} });var u = l(e),
|
233
|
-
s = e.endTime - e.startTime;return { nodeType: o(e), type: e.type, name: i(e), ref: e.ref || null, key: e.key || null, updater: r, text: null === e.type ? e.props : null, state: null != t && t instanceof _preact.Component ? t.state : null, props: e.props, children: null !== e.type ? null != u && 1 == u.length && null === u[0].type ? u[0].props : u : null, publicInstance: c(e), memoizedInteractions: [], actualDuration: s, actualStartTime: e.startTime, treeBaseDuration: s };
|
234
|
-
}function l(n) {
|
235
|
-
return null == n.__c ? null != n.__k ? n.__k.filter(Boolean) : [] : null != n.__k ? n.__k.filter(Boolean) : null;
|
236
|
-
}function s(n) {
|
237
|
-
return n.type === _preact.Fragment && null === n.__p;
|
238
|
-
}function c(n) {
|
239
|
-
return s(n) ? n.__k.length > 0 && null != n.__k[0] && null != n.__k[0].__e ? n.__k[0].__e.parentNode : n : null != n.__c ? n.__c : n.type === _preact.Fragment ? n.props : n.__e;
|
240
|
-
}function f(n, e, t) {
|
241
|
-
if (null == n || null == e) return !1;for (var r in n) {
|
242
|
-
if ((!t || "children" != r || null == e[r]) && n[r] !== e[r]) return !1;
|
243
|
-
}return Object.keys(n).length === Object.keys(e).length;
|
244
|
-
}function d(n) {
|
245
|
-
var e = n.props,
|
246
|
-
t = i(n),
|
247
|
-
r = "";if (e) for (var o in e) {
|
248
|
-
if (e.hasOwnProperty(o) && "children" !== o) {
|
249
|
-
var a = e[o];"function" == typeof a && (a = "function " + (a.displayName || a.name) + "() {}"), a = Object(a) !== a || a.toString ? a + "" : Object.prototype.toString.call(a), r += " " + o + "=" + JSON.stringify(a);
|
250
|
-
}
|
251
|
-
}var u = e.children;return "<" + t + r + (u && u.length ? ">..</" + t + ">" : " />");
|
252
|
-
}var h = function h(n, e) {
|
253
|
-
this.rid = e, this.hook = n, this.pending = [], this.inst2vnode = new WeakMap(), this.connected = !1;
|
254
|
-
};function p(n) {
|
255
|
-
return function (e) {
|
256
|
-
try {
|
257
|
-
return n(e);
|
258
|
-
} catch (n) {
|
259
|
-
console.error("The react devtools encountered an error"), console.error(n);
|
260
|
-
}
|
261
|
-
};
|
262
|
-
}h.prototype.markConnected = function () {
|
263
|
-
this.connected = !0, this.flushPendingEvents();
|
264
|
-
}, h.prototype.flushPendingEvents = function () {
|
265
|
-
if (this.connected) {
|
266
|
-
var n = this.pending;this.pending = [];for (var e = 0; e < n.length; e++) {
|
267
|
-
var t = n[e];this.hook.emit(t.type, t);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
}, h.prototype.mount = function (n) {
|
271
|
-
this.inst2vnode.set(c(n), n);var e = u(n),
|
272
|
-
t = [{ internalInstance: n, data: e, renderer: this.rid, type: "mount" }];if (Array.isArray(e.children)) for (var r, o = e.children.slice(); null != (r = o.pop());) {
|
273
|
-
var i = l(r);o.push.apply(o, i), this.inst2vnode.set(c(r), r);var a = u(r);t.push({ internalInstance: r, data: a, renderer: this.rid, type: "mount" });
|
274
|
-
}for (var f = t.length; --f >= 0;) {
|
275
|
-
this.pending.push(t[f]);
|
276
|
-
}s(n) && this.pending.push({ internalInstance: n, data: e, renderer: this.rid, type: "root" });
|
277
|
-
}, h.prototype.update = function (n) {
|
278
|
-
var e = u(n);if (Array.isArray(e.children)) for (var t = 0; t < e.children.length; t++) {
|
279
|
-
var r = e.children[t],
|
280
|
-
o = c(r);null == this.inst2vnode.get(o) ? this.mount(r) : this.update(r), e.children[t] = this.inst2vnode.get(o);
|
281
|
-
}var i = this.inst2vnode.get(e.publicInstance);!function (n, e) {
|
282
|
-
return n.props !== e.props && !f(n.props, e.props, !0) || null != n.__c && !f(e.__c.__u, e.__c.state) || n.__e !== e.__e || n.ref !== e.ref;
|
283
|
-
}(i, n) ? this.pending.push({ internalInstance: i, data: e, renderer: this.rid, type: "updateProfileTimes" }) : this.pending.push({ internalInstance: i, data: e, renderer: this.rid, type: "update" });
|
284
|
-
}, h.prototype.handleCommitFiberRoot = function (n) {
|
285
|
-
var e = c(n);this.inst2vnode.has(e) ? this.update(n) : this.mount(n);var t = null;if (s(n)) n.treeBaseDuration = 0, t = n;else for (t = n; null != t.__p;) {
|
286
|
-
t = t.__p;
|
287
|
-
}return this.pending.push({ internalInstance: t, renderer: this.rid, data: u(t), type: "rootCommitted" }), this.flushPendingEvents(), n;
|
288
|
-
}, h.prototype.handleCommitFiberUnmount = function (n) {
|
289
|
-
var e = c(n);this.inst2vnode.delete(e), this.pending.push({ internalInstance: n, renderer: this.rid, type: "unmount" });
|
290
|
-
}, h.prototype.getNativeFromReactElement = function (n) {
|
291
|
-
return n.__e;
|
292
|
-
}, h.prototype.getReactElementFromNative = function (n) {
|
293
|
-
return this.inst2vnode.get(n) || null;
|
294
|
-
}, h.prototype.walkTree = function () {}, h.prototype.cleanup = function () {};var v = function v() {},
|
295
|
-
y = Date.now;try {
|
296
|
-
y = performance.now.bind(performance);
|
297
|
-
} catch (n) {}"development" === process.env.NODE_ENV && (function () {
|
298
|
-
var n = _preact.options.__b,
|
299
|
-
e = _preact.options.diffed,
|
300
|
-
o = _preact.options.vnode,
|
301
|
-
a = _preact.options.__e,
|
302
|
-
u = { useEffect: {}, useLayoutEffect: {}, lazyPropTypes: {} };_preact.options.__e = function (n, e, t) {
|
303
|
-
if (e && e.__c && "function" == typeof n.then) {
|
304
|
-
var r = n;n = new Error("Missing Suspense. The throwing component was: " + i(e));for (var o = e; o; o = o.__p) {
|
305
|
-
if (o.__c && o.__c.t) {
|
306
|
-
n = r;break;
|
307
|
-
}
|
308
|
-
}
|
309
|
-
}a(n, e, t);
|
310
|
-
}, _preact.options.__p = function (n, e) {
|
311
|
-
if (!e) throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch (e.nodeType) {case 1:case 11:case 9:
|
312
|
-
t = !0;break;default:
|
313
|
-
t = !1;}if (!t) throw new Error("\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived " + e + " instead: render(<" + (n.type.name || n.type) + " />, " + e + ");\n\t\t");
|
314
|
-
}, _preact.options.__b = function (e) {
|
315
|
-
if (null != e) {
|
316
|
-
var t,
|
317
|
-
o,
|
318
|
-
a,
|
319
|
-
l,
|
320
|
-
s = e.type,
|
321
|
-
c = function n(e) {
|
322
|
-
return e ? "function" == typeof e.type ? n(e.__p) : e : {};
|
323
|
-
}(e.__p);if (void 0 === s) throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports" + d(e));if (null != s && "object" == typeof s) {
|
324
|
-
if (void 0 !== s.o && void 0 !== s.__e) {
|
325
|
-
var f = "Did you accidentally pass a JSX literal as JSX twice?\n\n let My" + i(s) + " = " + d(s) + ";\n let vnode = <My" + i(s) + " />;\n\nThis usually happens when you export a JSX literal and not the component.";throw new Error("Invalid type passed to createElement(): " + s + "\n\n" + f + "\n");
|
326
|
-
}throw new Error("Invalid type passed to createElement(): " + (Array.isArray(s) ? "array" : s));
|
327
|
-
}if ("thead" !== s && "tfoot" !== s && "thead" !== s || "table" === c.type ? "tr" === s && "thead" !== c.type && "tfoot" !== c.type && "tbody" !== c.type && "table" !== c.type ? console.error("Improper nesting of table.Your <tr> should have a <thead/tbody/tfoot/table> parent." + d(e)) : "td" === s && "tr" !== c.type ? console.error("Improper nesting of table.Your <td> should have a <tr> parent." + d(e)) : "th" === s && "tr" !== c.type && console.error("Improper nesting of table.Your <th> should have a <tr>." + d(e)) : console.error("Improper nesting of table.Your <thead/tbody/tfoot> should have a <table> parent." + d(e)), void 0 !== e.ref && "function" != typeof e.ref && "object" != typeof e.ref && !("$$typeof" in e)) throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got [' + typeof e.ref + "] instead\n" + d(e));if ("string" == typeof e.type) for (var h in e.props) {
|
328
|
-
if ("o" === h[0] && "n" === h[1] && "function" != typeof e.props[h] && null != e.props[h]) throw new Error("Component's \"" + h + '" property should be a function, but got [' + typeof e.props[h] + "] instead\n" + d(e));
|
329
|
-
}if ("function" == typeof e.type && e.type.propTypes) {
|
330
|
-
if ("Lazy" === e.type.displayName && !u.lazyPropTypes[e.type]) {
|
331
|
-
var p = "PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try {
|
332
|
-
var v = e.type();u.lazyPropTypes[e.type] = !0, console.warn(p + "Component wrapped in lazy() is " + (v.type.displayName || v.type.name));
|
333
|
-
} catch (n) {
|
334
|
-
console.warn(p + "We will log the wrapped component's name once it is loaded.");
|
335
|
-
}
|
336
|
-
}t = e.type.propTypes, o = e.props, a = i(e), l = d(e), Object.keys(t).forEach(function (n) {
|
337
|
-
var e;try {
|
338
|
-
e = t[n](o, n, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
339
|
-
} catch (n) {
|
340
|
-
e = n;
|
341
|
-
}!e || e.message in r || (r[e.message] = !0, console.error("Failed " + a + " type: " + e.message));
|
342
|
-
});
|
343
|
-
}n && n(e);
|
344
|
-
}
|
345
|
-
}, _preact.options.__h = function (n) {
|
346
|
-
if (!n) throw new Error("Hook can only be invoked from render methods.");
|
347
|
-
};var l = function l(n, e) {
|
348
|
-
return { get: function get() {
|
349
|
-
throw new Error("getting vnode." + n + " is deprecated, " + e);
|
350
|
-
}, set: function set() {
|
351
|
-
throw new Error("setting vnode." + n + " is not allowed, " + e);
|
352
|
-
} };
|
353
|
-
},
|
354
|
-
s = { nodeName: l("nodeName", "use vnode.type"), attributes: l("attributes", "use vnode.props"), children: l("children", "use vnode.props.children") };_preact.options.vnode = function (n) {
|
355
|
-
var e, t;n.props && n.props.i && (e = n.props.i, delete n.props.i), n.props && n.props.u && (t = n.props.u, delete n.props.u), n.u = t, n.i = e, Object.defineProperties(n, s), o && o(n);
|
356
|
-
}, _preact.options.diffed = function (n) {
|
357
|
-
if (null != n) {
|
358
|
-
if (n.__c && n.__c.l) {
|
359
|
-
var t = n.__c.l;t.s.forEach(function (e) {
|
360
|
-
!e.h || e.p && Array.isArray(e.p) || console.warn("In " + (n.type.name || n.type) + " you are calling useMemo/useCallback without passing arguments.\nThis is a noop since it will not be able to memoize, it will execute it every render.");
|
361
|
-
}), t.v.length > 0 && t.v.forEach(function (e) {
|
362
|
-
e.p && Array.isArray(e.p) || u.useEffect[n.type] || (u.useEffect[n.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (n.type.name || n.type) + "."));
|
363
|
-
}), t.m.length > 0 && t.m.forEach(function (e) {
|
364
|
-
e.p && Array.isArray(e.p) || u.useLayoutEffect[n.type] || (u.useLayoutEffect[n.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useLayoutEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (n.type.name || n.type) + "."));
|
365
|
-
});
|
366
|
-
}if (null != n.__k) for (var r = [], o = 0; o < n.__k.length; o++) {
|
367
|
-
var i = n.__k[o];if (i && null != i.key) {
|
368
|
-
var a = i.key;if (-1 !== r.indexOf(a)) {
|
369
|
-
console.error('Following component has two or more children with the same key attribute: "' + a + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + d(n));break;
|
370
|
-
}r.push(a);
|
371
|
-
}
|
372
|
-
}e && e(n);
|
373
|
-
}
|
374
|
-
};
|
375
|
-
}(), function () {
|
376
|
-
var r = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if (null != r) {
|
377
|
-
var o = v,
|
378
|
-
i = v,
|
379
|
-
a = Math.random().toString(16).slice(2),
|
380
|
-
u = new h(r, a);p(function () {
|
381
|
-
var n = !1;try {
|
382
|
-
n = "production" !== process.env.NODE_ENV;
|
383
|
-
} catch (n) {}window.parent.postMessage({ source: "react-devtools-detector", reactBuildType: n ? "development" : "production" }, "*");var t = { bundleType: n ? 1 : 0, version: "16.5.2", rendererPackageName: "preact", findHostInstanceByFiber: function findHostInstanceByFiber(n) {
|
384
|
-
return n.__e;
|
385
|
-
}, findFiberByHostInstance: function findFiberByHostInstance(n) {
|
386
|
-
return u.inst2vnode.get(n) || null;
|
387
|
-
} };r._renderers[a] = t, Object.defineProperty(r.helpers, a, { get: function get() {
|
388
|
-
return u;
|
389
|
-
}, set: function set() {
|
390
|
-
u.connected || l.markConnected();
|
391
|
-
} });var l = r.helpers[a];r.emit("renderer-attached", { id: a, renderer: t, helpers: l }), o = p(function (n) {
|
392
|
-
if (n.type !== _preact.Fragment || 0 != n.__k.length) {
|
393
|
-
var t = r.getFiberRoots(a);n = l.handleCommitFiberRoot(n), t.has(n) || t.add(n);
|
394
|
-
}
|
395
|
-
}), i = p(function (n) {
|
396
|
-
r.onCommitFiberUnmount(a, n);
|
397
|
-
});
|
398
|
-
})();var l = _preact.options.vnode,
|
399
|
-
s = _preact.options.__c,
|
400
|
-
c = _preact.options.unmount,
|
401
|
-
f = _preact.options.__b,
|
402
|
-
d = _preact.options.diffed;_preact.options.vnode = function (n) {
|
403
|
-
n.startTime = NaN, n.endTime = NaN, n.startTime = 0, n.endTime = -1, l && l(n);
|
404
|
-
}, _preact.options.__b = function (n) {
|
405
|
-
n.startTime = y(), null != f && f(n);
|
406
|
-
}, _preact.options.diffed = function (n) {
|
407
|
-
n.endTime = y(), null != d && d(n);
|
408
|
-
}, _preact.options.__c = p(function (n) {
|
409
|
-
null != s && s(n), null != n && o(n);
|
410
|
-
}), _preact.options.unmount = p(function (n) {
|
411
|
-
null != c && c(n), i(n);
|
412
|
-
});var m = _preact.Component.prototype.setState;_preact.Component.prototype.setState = function (n, e) {
|
413
|
-
var t = this.__s !== this.state && this.__s || (this.__s = Object.assign({}, this.state));return this.__u = Object.assign({}, t), m.call(this, n, e);
|
414
|
-
};
|
415
|
-
}
|
416
|
-
}());
|
417
|
-
//# sourceMappingURL=debug.module.js.map
|
418
|
-
"use strict";
|
419
|
-
|
420
|
-
!function (e, n) {
|
421
|
-
"object" == typeof exports && "undefined" != typeof module ? n(require("preact")) : "function" == typeof define && define.amd ? define(["preact"], n) : n(e.preact);
|
422
|
-
}(undefined, function (e) {
|
423
|
-
var n = {};function t(n) {
|
424
|
-
return n.type === e.Fragment ? "Wrapper" : "function" == typeof n.type ? "Composite" : "string" == typeof n.type ? "Native" : "Text";
|
425
|
-
}function r(n) {
|
426
|
-
return n.type === e.Fragment ? "Fragment" : "function" == typeof n.type ? n.type.displayName || n.type.name : "string" == typeof n.type ? n.type : "#text";
|
427
|
-
}function o(e, n, t) {
|
428
|
-
var r = n.pop(),
|
429
|
-
o = n.reduce(function (e, n) {
|
430
|
-
return e ? e[n] : null;
|
431
|
-
}, e);o && (o[r] = t);
|
432
|
-
}function i(n) {
|
433
|
-
var i = n.__c,
|
434
|
-
u = null;null != i && i instanceof e.Component && (u = { setState: i.setState.bind(i), forceUpdate: i.forceUpdate.bind(i), setInState: function setInState(e, n) {
|
435
|
-
i.setState(function (t) {
|
436
|
-
return o(t, e, n), t;
|
437
|
-
});
|
438
|
-
}, setInProps: function setInProps(e, t) {
|
439
|
-
o(n.props, e, t), i.setState({});
|
440
|
-
}, setInContext: function setInContext(e, n) {
|
441
|
-
o(i.context, e, n), i.setState({});
|
442
|
-
} });var s = a(n),
|
443
|
-
c = n.endTime - n.startTime;return { nodeType: t(n), type: n.type, name: r(n), ref: n.ref || null, key: n.key || null, updater: u, text: null === n.type ? n.props : null, state: null != i && i instanceof e.Component ? i.state : null, props: n.props, children: null !== n.type ? null != s && 1 == s.length && null === s[0].type ? s[0].props : s : null, publicInstance: l(n), memoizedInteractions: [], actualDuration: c, actualStartTime: n.startTime, treeBaseDuration: c };
|
444
|
-
}function a(e) {
|
445
|
-
return null == e.__c ? null != e.__k ? e.__k.filter(Boolean) : [] : null != e.__k ? e.__k.filter(Boolean) : null;
|
446
|
-
}function u(n) {
|
447
|
-
return n.type === e.Fragment && null === n.__p;
|
448
|
-
}function l(n) {
|
449
|
-
return u(n) ? n.__k.length > 0 && null != n.__k[0] && null != n.__k[0].__e ? n.__k[0].__e.parentNode : n : null != n.__c ? n.__c : n.type === e.Fragment ? n.props : n.__e;
|
450
|
-
}function s(e, n, t) {
|
451
|
-
if (null == e || null == n) return !1;for (var r in e) {
|
452
|
-
if ((!t || "children" != r || null == n[r]) && e[r] !== n[r]) return !1;
|
453
|
-
}return Object.keys(e).length === Object.keys(n).length;
|
454
|
-
}function c(e) {
|
455
|
-
var n = e.props,
|
456
|
-
t = r(e),
|
457
|
-
o = "";if (n) for (var i in n) {
|
458
|
-
if (n.hasOwnProperty(i) && "children" !== i) {
|
459
|
-
var a = n[i];"function" == typeof a && (a = "function " + (a.displayName || a.name) + "() {}"), a = Object(a) !== a || a.toString ? a + "" : Object.prototype.toString.call(a), o += " " + i + "=" + JSON.stringify(a);
|
460
|
-
}
|
461
|
-
}var u = n.children;return "<" + t + o + (u && u.length ? ">..</" + t + ">" : " />");
|
462
|
-
}var f = function f(e, n) {
|
463
|
-
this.rid = n, this.hook = e, this.pending = [], this.inst2vnode = new WeakMap(), this.connected = !1;
|
464
|
-
};function d(e) {
|
465
|
-
return function (n) {
|
466
|
-
try {
|
467
|
-
return e(n);
|
468
|
-
} catch (e) {
|
469
|
-
console.error("The react devtools encountered an error"), console.error(e);
|
470
|
-
}
|
471
|
-
};
|
472
|
-
}f.prototype.markConnected = function () {
|
473
|
-
this.connected = !0, this.flushPendingEvents();
|
474
|
-
}, f.prototype.flushPendingEvents = function () {
|
475
|
-
if (this.connected) {
|
476
|
-
var e = this.pending;this.pending = [];for (var n = 0; n < e.length; n++) {
|
477
|
-
var t = e[n];this.hook.emit(t.type, t);
|
478
|
-
}
|
479
|
-
}
|
480
|
-
}, f.prototype.mount = function (e) {
|
481
|
-
this.inst2vnode.set(l(e), e);var n = i(e),
|
482
|
-
t = [{ internalInstance: e, data: n, renderer: this.rid, type: "mount" }];if (Array.isArray(n.children)) for (var r, o = n.children.slice(); null != (r = o.pop());) {
|
483
|
-
var s = a(r);o.push.apply(o, s), this.inst2vnode.set(l(r), r);var c = i(r);t.push({ internalInstance: r, data: c, renderer: this.rid, type: "mount" });
|
484
|
-
}for (var f = t.length; --f >= 0;) {
|
485
|
-
this.pending.push(t[f]);
|
486
|
-
}u(e) && this.pending.push({ internalInstance: e, data: n, renderer: this.rid, type: "root" });
|
487
|
-
}, f.prototype.update = function (e) {
|
488
|
-
var n = i(e);if (Array.isArray(n.children)) for (var t = 0; t < n.children.length; t++) {
|
489
|
-
var r = n.children[t],
|
490
|
-
o = l(r);null == this.inst2vnode.get(o) ? this.mount(r) : this.update(r), n.children[t] = this.inst2vnode.get(o);
|
491
|
-
}var a = this.inst2vnode.get(n.publicInstance);!function (e, n) {
|
492
|
-
return e.props !== n.props && !s(e.props, n.props, !0) || null != e.__c && !s(n.__c.__u, n.__c.state) || e.__e !== n.__e || e.ref !== n.ref;
|
493
|
-
}(a, e) ? this.pending.push({ internalInstance: a, data: n, renderer: this.rid, type: "updateProfileTimes" }) : this.pending.push({ internalInstance: a, data: n, renderer: this.rid, type: "update" });
|
494
|
-
}, f.prototype.handleCommitFiberRoot = function (e) {
|
495
|
-
var n = l(e);this.inst2vnode.has(n) ? this.update(e) : this.mount(e);var t = null;if (u(e)) e.treeBaseDuration = 0, t = e;else for (t = e; null != t.__p;) {
|
496
|
-
t = t.__p;
|
497
|
-
}return this.pending.push({ internalInstance: t, renderer: this.rid, data: i(t), type: "rootCommitted" }), this.flushPendingEvents(), e;
|
498
|
-
}, f.prototype.handleCommitFiberUnmount = function (e) {
|
499
|
-
var n = l(e);this.inst2vnode.delete(n), this.pending.push({ internalInstance: e, renderer: this.rid, type: "unmount" });
|
500
|
-
}, f.prototype.getNativeFromReactElement = function (e) {
|
501
|
-
return e.__e;
|
502
|
-
}, f.prototype.getReactElementFromNative = function (e) {
|
503
|
-
return this.inst2vnode.get(e) || null;
|
504
|
-
}, f.prototype.walkTree = function () {}, f.prototype.cleanup = function () {};var h = function h() {},
|
505
|
-
p = Date.now;try {
|
506
|
-
p = performance.now.bind(performance);
|
507
|
-
} catch (e) {}"development" === process.env.NODE_ENV && (function () {
|
508
|
-
var t = e.options.__b,
|
509
|
-
o = e.options.diffed,
|
510
|
-
i = e.options.vnode,
|
511
|
-
a = e.options.__e,
|
512
|
-
u = { useEffect: {}, useLayoutEffect: {}, lazyPropTypes: {} };e.options.__e = function (e, n, t) {
|
513
|
-
if (n && n.__c && "function" == typeof e.then) {
|
514
|
-
var o = e;e = new Error("Missing Suspense. The throwing component was: " + r(n));for (var i = n; i; i = i.__p) {
|
515
|
-
if (i.__c && i.__c.t) {
|
516
|
-
e = o;break;
|
517
|
-
}
|
518
|
-
}
|
519
|
-
}a(e, n, t);
|
520
|
-
}, e.options.__p = function (e, n) {
|
521
|
-
if (!n) throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch (n.nodeType) {case 1:case 11:case 9:
|
522
|
-
t = !0;break;default:
|
523
|
-
t = !1;}if (!t) throw new Error("\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived " + n + " instead: render(<" + (e.type.name || e.type) + " />, " + n + ");\n\t\t");
|
524
|
-
}, e.options.__b = function (e) {
|
525
|
-
if (null != e) {
|
526
|
-
var o,
|
527
|
-
i,
|
528
|
-
a,
|
529
|
-
l,
|
530
|
-
s = e.type,
|
531
|
-
f = function e(n) {
|
532
|
-
return n ? "function" == typeof n.type ? e(n.__p) : n : {};
|
533
|
-
}(e.__p);if (void 0 === s) throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports" + c(e));if (null != s && "object" == typeof s) {
|
534
|
-
if (void 0 !== s.o && void 0 !== s.__e) {
|
535
|
-
var d = "Did you accidentally pass a JSX literal as JSX twice?\n\n let My" + r(s) + " = " + c(s) + ";\n let vnode = <My" + r(s) + " />;\n\nThis usually happens when you export a JSX literal and not the component.";throw new Error("Invalid type passed to createElement(): " + s + "\n\n" + d + "\n");
|
536
|
-
}throw new Error("Invalid type passed to createElement(): " + (Array.isArray(s) ? "array" : s));
|
537
|
-
}if ("thead" !== s && "tfoot" !== s && "thead" !== s || "table" === f.type ? "tr" === s && "thead" !== f.type && "tfoot" !== f.type && "tbody" !== f.type && "table" !== f.type ? console.error("Improper nesting of table.Your <tr> should have a <thead/tbody/tfoot/table> parent." + c(e)) : "td" === s && "tr" !== f.type ? console.error("Improper nesting of table.Your <td> should have a <tr> parent." + c(e)) : "th" === s && "tr" !== f.type && console.error("Improper nesting of table.Your <th> should have a <tr>." + c(e)) : console.error("Improper nesting of table.Your <thead/tbody/tfoot> should have a <table> parent." + c(e)), void 0 !== e.ref && "function" != typeof e.ref && "object" != typeof e.ref && !("$$typeof" in e)) throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got [' + typeof e.ref + "] instead\n" + c(e));if ("string" == typeof e.type) for (var h in e.props) {
|
538
|
-
if ("o" === h[0] && "n" === h[1] && "function" != typeof e.props[h] && null != e.props[h]) throw new Error("Component's \"" + h + '" property should be a function, but got [' + typeof e.props[h] + "] instead\n" + c(e));
|
539
|
-
}if ("function" == typeof e.type && e.type.propTypes) {
|
540
|
-
if ("Lazy" === e.type.displayName && !u.lazyPropTypes[e.type]) {
|
541
|
-
var p = "PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try {
|
542
|
-
var v = e.type();u.lazyPropTypes[e.type] = !0, console.warn(p + "Component wrapped in lazy() is " + (v.type.displayName || v.type.name));
|
543
|
-
} catch (e) {
|
544
|
-
console.warn(p + "We will log the wrapped component's name once it is loaded.");
|
545
|
-
}
|
546
|
-
}o = e.type.propTypes, i = e.props, a = r(e), l = c(e), Object.keys(o).forEach(function (e) {
|
547
|
-
var t;try {
|
548
|
-
t = o[e](i, e, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
549
|
-
} catch (e) {
|
550
|
-
t = e;
|
551
|
-
}!t || t.message in n || (n[t.message] = !0, console.error("Failed " + a + " type: " + t.message));
|
552
|
-
});
|
553
|
-
}t && t(e);
|
554
|
-
}
|
555
|
-
}, e.options.__h = function (e) {
|
556
|
-
if (!e) throw new Error("Hook can only be invoked from render methods.");
|
557
|
-
};var l = function l(e, n) {
|
558
|
-
return { get: function get() {
|
559
|
-
throw new Error("getting vnode." + e + " is deprecated, " + n);
|
560
|
-
}, set: function set() {
|
561
|
-
throw new Error("setting vnode." + e + " is not allowed, " + n);
|
562
|
-
} };
|
563
|
-
},
|
564
|
-
s = { nodeName: l("nodeName", "use vnode.type"), attributes: l("attributes", "use vnode.props"), children: l("children", "use vnode.props.children") };e.options.vnode = function (e) {
|
565
|
-
var n, t;e.props && e.props.i && (n = e.props.i, delete e.props.i), e.props && e.props.u && (t = e.props.u, delete e.props.u), e.u = t, e.i = n, Object.defineProperties(e, s), i && i(e);
|
566
|
-
}, e.options.diffed = function (e) {
|
567
|
-
if (null != e) {
|
568
|
-
if (e.__c && e.__c.l) {
|
569
|
-
var n = e.__c.l;n.s.forEach(function (n) {
|
570
|
-
!n.h || n.p && Array.isArray(n.p) || console.warn("In " + (e.type.name || e.type) + " you are calling useMemo/useCallback without passing arguments.\nThis is a noop since it will not be able to memoize, it will execute it every render.");
|
571
|
-
}), n.v.length > 0 && n.v.forEach(function (n) {
|
572
|
-
n.p && Array.isArray(n.p) || u.useEffect[e.type] || (u.useEffect[e.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (e.type.name || e.type) + "."));
|
573
|
-
}), n.m.length > 0 && n.m.forEach(function (n) {
|
574
|
-
n.p && Array.isArray(n.p) || u.useLayoutEffect[e.type] || (u.useLayoutEffect[e.type] = !0, console.warn('You should provide an array of arguments as the second argument to the "useLayoutEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of ' + (e.type.name || e.type) + "."));
|
575
|
-
});
|
576
|
-
}if (null != e.__k) for (var t = [], r = 0; r < e.__k.length; r++) {
|
577
|
-
var i = e.__k[r];if (i && null != i.key) {
|
578
|
-
var a = i.key;if (-1 !== t.indexOf(a)) {
|
579
|
-
console.error('Following component has two or more children with the same key attribute: "' + a + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + c(e));break;
|
580
|
-
}t.push(a);
|
581
|
-
}
|
582
|
-
}o && o(e);
|
583
|
-
}
|
584
|
-
};
|
585
|
-
}(), function () {
|
586
|
-
var n = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if (null != n) {
|
587
|
-
var t = h,
|
588
|
-
r = h,
|
589
|
-
o = Math.random().toString(16).slice(2),
|
590
|
-
i = new f(n, o);d(function () {
|
591
|
-
var a = !1;try {
|
592
|
-
a = "production" !== process.env.NODE_ENV;
|
593
|
-
} catch (e) {}window.parent.postMessage({ source: "react-devtools-detector", reactBuildType: a ? "development" : "production" }, "*");var u = { bundleType: a ? 1 : 0, version: "16.5.2", rendererPackageName: "preact", findHostInstanceByFiber: function findHostInstanceByFiber(e) {
|
594
|
-
return e.__e;
|
595
|
-
}, findFiberByHostInstance: function findFiberByHostInstance(e) {
|
596
|
-
return i.inst2vnode.get(e) || null;
|
597
|
-
} };n._renderers[o] = u, Object.defineProperty(n.helpers, o, { get: function get() {
|
598
|
-
return i;
|
599
|
-
}, set: function set() {
|
600
|
-
i.connected || l.markConnected();
|
601
|
-
} });var l = n.helpers[o];n.emit("renderer-attached", { id: o, renderer: u, helpers: l }), t = d(function (t) {
|
602
|
-
if (t.type !== e.Fragment || 0 != t.__k.length) {
|
603
|
-
var r = n.getFiberRoots(o);t = l.handleCommitFiberRoot(t), r.has(t) || r.add(t);
|
604
|
-
}
|
605
|
-
}), r = d(function (e) {
|
606
|
-
n.onCommitFiberUnmount(o, e);
|
607
|
-
});
|
608
|
-
})();var a = e.options.vnode,
|
609
|
-
u = e.options.__c,
|
610
|
-
l = e.options.unmount,
|
611
|
-
s = e.options.__b,
|
612
|
-
c = e.options.diffed;e.options.vnode = function (e) {
|
613
|
-
e.startTime = NaN, e.endTime = NaN, e.startTime = 0, e.endTime = -1, a && a(e);
|
614
|
-
}, e.options.__b = function (e) {
|
615
|
-
e.startTime = p(), null != s && s(e);
|
616
|
-
}, e.options.diffed = function (e) {
|
617
|
-
e.endTime = p(), null != c && c(e);
|
618
|
-
}, e.options.__c = d(function (e) {
|
619
|
-
null != u && u(e), null != e && t(e);
|
620
|
-
}), e.options.unmount = d(function (e) {
|
621
|
-
null != l && l(e), r(e);
|
622
|
-
});var v = e.Component.prototype.setState;e.Component.prototype.setState = function (e, n) {
|
623
|
-
var t = this.__s !== this.state && this.__s || (this.__s = Object.assign({}, this.state));return this.__u = Object.assign({}, t), v.call(this, e, n);
|
624
|
-
};
|
625
|
-
}
|
626
|
-
}());
|
627
|
-
});
|
628
|
-
//# sourceMappingURL=debug.umd.js.map
|
629
|
-
'use strict';
|
630
|
-
|
631
|
-
/* eslint-disable no-console */
|
632
|
-
|
633
|
-
if (process.env.NODE_ENV === 'development') {
|
634
|
-
var preact = require('preact');
|
635
|
-
var options = preact.options;
|
636
|
-
var oldVnodeOption = options.vnode;
|
637
|
-
|
638
|
-
options.vnode = function (vnode) {
|
639
|
-
var nodeName = vnode.nodeName,
|
640
|
-
attributes = vnode.attributes,
|
641
|
-
children = vnode.children;
|
642
|
-
|
643
|
-
|
644
|
-
if (nodeName === void 0) {
|
645
|
-
console.error('Undefined component passed to preact.h()\n' + serializeVNode(vnode));
|
646
|
-
}
|
647
|
-
|
648
|
-
if (attributes && attributes.ref !== void 0 && typeof attributes.ref !== 'function' && typeof attributes.ref !== 'object' && !('$$typeof' in vnode) // allow string refs when preact-compat is installed
|
649
|
-
) {
|
650
|
-
throw new Error('Component\'s "ref" property should be a function or createRef() object,' + (' but [' + typeof attributes.ref + '] passed\n') + serializeVNode(vnode));
|
651
|
-
}
|
652
|
-
|
653
|
-
{
|
654
|
-
var keys = {};
|
655
|
-
|
656
|
-
inspectChildren(children, function (deepChild) {
|
657
|
-
if (!deepChild || deepChild.key == null) return;
|
658
|
-
|
659
|
-
// In Preact, all keys are stored as object values, i.e. being strings
|
660
|
-
var key = deepChild.key + '';
|
661
|
-
|
662
|
-
if (keys.hasOwnProperty(key)) {
|
663
|
-
console.error('Following component has two or more children with the ' + 'same "key" attribute. This may cause glitches and misbehavior ' + 'in rendering process. Component: \n\n' + serializeVNode(vnode));
|
664
|
-
|
665
|
-
// Return early to not spam the console
|
666
|
-
return true;
|
667
|
-
}
|
668
|
-
|
669
|
-
keys[key] = true;
|
670
|
-
});
|
671
|
-
}
|
672
|
-
|
673
|
-
if (oldVnodeOption) oldVnodeOption.call(this, vnode);
|
674
|
-
};
|
675
|
-
|
676
|
-
try {
|
677
|
-
var oldRender = preact.render;
|
678
|
-
preact.render = function (vnode, parent, merge) {
|
679
|
-
if (parent == null && merge == null) {
|
680
|
-
// render(vnode, parent, merge) can't have both parent and merge be undefined
|
681
|
-
console.error('The "containerNode" or "replaceNode" is not defined in the render method. ' + 'Component: \n\n' + serializeVNode(vnode));
|
682
|
-
} else if (parent == merge) {
|
683
|
-
// if parent == merge, it doesn't reason well and would cause trouble when preact
|
684
|
-
// tries to update or replace that 'replaceNode' element
|
685
|
-
console.error('The "containerNode" and "replaceNode" are the same in render method, ' + 'when the "replaceNode" DOM node is expected to be a child of "containerNode". ' + 'docs-ref: https://preactjs.com/guide/api-reference#-preact-render-. Component: \n\n' + serializeVNode(vnode));
|
686
|
-
}
|
687
|
-
return oldRender(vnode, parent, merge);
|
688
|
-
};
|
689
|
-
} catch (e) {}
|
690
|
-
|
691
|
-
var inspectChildren = function inspectChildren(children, inspect) {
|
692
|
-
if (!Array.isArray(children)) {
|
693
|
-
children = [children];
|
694
|
-
}
|
695
|
-
return children.some(function (child, i) {
|
696
|
-
if (Array.isArray(child)) {
|
697
|
-
return inspectChildren(child, inspect);
|
698
|
-
}
|
699
|
-
|
700
|
-
return inspect(child, i);
|
701
|
-
});
|
702
|
-
};
|
703
|
-
|
704
|
-
var serializeVNode = function serializeVNode(_ref) {
|
705
|
-
var nodeName = _ref.nodeName,
|
706
|
-
attributes = _ref.attributes,
|
707
|
-
children = _ref.children;
|
708
|
-
|
709
|
-
if (typeof nodeName === 'function') {
|
710
|
-
nodeName = nodeName.name || nodeName.displayName;
|
711
|
-
}
|
712
|
-
|
713
|
-
var props = '';
|
714
|
-
if (attributes) {
|
715
|
-
for (var attr in attributes) {
|
716
|
-
if (attributes.hasOwnProperty(attr) && attr !== 'children') {
|
717
|
-
var value = attributes[attr];
|
718
|
-
|
719
|
-
// If it is an object but doesn't have toString(), use Object.toString
|
720
|
-
if (typeof value === 'function') {
|
721
|
-
value = 'function ' + (value.displayName || value.name) + '() {}';
|
722
|
-
}
|
723
|
-
if (Object(value) === value && !value.toString) {
|
724
|
-
value = Object.prototype.toString.call(value);
|
725
|
-
} else {
|
726
|
-
value = value + '';
|
727
|
-
}
|
728
|
-
|
729
|
-
props += ' ' + attr + '=' + JSON.stringify(value);
|
730
|
-
}
|
731
|
-
}
|
732
|
-
}
|
733
|
-
|
734
|
-
return '<' + nodeName + props + (children && children.length ? '>..</' + nodeName + '>' : ' />');
|
735
|
-
};
|
736
|
-
|
737
|
-
require('preact/devtools');
|
738
|
-
}
|
739
|
-
|
740
|
-
//# sourceMappingURL=debug.js.map
|