@nanoporetech-digital/components 2.10.1 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/cjs/{date-utils-0ae9a12d.js → date-utils-b3af910d.js} +2 -2
- package/dist/cjs/date-utils-b3af910d.js.map +1 -0
- package/dist/cjs/{global-0d4f3b77.js → global-989678ec.js} +1 -8
- package/dist/cjs/global-989678ec.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nano-algolia.cjs.entry.js +5 -1
- package/dist/cjs/nano-algolia.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-components.cjs.js +2 -2
- package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +16 -5
- package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/nano-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +1 -2
- package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +292 -96
- package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js +5 -2
- package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-search-results.cjs.entry.js +21 -6
- package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-grid_3.cjs.entry.js +1 -2
- package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-icon-button.cjs.entry.js +4 -0
- package/dist/cjs/nano-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +16 -3
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-nav-item_2.cjs.entry.js +2 -0
- package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -2
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js +1 -2
- package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +2 -3
- package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +4 -2
- package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab.cjs.entry.js +5 -1
- package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/nano-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/algolia/algolia-filter.js +2 -2
- package/dist/collection/components/algolia/algolia-input.js +5 -5
- package/dist/collection/components/algolia/algolia-results.js +1 -1
- package/dist/collection/components/algolia/algolia.js +12 -6
- package/dist/collection/components/algolia/algolia.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox-group.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/datalist/datalist.js +4 -2
- package/dist/collection/components/datalist/datalist.js.map +1 -1
- package/dist/collection/components/date-input/date-input.js +65 -11
- package/dist/collection/components/date-input/date-input.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.css +1 -1
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/details/details.js +1 -2
- package/dist/collection/components/details/details.js.map +1 -1
- package/dist/collection/components/dialog/dialog.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/field-validator/field-validator-interface.js +5 -0
- package/dist/collection/components/field-validator/field-validator-interface.js.map +1 -0
- package/dist/collection/components/field-validator/field-validator.js +434 -113
- package/dist/collection/components/field-validator/field-validator.js.map +1 -1
- package/dist/collection/components/file-upload/file-upload.css +0 -1
- package/dist/collection/components/file-upload/file-upload.js +10 -7
- package/dist/collection/components/file-upload/file-upload.js.map +1 -1
- package/dist/collection/components/global-nav/global-nav.js +4 -4
- package/dist/collection/components/global-search-results/global-search-results.css +7 -0
- package/dist/collection/components/global-search-results/global-search-results.js +19 -4
- package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/grid/grid.js +0 -1
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +23 -1
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/components/input/input.js +37 -8
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/nav-item/nav-item.js +4 -4
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +1 -2
- package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
- package/dist/collection/components/select/select.js +9 -7
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/slides/slides.js +7 -8
- package/dist/collection/components/slides/slides.js.map +1 -1
- package/dist/collection/components/sticker/sticker.js +0 -1
- package/dist/collection/components/sticker/sticker.js.map +1 -1
- package/dist/collection/components/tabs/tab-group.js +5 -3
- package/dist/collection/components/tabs/tab-group.js.map +1 -1
- package/dist/collection/components/tabs/tab.js +5 -1
- package/dist/collection/components/tabs/tab.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.css +0 -1
- package/dist/collection/global/script/global.js +0 -7
- package/dist/collection/global/script/global.js.map +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/date-utils.js +1 -1
- package/dist/collection/utils/date-utils.js.map +1 -1
- package/dist/components/algolia.js +5 -1
- package/dist/components/algolia.js.map +1 -1
- package/dist/components/datalist.js +3 -1
- package/dist/components/datalist.js.map +1 -1
- package/dist/components/date-picker.js +2 -2
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/grid.js +1 -2
- package/dist/components/grid.js.map +1 -1
- package/dist/components/icon-button.js +6 -1
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/index.js +1 -7
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.js +17 -3
- package/dist/components/input.js.map +1 -1
- package/dist/components/nano-date-input.js +17 -4
- package/dist/components/nano-date-input.js.map +1 -1
- package/dist/components/nano-details.js +1 -2
- package/dist/components/nano-details.js.map +1 -1
- package/dist/components/nano-field-validator.js +300 -99
- package/dist/components/nano-field-validator.js.map +1 -1
- package/dist/components/nano-file-upload.js +6 -3
- package/dist/components/nano-file-upload.js.map +1 -1
- package/dist/components/nano-global-search-results.js +21 -6
- package/dist/components/nano-global-search-results.js.map +1 -1
- package/dist/components/nano-slides.js +1 -2
- package/dist/components/nano-slides.js.map +1 -1
- package/dist/components/nano-tab-group.js +4 -2
- package/dist/components/nano-tab-group.js.map +1 -1
- package/dist/components/nano-tab.js +5 -1
- package/dist/components/nano-tab.js.map +1 -1
- package/dist/components/resize-observe.js +1 -2
- package/dist/components/resize-observe.js.map +1 -1
- package/dist/components/select.js +2 -0
- package/dist/components/select.js.map +1 -1
- package/dist/components/sticker.js +2 -3
- package/dist/components/sticker.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/custom-elements/index.js +386 -2046
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{date-utils-e4b757ff.js → date-utils-839cb010.js} +2 -2
- package/dist/esm/date-utils-839cb010.js.map +1 -0
- package/dist/esm/{global-d5ec4d53.js → global-8047b4ff.js} +1 -8
- package/dist/esm/global-8047b4ff.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/nano-algolia.entry.js +5 -1
- package/dist/esm/nano-algolia.entry.js.map +1 -1
- package/dist/esm/nano-components.js +2 -2
- package/dist/esm/nano-datalist_3.entry.js +3 -1
- package/dist/esm/nano-datalist_3.entry.js.map +1 -1
- package/dist/esm/nano-date-input.entry.js +16 -5
- package/dist/esm/nano-date-input.entry.js.map +1 -1
- package/dist/esm/nano-date-picker.entry.js +2 -2
- package/dist/esm/nano-date-picker.entry.js.map +1 -1
- package/dist/esm/nano-details.entry.js +1 -2
- package/dist/esm/nano-details.entry.js.map +1 -1
- package/dist/esm/nano-field-validator.entry.js +292 -96
- package/dist/esm/nano-field-validator.entry.js.map +1 -1
- package/dist/esm/nano-file-upload.entry.js +5 -2
- package/dist/esm/nano-file-upload.entry.js.map +1 -1
- package/dist/esm/nano-global-search-results.entry.js +21 -6
- package/dist/esm/nano-global-search-results.entry.js.map +1 -1
- package/dist/esm/nano-grid_3.entry.js +1 -2
- package/dist/esm/nano-grid_3.entry.js.map +1 -1
- package/dist/esm/nano-icon-button.entry.js +4 -0
- package/dist/esm/nano-icon-button.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +16 -3
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-nav-item_2.entry.js +2 -0
- package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +1 -2
- package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm/nano-slides.entry.js +1 -2
- package/dist/esm/nano-slides.entry.js.map +1 -1
- package/dist/esm/nano-sticker.entry.js +2 -3
- package/dist/esm/nano-sticker.entry.js.map +1 -1
- package/dist/esm/nano-tab-group.entry.js +4 -2
- package/dist/esm/nano-tab-group.entry.js.map +1 -1
- package/dist/esm/nano-tab.entry.js +5 -1
- package/dist/esm/nano-tab.entry.js.map +1 -1
- package/dist/esm/nano-tooltip.entry.js +1 -1
- package/dist/esm/nano-tooltip.entry.js.map +1 -1
- package/dist/esm-es5/date-utils-839cb010.js +5 -0
- package/dist/esm-es5/date-utils-839cb010.js.map +1 -0
- package/dist/esm-es5/{global-d5ec4d53.js → global-8047b4ff.js} +2 -2
- package/dist/esm-es5/global-8047b4ff.js.map +1 -0
- package/dist/esm-es5/index.js +2 -2
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/nano-algolia.entry.js +1 -1
- package/dist/esm-es5/nano-algolia.entry.js.map +1 -1
- package/dist/esm-es5/nano-components.js +1 -1
- package/dist/esm-es5/nano-components.js.map +1 -1
- package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
- package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
- package/dist/esm-es5/nano-date-input.entry.js +1 -1
- package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-date-picker.entry.js +1 -1
- package/dist/esm-es5/nano-date-picker.entry.js.map +1 -1
- package/dist/esm-es5/nano-details.entry.js +1 -1
- package/dist/esm-es5/nano-details.entry.js.map +1 -1
- package/dist/esm-es5/nano-field-validator.entry.js +2 -2
- package/dist/esm-es5/nano-field-validator.entry.js.map +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
- package/dist/esm-es5/nano-global-search-results.entry.js +1 -1
- package/dist/esm-es5/nano-global-search-results.entry.js.map +1 -1
- package/dist/esm-es5/nano-grid_3.entry.js +1 -1
- package/dist/esm-es5/nano-grid_3.entry.js.map +1 -1
- package/dist/esm-es5/nano-icon-button.entry.js +2 -2
- package/dist/esm-es5/nano-icon-button.entry.js.map +1 -1
- package/dist/esm-es5/nano-input.entry.js +1 -1
- package/dist/esm-es5/nano-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-resize-observe_2.entry.js +1 -1
- package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-slides.entry.js +2 -2
- package/dist/esm-es5/nano-slides.entry.js.map +1 -1
- package/dist/esm-es5/nano-sticker.entry.js +1 -1
- package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
- package/dist/esm-es5/nano-tab-group.entry.js +2 -2
- package/dist/esm-es5/nano-tab-group.entry.js.map +1 -1
- package/dist/esm-es5/nano-tab.entry.js +2 -2
- package/dist/esm-es5/nano-tab.entry.js.map +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js.map +1 -1
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/index.esm.js.map +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/nano-components.js +1 -1
- package/dist/nano-components/p-018b7047.entry.js +5 -0
- package/dist/nano-components/p-018b7047.entry.js.map +1 -0
- package/dist/nano-components/p-0193a282.entry.js +5 -0
- package/dist/nano-components/p-0193a282.entry.js.map +1 -0
- package/dist/nano-components/p-0320410c.entry.js +5 -0
- package/dist/nano-components/p-0320410c.entry.js.map +1 -0
- package/dist/nano-components/p-0d699368.system.js +5 -0
- package/dist/nano-components/{p-3258c568.system.js.map → p-0d699368.system.js.map} +1 -1
- package/dist/nano-components/p-18863670.system.entry.js +5 -0
- package/dist/nano-components/p-18863670.system.entry.js.map +1 -0
- package/dist/nano-components/p-32900c91.entry.js +5 -0
- package/dist/nano-components/p-32900c91.entry.js.map +1 -0
- package/dist/nano-components/p-33fce1a6.js +5 -0
- package/dist/nano-components/p-33fce1a6.js.map +1 -0
- package/dist/nano-components/p-371aebe7.system.entry.js +23 -0
- package/dist/nano-components/p-371aebe7.system.entry.js.map +1 -0
- package/dist/nano-components/p-41899a31.system.entry.js +5 -0
- package/dist/nano-components/p-41899a31.system.entry.js.map +1 -0
- package/dist/nano-components/p-53957ec6.system.js +5 -0
- package/dist/nano-components/{p-e7140887.system.js.map → p-53957ec6.system.js.map} +1 -1
- package/dist/nano-components/p-561500f0.system.entry.js +5 -0
- package/dist/nano-components/p-561500f0.system.entry.js.map +1 -0
- package/dist/nano-components/p-596c1711.system.entry.js +5 -0
- package/dist/nano-components/p-596c1711.system.entry.js.map +1 -0
- package/dist/nano-components/{p-01667573.entry.js → p-634a58f7.entry.js} +2 -2
- package/dist/nano-components/p-634a58f7.entry.js.map +1 -0
- package/dist/nano-components/p-6a949280.system.entry.js +5 -0
- package/dist/nano-components/p-6a949280.system.entry.js.map +1 -0
- package/dist/nano-components/{p-bf9aa89d.system.entry.js → p-6af10533.system.entry.js} +3 -3
- package/dist/nano-components/p-6af10533.system.entry.js.map +1 -0
- package/dist/nano-components/p-70272eae.js +5 -0
- package/dist/nano-components/p-70272eae.js.map +1 -0
- package/dist/nano-components/p-755d9227.entry.js +5 -0
- package/dist/nano-components/p-755d9227.entry.js.map +1 -0
- package/dist/nano-components/p-7bd25494.entry.js +5 -0
- package/dist/nano-components/p-7bd25494.entry.js.map +1 -0
- package/dist/nano-components/p-7c837460.entry.js +5 -0
- package/dist/nano-components/p-7c837460.entry.js.map +1 -0
- package/dist/nano-components/p-7f051c20.entry.js +5 -0
- package/dist/nano-components/p-7f051c20.entry.js.map +1 -0
- package/dist/nano-components/{p-93880c28.system.js → p-82e28afd.system.js} +2 -2
- package/dist/nano-components/p-82e28afd.system.js.map +1 -0
- package/dist/nano-components/p-8378428e.system.js +5 -0
- package/dist/nano-components/p-8378428e.system.js.map +1 -0
- package/dist/nano-components/p-8df4f125.system.entry.js +5 -0
- package/dist/nano-components/p-8df4f125.system.entry.js.map +1 -0
- package/dist/nano-components/{p-d0385948.system.entry.js → p-93596c3d.system.entry.js} +2 -2
- package/dist/nano-components/p-93596c3d.system.entry.js.map +1 -0
- package/dist/nano-components/{p-3e930ac7.entry.js → p-9d9b0b66.entry.js} +2 -2
- package/dist/nano-components/p-9d9b0b66.entry.js.map +1 -0
- package/dist/nano-components/p-9ffdf6cc.entry.js +5 -0
- package/dist/nano-components/{p-222d8095.entry.js.map → p-9ffdf6cc.entry.js.map} +1 -1
- package/dist/nano-components/p-a07cf44c.system.entry.js +5 -0
- package/dist/nano-components/p-a07cf44c.system.entry.js.map +1 -0
- package/dist/nano-components/p-a1444980.entry.js +5 -0
- package/dist/nano-components/p-a1444980.entry.js.map +1 -0
- package/dist/nano-components/p-aa84c727.system.entry.js +5 -0
- package/dist/nano-components/p-aa84c727.system.entry.js.map +1 -0
- package/dist/nano-components/p-ac5e3775.system.entry.js +5 -0
- package/dist/nano-components/p-ac5e3775.system.entry.js.map +1 -0
- package/dist/nano-components/p-b85cf493.system.entry.js +5 -0
- package/dist/nano-components/{p-e817ab4a.system.entry.js.map → p-b85cf493.system.entry.js.map} +1 -1
- package/dist/nano-components/{p-96d9b8b9.system.entry.js → p-c2bbf0fb.system.entry.js} +2 -2
- package/dist/nano-components/p-c2bbf0fb.system.entry.js.map +1 -0
- package/dist/nano-components/{p-f780d2f6.system.entry.js → p-cb512cff.system.entry.js} +2 -2
- package/dist/nano-components/p-cb512cff.system.entry.js.map +1 -0
- package/dist/nano-components/{p-4e2c0abb.entry.js → p-ccd6c206.entry.js} +2 -2
- package/dist/nano-components/p-ccd6c206.entry.js.map +1 -0
- package/dist/nano-components/{p-1030797a.entry.js → p-d37e1489.entry.js} +2 -2
- package/dist/nano-components/p-d37e1489.entry.js.map +1 -0
- package/dist/nano-components/p-da88981f.entry.js +23 -0
- package/dist/nano-components/p-da88981f.entry.js.map +1 -0
- package/dist/nano-components/p-e8a913ac.system.entry.js +5 -0
- package/dist/nano-components/p-e8a913ac.system.entry.js.map +1 -0
- package/dist/nano-components/p-e9fddc1a.entry.js +5 -0
- package/dist/nano-components/p-e9fddc1a.entry.js.map +1 -0
- package/dist/nano-components/p-ea54ee12.entry.js +5 -0
- package/dist/nano-components/p-ea54ee12.entry.js.map +1 -0
- package/dist/nano-components/{p-86bd5194.entry.js → p-ed0bdea9.entry.js} +2 -2
- package/dist/nano-components/p-ed0bdea9.entry.js.map +1 -0
- package/dist/nano-components/p-faba2fc1.system.entry.js +5 -0
- package/dist/nano-components/p-faba2fc1.system.entry.js.map +1 -0
- package/dist/nano-components/p-ff026352.system.entry.js +5 -0
- package/dist/nano-components/p-ff026352.system.entry.js.map +1 -0
- package/dist/themes/nanopore.css +1 -1
- package/dist/themes/nanopore.css.map +1 -1
- package/dist/types/components/algolia/algolia.d.ts +1 -0
- package/dist/types/components/date-input/date-input.d.ts +6 -1
- package/dist/types/components/field-validator/field-validator-interface.d.ts +19 -0
- package/dist/types/components/field-validator/field-validator.d.ts +77 -31
- package/dist/types/components/file-upload/file-upload.d.ts +2 -1
- package/dist/types/components/global-search-results/global-search-results.d.ts +1 -0
- package/dist/types/components/icon-button/icon-button.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +6 -1
- package/dist/types/components/tabs/tab.d.ts +1 -0
- package/dist/types/components.d.ts +67 -12
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interface.d.ts +1 -0
- package/docs-json.json +161 -13
- package/docs-vscode.json +6 -2
- package/package.json +2 -4
- package/dist/cjs/ResizeObserver.es-09b81a1b.js +0 -935
- package/dist/cjs/ResizeObserver.es-09b81a1b.js.map +0 -1
- package/dist/cjs/date-utils-0ae9a12d.js.map +0 -1
- package/dist/cjs/global-0d4f3b77.js.map +0 -1
- package/dist/cjs/intersection-observer-1822c787.js +0 -987
- package/dist/cjs/intersection-observer-1822c787.js.map +0 -1
- package/dist/components/ResizeObserver.es.js +0 -933
- package/dist/components/ResizeObserver.es.js.map +0 -1
- package/dist/components/intersection-observer.js +0 -985
- package/dist/components/intersection-observer.js.map +0 -1
- package/dist/esm/ResizeObserver.es-724af9fd.js +0 -933
- package/dist/esm/ResizeObserver.es-724af9fd.js.map +0 -1
- package/dist/esm/date-utils-e4b757ff.js.map +0 -1
- package/dist/esm/global-d5ec4d53.js.map +0 -1
- package/dist/esm/intersection-observer-dff9fb5b.js +0 -985
- package/dist/esm/intersection-observer-dff9fb5b.js.map +0 -1
- package/dist/esm-es5/ResizeObserver.es-724af9fd.js +0 -5
- package/dist/esm-es5/ResizeObserver.es-724af9fd.js.map +0 -1
- package/dist/esm-es5/date-utils-e4b757ff.js +0 -5
- package/dist/esm-es5/date-utils-e4b757ff.js.map +0 -1
- package/dist/esm-es5/global-d5ec4d53.js.map +0 -1
- package/dist/esm-es5/intersection-observer-dff9fb5b.js +0 -5
- package/dist/esm-es5/intersection-observer-dff9fb5b.js.map +0 -1
- package/dist/nano-components/p-00eaa36a.entry.js +0 -5
- package/dist/nano-components/p-00eaa36a.entry.js.map +0 -1
- package/dist/nano-components/p-01667573.entry.js.map +0 -1
- package/dist/nano-components/p-1030797a.entry.js.map +0 -1
- package/dist/nano-components/p-11a2dcce.js +0 -5
- package/dist/nano-components/p-11a2dcce.js.map +0 -1
- package/dist/nano-components/p-1a30dfdd.system.entry.js +0 -5
- package/dist/nano-components/p-1a30dfdd.system.entry.js.map +0 -1
- package/dist/nano-components/p-1b120f53.entry.js +0 -5
- package/dist/nano-components/p-1b120f53.entry.js.map +0 -1
- package/dist/nano-components/p-21d6d31e.system.entry.js +0 -5
- package/dist/nano-components/p-21d6d31e.system.entry.js.map +0 -1
- package/dist/nano-components/p-222d8095.entry.js +0 -5
- package/dist/nano-components/p-241d90eb.system.entry.js +0 -5
- package/dist/nano-components/p-241d90eb.system.entry.js.map +0 -1
- package/dist/nano-components/p-2c8d7273.entry.js +0 -5
- package/dist/nano-components/p-2c8d7273.entry.js.map +0 -1
- package/dist/nano-components/p-3093915f.entry.js +0 -5
- package/dist/nano-components/p-3093915f.entry.js.map +0 -1
- package/dist/nano-components/p-3258c568.system.js +0 -5
- package/dist/nano-components/p-325c1cad.entry.js +0 -5
- package/dist/nano-components/p-325c1cad.entry.js.map +0 -1
- package/dist/nano-components/p-32f396c0.system.entry.js +0 -5
- package/dist/nano-components/p-32f396c0.system.entry.js.map +0 -1
- package/dist/nano-components/p-35108e08.entry.js +0 -5
- package/dist/nano-components/p-35108e08.entry.js.map +0 -1
- package/dist/nano-components/p-3ccb176c.system.entry.js +0 -5
- package/dist/nano-components/p-3ccb176c.system.entry.js.map +0 -1
- package/dist/nano-components/p-3e930ac7.entry.js.map +0 -1
- package/dist/nano-components/p-42cebbfe.system.entry.js +0 -5
- package/dist/nano-components/p-42cebbfe.system.entry.js.map +0 -1
- package/dist/nano-components/p-4e2c0abb.entry.js.map +0 -1
- package/dist/nano-components/p-5d17cfbb.system.entry.js +0 -23
- package/dist/nano-components/p-5d17cfbb.system.entry.js.map +0 -1
- package/dist/nano-components/p-5d5ea4ab.system.entry.js +0 -5
- package/dist/nano-components/p-5d5ea4ab.system.entry.js.map +0 -1
- package/dist/nano-components/p-6722447c.entry.js +0 -5
- package/dist/nano-components/p-6722447c.entry.js.map +0 -1
- package/dist/nano-components/p-6d138abf.entry.js +0 -5
- package/dist/nano-components/p-6d138abf.entry.js.map +0 -1
- package/dist/nano-components/p-76d9d1d4.entry.js +0 -5
- package/dist/nano-components/p-76d9d1d4.entry.js.map +0 -1
- package/dist/nano-components/p-866f083f.system.entry.js +0 -5
- package/dist/nano-components/p-866f083f.system.entry.js.map +0 -1
- package/dist/nano-components/p-86bd5194.entry.js.map +0 -1
- package/dist/nano-components/p-88779174.system.entry.js +0 -5
- package/dist/nano-components/p-88779174.system.entry.js.map +0 -1
- package/dist/nano-components/p-93880c28.system.js.map +0 -1
- package/dist/nano-components/p-96d9b8b9.system.entry.js.map +0 -1
- package/dist/nano-components/p-97b13ad2.entry.js +0 -5
- package/dist/nano-components/p-97b13ad2.entry.js.map +0 -1
- package/dist/nano-components/p-b430a9b6.system.js +0 -5
- package/dist/nano-components/p-b430a9b6.system.js.map +0 -1
- package/dist/nano-components/p-bc394857.system.entry.js +0 -5
- package/dist/nano-components/p-bc394857.system.entry.js.map +0 -1
- package/dist/nano-components/p-bf9aa89d.system.entry.js.map +0 -1
- package/dist/nano-components/p-c3830c43.entry.js +0 -5
- package/dist/nano-components/p-c3830c43.entry.js.map +0 -1
- package/dist/nano-components/p-d0385948.system.entry.js.map +0 -1
- package/dist/nano-components/p-debd9efc.js +0 -5
- package/dist/nano-components/p-debd9efc.js.map +0 -1
- package/dist/nano-components/p-e195ab77.system.js +0 -5
- package/dist/nano-components/p-e195ab77.system.js.map +0 -1
- package/dist/nano-components/p-e7140887.system.js +0 -5
- package/dist/nano-components/p-e817ab4a.system.entry.js +0 -5
- package/dist/nano-components/p-f5d4d13b.system.js +0 -5
- package/dist/nano-components/p-f5d4d13b.system.js.map +0 -1
- package/dist/nano-components/p-f66958c1.js +0 -5
- package/dist/nano-components/p-f66958c1.js.map +0 -1
- package/dist/nano-components/p-f710c763.system.entry.js +0 -5
- package/dist/nano-components/p-f710c763.system.entry.js.map +0 -1
- package/dist/nano-components/p-f780d2f6.system.entry.js.map +0 -1
- package/dist/nano-components/p-f9c7d961.js +0 -5
- package/dist/nano-components/p-f9c7d961.js.map +0 -1
- package/dist/nano-components/p-ffc2063a.entry.js +0 -23
- package/dist/nano-components/p-ffc2063a.entry.js.map +0 -1
- package/dist/nano-components/p-fff27907.system.entry.js +0 -5
- package/dist/nano-components/p-fff27907.system.entry.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"],"names":["MapShim","Map","getIndex","arr","key","result","some","entry","index","class_1","this","__entries__","Object","defineProperty","prototype","get","length","enumerable","configurable","set","value","push","delete","entries","splice","has","clear","forEach","callback","ctx","_i","_a","call","isBrowser","window","document","global$1","global","Math","self","Function","requestAnimationFrame$1","requestAnimationFrame","bind","setTimeout","Date","now","trailingTimeout","throttle","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","REFRESH_DELAY","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","addObserver","observer","indexOf","connect_","removeObserver","observers","disconnect_","changesDetected","updateObservers_","activeObservers","filter","gatherActive","hasActive","broadcastActive","addEventListener","observe","attributes","childList","characterData","subtree","removeEventListener","disconnect","_b","propertyName","isReflowProperty","getInstance","instance_","defineConfigurable","target","props","keys","writable","getWindowOf","ownerGlobal","ownerDocument","defaultView","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","arguments","reduce","size","position","getPaddings","paddings","positions_1","getSVGContentRect","bbox","getBBox","width","height","getHTMLElementContentRect","clientWidth","clientHeight","getComputedStyle","horizPad","left","right","vertPad","top","bottom","boxSizing","round","isDocumentElement","vertScrollbar","horizScrollbar","abs","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","documentElement","getContentRect","createReadOnlyRect","x","y","Constr","DOMRectReadOnly","rect","create","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","broadcastRect","ResizeObserverEntry","rectInit","contentRect","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","unobserve","clearActive","_this","observation","map","WeakMap","ResizeObserver","method","apply"],"mappings":";;;AAOA,IAAIA,EAAU,WACV,UAAWC,MAAQ,YAAa,CAC5B,OAAOA,IASX,SAASC,EAASC,EAAKC,GACnB,IAAIC,GAAU,EACdF,EAAIG,MAAK,SAAUC,EAAOC,GACtB,GAAID,EAAM,KAAOH,EAAK,CAClBC,EAASG,EACT,OAAO,KAEX,OAAO,SAEX,OAAOH,EAEX,OAAsB,WAClB,SAASI,IACLC,KAAKC,YAAc,GAEvBC,OAAOC,eAAeJ,EAAQK,UAAW,OAAQ,CAI7CC,IAAK,WACD,OAAOL,KAAKC,YAAYK,QAE5BC,WAAY,KACZC,aAAc,OAMlBT,EAAQK,UAAUC,IAAM,SAAUX,GAC9B,IAAII,EAAQN,EAASQ,KAAKC,YAAaP,GACvC,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C,MAAMpJ,EAAIgF,eAIzD,IAACvG,EAAQ,WAER,UAAW4B,EAAS6I,iBAAmB,YAAa,CAChD,OAAO7I,EAAS6I,eAEpB,OAAOA,EALC","sourcesContent":["/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n"]}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Web Components for Nanopore digital Web Apps
|
3
|
-
*/
|
4
|
-
System.register([],(function(t){"use strict";return{execute:function(){t({D:void 0,a:u,b:h,c:r,d:i,e:f,f:s,g:d,h:g,i:v,j:D,k:c,p:a,s:o});var e=/^(\d{4})-(\d{2})-(\d{2})$/;var n;(function(t){t[t["Sunday"]=0]="Sunday";t[t["Monday"]=1]="Monday";t[t["Tuesday"]=2]="Tuesday";t[t["Wednesday"]=3]="Wednesday";t[t["Thursday"]=4]="Thursday";t[t["Friday"]=5]="Friday";t[t["Saturday"]=6]="Saturday"})(n||(n=t("D",{})));function r(t,e,n){var r=parseInt(n,10);var a=parseInt(e,10);var u=parseInt(t,10);var i=Number.isInteger(u)&&Number.isInteger(a)&&Number.isInteger(r)&&a>0&&a<=12&&r>0&&r<=31&&u>0;if(i){return new Date(u,a-1,r)}}function a(t){if(!t){return}var n=t.match(e);if(n){return r(n[1],n[2],n[3])}}function u(t){if(!t){return""}var e=t.getDate().toString(10);var n=(t.getMonth()+1).toString(10);var r=t.getFullYear().toString(10);if(t.getDate()<10){e="0"+e}if(t.getMonth()<9){n="0"+n}return r+"-"+n+"-"+e}function i(t,e){var n=new Date(t);n.setDate(n.getDate()+e);return n}function o(t,e){if(e===void 0){e=n.Monday}var r=new Date(t);var a=r.getDay();var u=(a<e?7:0)+a-e;r.setDate(r.getDate()-u);return r}function f(t,e){if(e===void 0){e=n.Monday}var r=new Date(t);var a=r.getDay();var u=(a<e?-7:0)+6-(a-e);r.setDate(r.getDate()+u);return r}function d(t){return new Date(t.getFullYear(),t.getMonth(),1)}function g(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function s(t,e){var n=new Date(t);n.setMonth(e);return n}function c(t,e){var n=new Date(t);n.setFullYear(e);return n}function v(t,e,n){return D(t,e,n)===t}function D(t,e,n){var r=t.getTime();if(e&&e instanceof Date&&r<e.getTime()){return e}if(n&&n instanceof Date&&r>n.getTime()){return n}return t}function y(){return Math.random().toString(16).slice(-4)}function h(t){return t+"-"+y()+y()+"-"+y()+"-"+y()+"-"+y()+"-"+y()+y()+y()}}}}));
|
5
|
-
//# sourceMappingURL=p-e195ab77.system.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/utils/date-utils.ts"],"names":["ISO_DATE_FORMAT","DaysOfWeek","exports","createDate","year","month","day","dayInt","parseInt","monthInt","yearInt","isValid","Number","isInteger","Date","parseISODate","value","matches","match","printISODate","date","d","getDate","toString","m","getMonth","y","getFullYear","addDays","days","setDate","startOfWeek","firstDayOfWeek","Monday","getDay","diff","endOfWeek","startOfMonth","endOfMonth","setMonth","setYear","setFullYear","inRange","min","max","clamp","time","getTime","chr4","Math","random","slice","createIdentifier","prefix"],"mappings":";;;yIAAA,IAAMA,EAAkB,gCAEZC,GAAZ,SAAYA,GACVA,EAAAA,EAAA,UAAA,GAAA,SACAA,EAAAA,EAAA,UAAA,GAAA,SACAA,EAAAA,EAAA,WAAA,GAAA,UACAA,EAAAA,EAAA,aAAA,GAAA,YACAA,EAAAA,EAAA,YAAA,GAAA,WACAA,EAAAA,EAAA,UAAA,GAAA,SACAA,EAAAA,EAAA,YAAA,GAAA,YAPF,CAAYA,IAAAA,EAAUC,EAAA,IAAA,eAUNC,EAAWC,EAAcC,EAAeC,GACtD,IAAIC,EAASC,SAASF,EAAK,IAC3B,IAAIG,EAAWD,SAASH,EAAO,IAC/B,IAAIK,EAAUF,SAASJ,EAAM,IAE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EAAES,QAAQT,EAAEC,UAAYa,GACxB,OAAOd,WAGOgB,EAAajB,GAC3B,OAAO,IAAIN,KAAKM,EAAKO,cAAeP,EAAKK,WAAY,YAGvCa,EAAWlB,GACzB,OAAO,IAAIN,KAAKM,EAAKO,cAAeP,EAAKK,WAAa,EAAG,YAG3Cc,EAASnB,EAAYf,GACnC,IAAMgB,EAAI,IAAIP,KAAKM,GACnBC,EAAEkB,SAASlC,GACX,OAAOgB,WAGOmB,EAAQpB,EAAYhB,GAClC,IAAMiB,EAAI,IAAIP,KAAKM,GACnBC,EAAEoB,YAAYrC,GACd,OAAOiB,WAMOqB,EAAQtB,EAAYuB,EAAYC,GAC9C,OAAOC,EAAMzB,EAAMuB,EAAKC,KAASxB,WAMnByB,EAAMzB,EAAYuB,EAAYC,GAC5C,IAAME,EAAO1B,EAAK2B,UAElB,GAAIJ,GAAOA,aAAe7B,MAAQgC,EAAOH,EAAII,UAAW,CACtD,OAAOJ,EAET,GAAIC,GAAOA,aAAe9B,MAAQgC,EAAOF,EAAIG,UAAW,CACtD,OAAOH,EAET,OAAOxB,WAwCO4B,IACd,OAAOC,KAAKC,SAAS3B,SAAS,IAAI4B,OAAO,YAO3BC,EAAiBC,GAC/B,OAAUA,EAAM,IAAIL,IAASA,IAAM,IAAIA,IAAM,IAAIA,IAAM,IAAIA,IAAM,IAAIA,IAASA,IAASA","sourcesContent":["const ISO_DATE_FORMAT = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n\nexport enum DaysOfWeek {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport function createDate(year: string, month: string, day: string): Date {\n var dayInt = parseInt(day, 10);\n var monthInt = parseInt(month, 10);\n var yearInt = parseInt(year, 10);\n\n const isValid =\n Number.isInteger(yearInt) && // all parts should be integers\n Number.isInteger(monthInt) &&\n Number.isInteger(dayInt) &&\n monthInt > 0 && // month must be 1-12\n monthInt <= 12 &&\n dayInt > 0 && // day must be 1-31\n dayInt <= 31 &&\n yearInt > 0;\n\n if (isValid) {\n return new Date(yearInt, monthInt - 1, dayInt);\n }\n}\n\n/**\n * @param value date string in ISO format YYYY-MM-DD\n */\nexport function parseISODate(value: string): Date {\n if (!value) {\n return;\n }\n\n const matches = value.match(ISO_DATE_FORMAT);\n if (matches) {\n return createDate(matches[1], matches[2], matches[3]);\n }\n}\n\n/**\n * print date in format YYYY-MM-DD\n * @param date\n */\nexport function printISODate(date: Date): string {\n if (!date) {\n return '';\n }\n\n var d = date.getDate().toString(10);\n var m = (date.getMonth() + 1).toString(10);\n var y = date.getFullYear().toString(10);\n\n // days are not zero-indexed, so pad if less than 10\n if (date.getDate() < 10) {\n d = `0${d}`;\n }\n\n // months *are* zero-indexed, pad if less than 9!\n if (date.getMonth() < 9) {\n m = `0${m}`;\n }\n\n return `${y}-${m}-${d}`;\n}\n\n/**\n * Compare if two dates are equal in terms of day, month, and year\n */\nexport function isEqual(a: Date, b: Date): boolean {\n if (a == null || b == null) {\n return false;\n }\n\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nexport function addDays(date: Date, days: number): Date {\n var d = new Date(date);\n d.setDate(d.getDate() + days);\n return d;\n}\n\nexport function addMonths(date: Date, months: number): Date {\n const d = new Date(date);\n d.setMonth(date.getMonth() + months);\n return d;\n}\n\nexport function addYears(date: Date, years: number): Date {\n const d = new Date(date);\n d.setFullYear(date.getFullYear() + years);\n return d;\n}\n\nexport function startOfWeek(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date {\n var d = new Date(date);\n var day = d.getDay();\n var diff = (day < firstDayOfWeek ? 7 : 0) + day - firstDayOfWeek;\n\n d.setDate(d.getDate() - diff);\n return d;\n}\n\nexport function endOfWeek(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date {\n var d = new Date(date);\n var day = d.getDay();\n var diff = (day < firstDayOfWeek ? -7 : 0) + 6 - (day - firstDayOfWeek);\n\n d.setDate(d.getDate() + diff);\n return d;\n}\n\nexport function startOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function endOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n}\n\nexport function setMonth(date: Date, month: number): Date {\n const d = new Date(date);\n d.setMonth(month);\n return d;\n}\n\nexport function setYear(date: Date, year: number): Date {\n const d = new Date(date);\n d.setFullYear(year);\n return d;\n}\n\n/**\n * Check if date is within a min and max\n */\nexport function inRange(date: Date, min?: Date, max?: Date): boolean {\n return clamp(date, min, max) === date;\n}\n\n/**\n * Ensures date is within range, returns min or max if out of bounds\n */\nexport function clamp(date: Date, min?: Date, max?: Date): Date {\n const time = date.getTime();\n\n if (min && min instanceof Date && time < min.getTime()) {\n return min;\n }\n if (max && max instanceof Date && time > max.getTime()) {\n return max;\n }\n return date;\n}\n\n/**\n * given start and end date, return an (inclusive) array of all dates in between\n * @param start\n * @param end\n */\nfunction getDaysInRange(start: Date, end: Date): Date[] {\n const days: Date[] = [];\n let current = start;\n\n while (!isEqual(current, end)) {\n days.push(current);\n current = addDays(current, 1);\n }\n\n days.push(current);\n\n return days;\n}\n\n/**\n * given a date, return an array of dates from a calendar perspective\n * @param date\n * @param firstDayOfWeek\n */\nexport function getViewOfMonth(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date[] {\n const start = startOfWeek(startOfMonth(date), firstDayOfWeek);\n const end = endOfWeek(endOfMonth(date), firstDayOfWeek);\n\n return getDaysInRange(start, end);\n}\n\n/**\n * Form random hash\n */\nexport function chr4() {\n return Math.random().toString(16).slice(-4);\n}\n\n/**\n * Create random identifier with a prefix\n * @param prefix\n */\nexport function createIdentifier(prefix) {\n return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;\n}\n"]}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Web Components for Nanopore digital Web Apps
|
3
|
-
*/
|
4
|
-
System.register(["./p-f48be9f5.system.js","./p-93880c28.system.js"],(function(e,a){"use strict";var n,o,t,s,i,l,r;return{setters:[function(e){n=e.p;o=e.w;t=e.d;s=e.N;i=e.a;l=e.H;r=e.b},function(){}],execute:function(){var e=function(e){return"__sc_import_"+e.replace(/\s|-/g,"_")};var d=function(){{n.$cssShim$=o.__cssshim}{h(l.prototype)}var e=Array.from(t.querySelectorAll("script")).find((function(e){return new RegExp("/"+s+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var r={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,o.location.href)).href;{c(r.resourcesUrl,e)}if(!o.customElements){return a.import("./p-5b6c304c.system.js").then((function(){return r}))}}return i(r)};var c=function(a,n){var i=e(s);try{o[i]=new Function("w","return import(w);//"+Math.random())}catch(r){var l=new Map;o[i]=function(e){var s=new URL(e,a).href;var r=l.get(s);if(!r){var d=t.createElement("script");d.type="module";d.crossOrigin=n.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '"+s+"'; window."+i+".m = m;"],{type:"application/javascript"}));r=new Promise((function(e){d.onload=function(){e(o[i].m);d.remove()}}));l.set(s,r);t.head.appendChild(d)}return r}}};var h=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var n=a.call(this,false);var o=this.childNodes;if(e){for(var t=0;t<o.length;t++){if(o[t].nodeType!==2){n.appendChild(o[t].cloneNode(true))}}}return n}};d().then((function(e){return r(JSON.parse('[["p-5b66bb8f.system",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-39d36fd1.system",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-f710c763.system",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-7ad4a27a.system",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-bc394857.system",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[2064],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-0c6c2141.system",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-3ccb176c.system",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-d0385948.system",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-5100ae70.system",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-21af2a5e.system",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-32f396c0.system",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"isLegacy":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-a02cc654.system",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-56f86047.system",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-379e21d9.system",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-7f1374b6.system",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-ab07c1fa.system",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-0d0dfc06.system",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-c070ffd3.system",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-85c8b070.system",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-42cebbfe.system",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-52769304.system",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-21d6d31e.system",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"validation":[16],"store":[32],"userForm":[32],"submitted":[32],"_dirty":[32],"_valid":[32]}]]],["p-6dad332b.system",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-316f83a9.system",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-eacf5b5b.system",[[1,"nano-slide",{"ready":[1540]}]]],["p-5d17cfbb.system",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-6b4dd158.system",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-bf9aa89d.system",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-e817ab4a.system",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-fff27907.system",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-48874481.system",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-1a30dfdd.system",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-88779174.system",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1]}]]],["p-241d90eb.system",[[1,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-7e55b214.system",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-7aa7425d.system",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-866f083f.system",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-f780d2f6.system",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"isLegacy":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-96d9b8b9.system",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-5d5ea4ab.system",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]]]'),e)}))}}}));
|
5
|
-
//# sourceMappingURL=p-e7140887.system.js.map
|
@@ -1,5 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function s(e){try{d(o.next(e))}catch(t){i(t)}}function r(e){try{d(o["throw"](e))}catch(t){i(t)}}function d(e){e.done?a(e.value):n(e.value).then(s,r)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1];i=s;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(s);break}if(i[2])a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(r){s=[6,r];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
|
2
|
-
/*!
|
3
|
-
* Web Components for Nanopore digital Web Apps
|
4
|
-
*/System.register(["./p-f48be9f5.system.js","./p-e195ab77.system.js","./p-89edc042.system.js","./p-0784f2ad.system.js"],(function(e){"use strict";var t,a,o,n,i,s,r,d,l,c,u,h,f,b,p,v,y,g,_,m;return{setters:[function(e){t=e.h;a=e.r;o=e.c;n=e.e;i=e.g},function(e){s=e.b;r=e.D;d=e.i;l=e.p;c=e.d;u=e.s;h=e.e;f=e.f;b=e.g;p=e.h;v=e.j;y=e.k;g=e.a},function(e){_=e.c},function(e){m=e.f}],execute:function(){var x;(function(e){e[e["Sunday"]=0]="Sunday";e[e["Monday"]=1]="Monday";e[e["Tuesday"]=2]="Tuesday";e[e["Wednesday"]=3]="Wednesday";e[e["Thursday"]=4]="Thursday";e[e["Friday"]=5]="Friday";e[e["Saturday"]=6]="Saturday"})(x||(x={}));function D(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function w(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function k(e,t){if(t===void 0){t=x.Monday}var a=new Date(e);var o=a.getDay();var n=(o<t?7:0)+o-t;a.setDate(a.getDate()-n);return a}function M(e,t){if(t===void 0){t=x.Monday}var a=new Date(e);var o=a.getDay();var n=(o<t?-7:0)+6-(o-t);a.setDate(a.getDate()+n);return a}function S(e){return new Date(e.getFullYear(),e.getMonth(),1)}function F(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function T(e,t,a){return N(e,t,a)===e}function N(e,t,a){var o=e.getTime();if(t&&t instanceof Date&&o<t.getTime()){return t}if(a&&a instanceof Date&&o>a.getTime()){return a}return e}function Y(e,t){var a=[];var o=e;while(!D(o,t)){a.push(o);o=w(o,1)}a.push(o);return a}function z(e,t){if(t===void 0){t=x.Monday}var a=k(S(e),t);var o=M(F(e),t);return Y(a,o)}var C=function(e){var a=e.focusedDay,o=e.today,n=e.day,i=e.onDaySelect,s=e.onKeyboardNavigation,r=e.focusedDayRef,d=e.inRange,l=e.disabled,c=e.isSelected;var u=D(n,o);var h=D(n,a);var f=n.getMonth()!==a.getMonth()||l;var b=!d;function p(e){i(e,n)}return t("button",{class:{"duet-date__day":true,"is-outside":b,"is-disabled":f,"is-today":u},tabIndex:h?0:-1,onClick:p,onKeyDown:s,disabled:b,type:"button","aria-pressed":c?"true":"false",ref:function(e){if(h&&e&&r){r(e)}}},t("span",{"aria-hidden":"true"},n.getDate()),t("span",{class:"duet-date__vhidden"},n.toLocaleDateString(undefined,{day:"numeric",month:"long"})))};function I(e,t){var a=[];for(var o=0;o<e.length;o+=t){a.push(e.slice(o,o+t))}return a}function L(e,t,a){return e.map((function(o,n){var i=(n+t)%e.length;return a(e[i])}))}var O=function(e){var a=e.selectedDate,o=e.focusedDate,n=e.labelledById,i=e.localization,s=e.firstDayOfWeek,r=e.min,d=e.max,l=e.onDateSelect,c=e.onKeyboardNavigation,u=e.focusedDayRef,h=e.onMouseDown,f=e.onFocusIn,b=e.isDateDisabled;var p=new Date;var v=z(o,s);return t("table",{class:"duet-date__table",role:"grid","aria-labelledby":n,onFocusin:f,onMouseDown:h},t("thead",null,t("tr",null,L(i.dayNames,s,(function(e){return t("th",{class:"duet-date__table-header",scope:"col"},t("span",{"aria-hidden":"true"},e.substr(0,2)),t("span",{class:"duet-date__vhidden"},e))})))),t("tbody",null,I(v,7).map((function(e){return t("tr",{class:"duet-date__row"},e.map((function(e){return t("td",{class:"duet-date__cell",role:"gridcell","aria-selected":D(e,a)?"true":undefined},t(C,{day:e,today:p,focusedDay:o,inRange:T(e,r,d),onDaySelect:l,onKeyboardNavigation:c,focusedDayRef:u,disabled:b(e),isSelected:D(e,a)}))})))}))))};var W={buttonLabel:"Choose date",placeholder:"YYYY-MM-DD",selectedDateMessage:"Selected date is",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",keyboardInstruction:"You can use arrow keys to navigate dates",calendarHeading:"Choose a date",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};var A=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--background:var(--nano-layer-bg, #fff);--active-color:var(--nano-color-base, var(--nano-color-primary, #007495));--active-text-color:var(\n --nano-color-contrast,\n var(--nano-color-primary-contrast, #fff)\n );--focus-shadow:var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8)));--inactive-color:var(--nano-button-color, #f0efed);display:block;font-size:16px}:host(.nano-color){--active-color:var(--nano-color-base, var(--nano-color-primary, #007495));--active-text-color:var(--nano-color-contrast);--focus-shadow:0 0 0 0.1875rem rgba(var(--nano-color-tint-rgb), 0.56)}.duet-date *,.duet-date *::before,.duet-date *::after{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.duet-date{-webkit-box-sizing:border-box;box-sizing:border-box;color:currentColor;display:block;margin:0;position:relative;text-align:left;width:100%}.duet-date__dialog{display:-webkit-box;display:-ms-flexbox;display:flex;top:100%;max-width:100%;width:100%}.duet-date__dialog.is-left{left:auto;right:0;width:auto}.duet-date__dialog-content{background:var(--background);min-width:290px;padding:16px 16px 20px;position:relative;-webkit-transform:none;transform:none;max-width:100%;width:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1.25;text-align:center;width:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1.25;padding-bottom:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center}.duet-date__day{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-size:0.875em;font-variant-numeric:tabular-nums;line-height:1.25;position:relative;text-align:center;vertical-align:middle;z-index:1;-webkit-transition:0.15s ease all;transition:0.15s ease all;height:2.5em;width:2.5em}.duet-date__day.is-today{-webkit-box-shadow:0 0 0 1px var(--active-color);box-shadow:0 0 0 1px var(--active-color);position:relative}.duet-date__day:hover::before,.duet-date__day.is-today::before{content:"";background:var(--active-color);border-radius:50%;bottom:0;left:0;opacity:0.16;position:absolute;right:0;top:0}[aria-selected=true] .duet-date__day{background:var(--active-color);color:var(--active-text-color);-webkit-box-shadow:none;box-shadow:none;outline:0}.duet-date__day:active{background:var(--active-color);-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);color:var(--active-text-color)}.duet-date__day:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:0}.duet-date__day.is-disabled{background:transparent;-webkit-box-shadow:none;box-shadow:none;cursor:default;opacity:0.5}.duet-date__day.is-disabled::before{display:none}.duet-date__day.is-outside{background:var(--inactive-color);-webkit-box-shadow:none;box-shadow:none;cursor:default;opacity:0.6;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;width:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);-moz-appearance:none;-webkit-appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;appearance:none;border:0;border-radius:50%;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:distribute;justify-content:space-around;margin-left:8px;padding:0;-webkit-transition:background-color 300ms ease;transition:background-color 300ms ease;font-size:0.9em;height:2.2em;width:2.2em}.duet-date__prev:focus,.duet-date__next:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:0}.duet-date__prev:active:focus,.duet-date__next:active:focus{-webkit-box-shadow:none;box-shadow:none}.duet-date__prev:disabled,.duet-date__next:disabled{cursor:default;opacity:0.5}.duet-date__prev nano-icon,.duet-date__next nano-icon{margin:0 auto}.duet-date__select{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-top:4px;position:relative}.duet-date__select span{margin-right:4px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.duet-date__select span{margin-right:unset;-webkit-margin-end:4px;margin-inline-end:4px}}.duet-date__select select{cursor:pointer;font-size:1em;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2}.duet-date__select select.focus-visible:focus+.duet-date__select-label{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow)}.duet-date__select-label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.25em;font-weight:600;line-height:1.25;padding:0 4px 0 8px;pointer-events:none;position:relative;width:100%;z-index:1}.duet-date__select-label nano-icon{font-size:0.55em}.duet-date__vhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;top:0;width:1px}';function j(e,t){var a=[];for(var o=e;o<=t;o++){a.push(o)}return a}var P=e("nano_date_picker",function(){function e(e){var t=this;a(this,e);this.nanoDatePicked=o(this,"nanoDatePicked",7);this.monthSelectId=s("NanoDateMonth");this.yearSelectId=s("NanoDateYear");this.dialogLabelId=s("NanoDateLabel");this.initialTouchX=null;this.initialTouchY=null;this.activeFocus=false;this.focusedDay=new Date;this.selectedDate="";this.min="";this.max="";this.firstDayOfWeek=r.Monday;this.localization=W;this.isDateDisabled=function(){return false};this.isModal=false;this.enableActiveFocus=function(){t.activeFocus=true};this.disableActiveFocus=function(){t.activeFocus=false};this.handleTouchStart=function(e){var a=e.changedTouches[0];t.initialTouchX=a.pageX;t.initialTouchY=a.pageY};this.handleTouchMove=function(e){e.preventDefault()};this.handleTouchEnd=function(e){var a=e.changedTouches[0];var o=a.pageX-t.initialTouchX;var n=a.pageY-t.initialTouchY;var i=70;var s=Math.abs(o)>=i&&Math.abs(n)<=i;if(s){t.addMonths(o<0?1:-1)}t.initialTouchY=null;t.initialTouchX=null};this.handleNextMonthClick=function(e){e.preventDefault();t.addMonths(1)};this.handlePreviousMonthClick=function(e){e.preventDefault();t.addMonths(-1)};this.handleKeyboardNavigation=function(e){if(e.key==="Tab"&&!e.shiftKey&&t.isModal){e.preventDefault();var a=t.firstFocusEle||t.firstFocusableElement;a.focus();return}var o=true;switch(e.key){case"ArrowRight":t.addDays(1);break;case"ArrowLeft":t.addDays(-1);break;case"ArrowDown":t.addDays(7);break;case"ArrowUp":t.addDays(-7);break;case"PageUp":if(e.shiftKey){t.addYears(-1)}else{t.addMonths(-1)}break;case"PageDown":if(e.shiftKey){t.addYears(1)}else{t.addMonths(1)}break;case"Home":t.startOfWeek();break;case"End":t.endOfWeek();break;default:o=false}if(o){e.preventDefault();t.enableActiveFocus()}};this.handleDaySelect=function(e,a){var o=!t.isDateDisabled(a);var n=d(a,l(t.min),l(t.max));if(!n||!o){return}if(a.getMonth()===t.focusedDay.getMonth()){t.setValue(a)}else{t.setFocusedDay(a)}};this.handleMonthSelect=function(e){t.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=function(e){t.setYear(parseInt(e.target.value,10))};this.processFocusedDayNode=function(e){t.focusedDayNode=e;if(t.activeFocus){setTimeout((function(){return e.focus()}),0)}}}e.prototype.setFocus=function(e,t){if(e===void 0){e=false}if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var a=this;return __generator(this,(function(o){this.setFocusedDay(l(this.selectedDate)||new Date);if(e){setTimeout((function(e){return a.focusedDayNode.focus()}),20);return[2]}clearTimeout(this.focusTimeoutId);this.focusTimeoutId=setTimeout((function(){if(t)m.force(a.monthSelectNode);a.monthSelectNode.focus()}),20);return[2]}))}))};e.prototype.handleSelectedDateChange=function(){this.setFocus(true)};e.prototype.addDays=function(e){this.setFocusedDay(c(this.focusedDay,e))};e.prototype.addMonths=function(e){this.setMonth(this.focusedDay.getMonth()+e)};e.prototype.addYears=function(e){this.setYear(this.focusedDay.getFullYear()+e)};e.prototype.startOfWeek=function(){this.setFocusedDay(u(this.focusedDay,this.firstDayOfWeek))};e.prototype.endOfWeek=function(){this.setFocusedDay(h(this.focusedDay,this.firstDayOfWeek))};e.prototype.setMonth=function(e){var t=f(b(this.focusedDay),e);var a=p(t);var o=f(this.focusedDay,e);this.setFocusedDay(v(o,t,a))};e.prototype.setYear=function(e){var t=y(b(this.focusedDay),e);var a=p(t);var o=y(this.focusedDay,e);this.setFocusedDay(v(o,t,a))};e.prototype.setFocusedDay=function(e){this.focusedDay=v(e,l(this.min),l(this.max))};e.prototype.setValue=function(e){this.selectedDate=g(e);this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:e})};e.prototype.connectedCallback=function(){if(this.yearSelectNode)m.observe(this.yearSelectNode);if(this.monthSelectNode)m.observe(this.monthSelectNode)};e.prototype.componentWillLoad=function(){this.handleSelectedDateChange()};e.prototype.componentDidLoad=function(){this.connectedCallback()};e.prototype.disconnectedCallback=function(){m.unobserve(this.yearSelectNode);m.unobserve(this.monthSelectNode)};e.prototype.render=function(){var e=this;var a=l(this.selectedDate);var o=(a||this.focusedDay).getFullYear();var i=this.focusedDay.getMonth();var s=this.focusedDay.getFullYear();var r=l(this.min);var c=l(this.max);var u=r!=null&&r.getMonth()===i&&r.getFullYear()===s;var h=c!=null&&c.getMonth()===i&&c.getFullYear()===s;var f=o-10;var v=o+10;if(r)f=r.getFullYear();if(c)v=c.getFullYear();return t(n,{class:Object.assign({},_(this.color))},t("div",{class:"duet-date"},t("div",{class:{"duet-date__dialog":true,"is-active":true},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},t("div",{class:"duet-date__dialog-content"},t("div",{class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),t("div",{class:"duet-date__header",onFocusin:this.disableActiveFocus},t("div",null,t("h2",{id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[i]," ",this.focusedDay.getFullYear()),t("label",{htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),t("div",{class:"duet-date__select"},t("select",{id:this.monthSelectId,class:"duet-date__select--month",ref:function(t){return e.firstFocusableElement=e.monthSelectNode=t},onChange:this.handleMonthSelect},this.localization.monthNames.map((function(e,a){return t("option",{key:e,value:a,selected:a===i,disabled:!d(new Date(s,a,1),r?b(r):null,c?p(c):null)},e)}))),t("div",{class:"duet-date__select-label","aria-hidden":"true"},t("span",null,this.localization.monthNamesShort[i]),t("nano-icon",{name:"light/chevron-down"}))),t("label",{htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),t("div",{class:"duet-date__select"},t("select",{id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect,ref:function(t){return e.yearSelectNode=t}},j(f,v).map((function(e){return t("option",{key:e,selected:e===s},e)}))),t("div",{class:"duet-date__select-label","aria-hidden":"true"},t("span",null,this.focusedDay.getFullYear()),t("nano-icon",{name:"light/chevron-down"})))),t("div",{class:"duet-date__nav"},t("button",{class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:u,type:"button"},t("nano-icon",{name:"light/chevron-left"}),t("span",{class:"duet-date__vhidden"},this.localization.prevMonthLabel)),t("button",{class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},t("nano-icon",{name:"light/chevron-right"}),t("span",{class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),t("div",null,t(O,{selectedDate:a,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:r,max:c,isDateDisabled:this.isDateDisabled}))))))};Object.defineProperty(e.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selectedDate:["handleSelectedDateChange"]}},enumerable:false,configurable:true});return e}());P.style=A}}}));
|
5
|
-
//# sourceMappingURL=p-e817ab4a.system.entry.js.map
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Web Components for Nanopore digital Web Apps
|
3
|
-
*/
|
4
|
-
System.register([],(function(){"use strict";return{execute:function(){(function(){if(typeof window!=="object"){return}if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype)){Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}})}return}var t=window.document;var e=[];var n=null;var r=null;function i(t){this.time=t.time;this.target=t.target;this.rootBounds=p(t.rootBounds);this.boundingClientRect=p(t.boundingClientRect);this.intersectionRect=p(t.intersectionRect||l());this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect;var n=e.width*e.height;var r=this.intersectionRect;var i=r.width*r.height;if(n){this.intersectionRatio=Number((i/n).toFixed(4))}else{this.intersectionRatio=this.isIntersecting?1:0}}function o(t,e){var n=e||{};if(typeof t!="function"){throw new Error("callback must be a function")}if(n.root&&n.root.nodeType!=1){throw new Error("root must be an Element")}this._checkForIntersections=u(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=t;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(n.rootMargin);this.thresholds=this._initThresholds(n.threshold);this.root=n.root||null;this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" ");this._monitoringDocuments=[];this._monitoringUnsubscribes=[]}o.prototype.THROTTLE_TIMEOUT=100;o.prototype.POLL_INTERVAL=null;o.prototype.USE_MUTATION_OBSERVER=true;o._setupCrossOriginUpdater=function(){if(!n){n=function(t,n){if(!t||!n){r=l()}else{r=d(t,n)}e.forEach((function(t){t._checkForIntersections()}))}}return n};o._resetCrossOriginUpdater=function(){n=null;r=null};o.prototype.observe=function(t){var e=this._observationTargets.some((function(e){return e.element==t}));if(e){return}if(!(t&&t.nodeType==1)){throw new Error("target must be an Element")}this._registerInstance();this._observationTargets.push({element:t,entry:null});this._monitorIntersections(t.ownerDocument);this._checkForIntersections()};o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t}));this._unmonitorIntersections(t.ownerDocument);if(this._observationTargets.length==0){this._unregisterInstance()}};o.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorAllIntersections();this._unregisterInstance()};o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();this._queuedEntries=[];return t};o.prototype._initThresholds=function(t){var e=t||[0];if(!Array.isArray(e))e=[e];return e.sort().filter((function(t,e,n){if(typeof t!="number"||isNaN(t)||t<0||t>1){throw new Error("threshold must be a number between 0 and 1 inclusively")}return t!==n[e-1]}))};o.prototype._parseRootMargin=function(t){var e=t||"0px";var n=e.split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e){throw new Error("rootMargin must be specified in pixels or percent")}return{value:parseFloat(e[1]),unit:e[2]}}));n[1]=n[1]||n[0];n[2]=n[2]||n[0];n[3]=n[3]||n[1];return n};o.prototype._monitorIntersections=function(e){var n=e.defaultView;if(!n){return}if(this._monitoringDocuments.indexOf(e)!=-1){return}var r=this._checkForIntersections;var i=null;var o=null;if(this.POLL_INTERVAL){i=n.setInterval(r,this.POLL_INTERVAL)}else{h(n,"resize",r,true);h(e,"scroll",r,true);if(this.USE_MUTATION_OBSERVER&&"MutationObserver"in n){o=new n.MutationObserver(r);o.observe(e,{attributes:true,childList:true,characterData:true,subtree:true})}}this._monitoringDocuments.push(e);this._monitoringUnsubscribes.push((function(){var t=e.defaultView;if(t){if(i){t.clearInterval(i)}c(t,"resize",r,true)}c(e,"scroll",r,true);if(o){o.disconnect()}}));if(e!=(this.root&&this.root.ownerDocument||t)){var s=m(e);if(s){this._monitorIntersections(s.ownerDocument)}}};o.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(n==-1){return}var r=this.root&&this.root.ownerDocument||t;var i=this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e){return true}while(n&&n!=r){var i=m(n);n=i&&i.ownerDocument;if(n==e){return true}}return false}));if(i){return}var o=this._monitoringUnsubscribes[n];this._monitoringDocuments.splice(n,1);this._monitoringUnsubscribes.splice(n,1);o();if(e!=r){var s=m(e);if(s){this._unmonitorIntersections(s.ownerDocument)}}};o.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0;this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++){t[e]()}};o.prototype._checkForIntersections=function(){if(!this.root&&n&&!r){return}var t=this._rootIsInDom();var e=t?this._getRootRect():l();this._observationTargets.forEach((function(r){var o=r.element;var u=f(o);var h=this._rootContainsTarget(o);var c=r.entry;var a=t&&h&&this._computeTargetAndRootIntersection(o,u,e);var l=r.entry=new i({time:s(),target:o,boundingClientRect:u,rootBounds:n&&!this.root?null:e,intersectionRect:a});if(!c){this._queuedEntries.push(l)}else if(t&&h){if(this._hasCrossedThreshold(c,l)){this._queuedEntries.push(l)}}else{if(c&&c.isIntersecting){this._queuedEntries.push(l)}}}),this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this)}};o.prototype._computeTargetAndRootIntersection=function(e,i,o){if(window.getComputedStyle(e).display=="none")return;var s=i;var u=g(e);var h=false;while(!h&&u){var c=null;var l=u.nodeType==1?window.getComputedStyle(u):{};if(l.display=="none")return null;if(u==this.root||u.nodeType==9){h=true;if(u==this.root||u==t){if(n&&!this.root){if(!r||r.width==0&&r.height==0){u=null;c=null;s=null}else{c=r}}else{c=o}}else{var p=g(u);var v=p&&f(p);var m=p&&this._computeTargetAndRootIntersection(p,v,o);if(v&&m){u=p;c=d(v,m)}else{u=null;s=null}}}else{var _=u.ownerDocument;if(u!=_.body&&u!=_.documentElement&&l.overflow!="visible"){c=f(u)}}if(c){s=a(c,s)}if(!s)break;u=u&&g(u)}return s};o.prototype._getRootRect=function(){var e;if(this.root){e=f(this.root)}else{var n=t.documentElement;var r=t.body;e={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(e)};o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return e.unit=="px"?e.value:e.value*(n%2?t.width:t.height)/100}));var n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};n.width=n.right-n.left;n.height=n.bottom-n.top;return n};o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1;var r=e.isIntersecting?e.intersectionRatio||0:-1;if(n===r)return;for(var i=0;i<this.thresholds.length;i++){var o=this.thresholds[i];if(o==n||o==r||o<n!==o<r){return true}}};o.prototype._rootIsInDom=function(){return!this.root||v(t,this.root)};o.prototype._rootContainsTarget=function(e){return v(this.root||t,e)&&(!this.root||this.root.ownerDocument==e.ownerDocument)};o.prototype._registerInstance=function(){if(e.indexOf(this)<0){e.push(this)}};o.prototype._unregisterInstance=function(){var t=e.indexOf(this);if(t!=-1)e.splice(t,1)};function s(){return window.performance&&performance.now&&performance.now()}function u(t,e){var n=null;return function(){if(!n){n=setTimeout((function(){t();n=null}),e)}}}function h(t,e,n,r){if(typeof t.addEventListener=="function"){t.addEventListener(e,n,r||false)}else if(typeof t.attachEvent=="function"){t.attachEvent("on"+e,n)}}function c(t,e,n,r){if(typeof t.removeEventListener=="function"){t.removeEventListener(e,n,r||false)}else if(typeof t.detatchEvent=="function"){t.detatchEvent("on"+e,n)}}function a(t,e){var n=Math.max(t.top,e.top);var r=Math.min(t.bottom,e.bottom);var i=Math.max(t.left,e.left);var o=Math.min(t.right,e.right);var s=o-i;var u=r-n;return s>=0&&u>=0&&{top:n,bottom:r,left:i,right:o,width:s,height:u}||null}function f(t){var e;try{e=t.getBoundingClientRect()}catch(n){}if(!e)return l();if(!(e.width&&e.height)){e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}}return e}function l(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function p(t){if(!t||"x"in t){return t}return{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function d(t,e){var n=e.top-t.top;var r=e.left-t.left;return{top:n,left:r,height:e.height,width:e.width,bottom:n+e.height,right:r+e.width}}function v(t,e){var n=e;while(n){if(n==t)return true;n=g(n)}return false}function g(e){var n=e.parentNode;if(e.nodeType==9&&e!=t){return m(e)}if(n&&n.nodeType==11&&n.host){return n.host}if(n&&n.assignedSlot){return n.assignedSlot.parentNode}return n}function m(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(e){return null}}window.IntersectionObserver=o;window.IntersectionObserverEntry=i})()}}}));
|
5
|
-
//# sourceMappingURL=p-f5d4d13b.system.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["node_modules/intersection-observer/intersection-observer.js"],"names":["window","IntersectionObserverEntry","prototype","Object","defineProperty","get","this","intersectionRatio","document","registry","crossOriginUpdater","crossOriginRect","entry","time","target","rootBounds","ensureDOMRect","boundingClientRect","intersectionRect","getEmptyRect","isIntersecting","targetRect","targetArea","width","height","intersectionArea","Number","toFixed","IntersectionObserver","callback","opt_options","options","Error","root","nodeType","_checkForIntersections","throttle","bind","THROTTLE_TIMEOUT","_callback","_observationTargets","_queuedEntries","_rootMarginValues","_parseRootMargin","rootMargin","thresholds","_initThresholds","threshold","map","margin","value","unit","join","_monitoringDocuments","_monitoringUnsubscribes","POLL_INTERVAL","USE_MUTATION_OBSERVER","_setupCrossOriginUpdater","convertFromParentRect","forEach","observer","_resetCrossOriginUpdater","observe","isTargetAlreadyObserved","some","item","element","_registerInstance","push","_monitorIntersections","ownerDocument","unobserve","filter","_unmonitorIntersections","length","_unregisterInstance","disconnect","_unmonitorAllIntersections","takeRecords","records","slice","opt_threshold","Array","isArray","sort","t","i","a","isNaN","opt_rootMargin","marginString","margins","split","parts","exec","parseFloat","doc","win","defaultView","indexOf","monitoringInterval","domObserver","setInterval","addEvent","MutationObserver","attributes","childList","characterData","subtree","clearInterval","removeEvent","frame","getFrameElement","index","rootDoc","hasDependentTargets","itemDoc","unsubscribe","splice","unsubscribes","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","getBoundingClientRect","rootContainsTarget","_rootContainsTarget","oldEntry","_computeTargetAndRootIntersection","newEntry","now","_hasCrossedThreshold","getComputedStyle","display","parent","getParentNode","atRoot","parentRect","parentComputedStyle","frameRect","frameIntersect","body","documentElement","overflow","computeRectIntersection","html","top","left","right","clientWidth","bottom","clientHeight","_expandRectByRootMargin","rect","newRect","oldRatio","newRatio","containsDeep","performance","fn","timeout","timer","setTimeout","node","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detatchEvent","rect1","rect2","Math","max","min","el","err","y","x","parentBoundingRect","parentIntersectionRect","child","parentNode","host","assignedSlot","frameElement","e"],"mappings":";;;uEAQC,WAID,UAAWA,SAAW,SAAU,CAC9B,OAKF,GAAI,yBAA0BA,QAC1B,8BAA+BA,QAC/B,sBAAuBA,OAAOC,0BAA0BC,UAAW,CAIrE,KAAM,mBAAoBF,OAAOC,0BAA0BC,WAAY,CACrEC,OAAOC,eAAeJ,OAAOC,0BAA0BC,UACrD,iBAAkB,CAClBG,IAAK,WACH,OAAOC,KAAKC,kBAAoB,KAItC,OAOF,IAAIC,EAAWR,OAAOQ,SAStB,IAAIC,EAAW,GAOf,IAAIC,EAAqB,KAMzB,IAAIC,EAAkB,KAStB,SAASV,EAA0BW,GACjCN,KAAKO,KAAOD,EAAMC,KAClBP,KAAKQ,OAASF,EAAME,OACpBR,KAAKS,WAAaC,EAAcJ,EAAMG,YACtCT,KAAKW,mBAAqBD,EAAcJ,EAAMK,oBAC9CX,KAAKY,iBAAmBF,EAAcJ,EAAMM,kBAAoBC,KAChEb,KAAKc,iBAAmBR,EAAMM,iBAG9B,IAAIG,EAAaf,KAAKW,mBACtB,IAAIK,EAAaD,EAAWE,MAAQF,EAAWG,OAC/C,IAAIN,EAAmBZ,KAAKY,iBAC5B,IAAIO,EAAmBP,EAAiBK,MAAQL,EAAiBM,OAGjE,GAAIF,EAAY,CAGdhB,KAAKC,kBAAoBmB,QAAQD,EAAmBH,GAAYK,QAAQ,QACnE,CAELrB,KAAKC,kBAAoBD,KAAKc,eAAiB,EAAI,GAcvD,SAASQ,EAAqBC,EAAUC,GAEtC,IAAIC,EAAUD,GAAe,GAE7B,UAAWD,GAAY,WAAY,CACjC,MAAM,IAAIG,MAAM,+BAGlB,GAAID,EAAQE,MAAQF,EAAQE,KAAKC,UAAY,EAAG,CAC9C,MAAM,IAAIF,MAAM,2BAIlB1B,KAAK6B,uBAAyBC,EAC1B9B,KAAK6B,uBAAuBE,KAAK/B,MAAOA,KAAKgC,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AKjI,QAYjB,SAASkC,EAAsByH,EAAoBC,GACjD,IAAIlC,EAAMkC,EAAuBlC,IAAMiC,EAAmBjC,IAC1D,IAAIC,EAAOiC,EAAuBjC,KAAOgC,EAAmBhC,KAC5D,MAAO,CACLD,IAAKA,EACLC,KAAMA,EACN3H,OAAQ4J,EAAuB5J,OAC/BD,MAAO6J,EAAuB7J,MAC9B+H,OAAQJ,EAAMkC,EAAuB5J,OACrC4H,MAAOD,EAAOiC,EAAuB7J,OAYzC,SAASsI,EAAavB,EAAQ+C,GAC5B,IAAIlB,EAAOkB,EACX,MAAOlB,EAAM,CACX,GAAIA,GAAQ7B,EAAQ,OAAO,KAE3B6B,EAAO5B,EAAc4B,GAEvB,OAAO,MAUT,SAAS5B,EAAc4B,GACrB,IAAI7B,EAAS6B,EAAKmB,WAElB,GAAInB,EAAKjI,UAA2B,GAAKiI,GAAQ3J,EAAU,CAEzD,OAAOwG,EAAgBmD,GAGzB,GAAI7B,GAAUA,EAAOpG,UAAY,IAAMoG,EAAOiD,KAAM,CAElD,OAAOjD,EAAOiD,KAGhB,GAAIjD,GAAUA,EAAOkD,aAAc,CAEjC,OAAOlD,EAAOkD,aAAaF,WAG7B,OAAOhD,EAST,SAAStB,EAAgBhB,GACvB,IACE,OAAOA,EAAIE,aAAeF,EAAIE,YAAYuF,cAAgB,KAC1D,MAAOC,GAEP,OAAO,MAMX1L,OAAO4B,qBAAuBA,EAC9B5B,OAAOC,0BAA4BA,GA18BnC","sourcesContent":["/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n(function() {\n'use strict';\n\n// Exit early if we're not running in a browser.\nif (typeof window !== 'object') {\n return;\n}\n\n// Exit early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n\n/**\n * A local reference to the document.\n */\nvar document = window.document;\n\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n/**\n * The signal updater for cross-origin intersection. When not null, it means\n * that the polyfill is configured to work in a cross-origin mode.\n * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nvar crossOriginUpdater = null;\n\n/**\n * The current cross-origin intersection. Only used in the cross-origin mode.\n * @type {DOMRect|ClientRect}\n */\nvar crossOriginRect = null;\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = ensureDOMRect(entry.rootBounds);\n this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);\n this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n\n /** @private @const {!Array<!Document>} */\n this._monitoringDocuments = [];\n /** @private @const {!Array<function()>} */\n this._monitoringUnsubscribes = [];\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Sets up the polyfill in the cross-origin mode. The result is the\n * updater function that accepts two arguments: `boundingClientRect` and\n * `intersectionRect` - just as these fields would be available to the\n * parent via `IntersectionObserverEntry`. This function should be called\n * each time the iframe receives intersection information from the parent\n * window, e.g. via messaging.\n * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nIntersectionObserver._setupCrossOriginUpdater = function() {\n if (!crossOriginUpdater) {\n /**\n * @param {DOMRect|ClientRect} boundingClientRect\n * @param {DOMRect|ClientRect} intersectionRect\n */\n crossOriginUpdater = function(boundingClientRect, intersectionRect) {\n if (!boundingClientRect || !intersectionRect) {\n crossOriginRect = getEmptyRect();\n } else {\n crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);\n }\n registry.forEach(function(observer) {\n observer._checkForIntersections();\n });\n };\n }\n return crossOriginUpdater;\n};\n\n\n/**\n * Resets the cross-origin mode.\n */\nIntersectionObserver._resetCrossOriginUpdater = function() {\n crossOriginUpdater = null;\n crossOriginRect = null;\n};\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections(target.ownerDocument);\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n return item.element != target;\n });\n this._unmonitorIntersections(target.ownerDocument);\n if (this._observationTargets.length == 0) {\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorAllIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n * value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n var marginString = opt_rootMargin || '0px';\n var margins = marginString.split(/\\s+/).map(function(margin) {\n var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent');\n }\n return {value: parseFloat(parts[1]), unit: parts[2]};\n });\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0];\n margins[2] = margins[2] || margins[0];\n margins[3] = margins[3] || margins[1];\n\n return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function(doc) {\n var win = doc.defaultView;\n if (!win) {\n // Already destroyed.\n return;\n }\n if (this._monitoringDocuments.indexOf(doc) != -1) {\n // Already monitoring.\n return;\n }\n\n // Private state for monitoring.\n var callback = this._checkForIntersections;\n var monitoringInterval = null;\n var domObserver = null;\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL);\n } else {\n addEvent(win, 'resize', callback, true);\n addEvent(doc, 'scroll', callback, true);\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {\n domObserver = new win.MutationObserver(callback);\n domObserver.observe(doc, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n }\n\n this._monitoringDocuments.push(doc);\n this._monitoringUnsubscribes.push(function() {\n // Get the window object again. When a friendly iframe is destroyed, it\n // will be null.\n var win = doc.defaultView;\n\n if (win) {\n if (monitoringInterval) {\n win.clearInterval(monitoringInterval);\n }\n removeEvent(win, 'resize', callback, true);\n }\n\n removeEvent(doc, 'scroll', callback, true);\n if (domObserver) {\n domObserver.disconnect();\n }\n });\n\n // Also monitor the parent.\n if (doc != (this.root && this.root.ownerDocument || document)) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._monitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function(doc) {\n var index = this._monitoringDocuments.indexOf(doc);\n if (index == -1) {\n return;\n }\n\n var rootDoc = (this.root && this.root.ownerDocument || document);\n\n // Check if any dependent targets are still remaining.\n var hasDependentTargets =\n this._observationTargets.some(function(item) {\n var itemDoc = item.element.ownerDocument;\n // Target is in this context.\n if (itemDoc == doc) {\n return true;\n }\n // Target is nested in this context.\n while (itemDoc && itemDoc != rootDoc) {\n var frame = getFrameElement(itemDoc);\n itemDoc = frame && frame.ownerDocument;\n if (itemDoc == doc) {\n return true;\n }\n }\n return false;\n });\n if (hasDependentTargets) {\n return;\n }\n\n // Unsubscribe.\n var unsubscribe = this._monitoringUnsubscribes[index];\n this._monitoringDocuments.splice(index, 1);\n this._monitoringUnsubscribes.splice(index, 1);\n unsubscribe();\n\n // Also unmonitor the parent.\n if (doc != rootDoc) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._unmonitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorAllIntersections = function() {\n var unsubscribes = this._monitoringUnsubscribes.slice(0);\n this._monitoringDocuments.length = 0;\n this._monitoringUnsubscribes.length = 0;\n for (var i = 0; i < unsubscribes.length; i++) {\n unsubscribes[i]();\n }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n if (!this.root && crossOriginUpdater && !crossOriginRect) {\n // Cross origin monitoring, but no initial data available yet.\n return;\n }\n\n var rootIsInDom = this._rootIsInDom();\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n this._observationTargets.forEach(function(item) {\n var target = item.element;\n var targetRect = getBoundingClientRect(target);\n var rootContainsTarget = this._rootContainsTarget(target);\n var oldEntry = item.entry;\n var intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, targetRect, rootRect);\n\n var newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: crossOriginUpdater && !this.root ? null : rootRect,\n intersectionRect: intersectionRect\n });\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry);\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry);\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry);\n }\n }\n }, this);\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this);\n }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} targetRect The bounding rect of the target.\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n function(target, targetRect, rootRect) {\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display == 'none') return;\n\n var intersectionRect = targetRect;\n var parent = getParentNode(target);\n var atRoot = false;\n\n while (!atRoot && parent) {\n var parentRect = null;\n var parentComputedStyle = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {};\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display == 'none') return null;\n\n if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {\n atRoot = true;\n if (parent == this.root || parent == document) {\n if (crossOriginUpdater && !this.root) {\n if (!crossOriginRect ||\n crossOriginRect.width == 0 && crossOriginRect.height == 0) {\n // A 0-size cross-origin intersection means no-intersection.\n parent = null;\n parentRect = null;\n intersectionRect = null;\n } else {\n parentRect = crossOriginRect;\n }\n } else {\n parentRect = rootRect;\n }\n } else {\n // Check if there's a frame that can be navigated to.\n var frame = getParentNode(parent);\n var frameRect = frame && getBoundingClientRect(frame);\n var frameIntersect =\n frame &&\n this._computeTargetAndRootIntersection(frame, frameRect, rootRect);\n if (frameRect && frameIntersect) {\n parent = frame;\n parentRect = convertFromParentRect(frameRect, frameIntersect);\n } else {\n parent = null;\n intersectionRect = null;\n }\n }\n } else {\n // If the element has a non-visible overflow, and it's not the <body>\n // or <html> element, update the intersection rect.\n // Note: <body> and <html> cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n var doc = parent.ownerDocument;\n if (parent != doc.body &&\n parent != doc.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent);\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n }\n if (!intersectionRect) break;\n parent = parent && getParentNode(parent);\n }\n return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {ClientRect} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n var rootRect;\n if (this.root) {\n rootRect = getBoundingClientRect(this.root);\n } else {\n // Use <html>/<body> instead of window since scroll bars affect size.\n var html = document.documentElement;\n var body = document.body;\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n };\n }\n return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {DOMRect|ClientRect} rect The rect object to expand.\n * @return {ClientRect} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n var margins = this._rootMarginValues.map(function(margin, i) {\n return margin.unit == 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\n });\n var newRect = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n };\n newRect.width = newRect.right - newRect.left;\n newRect.height = newRect.bottom - newRect.top;\n\n return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n function(oldEntry, newEntry) {\n\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n var oldRatio = oldEntry && oldEntry.isIntersecting ?\n oldEntry.intersectionRatio || 0 : -1;\n var newRatio = newEntry.isIntersecting ?\n newEntry.intersectionRatio || 0 : -1;\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return;\n\n for (var i = 0; i < this.thresholds.length; i++) {\n var threshold = this.thresholds[i];\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true;\n }\n }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n return containsDeep(this.root || document, target) &&\n (!this.root || this.root.ownerDocument == target.ownerDocument);\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n if (registry.indexOf(this) < 0) {\n registry.push(this);\n }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n var index = registry.indexOf(this);\n if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its execution, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n * function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n var timer = null;\n return function () {\n if (!timer) {\n timer = setTimeout(function() {\n fn();\n timer = null;\n }, timeout);\n }\n };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n if (typeof node.addEventListener == 'function') {\n node.addEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.attachEvent == 'function') {\n node.attachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n if (typeof node.removeEventListener == 'function') {\n node.removeEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.detatchEvent == 'function') {\n node.detatchEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object|?ClientRect} The intersection rect or undefined if no\n * intersection is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n var top = Math.max(rect1.top, rect2.top);\n var bottom = Math.min(rect1.bottom, rect2.bottom);\n var left = Math.max(rect1.left, rect2.left);\n var right = Math.min(rect1.right, rect2.right);\n var width = right - left;\n var height = bottom - top;\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n } || null;\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n var rect;\n\n try {\n rect = el.getBoundingClientRect();\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect();\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n }\n return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {ClientRect} The empty rect.\n */\nfunction getEmptyRect() {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n };\n}\n\n\n/**\n * Ensure that the result has all of the necessary fields of the DOMRect.\n * Specifically this ensures that `x` and `y` fields are set.\n *\n * @param {?DOMRect|?ClientRect} rect\n * @return {?DOMRect}\n */\nfunction ensureDOMRect(rect) {\n // A `DOMRect` object has `x` and `y` fields.\n if (!rect || 'x' in rect) {\n return rect;\n }\n // A IE's `ClientRect` type does not have `x` and `y`. The same is the case\n // for internally calculated Rect objects. For the purposes of\n // `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`\n // for these fields.\n return {\n top: rect.top,\n y: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n right: rect.right,\n width: rect.width,\n height: rect.height\n };\n}\n\n\n/**\n * Inverts the intersection and bounding rect from the parent (frame) BCR to\n * the local BCR space.\n * @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.\n * @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.\n * @return {ClientRect} The local root bounding rect for the parent's children.\n */\nfunction convertFromParentRect(parentBoundingRect, parentIntersectionRect) {\n var top = parentIntersectionRect.top - parentBoundingRect.top;\n var left = parentIntersectionRect.left - parentBoundingRect.left;\n return {\n top: top,\n left: left,\n height: parentIntersectionRect.height,\n width: parentIntersectionRect.width,\n bottom: top + parentIntersectionRect.height,\n right: left + parentIntersectionRect.width\n };\n}\n\n\n/**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n var node = child;\n while (node) {\n if (node == parent) return true;\n\n node = getParentNode(node);\n }\n return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n var parent = node.parentNode;\n\n if (node.nodeType == /* DOCUMENT */ 9 && node != document) {\n // If this node is a document node, look for the embedding frame.\n return getFrameElement(node);\n }\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host;\n }\n\n if (parent && parent.assignedSlot) {\n // If the parent is distributed in a <slot>, return the parent of a slot.\n return parent.assignedSlot.parentNode;\n }\n\n return parent;\n}\n\n\n/**\n * Returns the embedding frame element, if any.\n * @param {!Document} doc\n * @return {!Element}\n */\nfunction getFrameElement(doc) {\n try {\n return doc.defaultView && doc.defaultView.frameElement || null;\n } catch (e) {\n // Ignore the error.\n return null;\n }\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}());\n"]}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Web Components for Nanopore digital Web Apps
|
3
|
-
*/
|
4
|
-
const n=/^(\d{4})-(\d{2})-(\d{2})$/;var r;(function(n){n[n["Sunday"]=0]="Sunday";n[n["Monday"]=1]="Monday";n[n["Tuesday"]=2]="Tuesday";n[n["Wednesday"]=3]="Wednesday";n[n["Thursday"]=4]="Thursday";n[n["Friday"]=5]="Friday";n[n["Saturday"]=6]="Saturday"})(r||(r={}));function t(n,r,t){var a=parseInt(t,10);var e=parseInt(r,10);var u=parseInt(n,10);const s=Number.isInteger(u)&&Number.isInteger(e)&&Number.isInteger(a)&&e>0&&e<=12&&a>0&&a<=31&&u>0;if(s){return new Date(u,e-1,a)}}function a(r){if(!r){return}const a=r.match(n);if(a){return t(a[1],a[2],a[3])}}function e(n){if(!n){return""}var r=n.getDate().toString(10);var t=(n.getMonth()+1).toString(10);var a=n.getFullYear().toString(10);if(n.getDate()<10){r=`0${r}`}if(n.getMonth()<9){t=`0${t}`}return`${a}-${t}-${r}`}function u(n,r){var t=new Date(n);t.setDate(t.getDate()+r);return t}function s(n,t=r.Monday){var a=new Date(n);var e=a.getDay();var u=(e<t?7:0)+e-t;a.setDate(a.getDate()-u);return a}function i(n,t=r.Monday){var a=new Date(n);var e=a.getDay();var u=(e<t?-7:0)+6-(e-t);a.setDate(a.getDate()+u);return a}function f(n){return new Date(n.getFullYear(),n.getMonth(),1)}function o(n){return new Date(n.getFullYear(),n.getMonth()+1,0)}function c(n,r){const t=new Date(n);t.setMonth(r);return t}function $(n,r){const t=new Date(n);t.setFullYear(r);return t}function v(n,r,t){return d(n,r,t)===n}function d(n,r,t){const a=n.getTime();if(r&&r instanceof Date&&a<r.getTime()){return r}if(t&&t instanceof Date&&a>t.getTime()){return t}return n}function D(){return Math.random().toString(16).slice(-4)}function w(n){return`${n}-${D()}${D()}-${D()}-${D()}-${D()}-${D()}${D()}${D()}`}export{r as D,e as a,w as b,t as c,u as d,i as e,c as f,f as g,o as h,v as i,d as j,$ as k,a as p,s};
|
5
|
-
//# sourceMappingURL=p-f66958c1.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/utils/date-utils.ts"],"names":["ISO_DATE_FORMAT","DaysOfWeek","createDate","year","month","day","dayInt","parseInt","monthInt","yearInt","isValid","Number","isInteger","Date","parseISODate","value","matches","match","printISODate","date","d","getDate","toString","m","getMonth","y","getFullYear","addDays","days","setDate","startOfWeek","firstDayOfWeek","Monday","getDay","diff","endOfWeek","startOfMonth","endOfMonth","setMonth","setYear","setFullYear","inRange","min","max","clamp","time","getTime","chr4","Math","random","slice","createIdentifier","prefix"],"mappings":";;;AAAA,MAAMA,EAAkB,gCAEZC,GAAZ,SAAYA,GACVA,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\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport function createDate(year: string, month: string, day: string): Date {\n var dayInt = parseInt(day, 10);\n var monthInt = parseInt(month, 10);\n var yearInt = parseInt(year, 10);\n\n const isValid =\n Number.isInteger(yearInt) && // all parts should be integers\n Number.isInteger(monthInt) &&\n Number.isInteger(dayInt) &&\n monthInt > 0 && // month must be 1-12\n monthInt <= 12 &&\n dayInt > 0 && // day must be 1-31\n dayInt <= 31 &&\n yearInt > 0;\n\n if (isValid) {\n return new Date(yearInt, monthInt - 1, dayInt);\n }\n}\n\n/**\n * @param value date string in ISO format YYYY-MM-DD\n */\nexport function parseISODate(value: string): Date {\n if (!value) {\n return;\n }\n\n const matches = value.match(ISO_DATE_FORMAT);\n if (matches) {\n return createDate(matches[1], matches[2], matches[3]);\n }\n}\n\n/**\n * print date in format YYYY-MM-DD\n * @param date\n */\nexport function printISODate(date: Date): string {\n if (!date) {\n return '';\n }\n\n var d = date.getDate().toString(10);\n var m = (date.getMonth() + 1).toString(10);\n var y = date.getFullYear().toString(10);\n\n // days are not zero-indexed, so pad if less than 10\n if (date.getDate() < 10) {\n d = `0${d}`;\n }\n\n // months *are* zero-indexed, pad if less than 9!\n if (date.getMonth() < 9) {\n m = `0${m}`;\n }\n\n return `${y}-${m}-${d}`;\n}\n\n/**\n * Compare if two dates are equal in terms of day, month, and year\n */\nexport function isEqual(a: Date, b: Date): boolean {\n if (a == null || b == null) {\n return false;\n }\n\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nexport function addDays(date: Date, days: number): Date {\n var d = new Date(date);\n d.setDate(d.getDate() + days);\n return d;\n}\n\nexport function addMonths(date: Date, months: number): Date {\n const d = new Date(date);\n d.setMonth(date.getMonth() + months);\n return d;\n}\n\nexport function addYears(date: Date, years: number): Date {\n const d = new Date(date);\n d.setFullYear(date.getFullYear() + years);\n return d;\n}\n\nexport function startOfWeek(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date {\n var d = new Date(date);\n var day = d.getDay();\n var diff = (day < firstDayOfWeek ? 7 : 0) + day - firstDayOfWeek;\n\n d.setDate(d.getDate() - diff);\n return d;\n}\n\nexport function endOfWeek(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date {\n var d = new Date(date);\n var day = d.getDay();\n var diff = (day < firstDayOfWeek ? -7 : 0) + 6 - (day - firstDayOfWeek);\n\n d.setDate(d.getDate() + diff);\n return d;\n}\n\nexport function startOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function endOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n}\n\nexport function setMonth(date: Date, month: number): Date {\n const d = new Date(date);\n d.setMonth(month);\n return d;\n}\n\nexport function setYear(date: Date, year: number): Date {\n const d = new Date(date);\n d.setFullYear(year);\n return d;\n}\n\n/**\n * Check if date is within a min and max\n */\nexport function inRange(date: Date, min?: Date, max?: Date): boolean {\n return clamp(date, min, max) === date;\n}\n\n/**\n * Ensures date is within range, returns min or max if out of bounds\n */\nexport function clamp(date: Date, min?: Date, max?: Date): Date {\n const time = date.getTime();\n\n if (min && min instanceof Date && time < min.getTime()) {\n return min;\n }\n if (max && max instanceof Date && time > max.getTime()) {\n return max;\n }\n return date;\n}\n\n/**\n * given start and end date, return an (inclusive) array of all dates in between\n * @param start\n * @param end\n */\nfunction getDaysInRange(start: Date, end: Date): Date[] {\n const days: Date[] = [];\n let current = start;\n\n while (!isEqual(current, end)) {\n days.push(current);\n current = addDays(current, 1);\n }\n\n days.push(current);\n\n return days;\n}\n\n/**\n * given a date, return an array of dates from a calendar perspective\n * @param date\n * @param firstDayOfWeek\n */\nexport function getViewOfMonth(\n date: Date,\n firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n): Date[] {\n const start = startOfWeek(startOfMonth(date), firstDayOfWeek);\n const end = endOfWeek(endOfMonth(date), firstDayOfWeek);\n\n return getDaysInRange(start, end);\n}\n\n/**\n * Form random hash\n */\nexport function chr4() {\n return Math.random().toString(16).slice(-4);\n}\n\n/**\n * Create random identifier with a prefix\n * @param prefix\n */\nexport function createIdentifier(prefix) {\n return `${prefix}-${chr4()}${chr4()}-${chr4()}-${chr4()}-${chr4()}-${chr4()}${chr4()}${chr4()}`;\n}\n"]}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(s){r=[6,s];o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
|
2
|
-
/*!
|
3
|
-
* Web Components for Nanopore digital Web Apps
|
4
|
-
*/System.register(["./p-f48be9f5.system.js","./p-e195ab77.system.js","./p-89edc042.system.js"],(function(e){"use strict";var t,n,i,o,a,r,s,l,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.e;a=e.g},function(e){r=e.p;s=e.a;l=e.c},function(e){d=e.c}],execute:function(){var u=".sc-nano-date-input-h{-webkit-box-sizing:border-box;box-sizing:border-box}*.sc-nano-date-input,*.sc-nano-date-input::before,*.sc-nano-date-input::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden].sc-nano-date-input{display:none !important}.sc-nano-date-input-h{display:inline-block;width:100%;--focus-shadow:var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8)));--open-btn-color:var(--nano-button-color, #f0efed);--open-btn-border:none;--close-btn-color:var(--nano-button-color, #f0efed);--picker-base-size:16px}.nano-color.sc-nano-date-input-h{--focus-shadow:0 0 0 0.1875rem rgba(var(--nano-color-tint-rgb), 0.56)}nano-icon.sc-nano-date-input{pointer-events:none}.date-field.sc-nano-date-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative}.date-field__dropdown.sc-nano-date-input{--padding:0;--overflow:visible;padding:0 !important;width:0 !important;width:100%;z-index:var(--nano-layer-index-dropdown, 300) !important}.date-field__close-bar.sc-nano-date-input{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;text-overflow:ellipsis;white-space:nowrap;border:0;margin:0;overflow:visible;padding:0;position:absolute;right:-8px;top:-8px;width:auto;z-index:1}.date-field__open.sc-nano-date-input{background:var(--open-btn-color);border:var(--open-btn-border);margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-field__open.sc-nano-date-input:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:none}.date-field__close.sc-nano-date-input{-webkit-appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-moz-appearance:none;appearance:none;background:var(--close-btn-color);border:0;border-radius:50%;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0;width:24px}@media (min-width: 36em){.date-field__close.sc-nano-date-input{opacity:0}}.date-field__close.sc-nano-date-input:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:none}@media (min-width: 36em){.date-field__close.sc-nano-date-input:focus{opacity:1}}.date-field__close.sc-nano-date-input nano-icon.sc-nano-date-input{margin:0 auto}.date-field.sc-nano-date-input nano-date-picker.sc-nano-date-input{font-size:var(--picker-base-size)}.vhidden.sc-nano-date-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}";var c={d:"(\\d{1,2})",m:"(\\d{1,2})",y:"(\\d{4})"};var p=0;var h=e("nano_date_input",function(){function e(e){var i=this;t(this,e);this.nanoChange=n(this,"nanoChange",7);this.nanoValidate=n(this,"nanoValidate",7);this.directInput=false;this.dateOrderIndeces={d:0,m:1,y:3};this.inputId="nano-input-"+p++;this.locale=window.navigator.languages||window.navigator.language||undefined;this._invalid=false;this.helperText=true;this.helperTextFormat={year:"numeric",month:"long",day:"numeric"};this.floatLabel=false;this.name=this.inputId;this.readonly=false;this.disabled=false;this.autofocus=false;this.clearInput=false;this.value="";this.validateOn="submitThenDirty";this.showInlineError=true;this.dateOrder="dmy";this.required=false;this.hideLabel=false;this.picker=true;this.pickerOpen=false;this.closeAfterPicked=true;this._dropDownConfig={};this.onInputChange=function(e){e.stopPropagation();i.setValue(e.target.value)};this.onInputValidate=function(e){e.stopPropagation();i._invalid=!e.detail.isValid;i.nanoValidate.emit({isValid:e.detail.isValid,errorMessage:e.detail.errorMessage,originalEvent:e.detail.originalEvent})};this.onInputKey=function(){i.directInput=true};this.onDatePicked=function(e){i.directInput=false;i.value=e.detail.value;if(i.closeAfterPicked)i.pickerOpen=false};this.onDropdownHide=function(){setTimeout((function(e){return i.pickerOpen=false}),200);setTimeout((function(e){return i.trigger.focus()}),50)};this.onDropdownShow=function(){setTimeout((function(e){i.pickerEle.setFocus(false,i.pickerOpenSource==="key");i.pickerOpenSource=null}),200)};this.onTriggerClick=function(){if(!i.pickerOpen){i.pickerOpen=true;i.pickerOpenSource="mouse"}};this.onTriggerKey=function(e){if([" ","Enter"].includes(e.key)){if(!i.pickerOpen){i.pickerOpen=true;i.pickerOpenSource="key"}}};this.onCloseClick=function(){if(i.pickerOpen)i.pickerOpen=false};this.onCloseKeyDown=function(e){if(e.key==="Tab"&&e.shiftKey){i.pickerEle.setFocus(true);e.preventDefault()}if(e.key===" "||e.key==="Enter"){if(i.pickerOpen)i.pickerOpen=false}}}Object.defineProperty(e.prototype,"invalid",{get:function(){return this._invalid},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"validityMessage",{get:function(){if(!this.input)return"";return this.input.validityMessage},enumerable:false,configurable:true});e.prototype.handleValueChange=function(){var e=this;if(!this.directInput)this.inputValue=this.formatIsoDate(this.value);setTimeout((function(){e.nanoChange.emit({value:e.value,date:r(e.value)})}),20);this.directInput=false};e.prototype.handleDateOrderChange=function(){this.setDatePattern()};e.prototype.testDateValidity=function(){var e=this;var t=r(this.value);var n,i,o="";if(this.value&&t){if(this.min&&(n=r(this.min))&&t<n){o="Date below the minimum: "+n.toLocaleDateString(this.locale,this.helperTextFormat)}else if(this.max&&(i=r(this.max))&&t>i){o="Date above the maximum: "+i.toLocaleDateString(this.locale,this.helperTextFormat)}}requestAnimationFrame((function(n){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:if(!this.input)return[2];return[4,this.input.getInputElement()];case 1:e=n.sent();if(this.value.length&&!t)o="Please enter a valid date";e.setCustomValidity(o);if(this.input.validateOn==="dirty"){this.input.showError(o)}return[2]}}))}))}))};e.prototype.handlePickerOpenChange=function(){this.dropdown.open=this.pickerOpen};Object.defineProperty(e.prototype,"dropDownConfig",{get:function(){return this._dropDownConfig},set:function(e){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),e)},enumerable:false,configurable:true});e.prototype.reportValidity=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.input.reportValidity(e)];case 1:return[2,t.sent()]}}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.input)this.input.setFocus();return[2]}))}))};e.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.input.getInputElement()];case 1:return[2,e.sent()]}}))}))};e.prototype.showError=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.input)return[2];this.input.showError(e);return[2]}))}))};e.prototype.setDatePattern=function(){var e=this;var t=[];var n=[];Array.from(this.dateOrder).map((function(i,o){t.push(c[i]);e.dateOrderIndeces[i]=o;n.push(i==="y"?"yyyy":i+i)}));this.pattern=t.join("\\W+");if(!this.placeholder&&this.placeholder!=="false")this.placeholder=n.join(" ")};e.prototype.formatIsoDate=function(e){var t=[];Array.from("ymd").map((function(e){return t.push(c[e])}));var n=e.match(new RegExp(t.join("\\W+")));if(!n)return"";var i=[];i[this.dateOrderIndeces.d]=n[3];i[this.dateOrderIndeces.m]=n[2];i[this.dateOrderIndeces.y]=n[1];return i.join(" ")};e.prototype.setValue=function(e){var t=e.match(new RegExp(this.pattern));if(!t){this.value=e;return}var n=l(t[this.dateOrderIndeces.y+1],t[this.dateOrderIndeces.m+1],t[this.dateOrderIndeces.d+1]);if(!n){n=new Date(e);if(!n){this.value=e;return}}var i=s(n);this.value=i;return i};e.prototype.connectedCallback=function(){this.setDatePattern();this.handleValueChange()};e.prototype.componentDidLoad=function(){var e=this;if(!this.pickerCloseBtn||!this.picker)return;this.pickerEle.firstFocusEle=this.pickerCloseBtn;this.dropdown.tetherTo=this.trigger;setTimeout((function(t){return e.handlePickerOpenChange()}),300)};e.prototype.render=function(){var e=this;this.locale=navigator.languages||navigator.language||undefined;this.dropDownConfig.placement=this.dropDownConfig.placement||"bottom-end";if(this.host.ownerDocument.dir==="rtl"){this.dropDownConfig.placement.replace("start","end")}if(this.trigger)this.dropDownConfig.tetherTo=this.trigger;var t=r(this.value);var n=!!this.host.querySelector('[slot="helper"]');return i(o,{class:Object.assign({},d(this.color))},i("div",{class:"date-field"},i("nano-input",{class:"date-field__input",slot:"trigger",required:this.required||undefined,showInlineError:this.showInlineError,validateOn:this.validateOn,placeholder:this.placeholder!=="false"?this.placeholder:undefined,pattern:this.pattern,label:this.label,disabled:this.disabled||undefined,color:this.color||undefined,autofocus:this.autofocus||undefined,clearInput:this.clearInput||undefined,onNanoChange:this.onInputChange,onNanoInput:this.onInputKey,onNanoValidate:this.onInputValidate,name:"",form:this.form||undefined,size:this.size||undefined,readonly:this.readonly,value:this.inputValue,ref:function(t){return e.input=t},floatLabel:this.floatLabel,hideLabel:this.hideLabel,inputmode:"numeric",part:"input"},i("slot",{name:"start",slot:"start"}),i("slot",{name:"label"}),i("slot",{name:"end",slot:"end"}),this.picker&&[i("button",{slot:"end",class:"date-field__open",type:"button",onKeyDown:this.onTriggerKey,onClick:this.onTriggerClick,ref:function(t){return e.trigger=t},disabled:this.disabled||this.readonly},i("nano-icon",{name:"light/calendar-alt"})),i("nano-dropdown",Object.assign({slot:"end",onNanoHide:this.onDropdownHide,onNanoShow:this.onDropdownShow,dialogTitle:"Choose a date",class:"date-field__dropdown",ref:function(t){return e.dropdown=t}},this.dropDownConfig,{part:"dropdown"}),i("div",null,i("div",{class:"date-field__close-bar"},i("button",{class:"date-field__close",type:"button",onMouseDown:this.onCloseClick,onKeyDown:this.onCloseKeyDown,ref:function(t){return e.pickerCloseBtn=t}},i("nano-icon",{name:"light/times"}),i("span",{class:"vhidden"},"Close window"))),i("nano-date-picker",{onNanoDatePicked:this.onDatePicked,min:this.min||undefined,max:this.max||undefined,"is-modal":true,ref:function(t){return e.pickerEle=t},localization:this.localization,selectedDate:this.value||this.initialPickerDate,firstDayOfWeek:this.firstDayOfWeek,color:this.color||undefined,part:"date-picker"})))],(n||this.helperText||this.showInlineError)&&i("span",{slot:"helper"},i("span",{class:{vhidden:!!this.value.length}},i("slot",{name:"helper"})),this.helperText&&!!t&&i("span",null,t.toLocaleDateString(this.locale,this.helperTextFormat)))),i("input",{type:"hidden",value:this.value,name:this.name})))};Object.defineProperty(e.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["handleValueChange","testDateValidity"],dateOrder:["handleDateOrderChange"],min:["testDateValidity"],max:["testDateValidity"],pickerOpen:["handlePickerOpenChange"]}},enumerable:false,configurable:true});return e}());h.style=u}}}));
|
5
|
-
//# sourceMappingURL=p-f710c763.system.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/components/date-input/date-input.scss?tag=nano-date-input&encapsulation=scoped","src/components/date-input/date-input.tsx"],"names":["dateInputCss","DateRegxps","d","m","y","inputIds","DateInput","exports","class_1","hostRef","_this","this","directInput","dateOrderIndeces","inputId","locale","window","navigator","languages","language","undefined","_invalid","helperText","helperTextFormat","year","month","day","floatLabel","name","readonly","disabled","autofocus","clearInput","value","validateOn","showInlineError","dateOrder","required","hideLabel","picker","pickerOpen","closeAfterPicked","_dropDownConfig","onInputChange","e","stopPropagation","setValue","target","onInputValidate","detail","isValid","nanoValidate","emit","errorMessage","originalEvent","onInputKey","onDatePicked","onDropdownHide","setTimeout","_","trigger","focus","onDropdownShow","pickerEle","setFocus","pickerOpenSource","onTriggerClick","onTriggerKey","includes","key","onCloseClick","onCloseKeyDown","shiftKey","preventDefault","Object","defineProperty","prototype","input","validityMessage","handleValueChange","inputValue","formatIsoDate","nanoChange","date","parseISODate","handleDateOrderChange","setDatePattern","testDateValidity","valueDate","min","max","error","toLocaleDateString","requestAnimationFrame","__awaiter","getInputElement","_a","sent","length","setCustomValidity","showError","handlePickerOpenChange","dropdown","open","ddc","assign","reportValidity","validateFirst","message","dateRegexOrdered","dateStrOrd","Array","from","map","datepart","i","push","pattern","join","placeholder","isoDate","matches","match","RegExp","formatted","createDate","Date","dateStr","printISODate","connectedCallback","componentDidLoad","pickerCloseBtn","firstFocusEle","tetherTo","render","dropDownConfig","placement","host","ownerDocument","dir","replace","hasHelperSlot","querySelector","h","Host","class","createColorClasses","color","slot","label","onNanoChange","onNanoInput","onNanoValidate","form","size","ref","inputmode","part","type","onKeyDown","onClick","onNanoHide","onNanoShow","dialogTitle","onMouseDown","pickerClose","onNanoDatePicked","is-modal","localization","selectedDate","initialPickerDate","firstDayOfWeek","vhidden"],"mappings":";;;iRAAA,IAAMA,EAAe,iyFCgCrB,IAAMC,EAAa,CACjBC,EAAG,aACHC,EAAG,aACHC,EAAG,YAGL,IAAIC,EAAW,MAeFC,EAASC,EAAA,kBAAA,WALtB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,iGAaUA,KAAAC,YAAc,MACdD,KAAAE,iBAAmB,CAAEX,EAAG,EAAGC,EAAG,EAAGC,EAAG,GACpCO,KAAAG,QAAU,cAAcT,IACxBM,KAAAI,OACLC,OAAOC,UAAUC,WAClBF,OAAOC,UAAUE,UACjBC,UAmBOT,KAAAU,SAAW,MAcZV,KAAAW,WAAsB,KAKtBX,KAAAY,iBAAkC,CACxCC,KAAM,UACNC,MAAO,OACPC,IAAK,WAMCf,KAAAgB,WAAsB,MAKtBhB,KAAAiB,KAAejB,KAAKG,QAKpBH,KAAAkB,SAAW,MA2BXlB,KAAAmB,SAAW,MAUXnB,KAAAoB,UAAY,MAKZpB,KAAAqB,WA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KAAK6J,aACnBC,aAAc9J,KAAKsB,OAAStB,KAAK+J,kBACjCC,eAAgBhK,KAAKgK,eACrBxB,MAAOxI,KAAKwI,OAAS/H,UACrByI,KAAK,oBAKXhB,GAAiBlI,KAAKW,YAAcX,KAAKwB,kBACzC4G,EAAA,OAAA,CAAMK,KAAK,UACTL,EAAA,OAAA,CAAME,MAAO,CAAE2B,UAAWjK,KAAKsB,MAAMiE,SACnC6C,EAAA,OAAA,CAAMnH,KAAK,YAEZjB,KAAKW,cAAgBkE,GACpBuD,EAAA,OAAA,KACGvD,EAAUI,mBACTjF,KAAKI,OACLJ,KAAKY,qBAOjBwH,EAAA,QAAA,CAAOe,KAAK,SAAS7H,MAAOtB,KAAKsB,MAAOL,KAAMjB,KAAKiB,6YArkBvC","sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/layers';\n@import '../../global/style/utilities/globals';\n\n:host {\n /**\n * @prop --focus-shadow: defaults to #{$control-focus-style};\n * @prop --open-btn-color: defaults to #{$button-bg-color};\n * @prop --open-btn-border: defaults to none;\n * @prop --close-btn-color: defaults to #{map.get($colors, celsius)};\n * @prop --picker-base-size: Base font size of the date picker component. Defaults to 16px;\n */\n\n display: inline-block;\n width: 100%;\n\n --focus-shadow: #{$control-focus-style};\n --open-btn-color: #{$button-bg-color};\n --open-btn-border: none;\n --close-btn-color: #{$button-bg-color};\n --picker-base-size: 16px;\n}\n\n:host(.nano-color) {\n --focus-shadow: #{$control-focus-size current-color(tint, 0.56)};\n}\n\nnano-icon {\n pointer-events: none;\n}\n\n.date-field {\n display: flex;\n flex-direction: column;\n position: relative;\n\n &__dropdown {\n --padding: 0;\n --overflow: visible;\n\n padding: 0 !important;\n width: 0 !important;\n width: 100%;\n z-index: $layer-index-dropdown !important;\n }\n\n &__close-bar {\n align-items: center;\n display: flex;\n justify-content: space-between;\n text-overflow: ellipsis;\n white-space: nowrap;\n border: 0;\n margin: 0;\n overflow: visible;\n padding: 0;\n position: absolute;\n right: -8px;\n top: -8px;\n width: auto;\n z-index: 1;\n }\n\n &__open {\n background: var(--open-btn-color);\n border: var(--open-btn-border);\n margin: 0;\n appearance: none;\n\n &:focus {\n box-shadow: var(--focus-shadow);\n outline: none;\n }\n }\n\n &__close {\n -webkit-appearance: none;\n align-items: center;\n appearance: none;\n background: var(--close-btn-color);\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n padding: 0;\n width: 24px;\n\n @media (min-width: 36em) {\n opacity: 0;\n }\n\n &:focus {\n box-shadow: var(--focus-shadow);\n outline: none;\n\n @media (min-width: 36em) {\n opacity: 1;\n }\n }\n\n nano-icon {\n margin: 0 auto;\n }\n }\n\n nano-date-picker {\n font-size: var(--picker-base-size);\n }\n}\n\n.vhidden {\n @include visually-hide();\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n h,\n Prop,\n Watch,\n State,\n Event,\n EventEmitter,\n Host,\n Method,\n} from '@stencil/core';\nimport {\n createDate,\n DaysOfWeek,\n printISODate,\n parseISODate,\n} from '../../utils/date-utils';\n\nimport {\n PickerChangeEvent,\n DateInputChangeEventDetail,\n Color,\n LocalDateOpts,\n DuetLocalizedText,\n ControlValidity,\n ControlValidityEventDetail,\n} from '../../interface';\nimport { createColorClasses } from '../../utils';\nimport type { Dropdown } from '../dropdown/dropdown';\n\nconst DateRegxps = {\n d: '(\\\\d{1,2})',\n m: '(\\\\d{1,2})',\n y: '(\\\\d{4})',\n};\n\nlet inputIds = 0;\n\n/**\n * The date-input component combines `nano-dropdown`, `nano-input` and `nano-date-picker` components to make a fully featured date form field. It has specific options for localisation, date formatting and validation.\n *\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot start - input start slot\n * @slot end - input end slot\n */\n@Component({\n tag: 'nano-date-input',\n styleUrl: 'date-input.scss',\n scoped: true,\n})\nexport class DateInput implements ComponentInterface {\n private pickerEle!: HTMLNanoDatePickerElement;\n private trigger!: HTMLButtonElement;\n private pickerCloseBtn!: HTMLButtonElement;\n private dropdown!: HTMLNanoDropdownElement;\n private input: HTMLNanoInputElement;\n private pickerOpenSource: 'key' | 'mouse';\n\n private directInput = false;\n private dateOrderIndeces = { d: 0, m: 1, y: 3 };\n private inputId = `nano-input-${inputIds++}`;\n private locale =\n (window.navigator.languages as string[]) ||\n window.navigator.language ||\n undefined;\n\n @Element() host: HTMLNanoDateInputElement;\n\n // Private state\n\n @State() pattern!: string;\n @State() inputValue: string;\n\n // Public Api / Prop\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.input) return '';\n return this.input.validityMessage;\n }\n\n /**\n * Whether to show a long form, confirmation date string of the one currently entered\n */\n @Prop() helperText: boolean = true;\n\n /**\n * Options for the date string display. Refer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString.\n */\n @Prop() helperTextFormat: LocalDateOpts = {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n };\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * The initial size (number of characters) of the control.\n */\n @Prop() size?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\n * Default is Monday.\n */\n @Prop() firstDayOfWeek?: DaysOfWeek;\n\n /**\n * Button labels, day names, month names, etc, used for localization.\n * Default is English.\n */\n @Prop() localization?: DuetLocalizedText;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n * The pattern prop will be used to create a placeholder automatically if unused.\n */\n @Prop({ mutable: true }) placeholder: string;\n\n /**\n * Current value. Must be in IS0-8601 format: YYYY-MM-DD.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n @Watch('value')\n handleValueChange() {\n if (!this.directInput) this.inputValue = this.formatIsoDate(this.value);\n setTimeout(() => {\n this.nanoChange.emit({\n value: this.value,\n date: parseISODate(this.value),\n });\n }, 20);\n this.directInput = false;\n }\n\n /**\n * When should the field perform validation\n */\n @Prop() validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * The order of the date parts for entry and display.\n * e.g. dmy = dd mm yyyy\n */\n @Prop() dateOrder: 'dmy' | 'mdy' | 'ymd' | 'dym' = 'dmy';\n\n @Watch('dateOrder')\n handleDateOrderChange() {\n this.setDatePattern();\n }\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @Prop() min?: string;\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @Prop() max?: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n @Watch('min')\n @Watch('max')\n @Watch('value')\n testDateValidity() {\n const valueDate = parseISODate(this.value);\n let min: Date,\n max: Date,\n error: string = '';\n\n if (this.value && valueDate) {\n if (this.min && (min = parseISODate(this.min)) && valueDate < min) {\n error =\n 'Date below the minimum: ' +\n min.toLocaleDateString(this.locale, this.helperTextFormat);\n } else if (\n this.max &&\n (max = parseISODate(this.max)) &&\n valueDate > max\n ) {\n error =\n 'Date above the maximum: ' +\n max.toLocaleDateString(this.locale, this.helperTextFormat);\n }\n }\n\n requestAnimationFrame(async (_) => {\n if (!this.input) return;\n const input = await this.input.getInputElement();\n if (this.value.length && !valueDate) error = 'Please enter a valid date';\n\n input.setCustomValidity(error);\n if (this.input.validateOn === 'dirty') {\n this.input.showError(error);\n }\n });\n }\n\n /**\n * Show a date picker. Date pickers are not very useful\n * if the potential input is too far in the distance or past\n * e.g. Birthdays\n */\n @Prop() picker: boolean = true;\n\n /**\n * Initial picker date. Will be to `value` if set. Will be today's date if nothing set.\n * Must be in IS0-8601 format: YYYY-MM-DD.\n */\n @Prop() initialPickerDate?: string;\n\n /**\n * Set / read whether the picker is currently open.\n */\n @Prop({ reflect: true, mutable: true }) pickerOpen: boolean = false;\n\n @Watch('pickerOpen')\n handlePickerOpenChange() {\n this.dropdown.open = this.pickerOpen;\n }\n\n /**\n * Close the picker after a date is selected\n */\n @Prop() closeAfterPicked: boolean = true;\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop()\n get dropDownConfig() {\n return this._dropDownConfig;\n }\n set dropDownConfig(ddc: Partial<Dropdown>) {\n this._dropDownConfig = { ...this._dropDownConfig, ...ddc };\n }\n private _dropDownConfig: Partial<Dropdown> = {};\n\n // Event emitters\n\n /**\n * Event emitted when a date is selected.\n */\n @Event() nanoChange: EventEmitter<DateInputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return await this.input.reportValidity(validateFirst);\n }\n\n /**\n * Sets focus on the child `nano-input`.\n */\n @Method()\n async setFocus() {\n if (this.input) this.input.setFocus();\n }\n\n /**\n * Returns the native `<input>` element used under the hood.\n */\n @Method()\n async getInputElement() {\n return await this.input.getInputElement();\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (!this.input) return;\n this.input.showError(message);\n }\n\n // Event handlers\n\n private onInputChange = (\n e: CustomEvent & {\n target: HTMLInputElement;\n }\n ) => {\n e.stopPropagation();\n this.setValue(e.target.value);\n };\n\n private onInputValidate = (e: CustomEvent<ControlValidityEventDetail>) => {\n e.stopPropagation();\n this._invalid = !e.detail.isValid;\n this.nanoValidate.emit({\n isValid: e.detail.isValid,\n errorMessage: e.detail.errorMessage,\n originalEvent: e.detail.originalEvent,\n });\n };\n\n private onInputKey = () => {\n this.directInput = true;\n };\n\n private onDatePicked = (e: { detail: PickerChangeEvent }) => {\n this.directInput = false;\n this.value = e.detail.value;\n if (this.closeAfterPicked) this.pickerOpen = false;\n };\n\n private onDropdownHide = () => {\n setTimeout((_) => (this.pickerOpen = false), 200);\n setTimeout((_) => this.trigger.focus(), 50);\n };\n\n private onDropdownShow = () => {\n setTimeout((_) => {\n this.pickerEle.setFocus(false, this.pickerOpenSource === 'key');\n this.pickerOpenSource = null;\n }, 200);\n };\n\n private onTriggerClick = () => {\n if (!this.pickerOpen) {\n this.pickerOpen = true;\n this.pickerOpenSource = 'mouse';\n }\n };\n\n private onTriggerKey = (e: KeyboardEvent) => {\n if ([' ', 'Enter'].includes(e.key)) {\n if (!this.pickerOpen) {\n this.pickerOpen = true;\n this.pickerOpenSource = 'key';\n }\n }\n };\n\n private onCloseClick = () => {\n if (this.pickerOpen) this.pickerOpen = false;\n };\n\n private onCloseKeyDown = (e: KeyboardEvent) => {\n // this ensures focus is trapped inside the picker\n if (e.key === 'Tab' && e.shiftKey) {\n this.pickerEle.setFocus(true);\n e.preventDefault();\n }\n if (e.key === ' ' || e.key === 'Enter') {\n if (this.pickerOpen) this.pickerOpen = false;\n }\n };\n\n // Private logic\n\n // set the regexp input pattern and placeholder (if necessary)\n private setDatePattern() {\n let dateRegexOrdered = [];\n let dateStrOrd = [];\n Array.from(this.dateOrder).map((datepart, i) => {\n dateRegexOrdered.push(DateRegxps[datepart]);\n this.dateOrderIndeces[datepart] = i;\n dateStrOrd.push(datepart === 'y' ? 'yyyy' : datepart + datepart);\n });\n this.pattern = dateRegexOrdered.join('\\\\W+');\n\n if (!this.placeholder && this.placeholder !== 'false')\n this.placeholder = dateStrOrd.join(' ');\n }\n\n // set the public facing date string\n private formatIsoDate(isoDate: string) {\n let dateRegexOrdered = [];\n Array.from('ymd').map((datepart) =>\n dateRegexOrdered.push(DateRegxps[datepart])\n );\n const matches = isoDate.match(new RegExp(dateRegexOrdered.join('\\\\W+')));\n if (!matches) return '';\n\n let formatted = [];\n formatted[this.dateOrderIndeces.d] = matches[3];\n formatted[this.dateOrderIndeces.m] = matches[2];\n formatted[this.dateOrderIndeces.y] = matches[1];\n\n return formatted.join(' ');\n }\n\n // on manual user entry, set the value that will be sent with the form field\n private setValue(inputValue: string) {\n const matches = inputValue.match(new RegExp(this.pattern));\n\n // it's an invalid date, but we still need to set it\n if (!matches) {\n this.value = inputValue;\n return;\n }\n\n let date = createDate(\n matches[this.dateOrderIndeces.y + 1],\n matches[this.dateOrderIndeces.m + 1],\n matches[this.dateOrderIndeces.d + 1]\n );\n\n if (!date) {\n // last ditch attempt - see if the browser can get something\n date = new Date(inputValue);\n\n // it's definitely an invalid date, but set it anyway for validation messages\n if (!date) {\n this.value = inputValue;\n return;\n }\n }\n\n const dateStr = printISODate(date);\n this.value = dateStr;\n return dateStr;\n }\n\n connectedCallback() {\n this.setDatePattern();\n this.handleValueChange();\n }\n\n componentDidLoad() {\n if (!this.pickerCloseBtn || !this.picker) return;\n this.pickerEle.firstFocusEle = this.pickerCloseBtn;\n this.dropdown.tetherTo = this.trigger;\n setTimeout((_) => this.handlePickerOpenChange(), 300);\n }\n\n render() {\n this.locale =\n (navigator.languages as string[]) || navigator.language || undefined;\n\n this.dropDownConfig.placement =\n this.dropDownConfig.placement || 'bottom-end';\n\n if ((this.host.ownerDocument as Document).dir === 'rtl') {\n this.dropDownConfig.placement.replace('start', 'end');\n }\n if (this.trigger) this.dropDownConfig.tetherTo = this.trigger;\n\n const valueDate = parseISODate(this.value);\n const hasHelperSlot = !!this.host.querySelector('[slot=\"helper\"]');\n\n return (\n <Host class={{ ...createColorClasses(this.color) }}>\n <div class=\"date-field\">\n <nano-input\n class=\"date-field__input\"\n slot=\"trigger\"\n required={this.required || undefined}\n showInlineError={this.showInlineError}\n validateOn={this.validateOn}\n placeholder={\n this.placeholder !== 'false' ? this.placeholder : undefined\n }\n pattern={this.pattern}\n label={this.label}\n disabled={this.disabled || undefined}\n color={this.color || undefined}\n autofocus={this.autofocus || undefined}\n clearInput={this.clearInput || undefined}\n onNanoChange={this.onInputChange}\n onNanoInput={this.onInputKey}\n onNanoValidate={this.onInputValidate}\n name=\"\"\n form={this.form || undefined}\n size={this.size || undefined}\n readonly={this.readonly}\n value={this.inputValue}\n ref={(input) => (this.input = input)}\n floatLabel={this.floatLabel}\n hideLabel={this.hideLabel}\n inputmode={'numeric'}\n part=\"input\"\n >\n <slot name=\"start\" slot=\"start\" />\n <slot name=\"label\" />\n <slot name=\"end\" slot=\"end\" />\n {this.picker && [\n <button\n slot=\"end\"\n class=\"date-field__open\"\n type=\"button\"\n onKeyDown={this.onTriggerKey}\n onClick={this.onTriggerClick}\n ref={(trigger) => (this.trigger = trigger)}\n disabled={this.disabled || this.readonly}\n >\n <nano-icon name=\"light/calendar-alt\"></nano-icon>\n </button>,\n\n <nano-dropdown\n slot=\"end\"\n onNanoHide={this.onDropdownHide}\n onNanoShow={this.onDropdownShow}\n dialogTitle=\"Choose a date\"\n class=\"date-field__dropdown\"\n ref={(dropdown) => (this.dropdown = dropdown)}\n {...this.dropDownConfig}\n part=\"dropdown\"\n >\n <div>\n <div class=\"date-field__close-bar\">\n <button\n class=\"date-field__close\"\n type=\"button\"\n onMouseDown={this.onCloseClick}\n onKeyDown={this.onCloseKeyDown}\n ref={(pickerClose) => (this.pickerCloseBtn = pickerClose)}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n <span class=\"vhidden\">Close window</span>\n </button>\n </div>\n <nano-date-picker\n onNanoDatePicked={this.onDatePicked}\n min={this.min || undefined}\n max={this.max || undefined}\n is-modal={true}\n ref={(picker) => (this.pickerEle = picker)}\n localization={this.localization}\n selectedDate={this.value || this.initialPickerDate}\n firstDayOfWeek={this.firstDayOfWeek}\n color={this.color || undefined}\n part=\"date-picker\"\n ></nano-date-picker>\n </div>\n </nano-dropdown>,\n ]}\n {(hasHelperSlot || this.helperText || this.showInlineError) && (\n <span slot=\"helper\">\n <span class={{ vhidden: !!this.value.length }}>\n <slot name=\"helper\" />\n </span>\n {this.helperText && !!valueDate && (\n <span>\n {valueDate.toLocaleDateString(\n this.locale,\n this.helperTextFormat\n )}\n </span>\n )}\n </span>\n )}\n </nano-input>\n <input type=\"hidden\" value={this.value} name={this.name} />\n </div>\n </Host>\n );\n }\n}\n"]}
|