@nanoporetech-digital/components 3.10.0 → 3.10.2
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 +19 -0
- package/dist/cjs/{algolia-data-fb13160a.js → algolia-data-533e3a95.js} +2 -2
- package/dist/cjs/{algolia-data-fb13160a.js.map → algolia-data-533e3a95.js.map} +1 -1
- package/dist/cjs/{component-store-b80bdb26.js → component-store-5ad4de07.js} +2 -2
- package/dist/cjs/{component-store-b80bdb26.js.map → component-store-5ad4de07.js.map} +1 -1
- package/dist/cjs/{form-control-845951ac.js → form-control-80c69d1d.js} +2 -2
- package/dist/cjs/{form-control-845951ac.js.map → form-control-80c69d1d.js.map} +1 -1
- package/dist/cjs/{index-e1b5c3ea.js → index-46286eea.js} +8 -5
- package/dist/cjs/index-46286eea.js.map +1 -0
- package/dist/cjs/{index-5e11be36.js → index-b13f69e7.js} +2 -2
- package/dist/cjs/{index-5e11be36.js.map → index-b13f69e7.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +1 -1
- package/dist/cjs/nano-alert.cjs.entry.js +1 -1
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-input.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia.cjs.entry.js +3 -3
- package/dist/cjs/nano-aspect-ratio.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-components.cjs.js +2 -2
- package/dist/cjs/nano-components.cjs.js.map +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nano-demo.cjs.entry.js +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +1 -1
- package/dist/cjs/nano-dialog.cjs.entry.js +2 -2
- package/dist/cjs/nano-drawer.cjs.entry.js +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +2 -2
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_3.cjs.entry.js +1 -1
- package/dist/cjs/nano-hero.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +1 -1
- package/dist/cjs/nano-progress-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +1 -1
- package/dist/cjs/nano-rating.cjs.entry.js +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js +1 -1
- package/dist/cjs/{nano-table-63797258.js → nano-table-2fe37d8f.js} +4 -4
- package/dist/cjs/{nano-table-63797258.js.map → nano-table-2fe37d8f.js.map} +1 -1
- package/dist/cjs/nano-table.cjs.entry.js +3 -3
- package/dist/cjs/{table.worker-6442a968.js → table.worker-6841a9fc.js} +4 -4
- package/dist/cjs/table.worker-6841a9fc.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/{algolia-data-c4ed188c.js → algolia-data-e5e86f12.js} +2 -2
- package/dist/esm/{algolia-data-c4ed188c.js.map → algolia-data-e5e86f12.js.map} +1 -1
- package/dist/esm/{component-store-6eccd724.js → component-store-2044c2c2.js} +2 -2
- package/dist/esm/{component-store-6eccd724.js.map → component-store-2044c2c2.js.map} +1 -1
- package/dist/esm/{form-control-3284c2c9.js → form-control-4f3a88a1.js} +2 -2
- package/dist/esm/{form-control-3284c2c9.js.map → form-control-4f3a88a1.js.map} +1 -1
- package/dist/esm/{index-b4e277ad.js → index-52b0408e.js} +8 -5
- package/dist/esm/index-52b0408e.js.map +1 -0
- package/dist/esm/{index-38484737.js → index-728dda31.js} +2 -2
- package/dist/esm/{index-38484737.js.map → index-728dda31.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/nano-accordion.entry.js +1 -1
- package/dist/esm/nano-alert.entry.js +1 -1
- package/dist/esm/nano-algolia-filter.entry.js +3 -3
- package/dist/esm/nano-algolia-input.entry.js +3 -3
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +2 -2
- package/dist/esm/nano-algolia.entry.js +3 -3
- package/dist/esm/nano-aspect-ratio.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-components.js +3 -3
- package/dist/esm/nano-components.js.map +1 -1
- package/dist/esm/nano-datalist_3.entry.js +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-picker.entry.js +1 -1
- package/dist/esm/nano-demo.entry.js +1 -1
- package/dist/esm/nano-details.entry.js +1 -1
- package/dist/esm/nano-dialog.entry.js +2 -2
- package/dist/esm/nano-drawer.entry.js +1 -1
- package/dist/esm/nano-dropdown.entry.js +1 -1
- package/dist/esm/nano-field-validator.entry.js +2 -2
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-global-nav-user-profile_3.entry.js +2 -2
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-global-search-results.entry.js +1 -1
- package/dist/esm/nano-grid_3.entry.js +1 -1
- package/dist/esm/nano-hero.entry.js +1 -1
- package/dist/esm/nano-icon-button.entry.js +1 -1
- package/dist/esm/nano-icon.entry.js +1 -1
- package/dist/esm/nano-input.entry.js +2 -2
- package/dist/esm/nano-menu-drawer.entry.js +1 -1
- package/dist/esm/nano-progress-bar_2.entry.js +1 -1
- package/dist/esm/nano-range.entry.js +1 -1
- package/dist/esm/nano-rating.entry.js +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +1 -1
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-split-pane.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +1 -1
- package/dist/esm/nano-tab-content.entry.js +1 -1
- package/dist/esm/nano-tab-group.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js +1 -1
- package/dist/esm/{nano-table-2859ef7b.js → nano-table-ec32ac78.js} +4 -4
- package/dist/esm/{nano-table-2859ef7b.js.map → nano-table-ec32ac78.js.map} +1 -1
- package/dist/esm/nano-table.entry.js +3 -3
- package/dist/esm/{table.worker-dc338cc6.js → table.worker-f10dfc07.js} +4 -4
- package/dist/esm/table.worker-f10dfc07.js.map +1 -0
- 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/{p-c4e8d584.entry.js → p-07b6af21.entry.js} +2 -2
- package/dist/nano-components/{p-c4e8d584.entry.js.map → p-07b6af21.entry.js.map} +0 -0
- package/dist/nano-components/{p-400d698f.entry.js → p-09751447.entry.js} +2 -2
- package/dist/nano-components/{p-400d698f.entry.js.map → p-09751447.entry.js.map} +0 -0
- package/dist/nano-components/{p-8907dd24.entry.js → p-0e2f0040.entry.js} +2 -2
- package/dist/nano-components/{p-8907dd24.entry.js.map → p-0e2f0040.entry.js.map} +0 -0
- package/dist/nano-components/{p-c9ceb201.entry.js → p-16e45583.entry.js} +2 -2
- package/dist/nano-components/{p-c9ceb201.entry.js.map → p-16e45583.entry.js.map} +0 -0
- package/dist/nano-components/{p-c0ca353b.entry.js → p-17eebe94.entry.js} +2 -2
- package/dist/nano-components/{p-c0ca353b.entry.js.map → p-17eebe94.entry.js.map} +0 -0
- package/dist/nano-components/{p-524d9381.entry.js → p-1aff5304.entry.js} +2 -2
- package/dist/nano-components/{p-524d9381.entry.js.map → p-1aff5304.entry.js.map} +0 -0
- package/dist/nano-components/{p-f2875bf0.entry.js → p-2f7bb24f.entry.js} +2 -2
- package/dist/nano-components/{p-f2875bf0.entry.js.map → p-2f7bb24f.entry.js.map} +0 -0
- package/dist/nano-components/{p-264903b5.entry.js → p-3667832c.entry.js} +2 -2
- package/dist/nano-components/{p-264903b5.entry.js.map → p-3667832c.entry.js.map} +0 -0
- package/dist/nano-components/{p-78169835.entry.js → p-36a2f1c0.entry.js} +2 -2
- package/dist/nano-components/{p-78169835.entry.js.map → p-36a2f1c0.entry.js.map} +0 -0
- package/dist/nano-components/{p-90365d7b.entry.js → p-378fe272.entry.js} +2 -2
- package/dist/nano-components/{p-90365d7b.entry.js.map → p-378fe272.entry.js.map} +0 -0
- package/dist/nano-components/{p-817eda34.entry.js → p-3e7153c8.entry.js} +2 -2
- package/dist/nano-components/{p-817eda34.entry.js.map → p-3e7153c8.entry.js.map} +0 -0
- package/dist/nano-components/{p-371fe61d.entry.js → p-41be7990.entry.js} +2 -2
- package/dist/nano-components/{p-371fe61d.entry.js.map → p-41be7990.entry.js.map} +0 -0
- package/dist/nano-components/{p-ed69b27b.entry.js → p-41eeef4f.entry.js} +2 -2
- package/dist/nano-components/{p-ed69b27b.entry.js.map → p-41eeef4f.entry.js.map} +0 -0
- package/dist/nano-components/{p-36d5a41d.entry.js → p-47866646.entry.js} +2 -2
- package/dist/nano-components/{p-36d5a41d.entry.js.map → p-47866646.entry.js.map} +0 -0
- package/dist/nano-components/{p-e19d6a92.entry.js → p-4a916b47.entry.js} +2 -2
- package/dist/nano-components/{p-e19d6a92.entry.js.map → p-4a916b47.entry.js.map} +0 -0
- package/dist/nano-components/{p-9fcd383f.entry.js → p-4bbb04d3.entry.js} +2 -2
- package/dist/nano-components/{p-9fcd383f.entry.js.map → p-4bbb04d3.entry.js.map} +0 -0
- package/dist/nano-components/{p-69774e99.entry.js → p-62e3646b.entry.js} +2 -2
- package/dist/nano-components/{p-69774e99.entry.js.map → p-62e3646b.entry.js.map} +0 -0
- package/dist/nano-components/{p-87a76a81.entry.js → p-63f1e229.entry.js} +2 -2
- package/dist/nano-components/{p-87a76a81.entry.js.map → p-63f1e229.entry.js.map} +0 -0
- package/dist/nano-components/{p-fe1446cd.entry.js → p-6a5ae656.entry.js} +2 -2
- package/dist/nano-components/{p-fe1446cd.entry.js.map → p-6a5ae656.entry.js.map} +0 -0
- package/dist/nano-components/{p-abd6b774.entry.js → p-6bb4545b.entry.js} +2 -2
- package/dist/nano-components/{p-abd6b774.entry.js.map → p-6bb4545b.entry.js.map} +0 -0
- package/dist/nano-components/{p-bf91c50e.js → p-6ef53fa1.js} +2 -2
- package/dist/nano-components/p-6ef53fa1.js.map +1 -0
- package/dist/nano-components/{p-5a15e8d7.js → p-726df669.js} +2 -2
- package/dist/nano-components/{p-5a15e8d7.js.map → p-726df669.js.map} +0 -0
- package/dist/nano-components/{p-4b1d73e9.entry.js → p-76ab079e.entry.js} +2 -2
- package/dist/nano-components/{p-4b1d73e9.entry.js.map → p-76ab079e.entry.js.map} +0 -0
- package/dist/nano-components/{p-bb6f7c39.js → p-76d8a8a8.js} +2 -2
- package/dist/nano-components/{p-bb6f7c39.js.map → p-76d8a8a8.js.map} +0 -0
- package/dist/nano-components/{p-364434b4.entry.js → p-7733f1f8.entry.js} +2 -2
- package/dist/nano-components/{p-364434b4.entry.js.map → p-7733f1f8.entry.js.map} +0 -0
- package/dist/nano-components/{p-6f72f6e0.entry.js → p-7b21ec0b.entry.js} +2 -2
- package/dist/nano-components/{p-6f72f6e0.entry.js.map → p-7b21ec0b.entry.js.map} +0 -0
- package/dist/nano-components/{p-f47776fd.entry.js → p-7f545755.entry.js} +2 -2
- package/dist/nano-components/{p-f47776fd.entry.js.map → p-7f545755.entry.js.map} +0 -0
- package/dist/nano-components/{p-c0681b2b.entry.js → p-8065d85b.entry.js} +2 -2
- package/dist/nano-components/{p-c0681b2b.entry.js.map → p-8065d85b.entry.js.map} +0 -0
- package/dist/nano-components/{p-64246c77.entry.js → p-80ecc273.entry.js} +2 -2
- package/dist/nano-components/{p-64246c77.entry.js.map → p-80ecc273.entry.js.map} +0 -0
- package/dist/nano-components/{p-866c73c0.entry.js → p-8f888280.entry.js} +2 -2
- package/dist/nano-components/{p-866c73c0.entry.js.map → p-8f888280.entry.js.map} +0 -0
- package/dist/nano-components/p-928c0a2d.entry.js +5 -0
- package/dist/nano-components/{p-4e26a265.entry.js.map → p-928c0a2d.entry.js.map} +0 -0
- package/dist/nano-components/{p-bfbfec85.entry.js → p-93bece01.entry.js} +2 -2
- package/dist/nano-components/{p-bfbfec85.entry.js.map → p-93bece01.entry.js.map} +0 -0
- package/dist/nano-components/{p-909a424c.js → p-9d1432be.js} +2 -2
- package/dist/nano-components/{p-909a424c.js.map → p-9d1432be.js.map} +0 -0
- package/dist/nano-components/{p-d753f35a.entry.js → p-a20d2028.entry.js} +2 -2
- package/dist/nano-components/{p-d753f35a.entry.js.map → p-a20d2028.entry.js.map} +0 -0
- package/dist/nano-components/{p-f28c802d.entry.js → p-a26a7de3.entry.js} +2 -2
- package/dist/nano-components/{p-f28c802d.entry.js.map → p-a26a7de3.entry.js.map} +0 -0
- package/dist/nano-components/{p-5f1b94f0.entry.js → p-a9beb006.entry.js} +2 -2
- package/dist/nano-components/{p-5f1b94f0.entry.js.map → p-a9beb006.entry.js.map} +0 -0
- package/dist/nano-components/{p-1d21b2ce.entry.js → p-ad3ddbc8.entry.js} +2 -2
- package/dist/nano-components/{p-1d21b2ce.entry.js.map → p-ad3ddbc8.entry.js.map} +0 -0
- package/dist/nano-components/{p-69bec4f3.entry.js → p-b4b55f64.entry.js} +2 -2
- package/dist/nano-components/{p-69bec4f3.entry.js.map → p-b4b55f64.entry.js.map} +0 -0
- package/dist/nano-components/{p-d7ff8f12.js → p-b65e0e63.js} +2 -2
- package/dist/nano-components/{p-d7ff8f12.js.map → p-b65e0e63.js.map} +0 -0
- package/dist/nano-components/p-c3e4e059.js +5 -0
- package/dist/nano-components/{p-fb00a499.js.map → p-c3e4e059.js.map} +0 -0
- package/dist/nano-components/{p-ed2e6f32.js → p-d518b939.js} +2 -2
- package/dist/nano-components/{p-ed2e6f32.js.map → p-d518b939.js.map} +0 -0
- package/dist/nano-components/{p-0411f019.entry.js → p-dab8526f.entry.js} +2 -2
- package/dist/nano-components/{p-0411f019.entry.js.map → p-dab8526f.entry.js.map} +0 -0
- package/dist/nano-components/{p-60823325.entry.js → p-dc88e52b.entry.js} +2 -2
- package/dist/nano-components/{p-60823325.entry.js.map → p-dc88e52b.entry.js.map} +0 -0
- package/dist/nano-components/{p-6bca2d00.entry.js → p-e113074e.entry.js} +2 -2
- package/dist/nano-components/{p-6bca2d00.entry.js.map → p-e113074e.entry.js.map} +0 -0
- package/dist/nano-components/{p-6760e54a.entry.js → p-e4505f00.entry.js} +2 -2
- package/dist/nano-components/{p-6760e54a.entry.js.map → p-e4505f00.entry.js.map} +0 -0
- package/dist/nano-components/{p-de25ba80.entry.js → p-ebb61a70.entry.js} +2 -2
- package/dist/nano-components/{p-de25ba80.entry.js.map → p-ebb61a70.entry.js.map} +0 -0
- package/dist/nano-components/{p-320366a2.entry.js → p-ece694af.entry.js} +2 -2
- package/dist/nano-components/{p-320366a2.entry.js.map → p-ece694af.entry.js.map} +0 -0
- package/dist/nano-components/{p-fccd59e4.entry.js → p-f25d2e90.entry.js} +2 -2
- package/dist/nano-components/{p-fccd59e4.entry.js.map → p-f25d2e90.entry.js.map} +0 -0
- package/dist/nano-components/{p-3d658ce2.entry.js → p-f486c940.entry.js} +2 -2
- package/dist/nano-components/{p-3d658ce2.entry.js.map → p-f486c940.entry.js.map} +0 -0
- package/docs-json.json +2 -2
- package/hydrate/index.js +21 -19
- package/package.json +3 -3
- package/dist/cjs/index-e1b5c3ea.js.map +0 -1
- package/dist/cjs/table.worker-6442a968.js.map +0 -1
- package/dist/esm/index-b4e277ad.js.map +0 -1
- package/dist/esm/table.worker-dc338cc6.js.map +0 -1
- package/dist/nano-components/p-4e26a265.entry.js +0 -5
- package/dist/nano-components/p-bf91c50e.js.map +0 -1
- package/dist/nano-components/p-fb00a499.js +0 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,w as s,h as e,a as n,g as o}from"./p-bf91c50e.js";import{g as a}from"./p-74a7fc4f.js";import{d as h}from"./p-9746b0a5.js";import{g as r}from"./p-257432ff.js";import{g as l}from"./p-b933f3c8.js";const c=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding-top:var(--nano-spacing-small, 8px);--padding-bottom:var(--nano-spacing-small, 8px);--padding-start:var(--nano-spacing-xlarge, 24px);--padding-end:var(--nano-spacing-xlarge, 24px);--font-size:0.8em;--color:#b5aea7;color:var(--color)}.dlist--isfiltered ::slotted(*:not(nano-option):not([slot=no-result]):not([slot=list-top]):not([slot=list-bottom])){display:none !important}.dlist__dropdown{--min-width:100%;--overflow:auto}.dlist__status{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.dlist__menu{--padding-top:inherit;--padding-bottom:inherit;--padding-start:inherit;--padding-end:inherit;--font-size:inherit}";function d(t){let i;if(t.id){i=document.querySelector(`label[for='${t.id}']`)}if(!i){i=t.closest("label")}return i}let p=0;const u=class{get allOptEles(){return this._allOptEles}set allOptEles(t){var i;this._allOptEles=t;if((i=this.connectedInput)===null||i===void 0?void 0:i.value)return;t.forEach((t=>{if(t.selected&&!this.selected.includes(t.value)){this.changeInputValue(t)}}))}constructor(s){t(this,s);this.nanoSelect=i(this,"nanoSelect",7);this.nanoDeselect=i(this,"nanoDeselect",7);this.nanoOptionsUpdated=i(this,"nanoOptionsUpdated",7);this.isNanoInput=false;this.typeToSelect="";this.listId=`nano-datalist-${p++}`;this.isFiltered=false;this.shouldFocus=false;this._allOptEles=[];this._dropDownConfig={skidding:-1};this.optSelected=t=>{t.stopPropagation();this.changeInputValue(t.detail);requestAnimationFrame((()=>this.inputChange()));if(this.type!=="selctMulti")this.shouldOpen=false};this.handleShow=async()=>{if(this.shouldFocus){this.shouldFocus=false;this.listBox.setFocus()}else if(this.type==="select")this.listBox.showActiveElement()};this.handleHide=()=>{this.open=false;const t=a();if(t.closest(this.host.tagName.toLowerCase())){this.connectedInput.select()}};this.inputClick=()=>{this.shouldOpen=true;this.manageDropdownDisplay()};this.inputKeydown=t=>{const i=["Shift","ArrowRight","ArrowLeft","Escape","Enter","Tab"];if(i.includes(t.key)){if(t.key==="Tab")this.shouldOpen=false;return}if(this.type==="select"&&!["ArrowDown","ArrowUp"].includes(t.key)&&(t.key!==" "||this.typeToSelectTimeout)){if(t.key===" "||/^[a-z0-9]+$/i.test(t.key)){clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=window.setTimeout((()=>{this.typeToSelect="";this.typeToSelectTimeout=0}),750);this.typeToSelect+=t.key;this.setOptStartsWith()}return}this.shouldOpen=true;this.manageDropdownDisplay();if(["ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault();this.shouldFocus=true}};this.optionKeyDown=t=>{const i=["Shift","ArrowUp","ArrowDown","Escape","Enter","Tab","Space","PageUp","PageDown","Home","End"," "];if(i.includes(t.key)){if(t.key==="Escape")this.connectedInput.focus();return}const s=["Delete","Backspace"];if(this.type!=="select"&&(!this.exactMatch||s.includes(t.key))){this.connectedInput.focus()}};this.actvOptEles=[];this.connectedInput=undefined;this.inputLabel=undefined;this.hasNoResult=undefined;this.shouldOpen=undefined;this.canOpen=true;this.optionIds=[];this.selected=[];this.options=[];this.input=undefined;this.type="input";this.open=false;this.disableFilter=false;this.disabled=false;this.inputChange=h(this.inputChange.bind(this),50)}get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),t)}get activeOptions(){return this.allOptEles}openWatcher(){s((()=>{this.nanoDropdown.open=this.open;if(this.connectedInput)this.connectedInput.setAttribute("aria-expanded",this.open.toString())}))}async watchInputChange(){let t;if(t=this.host.closest("nano-input")){this.isNanoInput=true;this.connectedInput=await t.getInputElement()}else if(this.input&&typeof this.input==="string"&&(t=document.querySelector(this.input))){this.isNanoInput=false;this.connectedInput=t}else if(typeof this.input==="object"){this.connectedInput=this.input}}manageSlotChangeListener(){var t;if(!this.host)return;if((!this.options||!this.options.length)&&!this.mo){{const t=this.mo=new MutationObserver((()=>this.processSlottedContent()));t.observe(this.host,{childList:true,subtree:true})}this.processSlottedContent();return}if((t=this.options)===null||t===void 0?void 0:t.length){if(!!this.mo){this.mo.disconnect();this.mo=undefined}const t=this.host.querySelectorAll('[slot="internal-opts"]');s((()=>{var i;if(t===null||t===void 0?void 0:t.length)t.forEach((t=>t.remove()));this.allOptEles=this.options.flatMap(((t,i)=>{if(t.value||t.label){const s=Object.assign(document.createElement("nano-option"),{label:t.label,value:t.value,ariaPosinset:i,ariaSetsize:this.options.length,selected:t.selected,id:this.listId+"-option-"+i,textContent:t.label?t.label:t.value,slot:"internal-opts"});this.host.append(s);return s}}));if(((i=this.connectedInput)===null||i===void 0?void 0:i.value.length)&&this.type!=="select"){this.inputChange()}else{this.actvOptEles=[...this.allOptEles]}}))}}watchTypeChange(){if(!this.connectedInput)return;let t={closeOnSelect:false};let i="both";let s=false;switch(this.type){case"input":t={closeOnSelect:true};break;case"select":i="list";s=true;t={closeOnSelect:true,placement:"center"};break}if(!this.isNanoInput){t.tetherTo=this.connectedInput}this.dropDownConfig=Object.assign(Object.assign({},this.dropDownConfig),t);this.connectedInput.setAttribute("aria-autocomplete",i);this.connectedInput.readOnly=s}manageInputEvents(t,i){var e;if(!!i){const t=i.closest("nano-input");if(t){t.removeEventListener("nanoChange",this.inputChange)}i.removeEventListener("change",this.inputChange);i.removeEventListener("click",this.inputClick);i.removeEventListener("keydown",this.inputKeydown);i.removeEventListener("input",this.inputChange);this.inputLabel=null;s((()=>{i.removeAttribute("role");i.removeAttribute("aria-expanded");i.removeAttribute("aria-controls");i.removeAttribute("aria-owns");i.removeAttribute("aria-haspopup");i.removeAttribute("aria-autocomplete");i.removeAttribute("autocomplete")}))}if(!!t){const i=t.closest("nano-input");if(i){i.addEventListener("nanoChange",this.inputChange)}t.addEventListener("change",this.inputChange);t.addEventListener("click",this.inputClick);t.addEventListener("keydown",this.inputKeydown);t.addEventListener("input",this.inputChange);this.listId=this.host.id||this.listId;this.inputLabel=((e=t===null||t===void 0?void 0:t.labels)===null||e===void 0?void 0:e.item(0))||d(t);s((()=>{this.host.id=this.listId;t.setAttribute("role","combobox");t.setAttribute("aria-expanded","false");t.setAttribute("aria-controls",this.listId);t.setAttribute("aria-owns",this.listId);t.setAttribute("aria-haspopup","listbox");t.setAttribute("autocomplete","off")}))}}watchActvOptChange(){var t;let i=0;const e=((t=this.connectedInput)===null||t===void 0?void 0:t.value)||"";const n=[];s((()=>{this.allOptEles.forEach(((t,s)=>{if(this.actvOptEles.includes(t)){i++;t.setAttribute("aria-posinset",i+"");t.setAttribute("aria-setsize",this.actvOptEles.length+"");t.hidden=false;this.isSelected(t,e)}else{t.removeAttribute("aria-posinset");t.removeAttribute("aria-setsize");t.hidden=true;t.selected=false}t.id=this.listId+"-option-"+s;n.push(t.id)}));this.optionIds=n}))}manageCanOpen(){if(this.actvOptEles.length||this.hasNoResult)this.canOpen=true;else this.canOpen=false}manageDropdownDisplay(){if(this.shouldOpen&&this.canOpen&&!this.disabled)this.open=true;if(!this.shouldOpen||!this.canOpen)this.open=false;this.openWatcher()}fireActiveOptsEvent(){this.nanoOptionsUpdated.emit(this.actvOptEles)}isSelected(t,i){if(i===t.value||this.selected.includes(t.value)){t.selected=true}else t.selected=false}get dropwdownOpen(){if(!this.nanoDropdown||!this.open)return false;return true}get exactMatch(){return this.allOptEles.find((t=>this.connectedInput.value===t.value))}changeInputValue(t){var i;let s;if(this.selected.includes(t.value)){this.selected=this.selected.filter((i=>i!==t.value));s=this.nanoDeselect.emit(t)}else{this.selected=[...this.selected];s=this.nanoSelect.emit(t)}if(!s.defaultPrevented){if(this.connectedInput)this.connectedInput.value=t.value;const s=new window.Event("change");(i=this.connectedInput)===null||i===void 0?void 0:i.dispatchEvent(s)}}setOptStartsWith(){const t=t=>t.toLowerCase().substring(0,this.typeToSelect.length)===this.typeToSelect;const i=this.allOptEles.find((i=>i.value.trim().length>0&&!i.disabled&&(t(i.textContent)||t(i.value)||t(i.label)||t(i.filterMeta))));if(i)this.changeInputValue(i)}processSlottedContent(){requestAnimationFrame((()=>{var t;this.allOptEles=Array.from(this.host.querySelectorAll("nano-option"));this.hasNoResult=!!this.host.querySelector('[slot="no-result"]');if(((t=this.connectedInput)===null||t===void 0?void 0:t.value.length)&&this.type!=="select"){this.inputChange()}else this.actvOptEles=this.allOptEles}))}inputChange(){if(this.disableFilter){this.actvOptEles=this.allOptEles;return}const t=this.connectedInput.value;const i=t.trim().toLowerCase();let s=false;const e=[];const n=t=>t.toLowerCase().indexOf(i)>-1;this.allOptEles.forEach((i=>{if((t===i.value||t===i.label)&&this.type!=="selctMulti"){i.selected=true;s=true}else this.isSelected(i,t)}));this.allOptEles.forEach((t=>{if(!i.length||s){e.push(t)}else if(t.value.trim().length>0&&!t.disabled&&(n(t.textContent)||n(t.value)||n(t.label)||n(t.filterMeta))){e.push(t)}}));this.isFiltered=i.length&&!s;this.actvOptEles=e}connectedCallback(){this.watchInputChange()}componentDidLoad(){this.manageSlotChangeListener();this.openWatcher()}componentDidRender(){setTimeout((()=>{if(!this.connectedInput)console.warn("no `nano-input` found. `nano-datalist` should be nested within an `nano-input` or linked via `input` prop",this.host)}),500)}render(){return e(n,{role:this.actvOptEles.length?"listbox":undefined,"aria-owns":this.optionIds.length?this.optionIds.join(" "):undefined,"aria-label":this.optionIds.length?"Select options from the list below":undefined},e("nano-dropdown",Object.assign({},this.dropDownConfig,{ref:t=>this.nanoDropdown=t,dialogTitle:"Select options from the list below",class:{dlist__dropdown:true,"dlist--isfiltered":this.isFiltered},onNanoAfterShow:this.handleShow,onNanoAfterHide:this.handleHide,role:"group"}),e("nano-menu",{hidden:!this.actvOptEles.length,type:"listbox",label:this.inputLabel?this.inputLabel.textContent:undefined,class:{dlist__menu:true,"dlist__menu--open":this.dropwdownOpen},tabIndex:-1,onNanoSelect:this.optSelected,onKeyDown:this.optionKeyDown,ref:t=>this.listBox=t,role:"list"},e("slot",{name:"list-top"}),!this.options.length&&e("slot",null),!!this.options.length&&e("slot",{name:"internal-opts"}),e("slot",{name:"list-bottom"})),e("nano-menu",{type:"listbox",label:"No results found",hidden:!!this.actvOptEles.length,class:{dlist__menu:true,"dlist__menu--open":this.dropwdownOpen}},e("slot",{name:"no-result"})),!!this.actvOptEles&&e("div",{class:"dlist__status"},this.actvOptEles.length," result",this.actvOptEles.length>1?"s":""," available.")))}get host(){return o(this)}static get watchers(){return{open:["openWatcher"],input:["watchInputChange"],options:["manageSlotChangeListener"],type:["watchTypeChange"],connectedInput:["watchTypeChange","manageInputEvents"],selected:["watchActvOptChange"],actvOptEles:["watchActvOptChange","manageCanOpen","fireActiveOptsEvent"],hasNoResult:["manageCanOpen"],shouldOpen:["manageDropdownDisplay"],canOpen:["manageDropdownDisplay"]}}};u.style=c;const f=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding-start:var(--nano-spacing-medium, 16px);--padding-end:var(--nano-spacing-medium, 16px);--padding-top:var(--nano-spacing-small, 8px);--padding-bottom:var(--nano-spacing-small, 8px);--secondary-padding-top:0;--secondary-padding-bottom:0;--bg-color-hover:#f2f7f9;--bg-color-focus:#f2f7f9;--bg-color-selected:#f2f7f9;--color-hover:#007495;--color-selected:#007495;--color-focus:#007495;--focus-outline:none;--font-size:0.9em;display:block}.menu{font-size:var(--font-size, 0.9em);overscroll-behavior:none;min-width:var(--width);position:relative}.menu:focus{outline:none}::slotted(*:not(nano-nav-item):not(nano-option):not(hr):not(slot)){padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom);display:block}";const g=class{constructor(s){t(this,s);this.nanoFocus=i(this,"nanoFocus",7);this.nanoBlur=i(this,"nanoBlur",7);this.nanoSelect=i(this,"nanoSelect",7);this.ignoreMouseEvents=false;this.typeToSelect="";this._hasFocus=false;this.handleFocus=()=>{this.setActiveFocusItem(this.selectedItem||this.getItems[0]);this._hasFocus=true;this.nanoFocus.emit()};this.handleClick=t=>{const i=t.target;const s=i.closest("nano-nav-item");if(s&&!s.disabled){this.nanoSelect.emit(s)}};this.handleKeyDown=t=>{clearTimeout(this.ignoreMouseTimeout);this.ignoreMouseTimeout=setTimeout((()=>this.ignoreMouseEvents=false),500);this.ignoreMouseEvents=true;switch(t.key){case" ":if(this.activeItem)this.activeItem.click();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":case"Home":case"End":const i=this.getItems;const s=this.activeItem;let e=i.indexOf(s);if(i.length){t.preventDefault();if(t.key==="ArrowDown"){e++}else if(t.key==="ArrowUp"){e--}else if(t.key==="Home"||t.key==="PageUp"){e=0}else if(t.key==="End"||t.key==="PageDown"){e=i.length-1}if(e<0)e=i.length-1;if(e>i.length-1)e=0;this.setActiveFocusItem(i[e]);if(i[e])i[e].scrollIntoView({block:"nearest"});return}break}if(t.key===" "||/^[a-z0-9]+$/i.test(t.key)){clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelect=""),750);this.typeToSelect+=t.key;const i=this.getItems;for(const t of i){const i=t.shadowRoot.querySelector("slot:not([name])");const s=l(i).toLowerCase().trim();if(s.substring(0,this.typeToSelect.length)===this.typeToSelect){this.setActiveFocusItem(t);break}}}};this.handleMouseOver=t=>{const i=t.target;const s=i.closest("nano-nav-item")||i.closest("nano-option");if(s&&!this.ignoreMouseEvents){this.setActiveFocusItem(s)}};this.type="menu";this.label=undefined}get hasFocus(){return this._hasFocus}async setFocus(){var t;if((t=this.menu)===null||t===void 0?void 0:t.focus)this.menu.focus({preventScroll:true})}async removeFocus(){var t;if((t=this.menu)===null||t===void 0?void 0:t.blur)this.menu.blur()}async showActiveElement(){if(this.selectedItem)this.selectedItem.scrollIntoView({block:"nearest"})}async resetActiveItem(){this.getItems.filter((t=>t.tagName.toLowerCase()==="nano-option")).map((t=>t.setAttribute("tabindex","-1")))}get getItems(){let t;const i=this.el.querySelectorAll("nano-nav-item.secondary-open");if(i.length){const s=i[i.length-1];t=Array.from(s.querySelectorAll("nano-nav-item, nano-option"))}else{t=r(this.el,"nano-nav-item, nano-option","slot")}return t.filter((t=>!t.disabled&&!t.hidden))}get activeItem(){const t=a();return this.getItems.find((i=>i.getAttribute("tabindex")==="0"||i===t||i.classList.contains("has-focus")))}get selectedItem(){return this.getItems.find((t=>t.selected))}async setActiveFocusItem(t,i=true){const s=this.getItems;const e=!t||t.disabled?s.find((t=>t.selected))||s[0]:t;s.filter((t=>t.tagName.toLowerCase()==="nano-option")).map((t=>t.setAttribute("tabindex",t===e?"0":"-1")));if(!i)return;if(e){e.setFocus?e.setFocus():e.focus()}else this.menu.focus()}handleBlur(t){if(!this.hasFocus)return;const i=t;let s;if(i.key){if(i.key!=="Tab")return;s=a()&&a().closest(this.el.tagName.toLowerCase())===this.el}else s=!!t.composedPath().find((t=>t===this.el));if(!s){this.resetActiveItem();this._hasFocus=false;this.nanoBlur.emit()}}componentDidLoad(){{r(this.el,":not(nano-nav-item):not(nano-option):not([role])",true).forEach((t=>t.setAttribute("role","none")))}}render(){return e(n,{role:this.type==="menu"?"menu":"group"},e("div",{onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseOver:this.handleMouseOver,onFocus:this.handleFocus,"aria-label":this.label?this.label:undefined,ref:t=>this.menu=t,part:"base",class:{menu:true,["menu--"+this.type]:true,"menu--has-focus":this.hasFocus},tabIndex:-1,role:"group"},e("slot",null)))}get el(){return o(this)}};g.style=f;const m=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--bg:none;--bg-selected:var(--nano-select-opt-bg, #f2f7f9);--bg-focus:var(--nano-color-base, var(--nano-color-primary-tint, #2689a5));--bg-disabled:none;--color:var(--input-text-color, var(--nano-input-text-color, #4a4a4a));--color-selected:var(--nano-color-base, var(--nano-color-primary, #007495));--color-focus:var(--nano-color-contrast, var(--nano-color-primary-contrast, #fff));--color-disabled:#b5aea7;--opt-icon-size:1.6em;display:block;color:var(--color);overflow:hidden;font-size:14px;font-size:clamp(12px, .9em, 16px)}:host(:focus){outline:none}.option{position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;display:flex;align-items:stretch;width:100%;background:var(--bg);padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom)}:host(:focus) .option:not(.option--disabled),:host .option.option--selected{outline:none;background:var(--bg-selected);color:var(--color-selected)}:host(:focus) .option:not(.option--disabled){background:var(--bg-focus);color:var(--color-focus)}.option.option--disabled{outline:none;color:var(--color-disabled);cursor:not-allowed;background:var(--bg-disabled)}.option.option--novalue{font-style:italic;opacity:0.7}.option__label{flex:1 1 auto;display:flex;align-items:center}.option__start{flex:0 0 auto;display:flex;align-items:center}.option__start ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__start ::slotted(:last-child){-webkit-margin-end:0.5em;margin-inline-end:0.5em}.option__end{flex:0 0 auto;display:flex;align-items:center}.option__end ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__end ::slotted(:first-child){-webkit-margin-start:0.5em;margin-inline-start:0.5em}.option__check{visibility:hidden;display:flex;position:absolute;inset-inline-start:0.6em;inset-block-start:calc(50% - 0.6em);align-items:center;font-size:0.9em}.option--selected:not(.option--novalue) .option__check{visibility:visible}";let b=0;const v=class{constructor(s){t(this,s);this.nanoSelect=i(this,"nanoSelect",7);this.optId=`nano-option-${b++}`;this.hasFocus=false;this.value="";this.label="";this.selected=false;this.disabled=false;this.filterMeta="";this.handleClick=h(this.handleClick.bind(this),5)}valueChanged(){if(!this.value||!this.value.length)this.value=this.labelContent}labelChanged(){if(!this.label||!this.label.length)this.label=this.labelContent.length?this.labelContent:this.value}handleKeyDown(t){if(t.key!==" "&&t.key!=="Enter")return;t.preventDefault();this.nanoSelect.emit(this.host)}handleClick(){if(this.disabled)return;this.nanoSelect.emit(this.host)}get labelContent(){return r(this.host,"*:not([slot])",false).map((t=>t.textContent)).join(" ").trim()}componentWillLoad(){this.valueChanged();this.labelChanged()}render(){return e(n,{role:"option","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false"},e("div",{onMouseDown:this.handleClick,id:this.optId,class:{option:true,"option--selected":this.selected,"option--disabled":this.disabled,"option--novalue":!this.value}},e("div",{part:"check-icon",class:"option__check"},e("slot",{name:"check-icon"},e("nano-icon",{name:"light/check","aria-hidden":"true"}))),e("div",{part:"start",class:"option__start"},e("slot",{name:"start"})),e("div",{part:"label",class:"option__label"},e("slot",null,this.label||this.value)),e("div",{part:"end",class:"option__end"},e("slot",{name:"end"}))))}get host(){return o(this)}static get watchers(){return{value:["valueChanged"],label:["labelChanged"]}}};v.style=m;export{u as nano_datalist,g as nano_menu,v as nano_option};
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{r as t,c as i,w as s,h as e,a as n,g as o}from"./p-6ef53fa1.js";import{g as a}from"./p-74a7fc4f.js";import{d as h}from"./p-9746b0a5.js";import{g as r}from"./p-257432ff.js";import{g as l}from"./p-b933f3c8.js";const c=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding-top:var(--nano-spacing-small, 8px);--padding-bottom:var(--nano-spacing-small, 8px);--padding-start:var(--nano-spacing-xlarge, 24px);--padding-end:var(--nano-spacing-xlarge, 24px);--font-size:0.8em;--color:#b5aea7;color:var(--color)}.dlist--isfiltered ::slotted(*:not(nano-option):not([slot=no-result]):not([slot=list-top]):not([slot=list-bottom])){display:none !important}.dlist__dropdown{--min-width:100%;--overflow:auto}.dlist__status{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.dlist__menu{--padding-top:inherit;--padding-bottom:inherit;--padding-start:inherit;--padding-end:inherit;--font-size:inherit}";function d(t){let i;if(t.id){i=document.querySelector(`label[for='${t.id}']`)}if(!i){i=t.closest("label")}return i}let p=0;const u=class{get allOptEles(){return this._allOptEles}set allOptEles(t){var i;this._allOptEles=t;if((i=this.connectedInput)===null||i===void 0?void 0:i.value)return;t.forEach((t=>{if(t.selected&&!this.selected.includes(t.value)){this.changeInputValue(t)}}))}constructor(s){t(this,s);this.nanoSelect=i(this,"nanoSelect",7);this.nanoDeselect=i(this,"nanoDeselect",7);this.nanoOptionsUpdated=i(this,"nanoOptionsUpdated",7);this.isNanoInput=false;this.typeToSelect="";this.listId=`nano-datalist-${p++}`;this.isFiltered=false;this.shouldFocus=false;this._allOptEles=[];this._dropDownConfig={skidding:-1};this.optSelected=t=>{t.stopPropagation();this.changeInputValue(t.detail);requestAnimationFrame((()=>this.inputChange()));if(this.type!=="selctMulti")this.shouldOpen=false};this.handleShow=async()=>{if(this.shouldFocus){this.shouldFocus=false;this.listBox.setFocus()}else if(this.type==="select")this.listBox.showActiveElement()};this.handleHide=()=>{this.open=false;const t=a();if(t.closest(this.host.tagName.toLowerCase())){this.connectedInput.select()}};this.inputClick=()=>{this.shouldOpen=true;this.manageDropdownDisplay()};this.inputKeydown=t=>{const i=["Shift","ArrowRight","ArrowLeft","Escape","Enter","Tab"];if(i.includes(t.key)){if(t.key==="Tab")this.shouldOpen=false;return}if(this.type==="select"&&!["ArrowDown","ArrowUp"].includes(t.key)&&(t.key!==" "||this.typeToSelectTimeout)){if(t.key===" "||/^[a-z0-9]+$/i.test(t.key)){clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=window.setTimeout((()=>{this.typeToSelect="";this.typeToSelectTimeout=0}),750);this.typeToSelect+=t.key;this.setOptStartsWith()}return}this.shouldOpen=true;this.manageDropdownDisplay();if(["ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault();this.shouldFocus=true}};this.optionKeyDown=t=>{const i=["Shift","ArrowUp","ArrowDown","Escape","Enter","Tab","Space","PageUp","PageDown","Home","End"," "];if(i.includes(t.key)){if(t.key==="Escape")this.connectedInput.focus();return}const s=["Delete","Backspace"];if(this.type!=="select"&&(!this.exactMatch||s.includes(t.key))){this.connectedInput.focus()}};this.actvOptEles=[];this.connectedInput=undefined;this.inputLabel=undefined;this.hasNoResult=undefined;this.shouldOpen=undefined;this.canOpen=true;this.optionIds=[];this.selected=[];this.options=[];this.input=undefined;this.type="input";this.open=false;this.disableFilter=false;this.disabled=false;this.inputChange=h(this.inputChange.bind(this),50)}get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),t)}get activeOptions(){return this.allOptEles}openWatcher(){s((()=>{this.nanoDropdown.open=this.open;if(this.connectedInput)this.connectedInput.setAttribute("aria-expanded",this.open.toString())}))}async watchInputChange(){let t;if(t=this.host.closest("nano-input")){this.isNanoInput=true;this.connectedInput=await t.getInputElement()}else if(this.input&&typeof this.input==="string"&&(t=document.querySelector(this.input))){this.isNanoInput=false;this.connectedInput=t}else if(typeof this.input==="object"){this.connectedInput=this.input}}manageSlotChangeListener(){var t;if(!this.host)return;if((!this.options||!this.options.length)&&!this.mo){{const t=this.mo=new MutationObserver((()=>this.processSlottedContent()));t.observe(this.host,{childList:true,subtree:true})}this.processSlottedContent();return}if((t=this.options)===null||t===void 0?void 0:t.length){if(!!this.mo){this.mo.disconnect();this.mo=undefined}const t=this.host.querySelectorAll('[slot="internal-opts"]');s((()=>{var i;if(t===null||t===void 0?void 0:t.length)t.forEach((t=>t.remove()));this.allOptEles=this.options.flatMap(((t,i)=>{if(t.value||t.label){const s=Object.assign(document.createElement("nano-option"),{label:t.label,value:t.value,ariaPosinset:i,ariaSetsize:this.options.length,selected:t.selected,id:this.listId+"-option-"+i,textContent:t.label?t.label:t.value,slot:"internal-opts"});this.host.append(s);return s}}));if(((i=this.connectedInput)===null||i===void 0?void 0:i.value.length)&&this.type!=="select"){this.inputChange()}else{this.actvOptEles=[...this.allOptEles]}}))}}watchTypeChange(){if(!this.connectedInput)return;let t={closeOnSelect:false};let i="both";let s=false;switch(this.type){case"input":t={closeOnSelect:true};break;case"select":i="list";s=true;t={closeOnSelect:true,placement:"center"};break}if(!this.isNanoInput){t.tetherTo=this.connectedInput}this.dropDownConfig=Object.assign(Object.assign({},this.dropDownConfig),t);this.connectedInput.setAttribute("aria-autocomplete",i);this.connectedInput.readOnly=s}manageInputEvents(t,i){var e;if(!!i){const t=i.closest("nano-input");if(t){t.removeEventListener("nanoChange",this.inputChange)}i.removeEventListener("change",this.inputChange);i.removeEventListener("click",this.inputClick);i.removeEventListener("keydown",this.inputKeydown);i.removeEventListener("input",this.inputChange);this.inputLabel=null;s((()=>{i.removeAttribute("role");i.removeAttribute("aria-expanded");i.removeAttribute("aria-controls");i.removeAttribute("aria-owns");i.removeAttribute("aria-haspopup");i.removeAttribute("aria-autocomplete");i.removeAttribute("autocomplete")}))}if(!!t){const i=t.closest("nano-input");if(i){i.addEventListener("nanoChange",this.inputChange)}t.addEventListener("change",this.inputChange);t.addEventListener("click",this.inputClick);t.addEventListener("keydown",this.inputKeydown);t.addEventListener("input",this.inputChange);this.listId=this.host.id||this.listId;this.inputLabel=((e=t===null||t===void 0?void 0:t.labels)===null||e===void 0?void 0:e.item(0))||d(t);s((()=>{this.host.id=this.listId;t.setAttribute("role","combobox");t.setAttribute("aria-expanded","false");t.setAttribute("aria-controls",this.listId);t.setAttribute("aria-owns",this.listId);t.setAttribute("aria-haspopup","listbox");t.setAttribute("autocomplete","off")}))}}watchActvOptChange(){var t;let i=0;const e=((t=this.connectedInput)===null||t===void 0?void 0:t.value)||"";const n=[];s((()=>{this.allOptEles.forEach(((t,s)=>{if(this.actvOptEles.includes(t)){i++;t.setAttribute("aria-posinset",i+"");t.setAttribute("aria-setsize",this.actvOptEles.length+"");t.hidden=false;this.isSelected(t,e)}else{t.removeAttribute("aria-posinset");t.removeAttribute("aria-setsize");t.hidden=true;t.selected=false}t.id=this.listId+"-option-"+s;n.push(t.id)}));this.optionIds=n}))}manageCanOpen(){if(this.actvOptEles.length||this.hasNoResult)this.canOpen=true;else this.canOpen=false}manageDropdownDisplay(){if(this.shouldOpen&&this.canOpen&&!this.disabled)this.open=true;if(!this.shouldOpen||!this.canOpen)this.open=false;this.openWatcher()}fireActiveOptsEvent(){this.nanoOptionsUpdated.emit(this.actvOptEles)}isSelected(t,i){if(i===t.value||this.selected.includes(t.value)){t.selected=true}else t.selected=false}get dropwdownOpen(){if(!this.nanoDropdown||!this.open)return false;return true}get exactMatch(){return this.allOptEles.find((t=>this.connectedInput.value===t.value))}changeInputValue(t){var i;let s;if(this.selected.includes(t.value)){this.selected=this.selected.filter((i=>i!==t.value));s=this.nanoDeselect.emit(t)}else{this.selected=[...this.selected];s=this.nanoSelect.emit(t)}if(!s.defaultPrevented){if(this.connectedInput)this.connectedInput.value=t.value;const s=new window.Event("change");(i=this.connectedInput)===null||i===void 0?void 0:i.dispatchEvent(s)}}setOptStartsWith(){const t=t=>t.toLowerCase().substring(0,this.typeToSelect.length)===this.typeToSelect;const i=this.allOptEles.find((i=>i.value.trim().length>0&&!i.disabled&&(t(i.textContent)||t(i.value)||t(i.label)||t(i.filterMeta))));if(i)this.changeInputValue(i)}processSlottedContent(){requestAnimationFrame((()=>{var t;this.allOptEles=Array.from(this.host.querySelectorAll("nano-option"));this.hasNoResult=!!this.host.querySelector('[slot="no-result"]');if(((t=this.connectedInput)===null||t===void 0?void 0:t.value.length)&&this.type!=="select"){this.inputChange()}else this.actvOptEles=this.allOptEles}))}inputChange(){if(this.disableFilter){this.actvOptEles=this.allOptEles;return}const t=this.connectedInput.value;const i=t.trim().toLowerCase();let s=false;const e=[];const n=t=>t.toLowerCase().indexOf(i)>-1;this.allOptEles.forEach((i=>{if((t===i.value||t===i.label)&&this.type!=="selctMulti"){i.selected=true;s=true}else this.isSelected(i,t)}));this.allOptEles.forEach((t=>{if(!i.length||s){e.push(t)}else if(t.value.trim().length>0&&!t.disabled&&(n(t.textContent)||n(t.value)||n(t.label)||n(t.filterMeta))){e.push(t)}}));this.isFiltered=i.length&&!s;this.actvOptEles=e}connectedCallback(){this.watchInputChange()}componentDidLoad(){this.manageSlotChangeListener();this.openWatcher()}componentDidRender(){setTimeout((()=>{if(!this.connectedInput)console.warn("no `nano-input` found. `nano-datalist` should be nested within an `nano-input` or linked via `input` prop",this.host)}),500)}render(){return e(n,{role:this.actvOptEles.length?"listbox":undefined,"aria-owns":this.optionIds.length?this.optionIds.join(" "):undefined,"aria-label":this.optionIds.length?"Select options from the list below":undefined},e("nano-dropdown",Object.assign({},this.dropDownConfig,{ref:t=>this.nanoDropdown=t,dialogTitle:"Select options from the list below",class:{dlist__dropdown:true,"dlist--isfiltered":this.isFiltered},onNanoAfterShow:this.handleShow,onNanoAfterHide:this.handleHide,role:"group"}),e("nano-menu",{hidden:!this.actvOptEles.length,type:"listbox",label:this.inputLabel?this.inputLabel.textContent:undefined,class:{dlist__menu:true,"dlist__menu--open":this.dropwdownOpen},tabIndex:-1,onNanoSelect:this.optSelected,onKeyDown:this.optionKeyDown,ref:t=>this.listBox=t,role:"list"},e("slot",{name:"list-top"}),!this.options.length&&e("slot",null),!!this.options.length&&e("slot",{name:"internal-opts"}),e("slot",{name:"list-bottom"})),e("nano-menu",{type:"listbox",label:"No results found",hidden:!!this.actvOptEles.length,class:{dlist__menu:true,"dlist__menu--open":this.dropwdownOpen}},e("slot",{name:"no-result"})),!!this.actvOptEles&&e("div",{class:"dlist__status"},this.actvOptEles.length," result",this.actvOptEles.length>1?"s":""," available.")))}get host(){return o(this)}static get watchers(){return{open:["openWatcher"],input:["watchInputChange"],options:["manageSlotChangeListener"],type:["watchTypeChange"],connectedInput:["watchTypeChange","manageInputEvents"],selected:["watchActvOptChange"],actvOptEles:["watchActvOptChange","manageCanOpen","fireActiveOptsEvent"],hasNoResult:["manageCanOpen"],shouldOpen:["manageDropdownDisplay"],canOpen:["manageDropdownDisplay"]}}};u.style=c;const f=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--padding-start:var(--nano-spacing-medium, 16px);--padding-end:var(--nano-spacing-medium, 16px);--padding-top:var(--nano-spacing-small, 8px);--padding-bottom:var(--nano-spacing-small, 8px);--secondary-padding-top:0;--secondary-padding-bottom:0;--bg-color-hover:#f2f7f9;--bg-color-focus:#f2f7f9;--bg-color-selected:#f2f7f9;--color-hover:#007495;--color-selected:#007495;--color-focus:#007495;--focus-outline:none;--font-size:0.9em;display:block}.menu{font-size:var(--font-size, 0.9em);overscroll-behavior:none;min-width:var(--width);position:relative}.menu:focus{outline:none}::slotted(*:not(nano-nav-item):not(nano-option):not(hr):not(slot)){padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom);display:block}";const g=class{constructor(s){t(this,s);this.nanoFocus=i(this,"nanoFocus",7);this.nanoBlur=i(this,"nanoBlur",7);this.nanoSelect=i(this,"nanoSelect",7);this.ignoreMouseEvents=false;this.typeToSelect="";this._hasFocus=false;this.handleFocus=()=>{this.setActiveFocusItem(this.selectedItem||this.getItems[0]);this._hasFocus=true;this.nanoFocus.emit()};this.handleClick=t=>{const i=t.target;const s=i.closest("nano-nav-item");if(s&&!s.disabled){this.nanoSelect.emit(s)}};this.handleKeyDown=t=>{clearTimeout(this.ignoreMouseTimeout);this.ignoreMouseTimeout=setTimeout((()=>this.ignoreMouseEvents=false),500);this.ignoreMouseEvents=true;switch(t.key){case" ":if(this.activeItem)this.activeItem.click();break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":case"Home":case"End":const i=this.getItems;const s=this.activeItem;let e=i.indexOf(s);if(i.length){t.preventDefault();if(t.key==="ArrowDown"){e++}else if(t.key==="ArrowUp"){e--}else if(t.key==="Home"||t.key==="PageUp"){e=0}else if(t.key==="End"||t.key==="PageDown"){e=i.length-1}if(e<0)e=i.length-1;if(e>i.length-1)e=0;this.setActiveFocusItem(i[e]);if(i[e])i[e].scrollIntoView({block:"nearest"});return}break}if(t.key===" "||/^[a-z0-9]+$/i.test(t.key)){clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelect=""),750);this.typeToSelect+=t.key;const i=this.getItems;for(const t of i){const i=t.shadowRoot.querySelector("slot:not([name])");const s=l(i).toLowerCase().trim();if(s.substring(0,this.typeToSelect.length)===this.typeToSelect){this.setActiveFocusItem(t);break}}}};this.handleMouseOver=t=>{const i=t.target;const s=i.closest("nano-nav-item")||i.closest("nano-option");if(s&&!this.ignoreMouseEvents){this.setActiveFocusItem(s)}};this.type="menu";this.label=undefined}get hasFocus(){return this._hasFocus}async setFocus(){var t;if((t=this.menu)===null||t===void 0?void 0:t.focus)this.menu.focus({preventScroll:true})}async removeFocus(){var t;if((t=this.menu)===null||t===void 0?void 0:t.blur)this.menu.blur()}async showActiveElement(){if(this.selectedItem)this.selectedItem.scrollIntoView({block:"nearest"})}async resetActiveItem(){this.getItems.filter((t=>t.tagName.toLowerCase()==="nano-option")).map((t=>t.setAttribute("tabindex","-1")))}get getItems(){let t;const i=this.el.querySelectorAll("nano-nav-item.secondary-open");if(i.length){const s=i[i.length-1];t=Array.from(s.querySelectorAll("nano-nav-item, nano-option"))}else{t=r(this.el,"nano-nav-item, nano-option","slot")}return t.filter((t=>!t.disabled&&!t.hidden))}get activeItem(){const t=a();return this.getItems.find((i=>i.getAttribute("tabindex")==="0"||i===t||i.classList.contains("has-focus")))}get selectedItem(){return this.getItems.find((t=>t.selected))}async setActiveFocusItem(t,i=true){const s=this.getItems;const e=!t||t.disabled?s.find((t=>t.selected))||s[0]:t;s.filter((t=>t.tagName.toLowerCase()==="nano-option")).map((t=>t.setAttribute("tabindex",t===e?"0":"-1")));if(!i)return;if(e){e.setFocus?e.setFocus():e.focus()}else this.menu.focus()}handleBlur(t){if(!this.hasFocus)return;const i=t;let s;if(i.key){if(i.key!=="Tab")return;s=a()&&a().closest(this.el.tagName.toLowerCase())===this.el}else s=!!t.composedPath().find((t=>t===this.el));if(!s){this.resetActiveItem();this._hasFocus=false;this.nanoBlur.emit()}}componentDidLoad(){{r(this.el,":not(nano-nav-item):not(nano-option):not([role])",true).forEach((t=>t.setAttribute("role","none")))}}render(){return e(n,{role:this.type==="menu"?"menu":"group"},e("div",{onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseOver:this.handleMouseOver,onFocus:this.handleFocus,"aria-label":this.label?this.label:undefined,ref:t=>this.menu=t,part:"base",class:{menu:true,["menu--"+this.type]:true,"menu--has-focus":this.hasFocus},tabIndex:-1,role:"group"},e("slot",null)))}get el(){return o(this)}};g.style=f;const m=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--bg:none;--bg-selected:var(--nano-select-opt-bg, #f2f7f9);--bg-focus:var(--nano-color-base, var(--nano-color-primary-tint, #2689a5));--bg-disabled:none;--color:var(--input-text-color, var(--nano-input-text-color, #4a4a4a));--color-selected:var(--nano-color-base, var(--nano-color-primary, #007495));--color-focus:var(--nano-color-contrast, var(--nano-color-primary-contrast, #fff));--color-disabled:#b5aea7;--opt-icon-size:1.6em;display:block;color:var(--color);overflow:hidden;font-size:14px;font-size:clamp(12px, .9em, 16px)}:host(:focus){outline:none}.option{position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;display:flex;align-items:stretch;width:100%;background:var(--bg);padding-inline:var(--padding-start) var(--padding-end);padding-block:var(--padding-top) var(--padding-bottom)}:host(:focus) .option:not(.option--disabled),:host .option.option--selected{outline:none;background:var(--bg-selected);color:var(--color-selected)}:host(:focus) .option:not(.option--disabled){background:var(--bg-focus);color:var(--color-focus)}.option.option--disabled{outline:none;color:var(--color-disabled);cursor:not-allowed;background:var(--bg-disabled)}.option.option--novalue{font-style:italic;opacity:0.7}.option__label{flex:1 1 auto;display:flex;align-items:center}.option__start{flex:0 0 auto;display:flex;align-items:center}.option__start ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__start ::slotted(:last-child){-webkit-margin-end:0.5em;margin-inline-end:0.5em}.option__end{flex:0 0 auto;display:flex;align-items:center}.option__end ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__end ::slotted(:first-child){-webkit-margin-start:0.5em;margin-inline-start:0.5em}.option__check{visibility:hidden;display:flex;position:absolute;inset-inline-start:0.6em;inset-block-start:calc(50% - 0.6em);align-items:center;font-size:0.9em}.option--selected:not(.option--novalue) .option__check{visibility:visible}";let b=0;const v=class{constructor(s){t(this,s);this.nanoSelect=i(this,"nanoSelect",7);this.optId=`nano-option-${b++}`;this.hasFocus=false;this.value="";this.label="";this.selected=false;this.disabled=false;this.filterMeta="";this.handleClick=h(this.handleClick.bind(this),5)}valueChanged(){if(!this.value||!this.value.length)this.value=this.labelContent}labelChanged(){if(!this.label||!this.label.length)this.label=this.labelContent.length?this.labelContent:this.value}handleKeyDown(t){if(t.key!==" "&&t.key!=="Enter")return;t.preventDefault();this.nanoSelect.emit(this.host)}handleClick(){if(this.disabled)return;this.nanoSelect.emit(this.host)}get labelContent(){return r(this.host,"*:not([slot])",false).map((t=>t.textContent)).join(" ").trim()}componentWillLoad(){this.valueChanged();this.labelChanged()}render(){return e(n,{role:"option","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false"},e("div",{onMouseDown:this.handleClick,id:this.optId,class:{option:true,"option--selected":this.selected,"option--disabled":this.disabled,"option--novalue":!this.value}},e("div",{part:"check-icon",class:"option__check"},e("slot",{name:"check-icon"},e("nano-icon",{name:"light/check","aria-hidden":"true"}))),e("div",{part:"start",class:"option__start"},e("slot",{name:"start"})),e("div",{part:"label",class:"option__label"},e("slot",null,this.label||this.value)),e("div",{part:"end",class:"option__end"},e("slot",{name:"end"}))))}get host(){return o(this)}static get watchers(){return{value:["valueChanged"],label:["labelChanged"]}}};v.style=m;export{u as nano_datalist,g as nano_menu,v as nano_option};
|
5
|
+
//# sourceMappingURL=p-62e3646b.entry.js.map
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as e,h as i,a as r,g as s}from"./p-
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{r as t,c as e,h as i,a as r,g as s}from"./p-6ef53fa1.js";import{M as a}from"./p-e04f2333.js";import{u as n,l as o}from"./p-45b7682a.js";import"./p-45abbbdd.js";import"./p-257432ff.js";const l=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{position:relative;display:block;--size:25rem;--panel-background-color:white;--panel-shadow:0 4px 16px rgb(0 0 0 / 10%);--overlay-color:hsl(203deg 10% 20% / 50%)}.drawer{inset-block-start:0;inset-inline-start:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.drawer:not(.drawer--visible){position:absolute;inline-size:1px;block-size:1px;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.drawer--contained{position:absolute;z-index:initial}.drawer--fixed{position:fixed;z-index:2000}.drawer__panel{position:absolute;display:flex;flex-direction:column;z-index:2;max-width:100%;max-height:100%;background-color:var(--panel-background-color);box-shadow:var(--panel-shadow);transition:250ms transform;overflow:auto;pointer-events:all}.drawer__panel:focus{outline:none}.drawer--start .drawer__panel{transform:translate3d(-100%, 0, 0);inset-block:0 auto;width:var(--size);height:100%}.drawer--start .drawer__panel[dir=rtl]{transform:translate3d(calc(-1 * -100%), 0, 0)}.drawer--end .drawer__panel{transform:translate3d(100%, 0, 0);inset-block:0 auto;width:var(--size);height:100%}.drawer--end .drawer__panel[dir=rtl]{transform:translate3d(calc(-1 * 100%), 0, 0)}.drawer--top .drawer__panel{inset-inline:auto 0;inset-block:0 auto;width:100%;height:var(--size);transform:translate(0, -100%)}.drawer--bottom .drawer__panel{inset-inline:auto 0;inset-block:auto 0;width:100%;height:var(--size);transform:translate(0, 100%)}.drawer--open .drawer__panel{transform:translate(0, 0)}.drawer__header{display:flex}.drawer__title{flex:1 1 auto;padding:20px}.drawer__close{flex:0 0 auto;display:flex;align-items:center}.drawer__body{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch}.drawer__footer{text-align:end}.drawer:not(.drawer--has-footer) .drawer__footer{display:none}.drawer__overlay{display:block;position:fixed;inset:0;background-color:var(--overlay-color);opacity:0;transition:250ms opacity;pointer-events:all}.drawer--contained .drawer__overlay{position:absolute}.drawer--open .drawer__overlay{opacity:1}";let h=0;const d=class{constructor(i){t(this,i);this.nanoShow=e(this,"nanoShow",7);this.nanoAfterShow=e(this,"nanoAfterShow",7);this.nanoHide=e(this,"nanoHide",7);this.nanoAfterHide=e(this,"nanoAfterHide",7);this.nanoOverlayDismiss=e(this,"nanoOverlayDismiss",7);this.componentId=`drawer-${++h}`;this.hasFooter=false;this.isVisible=false;this.open=false;this.label="";this.placement="end";this.contained=false;this.noHeader=false;this.type="overlay";this.contentSelector=undefined}handleOpenChange(){this.open?this.show():this.hide()}handleTypeChange(){if(this.type!=="push"&&this.type!=="reveal")return;if(!this.contentEle){this.type="overlay";console.warn("a valid contentSelector must be set");return}}handleContentSelector(){if(!this.contentSelector)this.contentEle=null;else this.contentEle=this.host.ownerDocument.querySelector(this.contentSelector)}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this);this.handleTransitionEnd=this.handleTransitionEnd.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleOverlayClick=this.handleOverlayClick.bind(this);this.handleSlotChange=this.handleSlotChange.bind(this);this.modal=new a(this.host)}componentWillLoad(){if(this.open){this.show()}this.handleContentSelector()}disconnectedCallback(){n(this.host)}async show(){if(this.isVisible){return}const t=this.nanoShow.emit();if(t.defaultPrevented){this.open=false;return}this.isVisible=true;this.open=true;if(!this.contained){this.modal.activate();o(this.host)}if(!this.contentEle||this.type!=="push"&&this.type!=="reveal")return;this.contentEle.style.right="0";this.contentEle.style.transition="all ease 250ms";this.contentEle.style.position="relative";this.contentEle.style.overflow="hidden";setTimeout((t=>this.contentEle.style.right="25rem"),0)}async hide(){if(!this.isVisible){return}const t=this.nanoHide.emit();if(t.defaultPrevented){this.open=true;return}this.open=false;this.modal.deactivate();n(this.host);if(!this.contentEle)return;this.contentEle.style.transition="";this.contentEle.style.position="";this.contentEle.style.overflow="";this.contentEle.style.right=""}handleCloseClick(){this.hide()}handleKeyDown(t){if(t.key==="Escape"){this.hide()}}handleOverlayClick(){const t=this.nanoOverlayDismiss.emit();if(!t.defaultPrevented){this.hide()}}handleSlotChange(){this.hasFooter=!!this.host.querySelector('[slot="footer"]')}handleTransitionEnd(t){const e=t.target;if(t.propertyName==="transform"&&e.classList.contains("drawer__panel")){this.isVisible=this.open;this.open?this.nanoAfterShow.emit():this.nanoAfterHide.emit();if(this.open){this.panel.focus()}}}render(){const t="drawer--"+this.placement;const e="drawer--"+this.type;return i(r,null,i("div",{part:"base",class:{drawer:true,"drawer--open":this.open,"drawer--visible":this.isVisible,[e]:true,[t]:true,"drawer--contained":this.contained,"drawer--fixed":!this.contained,"drawer--has-footer":this.hasFooter},onKeyDown:this.handleKeyDown,onTransitionEnd:this.handleTransitionEnd},i("div",{part:"overlay",class:"drawer__overlay",onClick:this.handleOverlayClick}),i("div",{ref:t=>this.panel=t,part:"panel",class:"drawer__panel",role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-label":this.noHeader?this.label:null,"aria-labelledby":!this.noHeader?`${this.componentId}-title`:null,tabIndex:0},!this.noHeader&&i("header",{part:"header",class:"drawer__header"},i("span",{part:"title",class:"drawer__title",id:`${this.componentId}-title`},i("slot",{name:"label"},this.label||String.fromCharCode(65279)))),i("div",{part:"body",class:"drawer__body"},i("slot",null)),i("footer",{part:"footer",class:"drawer__footer"},i("slot",{name:"footer",onSlotchange:this.handleSlotChange})))))}get host(){return s(this)}static get watchers(){return{open:["handleOpenChange"],type:["handleTypeChange"],contentSelector:["handleContentSelector"]}}};d.style=l;export{d as nano_drawer};
|
5
|
+
//# sourceMappingURL=p-63f1e229.entry.js.map
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,h as e,a as s,g as n}from"./p-bf91c50e.js";import{p as a,a as o,c as h}from"./p-cecb9af1.js";import{c as d}from"./p-411bb8f1.js";const r=".sc-nano-date-input-h{box-sizing:border-box}*.sc-nano-date-input,*.sc-nano-date-input::before,*.sc-nano-date-input::after{box-sizing:border-box}[hidden].sc-nano-date-input{display:none !important}.sc-nano-date-input-h{display:inline-block;inline-size: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 rgb(var(--nano-color-tint-rgb)/0.56)}nano-icon.sc-nano-date-input{pointer-events:none}.date-field.sc-nano-date-input{display:flex;flex-direction:column;position:relative}.date-field__dropdown.sc-nano-date-input{--padding:0;--overflow:visible;padding:0 !important;inline-size:0 !important;inline-size:100%;z-index:var(--nano-layer-index-dropdown, 300) !important}.date-field__close-bar.sc-nano-date-input{align-items:center;display:flex;justify-content:space-between;text-overflow:ellipsis;white-space:nowrap;border:0;margin:0;overflow:visible;padding:0;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;inline-size: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;appearance:none}.date-field__open.sc-nano-date-input:focus{box-shadow:var(--focus-shadow);outline:none}.date-field__close.sc-nano-date-input{align-items:center;-webkit-appearance:none;appearance:none;background:var(--close-btn-color);border:0;border-radius:50%;cursor:pointer;display:flex;block-size:24px;justify-content:center;padding:0;inline-size:24px}@media (min-width: 36em){.date-field__close.sc-nano-date-input{opacity:0}}.date-field__close.sc-nano-date-input:focus{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-block:0;margin-inline: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%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}";const l={d:"(\\d{1,2})",m:"(\\d{1,2})",y:"(\\d{4})"};let c=0;const u=class{constructor(e){t(this,e);this.nanoChange=i(this,"nanoChange",7);this.nanoValidate=i(this,"nanoValidate",7);this.directInput=false;this.dateOrderIndeces={d:0,m:1,y:3};this.inputId=`nano-input-${c++}`;this.locale=window.navigator.languages||window.navigator.language||undefined;this._dropDownConfig={};this.onInputChange=t=>{t.stopPropagation();this.setValue(t.target.value)};this.onInputValidate=t=>{t.stopPropagation();this._invalid=!t.detail.isValid;this.nanoValidate.emit({isValid:t.detail.isValid,errorMessage:t.detail.errorMessage,originalEvent:t.detail.originalEvent})};this.onInputKey=()=>{this.directInput=true};this.onDatePicked=t=>{this.directInput=false;this.value=t.detail.value;if(this.closeAfterPicked)this.pickerOpen=false};this.onDropdownHide=()=>{setTimeout((t=>this.pickerOpen=false),200);setTimeout((t=>this.trigger.focus()),50)};this.onDropdownShow=()=>{setTimeout((t=>{this.pickerEle.setFocus(false,this.pickerOpenSource==="key");this.pickerOpenSource=null}),200)};this.onTriggerClick=()=>{if(!this.pickerOpen){this.pickerOpen=true;this.pickerOpenSource="mouse"}};this.onTriggerKey=t=>{if([" ","Enter"].includes(t.key)){if(!this.pickerOpen){this.pickerOpen=true;this.pickerOpenSource="key"}}};this.onCloseClick=()=>{if(this.pickerOpen)this.pickerOpen=false};this.onCloseKeyDown=t=>{if(t.key==="Tab"&&t.shiftKey){this.pickerEle.setFocus(true);t.preventDefault()}if(t.key===" "||t.key==="Enter"){if(this.pickerOpen)this.pickerOpen=false}};this.pattern=undefined;this.inputValue=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.size=undefined;this.form=undefined;this.firstDayOfWeek=undefined;this.localization=undefined;this.disabled=false;this.color=undefined;this.autofocus=false;this.clearInput=false;this.label=undefined;this.placeholder=undefined;this.value="";this.validateOn="submitThenDirty";this.showInlineError=true;this.dateOrder="dmy";this.required=false;this.min=undefined;this.max=undefined;this.hideLabel=false;this.picker=true;this.initialPickerDate=undefined;this.pickerOpen=false;this.closeAfterPicked=true;this.isDateDisabled=()=>false}get invalid(){return this._invalid}get validityMessage(){if(!this.input)return"";return this.input.validityMessage}handleValueChange(){if(!this.directInput)this.inputValue=this.formatIsoDate(this.value);setTimeout((()=>{this.nanoChange.emit({value:this.value,date:a(this.value)})}),20);this.directInput=false}handleDateOrderChange(){this.setDatePattern()}testDateValidity(){const t=a(this.value);let i,e,s="";if(this.value&&t){if(this.min&&(i=a(this.min))&&t<i){s="Date below the minimum: "+i.toLocaleDateString(this.locale,this.helperTextFormat)}if(this.max&&(e=a(this.max))&&t>e){s="Date above the maximum: "+e.toLocaleDateString(this.locale,this.helperTextFormat)}if(this.isDateDisabled(t)){s="Date selected is disabled."}}requestAnimationFrame((async i=>{if(!this.input)return;const e=await this.input.getInputElement();if(this.value.length&&!t)s="Please enter a valid date";e.setCustomValidity(s);if(this.input.validateOn==="dirty"){this.input.showError(s)}}))}handlePickerOpenChange(){this.dropdown.open=this.pickerOpen}get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),t)}get dateValue(){return a(this.value)}async reportValidity(t){const i=await this.input.reportValidity(t);if(i.isValid&&t)this.testDateValidity();return await this.input.reportValidity(t)}async setFocus(){if(this.input)this.input.setFocus()}async getInputElement(){return await this.input.getInputElement()}async showError(t){if(!this.input)return;this.input.showError(t)}setDatePattern(){const t=[];const i=[];Array.from(this.dateOrder).map(((e,s)=>{t.push(l[e]);this.dateOrderIndeces[e]=s;i.push(e==="y"?"yyyy":e+e)}));this.pattern=t.join("\\W+");if(!this.placeholder&&this.placeholder!=="false")this.placeholder=i.join(" ")}formatIsoDate(t){const i=[];Array.from("ymd").map((t=>i.push(l[t])));const e=t.match(new RegExp(i.join("\\W+")));if(!e)return"";const s=[];s[this.dateOrderIndeces.d]=e[3];s[this.dateOrderIndeces.m]=e[2];s[this.dateOrderIndeces.y]=e[1];return s.join(" ")}setValue(t){const i=t.match(new RegExp(this.pattern));if(!i){this.value=t;return}let e=h(i[this.dateOrderIndeces.y+1],i[this.dateOrderIndeces.m+1],i[this.dateOrderIndeces.d+1]);if(!e){e=new Date(t);if(!e){this.value=t;return}}const s=o(e);this.value=s;return s}connectedCallback(){this.setDatePattern();this.handleValueChange()}componentDidLoad(){if(!this.pickerCloseBtn||!this.picker)return;this.pickerEle.firstFocusEle=this.pickerCloseBtn;this.dropdown.tetherTo=this.trigger;setTimeout((t=>this.handlePickerOpenChange()),300)}render(){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;const t=a(this.value);const i=!!this.host.querySelector('[slot="helper"]');return e(s,{class:Object.assign({},d(this.color))},e("div",{class:"date-field"},e("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:t=>this.input=t,floatLabel:this.floatLabel,hideLabel:this.hideLabel,inputmode:"numeric",part:"input"},e("slot",{name:"start",slot:"start"}),e("slot",{name:"label"}),e("slot",{name:"end",slot:"end"}),this.picker&&[e("button",{slot:"end",class:"date-field__open",type:"button",onKeyDown:this.onTriggerKey,onClick:this.onTriggerClick,ref:t=>this.trigger=t,disabled:this.disabled||this.readonly},e("nano-icon",{name:"light/calendar-alt"})),e("nano-dropdown",Object.assign({slot:"end",onNanoHide:this.onDropdownHide,onNanoShow:this.onDropdownShow,dialogTitle:"Choose a date",class:"date-field__dropdown",ref:t=>this.dropdown=t},this.dropDownConfig,{part:"dropdown"}),e("div",null,e("div",{class:"date-field__close-bar"},e("button",{class:"date-field__close",type:"button",onMouseDown:this.onCloseClick,onKeyDown:this.onCloseKeyDown,ref:t=>this.pickerCloseBtn=t},e("nano-icon",{name:"light/times"}),e("span",{class:"vhidden"},"Close window"))),e("nano-date-picker",{isDateDisabled:this.isDateDisabled,onNanoDatePicked:this.onDatePicked,min:this.min||undefined,max:this.max||undefined,"is-modal":true,ref:t=>this.pickerEle=t,localization:this.localization,selectedDate:this.value||this.initialPickerDate,firstDayOfWeek:this.firstDayOfWeek,color:this.color||undefined,part:"date-picker"})))],(i||this.helperText||this.showInlineError)&&e("span",{slot:"helper"},e("span",{class:{vhidden:!!this.value.length}},e("slot",{name:"helper"})),this.helperText&&!!t&&e("span",null,t.toLocaleDateString(this.locale,this.helperTextFormat)))),e("input",{type:"hidden",value:this.value,name:this.name})))}get host(){return n(this)}static get watchers(){return{value:["handleValueChange","testDateValidity"],dateOrder:["handleDateOrderChange"],min:["testDateValidity"],max:["testDateValidity"],pickerOpen:["handlePickerOpenChange"]}}};u.style=r;export{u as nano_date_input};
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{r as t,c as i,h as e,a as s,g as n}from"./p-6ef53fa1.js";import{p as a,a as o,c as h}from"./p-cecb9af1.js";import{c as d}from"./p-411bb8f1.js";const r=".sc-nano-date-input-h{box-sizing:border-box}*.sc-nano-date-input,*.sc-nano-date-input::before,*.sc-nano-date-input::after{box-sizing:border-box}[hidden].sc-nano-date-input{display:none !important}.sc-nano-date-input-h{display:inline-block;inline-size: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 rgb(var(--nano-color-tint-rgb)/0.56)}nano-icon.sc-nano-date-input{pointer-events:none}.date-field.sc-nano-date-input{display:flex;flex-direction:column;position:relative}.date-field__dropdown.sc-nano-date-input{--padding:0;--overflow:visible;padding:0 !important;inline-size:0 !important;inline-size:100%;z-index:var(--nano-layer-index-dropdown, 300) !important}.date-field__close-bar.sc-nano-date-input{align-items:center;display:flex;justify-content:space-between;text-overflow:ellipsis;white-space:nowrap;border:0;margin:0;overflow:visible;padding:0;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;inline-size: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;appearance:none}.date-field__open.sc-nano-date-input:focus{box-shadow:var(--focus-shadow);outline:none}.date-field__close.sc-nano-date-input{align-items:center;-webkit-appearance:none;appearance:none;background:var(--close-btn-color);border:0;border-radius:50%;cursor:pointer;display:flex;block-size:24px;justify-content:center;padding:0;inline-size:24px}@media (min-width: 36em){.date-field__close.sc-nano-date-input{opacity:0}}.date-field__close.sc-nano-date-input:focus{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-block:0;margin-inline: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%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}";const l={d:"(\\d{1,2})",m:"(\\d{1,2})",y:"(\\d{4})"};let c=0;const u=class{constructor(e){t(this,e);this.nanoChange=i(this,"nanoChange",7);this.nanoValidate=i(this,"nanoValidate",7);this.directInput=false;this.dateOrderIndeces={d:0,m:1,y:3};this.inputId=`nano-input-${c++}`;this.locale=window.navigator.languages||window.navigator.language||undefined;this._dropDownConfig={};this.onInputChange=t=>{t.stopPropagation();this.setValue(t.target.value)};this.onInputValidate=t=>{t.stopPropagation();this._invalid=!t.detail.isValid;this.nanoValidate.emit({isValid:t.detail.isValid,errorMessage:t.detail.errorMessage,originalEvent:t.detail.originalEvent})};this.onInputKey=()=>{this.directInput=true};this.onDatePicked=t=>{this.directInput=false;this.value=t.detail.value;if(this.closeAfterPicked)this.pickerOpen=false};this.onDropdownHide=()=>{setTimeout((t=>this.pickerOpen=false),200);setTimeout((t=>this.trigger.focus()),50)};this.onDropdownShow=()=>{setTimeout((t=>{this.pickerEle.setFocus(false,this.pickerOpenSource==="key");this.pickerOpenSource=null}),200)};this.onTriggerClick=()=>{if(!this.pickerOpen){this.pickerOpen=true;this.pickerOpenSource="mouse"}};this.onTriggerKey=t=>{if([" ","Enter"].includes(t.key)){if(!this.pickerOpen){this.pickerOpen=true;this.pickerOpenSource="key"}}};this.onCloseClick=()=>{if(this.pickerOpen)this.pickerOpen=false};this.onCloseKeyDown=t=>{if(t.key==="Tab"&&t.shiftKey){this.pickerEle.setFocus(true);t.preventDefault()}if(t.key===" "||t.key==="Enter"){if(this.pickerOpen)this.pickerOpen=false}};this.pattern=undefined;this.inputValue=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.size=undefined;this.form=undefined;this.firstDayOfWeek=undefined;this.localization=undefined;this.disabled=false;this.color=undefined;this.autofocus=false;this.clearInput=false;this.label=undefined;this.placeholder=undefined;this.value="";this.validateOn="submitThenDirty";this.showInlineError=true;this.dateOrder="dmy";this.required=false;this.min=undefined;this.max=undefined;this.hideLabel=false;this.picker=true;this.initialPickerDate=undefined;this.pickerOpen=false;this.closeAfterPicked=true;this.isDateDisabled=()=>false}get invalid(){return this._invalid}get validityMessage(){if(!this.input)return"";return this.input.validityMessage}handleValueChange(){if(!this.directInput)this.inputValue=this.formatIsoDate(this.value);setTimeout((()=>{this.nanoChange.emit({value:this.value,date:a(this.value)})}),20);this.directInput=false}handleDateOrderChange(){this.setDatePattern()}testDateValidity(){const t=a(this.value);let i,e,s="";if(this.value&&t){if(this.min&&(i=a(this.min))&&t<i){s="Date below the minimum: "+i.toLocaleDateString(this.locale,this.helperTextFormat)}if(this.max&&(e=a(this.max))&&t>e){s="Date above the maximum: "+e.toLocaleDateString(this.locale,this.helperTextFormat)}if(this.isDateDisabled(t)){s="Date selected is disabled."}}requestAnimationFrame((async i=>{if(!this.input)return;const e=await this.input.getInputElement();if(this.value.length&&!t)s="Please enter a valid date";e.setCustomValidity(s);if(this.input.validateOn==="dirty"){this.input.showError(s)}}))}handlePickerOpenChange(){this.dropdown.open=this.pickerOpen}get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),t)}get dateValue(){return a(this.value)}async reportValidity(t){const i=await this.input.reportValidity(t);if(i.isValid&&t)this.testDateValidity();return await this.input.reportValidity(t)}async setFocus(){if(this.input)this.input.setFocus()}async getInputElement(){return await this.input.getInputElement()}async showError(t){if(!this.input)return;this.input.showError(t)}setDatePattern(){const t=[];const i=[];Array.from(this.dateOrder).map(((e,s)=>{t.push(l[e]);this.dateOrderIndeces[e]=s;i.push(e==="y"?"yyyy":e+e)}));this.pattern=t.join("\\W+");if(!this.placeholder&&this.placeholder!=="false")this.placeholder=i.join(" ")}formatIsoDate(t){const i=[];Array.from("ymd").map((t=>i.push(l[t])));const e=t.match(new RegExp(i.join("\\W+")));if(!e)return"";const s=[];s[this.dateOrderIndeces.d]=e[3];s[this.dateOrderIndeces.m]=e[2];s[this.dateOrderIndeces.y]=e[1];return s.join(" ")}setValue(t){const i=t.match(new RegExp(this.pattern));if(!i){this.value=t;return}let e=h(i[this.dateOrderIndeces.y+1],i[this.dateOrderIndeces.m+1],i[this.dateOrderIndeces.d+1]);if(!e){e=new Date(t);if(!e){this.value=t;return}}const s=o(e);this.value=s;return s}connectedCallback(){this.setDatePattern();this.handleValueChange()}componentDidLoad(){if(!this.pickerCloseBtn||!this.picker)return;this.pickerEle.firstFocusEle=this.pickerCloseBtn;this.dropdown.tetherTo=this.trigger;setTimeout((t=>this.handlePickerOpenChange()),300)}render(){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;const t=a(this.value);const i=!!this.host.querySelector('[slot="helper"]');return e(s,{class:Object.assign({},d(this.color))},e("div",{class:"date-field"},e("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:t=>this.input=t,floatLabel:this.floatLabel,hideLabel:this.hideLabel,inputmode:"numeric",part:"input"},e("slot",{name:"start",slot:"start"}),e("slot",{name:"label"}),e("slot",{name:"end",slot:"end"}),this.picker&&[e("button",{slot:"end",class:"date-field__open",type:"button",onKeyDown:this.onTriggerKey,onClick:this.onTriggerClick,ref:t=>this.trigger=t,disabled:this.disabled||this.readonly},e("nano-icon",{name:"light/calendar-alt"})),e("nano-dropdown",Object.assign({slot:"end",onNanoHide:this.onDropdownHide,onNanoShow:this.onDropdownShow,dialogTitle:"Choose a date",class:"date-field__dropdown",ref:t=>this.dropdown=t},this.dropDownConfig,{part:"dropdown"}),e("div",null,e("div",{class:"date-field__close-bar"},e("button",{class:"date-field__close",type:"button",onMouseDown:this.onCloseClick,onKeyDown:this.onCloseKeyDown,ref:t=>this.pickerCloseBtn=t},e("nano-icon",{name:"light/times"}),e("span",{class:"vhidden"},"Close window"))),e("nano-date-picker",{isDateDisabled:this.isDateDisabled,onNanoDatePicked:this.onDatePicked,min:this.min||undefined,max:this.max||undefined,"is-modal":true,ref:t=>this.pickerEle=t,localization:this.localization,selectedDate:this.value||this.initialPickerDate,firstDayOfWeek:this.firstDayOfWeek,color:this.color||undefined,part:"date-picker"})))],(i||this.helperText||this.showInlineError)&&e("span",{slot:"helper"},e("span",{class:{vhidden:!!this.value.length}},e("slot",{name:"helper"})),this.helperText&&!!t&&e("span",null,t.toLocaleDateString(this.locale,this.helperTextFormat)))),e("input",{type:"hidden",value:this.value,name:this.name})))}get host(){return n(this)}static get watchers(){return{value:["handleValueChange","testDateValidity"],dateOrder:["handleDateOrderChange"],min:["testDateValidity"],max:["testDateValidity"],pickerOpen:["handlePickerOpenChange"]}}};u.style=r;export{u as nano_date_input};
|
5
|
+
//# sourceMappingURL=p-6a5ae656.entry.js.map
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{h as e,r as t,c as a,a as s,g as i}from"./p-bf91c50e.js";import{i as n,g as o,b as d,p as r,D as l,d as c,s as h,e as u,f as b,h as p,j as _,k as f,l as v,a as g}from"./p-cecb9af1.js";import{f as y}from"./p-f8f89998.js";import{c as m}from"./p-411bb8f1.js";const x={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"]};const k=({focusedDay:t,today:a,day:s,onDaySelect:i,onKeyboardNavigation:o,focusedDayRef:d,inRange:r,disabled:l,isSelected:c})=>{const h=n(s,a);const u=n(s,t);const b=s.getMonth()!==t.getMonth()||l;const p=!r;function _(e){i(e,s)}return e("button",{class:{"duet-date__day":true,"is-outside":p,"is-disabled":b,"is-today":h},tabIndex:u?0:-1,onClick:_,onKeyDown:o,disabled:p,type:"button","aria-pressed":c?"true":"false",ref:e=>{if(u&&e&&d){d(e)}}},e("span",{"aria-hidden":"true"},s.getDate()),e("span",{class:"duet-date__vhidden"},s.toLocaleDateString(undefined,{day:"numeric",month:"long"})))};function w(e,t){const a=[];for(let s=0;s<e.length;s+=t){a.push(e.slice(s,s+t))}return a}function D(e,t,a){return e.map(((s,i)=>{const n=(i+t)%e.length;return a(e[n])}))}const z=({selectedDate:t,focusedDate:a,labelledById:s,localization:i,firstDayOfWeek:r,min:l,max:c,onDateSelect:h,onKeyboardNavigation:u,focusedDayRef:b,onMouseDown:p,onFocusIn:_,isDateDisabled:f})=>{const v=new Date;const g=o(a,r);return e("table",{class:"duet-date__table",role:"grid","aria-labelledby":s,onFocusin:_,onMouseDown:p},e("thead",null,e("tr",null,D(i.dayNames,r,(t=>e("th",{class:"duet-date__table-header",scope:"col"},e("span",{"aria-hidden":"true"},t.substr(0,2)),e("span",{class:"duet-date__vhidden"},t)))))),e("tbody",null,w(g,7).map((s=>e("tr",{class:"duet-date__row"},s.map((s=>e("td",{class:"duet-date__cell",role:"gridcell","aria-selected":n(s,t)?"true":undefined},e(k,{day:s,today:v,focusedDay:a,inRange:d(s,l,c),onDaySelect:h,onKeyboardNavigation:u,focusedDayRef:b,disabled:f(s),isSelected:n(s,t)})))))))))};const M=':host{box-sizing:border-box}*,*::before,*::after{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 rgb(var(--nano-color-tint-rgb)/0.56)}.duet-date *,.duet-date *::before,.duet-date *::after{box-sizing:border-box;margin:0}.duet-date{box-sizing:border-box;color:currentcolor;display:block;margin:0;position:relative;text-align:start;inline-size:100%}.duet-date__dialog{display:flex;inset-block-start:100%;max-inline-size:100%;inline-size:100%}.duet-date__dialog.is-left{inset-inline:auto 0;inline-size:auto}.duet-date__dialog-content{background:var(--background);min-inline-size:290px;padding-block:16px 20px;padding-inline:16px;position:relative;transform:none;max-inline-size:100%;inline-size:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1.25;text-align:center;inline-size:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1.25;-webkit-padding-after:8px;padding-block-end:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center}.duet-date__day{-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;transition:0.15s ease all;block-size:2.5em;inline-size:2.5em}.duet-date__day.is-today{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%;opacity:0.16;position:absolute;inset:0}[aria-selected=true] .duet-date__day{background:var(--active-color) !important;color:var(--active-text-color);box-shadow:none;outline:0}.duet-date__day:active{background:var(--active-color);box-shadow:var(--focus-shadow);color:var(--active-text-color)}.duet-date__day:focus{box-shadow:var(--focus-shadow);outline:0}.duet-date__day.is-disabled{background:transparent;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);box-shadow:none;cursor:default;opacity:0.6;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{align-items:center;display:flex;justify-content:space-between;-webkit-margin-after:16px;margin-block-end:16px;inline-size:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);align-items:center;-webkit-appearance:none;appearance:none;border:0;border-radius:50%;cursor:pointer;display:inline-flex;justify-content:space-around;-webkit-margin-start:8px;margin-inline-start:8px;padding:0;transition:background-color 300ms ease;font-size:0.9em;block-size:2.2em;inline-size:2.2em}.duet-date__prev:focus,.duet-date__next:focus{box-shadow:var(--focus-shadow);outline:0}.duet-date__prev:active:focus,.duet-date__next:active:focus{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-block:0;margin-inline:auto}.duet-date__select{display:inline-flex;-webkit-margin-before:4px;margin-block-start:4px;position:relative}.duet-date__select span{-webkit-margin-end:4px;margin-inline-end:4px}.duet-date__select select{cursor:pointer;font-size:1em;block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%;z-index:2}.duet-date__select select.focus-visible:focus+.duet-date__select-label{box-shadow:var(--focus-shadow)}.duet-date__select-label{align-items:center;border-radius:4px;display:flex;font-size:1.25em;font-weight:600;line-height:1.25;padding-block:0;padding-inline:8px 4px;pointer-events:none;position:relative;inline-size: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);block-size:1px;overflow:hidden;padding:0;position:absolute;inset-block-start:0;inline-size:1px}';function S(e,t){const a=[];for(let s=e;s<=t;s++){a.push(s)}return a}let C=0;const F=class{constructor(e){t(this,e);this.nanoDatePicked=a(this,"nanoDatePicked",7);this.dateId=`nano-datepicker-${C++}`;this.monthSelectId=this.dateId+"-"+"month";this.yearSelectId=this.dateId+"-"+"year";this.dialogLabelId=this.dateId+"-"+"dialog";this.initialTouchX=null;this.initialTouchY=null;this.enableActiveFocus=()=>{this.activeFocus=true};this.disableActiveFocus=()=>{this.activeFocus=false};this.handleTouchStart=e=>{const t=e.changedTouches[0];this.initialTouchX=t.pageX;this.initialTouchY=t.pageY};this.handleTouchMove=e=>{e.preventDefault()};this.handleTouchEnd=e=>{const t=e.changedTouches[0];const a=t.pageX-this.initialTouchX;const s=t.pageY-this.initialTouchY;const i=70;const n=Math.abs(a)>=i&&Math.abs(s)<=i;if(n){this.addMonths(a<0?1:-1)}this.initialTouchY=null;this.initialTouchX=null};this.handleNextMonthClick=e=>{e.preventDefault();this.addMonths(1)};this.handlePreviousMonthClick=e=>{e.preventDefault();this.addMonths(-1)};this.handleKeyboardNavigation=e=>{if(e.key==="Tab"&&!e.shiftKey&&this.isModal){e.preventDefault();const t=this.firstFocusEle||this.firstFocusableElement;t.focus();return}let t=true;switch(e.key){case"ArrowRight":this.addDays(1);break;case"ArrowLeft":this.addDays(-1);break;case"ArrowDown":this.addDays(7);break;case"ArrowUp":this.addDays(-7);break;case"PageUp":if(e.shiftKey){this.addYears(-1)}else{this.addMonths(-1)}break;case"PageDown":if(e.shiftKey){this.addYears(1)}else{this.addMonths(1)}break;case"Home":this.startOfWeek();break;case"End":this.endOfWeek();break;default:t=false}if(t){e.preventDefault();this.enableActiveFocus()}};this.handleDaySelect=(e,t)=>{const a=!this.isDateDisabled(t);const s=d(t,r(this.min),r(this.max));if(!s||!a){return}if(t.getMonth()===this.focusedDay.getMonth()){this.setValue(t)}else{this.setFocusedDay(t)}};this.handleMonthSelect=e=>{this.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=e=>{this.setYear(parseInt(e.target.value,10))};this.processFocusedDayNode=e=>{this.focusedDayNode=e;if(this.activeFocus){setTimeout((()=>e.focus()),0)}};this.activeFocus=false;this.focusedDay=new Date;this.selectedDate="";this.min="";this.max="";this.firstDayOfWeek=l.Monday;this.localization=x;this.color=undefined;this.isDateDisabled=()=>false;this.isModal=false;this.firstFocusEle=undefined}async setFocus(e=false,t=false){this.setFocusedDay(r(this.selectedDate)||new Date);if(e){setTimeout((e=>this.focusedDayNode.focus()),20);return}clearTimeout(this.focusTimeoutId);this.focusTimeoutId=setTimeout((()=>{if(t)y.force(this.monthSelectNode);this.monthSelectNode.focus()}),20)}handleSelectedDateChange(){this.setFocus(true)}addDays(e){this.setFocusedDay(c(this.focusedDay,e))}addMonths(e){this.setMonth(this.focusedDay.getMonth()+e)}addYears(e){this.setYear(this.focusedDay.getFullYear()+e)}startOfWeek(){this.setFocusedDay(h(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(u(this.focusedDay,this.firstDayOfWeek))}setMonth(e){const t=b(p(this.focusedDay),e);const a=_(t);const s=b(this.focusedDay,e);this.setFocusedDay(f(s,t,a))}setYear(e){const t=v(p(this.focusedDay),e);const a=_(t);const s=v(this.focusedDay,e);this.setFocusedDay(f(s,t,a))}setFocusedDay(e){this.focusedDay=f(e,r(this.min),r(this.max))}setValue(e){this.selectedDate=g(e);this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:e})}connectedCallback(){if(this.yearSelectNode)y.observe(this.yearSelectNode);if(this.monthSelectNode)y.observe(this.monthSelectNode)}componentWillLoad(){this.handleSelectedDateChange()}componentDidLoad(){this.connectedCallback()}disconnectedCallback(){y.unobserve(this.yearSelectNode);y.unobserve(this.monthSelectNode)}render(){const t=r(this.selectedDate);const a=(t||this.focusedDay).getFullYear();const i=this.focusedDay.getMonth();const n=this.focusedDay.getFullYear();const o=r(this.min);const l=r(this.max);const c=o!=null&&o.getMonth()===i&&o.getFullYear()===n;const h=l!=null&&l.getMonth()===i&&l.getFullYear()===n;let u=a-10;let b=a+10;if(o)u=o.getFullYear();if(l)b=l.getFullYear();return e(s,{class:Object.assign({},m(this.color))},e("div",{class:"duet-date"},e("div",{class:{"duet-date__dialog":true,"is-active":true},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},e("div",{class:"duet-date__dialog-content"},e("div",{class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),e("div",{class:"duet-date__header",onFocusin:this.disableActiveFocus},e("div",null,e("h2",{id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[i]," ",this.focusedDay.getFullYear()),e("label",{htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.monthSelectId,class:"duet-date__select--month",ref:e=>this.firstFocusableElement=this.monthSelectNode=e,onChange:this.handleMonthSelect},this.localization.monthNames.map(((t,a)=>e("option",{key:t,value:a,selected:a===i,disabled:!d(new Date(n,a,1),o?p(o):null,l?_(l):null)},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.localization.monthNamesShort[i]),e("nano-icon",{name:"light/chevron-down"}))),e("label",{htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect,ref:e=>this.yearSelectNode=e},S(u,b).map((t=>e("option",{key:t,selected:t===n},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.focusedDay.getFullYear()),e("nano-icon",{name:"light/chevron-down"})))),e("div",{class:"duet-date__nav"},e("button",{class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:c,type:"button"},e("nano-icon",{name:"light/chevron-left"}),e("span",{class:"duet-date__vhidden"},this.localization.prevMonthLabel)),e("button",{class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},e("nano-icon",{name:"light/chevron-right"}),e("span",{class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),e("div",null,e(z,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:o,max:l,isDateDisabled:this.isDateDisabled}))))))}get host(){return i(this)}static get watchers(){return{selectedDate:["handleSelectedDateChange"]}}};F.style=M;export{F as nano_date_picker};
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{h as e,r as t,c as a,a as s,g as i}from"./p-6ef53fa1.js";import{i as n,g as o,b as d,p as r,D as l,d as c,s as h,e as u,f as b,h as p,j as f,k as _,l as v,a as g}from"./p-cecb9af1.js";import{f as y}from"./p-f8f89998.js";import{c as m}from"./p-411bb8f1.js";const x={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"]};const k=({focusedDay:t,today:a,day:s,onDaySelect:i,onKeyboardNavigation:o,focusedDayRef:d,inRange:r,disabled:l,isSelected:c})=>{const h=n(s,a);const u=n(s,t);const b=s.getMonth()!==t.getMonth()||l;const p=!r;function f(e){i(e,s)}return e("button",{class:{"duet-date__day":true,"is-outside":p,"is-disabled":b,"is-today":h},tabIndex:u?0:-1,onClick:f,onKeyDown:o,disabled:p,type:"button","aria-pressed":c?"true":"false",ref:e=>{if(u&&e&&d){d(e)}}},e("span",{"aria-hidden":"true"},s.getDate()),e("span",{class:"duet-date__vhidden"},s.toLocaleDateString(undefined,{day:"numeric",month:"long"})))};function w(e,t){const a=[];for(let s=0;s<e.length;s+=t){a.push(e.slice(s,s+t))}return a}function D(e,t,a){return e.map(((s,i)=>{const n=(i+t)%e.length;return a(e[n])}))}const z=({selectedDate:t,focusedDate:a,labelledById:s,localization:i,firstDayOfWeek:r,min:l,max:c,onDateSelect:h,onKeyboardNavigation:u,focusedDayRef:b,onMouseDown:p,onFocusIn:f,isDateDisabled:_})=>{const v=new Date;const g=o(a,r);return e("table",{class:"duet-date__table",role:"grid","aria-labelledby":s,onFocusin:f,onMouseDown:p},e("thead",null,e("tr",null,D(i.dayNames,r,(t=>e("th",{class:"duet-date__table-header",scope:"col"},e("span",{"aria-hidden":"true"},t.substr(0,2)),e("span",{class:"duet-date__vhidden"},t)))))),e("tbody",null,w(g,7).map((s=>e("tr",{class:"duet-date__row"},s.map((s=>e("td",{class:"duet-date__cell",role:"gridcell","aria-selected":n(s,t)?"true":undefined},e(k,{day:s,today:v,focusedDay:a,inRange:d(s,l,c),onDaySelect:h,onKeyboardNavigation:u,focusedDayRef:b,disabled:_(s),isSelected:n(s,t)})))))))))};const M=':host{box-sizing:border-box}*,*::before,*::after{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 rgb(var(--nano-color-tint-rgb)/0.56)}.duet-date *,.duet-date *::before,.duet-date *::after{box-sizing:border-box;margin:0}.duet-date{box-sizing:border-box;color:currentcolor;display:block;margin:0;position:relative;text-align:start;inline-size:100%}.duet-date__dialog{display:flex;inset-block-start:100%;max-inline-size:100%;inline-size:100%}.duet-date__dialog.is-left{inset-inline:auto 0;inline-size:auto}.duet-date__dialog-content{background:var(--background);min-inline-size:290px;padding-block:16px 20px;padding-inline:16px;position:relative;transform:none;max-inline-size:100%;inline-size:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1.25;text-align:center;inline-size:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1.25;-webkit-padding-after:8px;padding-block-end:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center}.duet-date__day{-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;transition:0.15s ease all;block-size:2.5em;inline-size:2.5em}.duet-date__day.is-today{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%;opacity:0.16;position:absolute;inset:0}[aria-selected=true] .duet-date__day{background:var(--active-color) !important;color:var(--active-text-color);box-shadow:none;outline:0}.duet-date__day:active{background:var(--active-color);box-shadow:var(--focus-shadow);color:var(--active-text-color)}.duet-date__day:focus{box-shadow:var(--focus-shadow);outline:0}.duet-date__day.is-disabled{background:transparent;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);box-shadow:none;cursor:default;opacity:0.6;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{align-items:center;display:flex;justify-content:space-between;-webkit-margin-after:16px;margin-block-end:16px;inline-size:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);align-items:center;-webkit-appearance:none;appearance:none;border:0;border-radius:50%;cursor:pointer;display:inline-flex;justify-content:space-around;-webkit-margin-start:8px;margin-inline-start:8px;padding:0;transition:background-color 300ms ease;font-size:0.9em;block-size:2.2em;inline-size:2.2em}.duet-date__prev:focus,.duet-date__next:focus{box-shadow:var(--focus-shadow);outline:0}.duet-date__prev:active:focus,.duet-date__next:active:focus{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-block:0;margin-inline:auto}.duet-date__select{display:inline-flex;-webkit-margin-before:4px;margin-block-start:4px;position:relative}.duet-date__select span{-webkit-margin-end:4px;margin-inline-end:4px}.duet-date__select select{cursor:pointer;font-size:1em;block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%;z-index:2}.duet-date__select select.focus-visible:focus+.duet-date__select-label{box-shadow:var(--focus-shadow)}.duet-date__select-label{align-items:center;border-radius:4px;display:flex;font-size:1.25em;font-weight:600;line-height:1.25;padding-block:0;padding-inline:8px 4px;pointer-events:none;position:relative;inline-size: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);block-size:1px;overflow:hidden;padding:0;position:absolute;inset-block-start:0;inline-size:1px}';function S(e,t){const a=[];for(let s=e;s<=t;s++){a.push(s)}return a}let C=0;const F=class{constructor(e){t(this,e);this.nanoDatePicked=a(this,"nanoDatePicked",7);this.dateId=`nano-datepicker-${C++}`;this.monthSelectId=this.dateId+"-"+"month";this.yearSelectId=this.dateId+"-"+"year";this.dialogLabelId=this.dateId+"-"+"dialog";this.initialTouchX=null;this.initialTouchY=null;this.enableActiveFocus=()=>{this.activeFocus=true};this.disableActiveFocus=()=>{this.activeFocus=false};this.handleTouchStart=e=>{const t=e.changedTouches[0];this.initialTouchX=t.pageX;this.initialTouchY=t.pageY};this.handleTouchMove=e=>{e.preventDefault()};this.handleTouchEnd=e=>{const t=e.changedTouches[0];const a=t.pageX-this.initialTouchX;const s=t.pageY-this.initialTouchY;const i=70;const n=Math.abs(a)>=i&&Math.abs(s)<=i;if(n){this.addMonths(a<0?1:-1)}this.initialTouchY=null;this.initialTouchX=null};this.handleNextMonthClick=e=>{e.preventDefault();this.addMonths(1)};this.handlePreviousMonthClick=e=>{e.preventDefault();this.addMonths(-1)};this.handleKeyboardNavigation=e=>{if(e.key==="Tab"&&!e.shiftKey&&this.isModal){e.preventDefault();const t=this.firstFocusEle||this.firstFocusableElement;t.focus();return}let t=true;switch(e.key){case"ArrowRight":this.addDays(1);break;case"ArrowLeft":this.addDays(-1);break;case"ArrowDown":this.addDays(7);break;case"ArrowUp":this.addDays(-7);break;case"PageUp":if(e.shiftKey){this.addYears(-1)}else{this.addMonths(-1)}break;case"PageDown":if(e.shiftKey){this.addYears(1)}else{this.addMonths(1)}break;case"Home":this.startOfWeek();break;case"End":this.endOfWeek();break;default:t=false}if(t){e.preventDefault();this.enableActiveFocus()}};this.handleDaySelect=(e,t)=>{const a=!this.isDateDisabled(t);const s=d(t,r(this.min),r(this.max));if(!s||!a){return}if(t.getMonth()===this.focusedDay.getMonth()){this.setValue(t)}else{this.setFocusedDay(t)}};this.handleMonthSelect=e=>{this.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=e=>{this.setYear(parseInt(e.target.value,10))};this.processFocusedDayNode=e=>{this.focusedDayNode=e;if(this.activeFocus){setTimeout((()=>e.focus()),0)}};this.activeFocus=false;this.focusedDay=new Date;this.selectedDate="";this.min="";this.max="";this.firstDayOfWeek=l.Monday;this.localization=x;this.color=undefined;this.isDateDisabled=()=>false;this.isModal=false;this.firstFocusEle=undefined}async setFocus(e=false,t=false){this.setFocusedDay(r(this.selectedDate)||new Date);if(e){setTimeout((e=>this.focusedDayNode.focus()),20);return}clearTimeout(this.focusTimeoutId);this.focusTimeoutId=setTimeout((()=>{if(t)y.force(this.monthSelectNode);this.monthSelectNode.focus()}),20)}handleSelectedDateChange(){this.setFocus(true)}addDays(e){this.setFocusedDay(c(this.focusedDay,e))}addMonths(e){this.setMonth(this.focusedDay.getMonth()+e)}addYears(e){this.setYear(this.focusedDay.getFullYear()+e)}startOfWeek(){this.setFocusedDay(h(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(u(this.focusedDay,this.firstDayOfWeek))}setMonth(e){const t=b(p(this.focusedDay),e);const a=f(t);const s=b(this.focusedDay,e);this.setFocusedDay(_(s,t,a))}setYear(e){const t=v(p(this.focusedDay),e);const a=f(t);const s=v(this.focusedDay,e);this.setFocusedDay(_(s,t,a))}setFocusedDay(e){this.focusedDay=_(e,r(this.min),r(this.max))}setValue(e){this.selectedDate=g(e);this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:e})}connectedCallback(){if(this.yearSelectNode)y.observe(this.yearSelectNode);if(this.monthSelectNode)y.observe(this.monthSelectNode)}componentWillLoad(){this.handleSelectedDateChange()}componentDidLoad(){this.connectedCallback()}disconnectedCallback(){y.unobserve(this.yearSelectNode);y.unobserve(this.monthSelectNode)}render(){const t=r(this.selectedDate);const a=(t||this.focusedDay).getFullYear();const i=this.focusedDay.getMonth();const n=this.focusedDay.getFullYear();const o=r(this.min);const l=r(this.max);const c=o!=null&&o.getMonth()===i&&o.getFullYear()===n;const h=l!=null&&l.getMonth()===i&&l.getFullYear()===n;let u=a-10;let b=a+10;if(o)u=o.getFullYear();if(l)b=l.getFullYear();return e(s,{class:Object.assign({},m(this.color))},e("div",{class:"duet-date"},e("div",{class:{"duet-date__dialog":true,"is-active":true},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},e("div",{class:"duet-date__dialog-content"},e("div",{class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),e("div",{class:"duet-date__header",onFocusin:this.disableActiveFocus},e("div",null,e("h2",{id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[i]," ",this.focusedDay.getFullYear()),e("label",{htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.monthSelectId,class:"duet-date__select--month",ref:e=>this.firstFocusableElement=this.monthSelectNode=e,onChange:this.handleMonthSelect},this.localization.monthNames.map(((t,a)=>e("option",{key:t,value:a,selected:a===i,disabled:!d(new Date(n,a,1),o?p(o):null,l?f(l):null)},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.localization.monthNamesShort[i]),e("nano-icon",{name:"light/chevron-down"}))),e("label",{htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect,ref:e=>this.yearSelectNode=e},S(u,b).map((t=>e("option",{key:t,selected:t===n},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.focusedDay.getFullYear()),e("nano-icon",{name:"light/chevron-down"})))),e("div",{class:"duet-date__nav"},e("button",{class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:c,type:"button"},e("nano-icon",{name:"light/chevron-left"}),e("span",{class:"duet-date__vhidden"},this.localization.prevMonthLabel)),e("button",{class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},e("nano-icon",{name:"light/chevron-right"}),e("span",{class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),e("div",null,e(z,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:o,max:l,isDateDisabled:this.isDateDisabled}))))))}get host(){return i(this)}static get watchers(){return{selectedDate:["handleSelectedDateChange"]}}};F.style=M;export{F as nano_date_picker};
|
5
|
+
//# sourceMappingURL=p-6bb4545b.entry.js.map
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
const t="nano-components";let e;let n;let s;let i=false;let o=false;let l=false;let f=false;let c=null;let r=false;const u={isDev:false,isBrowser:true,isServer:false,isTesting:false};const a=t=>{const e=new URL(t,ke.t);return e.origin!==_e.location.origin?e.href:e.pathname};const d=(t,e="")=>{{return()=>{}}};const h=(t,e)=>{{return()=>{}}};const b="r";const $="o";const m="s";const p="t";const g="s-id";const j="sty-id";const y="c-id";const v="{visibility:hidden}.hydrated{visibility:inherit}";const O="sf-id";const w="http://www.w3.org/1999/xlink";const S={};const x=t=>t!=null;const _=t=>{t=typeof t;return t==="object"||t==="function"};function E(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const T=(t,e,...n)=>{let s=null;let i=null;let o=null;let l=false;let f=false;const c=[];const r=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){r(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!_(s)){s=String(s)}if(l&&f){c[c.length-1].i+=s}else{c.push(l?k(null,s):s)}f=l}}};r(n);if(e){if(e.key){i=e.key}if(e.name){o=e.name}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,c,N)}const u=k(t,null);u.o=e;if(c.length>0){u.l=c}{u.u=i}{u.h=o}return u};const k=(t,e)=>{const n={$:0,m:t,i:e,p:null,l:null};{n.o=null}{n.u=null}{n.h=null}return n};const C={};const M=t=>t&&t.m===C;const N={forEach:(t,e)=>t.map(L).forEach(e),map:(t,e)=>t.map(L).map(e).map(I)};const L=t=>({vattrs:t.o,vchildren:t.l,vkey:t.u,vname:t.h,vtag:t.m,vtext:t.i});const I=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return T(t.vtag,e,...t.vchildren||[])}const e=k(t.vtag,t.vtext);e.o=t.vattrs;e.l=t.vchildren;e.u=t.vkey;e.h=t.vname;return e};const R=(t,e)=>{if(!t["s-hsf"]||!t.parentNode)return;let n=t.parentNode.__childNodes||t.parentNode.childNodes;let s;const i=n.length;let o=0;for(o;o<i;o++){s=n[o];if(s["s-sr"]&&e&&s["s-psn"]===t["s-sn"]){R(s,true);continue}if(s["s-sn"]!==t["s-sn"])continue;if(s.nodeType===1&&s["s-sf"]){s.hidden=e;s.style.display=e?"none":""}else if(!!s["s-sfc"]){if(e){s["s-sfc"]=s.textContent||undefined;s.textContent=""}else if(!s.textContent||s.textContent.trim()===""){s.textContent=s["s-sfc"]}}}};const H=t=>{if(!t)return;const e=t.__childNodes||t.childNodes;let n;let s;let i;let o;let l;let f;for(s=0,i=e.length;s<i;s++){if(e[s]["s-sr"]){l=e[s]["s-sn"];n=e[s];R(n,false);for(o=0;o<i;o++){f=e[o].nodeType;if(e[o]["s-sf"])continue;if(e[o]["s-hn"]!==n["s-hn"]||l!==""){if(f===1&&l===e[o]["s-sn"]){R(n,true);nt(e[o]);break}}else if(e[o]["s-sn"]===l){if(f===1||f===3&&e[o]&&e[o].textContent&&e[o].textContent.trim()!==""){R(n,true);nt(e[o]);break}}}}H(e[s])}};const U=t=>{P(t);B(t);q(t);z(t);V(t);J(t);K(t);Q(t);G(t);D(t);W(t);F(t)};const A=t=>{t.__cloneNode=t.cloneNode;t.cloneNode=function(e){const n=this;const s=t.__cloneNode.call(n,false);if(e){let t=0;let e,i;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-sf","s-sfc","s-hsf"];for(;t<n.__childNodes.length;t++){e=n.__childNodes[t]["s-nr"];i=o.every((e=>!n.__childNodes[t][e]));if(e){s.__appendChild(e.cloneNode(true))}if(i){s.__appendChild(n.__childNodes[t].cloneNode(true))}}}return s}};const P=t=>{if(!globalThis.Node)return;class e extends Array{item(t){return this[t]}}let n=Object.getOwnPropertyDescriptor(Node.prototype,"childNodes");if(!n){n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Node.prototype),"childNodes")}if(n)Object.defineProperty(t,"__childNodes",n);let s=Object.getOwnPropertyDescriptor(Element.prototype,"children");if(s)Object.defineProperty(t,"__children",s);const i=Object.getOwnPropertyDescriptor(Element.prototype,"childElementCount");if(i)Object.defineProperty(t,"__childElementCount",i);Object.defineProperty(t,"children",{get(){return this.childNodes.map((t=>{if(t.nodeType===1)return t;else return null})).filter((t=>!!t))}});Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}});Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}});Object.defineProperty(t,"childElementCount",{get(){return t.children.length}});if(!n)return;Object.defineProperty(t,"childNodes",{get(){const t=this.__childNodes;const n=new e;for(let e=0;e<t.length;e++){const s=t[e]["s-nr"];if(s&&(s.nodeType!==8||s.nodeValue.indexOf($+".")!==0)){n.push(s)}}return n}})};const D=t=>{if(!globalThis.Element)return;let e=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML");if(!e)e=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML");if(e)Object.defineProperty(t,"__innerHTML",e);Object.defineProperty(t,"innerHTML",{get:function(){let t="";this.childNodes.forEach((e=>t+=e.outerHTML||e.textContent));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const W=t=>{if(!globalThis.Element)return;let e=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");if(!e)e=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerText");if(e)Object.defineProperty(t,"__innerText",e);Object.defineProperty(t,"innerText",{get:function(){let t="";this.childNodes.forEach((e=>{if(e.innerText)t+=e.innerText;else if(e.textContent)t+=e.textContent.trimEnd()}));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const F=t=>{if(!globalThis.Node)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"textContent");if(e)Object.defineProperty(t,"__textContent",e);Object.defineProperty(t,"textContent",{get:function(){let t="";this.childNodes.forEach((e=>t+=e.textContent||""));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const B=t=>{if(t.__insertBefore)return;t.__insertBefore=t.insertBefore;t.insertBefore=function(t,e){const n=t["s-sn"]=ot(t);const s=lt(this.__childNodes,n);if(s){let i=false;this.childNodes.forEach((o=>{if(o===e||e===null){i=true;it(t,s);if(e===null){this.__append(t);return}if(n===e["s-sn"]){const n=e.parentNode.__insertBefore||e.parentNode.insertBefore;n.call(e.parentNode,t,e);nt(t)}else{this.__append(t)}return}}));if(i){return t}}return this.__insertBefore(t,e)}};const q=t=>{if(t.__appendChild)return;t.__appendChild=t.appendChild;t.appendChild=function(t){const e=t["s-sn"]=ot(t);const n=lt(this.__childNodes||this.childNodes,e);if(n){it(t,n);const e=ft(n);const s=e[e.length-1];if(s.parentNode){const e=s.parentNode;e.__insertBefore?e.__insertBefore(t,s.nextSibling):e.insertBefore(t,s.nextSibling);nt(t)}if(n["s-hsf"]){H(n.parentNode)}return t}if(t.nodeType===1&&!!t.getAttribute("slot")&&this.__childNodes)t.hidden=true;return this.__appendChild(t)}};const V=t=>{if(t.__prepend)return;t.__prepend=t.prepend;t.prepend=function(...t){t.forEach((t=>{if(typeof t==="string"){t=this.ownerDocument.createTextNode(t)}const e=t["s-sn"]=ot(t);const n=lt(this.__childNodes,e);if(n){it(t,n);const e=ft(n);const s=e[0];if(s.parentNode){s.parentNode.insertBefore(t,s.nextSibling);nt(t)}if(n["s-hsf"]){H(n.parentNode)}return}if(t.nodeType===1&&!!t.getAttribute("slot")&&this.__childNodes)t.hidden=true;return this.__prepend(t)}))}};const z=t=>{if(t.__append)return;t.__append=t.append;t.append=function(...t){t.forEach((t=>{if(typeof t==="string"){t=this.ownerDocument.createTextNode(t)}this.appendChild(t)}))}};const G=t=>{if(t.__replaceChildren)return;t.__replaceChildren=t.replaceChildren;t.replaceChildren=function(...t){const e=lt(this.__childNodes,"");if(e){const n=ft(e);n.forEach((t=>{if(!t["s-sr"]){t.remove()}}));this.append(...t)}}};const J=t=>{if(t.__insertAdjacentHTML)return;t.__insertAdjacentHTML=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,e){if(t!=="afterbegin"&&t!=="beforeend"){return this.__insertAdjacentHTML(t,e)}const n=this.ownerDocument.createElement("_");let s;n.innerHTML=e;if(t==="afterbegin"){while(s=n.firstChild){this.prepend(s)}}else if(t==="beforeend"){while(s=n.firstChild){this.append(s)}}}};const K=t=>{if(t.__insertAdjacentText)return;t.__insertAdjacentText=t.insertAdjacentText;t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}};const Q=t=>{if(t.__insertAdjacentElement)return;t.__insertAdjacentElement=t.insertAdjacentElement;t.insertAdjacentElement=function(t,e){if(t!=="afterbegin"&&t!=="beforeend"){return this.__insertAdjacentElement(t,e)}if(t==="afterbegin"){this.prepend(e)}else if(t==="beforeend"){this.append(e)}}};const X=t=>{if(!t||t.__nextSibling||!globalThis.Node)return;Y(t);tt(t);Z(t);et(t)};const Y=t=>{if(!t||t.__nextSibling)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling");if(e)Object.defineProperty(t,"__nextSibling",e);else{t.__nextSibling=t.nextSibling||true}Object.defineProperty(t,"nextSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.childNodes;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n+1]}return this.__nextSibling}})};const Z=t=>{if(!t||t.__nextElementSibling||!t.nextSiblingElement)return;const e=Object.getOwnPropertyDescriptor(Element.prototype,"nextElementSibling");if(e)Object.defineProperty(t,"__nextElementSibling",e);else{t.__nextElementSibling=t.nextSiblingElement||true}Object.defineProperty(t,"nextElementSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.children;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n+1]}return this.__nextElementSibling}})};const tt=t=>{if(!t||t.__previousSibling)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"previousSibling");if(e)Object.defineProperty(t,"__previousSibling",e);else{t.__previousSibling=t.previousSibling||true}Object.defineProperty(t,"previousSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.childNodes;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n-1]}return this.__previousSibling}})};const et=t=>{if(!t||t.__previousElementSibling||!t.previousElementSibling)return;const e=Object.getOwnPropertyDescriptor(Element.prototype,"previousElementSibling");if(e)Object.defineProperty(t,"__previousElementSibling",e);else{t.__previousElementSibling=t.previousSiblingElement||true}Object.defineProperty(t,"previousElementSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.children;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n-1]}return this.__previousElementSibling}})};const nt=t=>{if(!t||t.__remove)return;t.__remove=t.remove||true;st(t.parentNode);t.remove=function(){if(this.parentNode){return this.parentNode.removeChild(this)}return this.__remove()}};const st=t=>{if(!t||t.__removeChild)return;t.__removeChild=t.removeChild;t.removeChild=function(t){if(t&&typeof t["s-sn"]!=="undefined"){const e=lt(this.__childNodes||this.childNodes,t["s-sn"]);t.parentElement.__removeChild(t);if(e&&e["s-hsf"]){H(e.parentElement)}return}return this.__removeChild(t)}};const it=(t,e)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const n=document.createTextNode("");n["s-nr"]=t;if(e["s-cr"]&&e["s-cr"].parentNode){const t=e["s-cr"].parentNode.__appendChild||e["s-cr"].parentNode.appendChild;t.call(e["s-cr"].parentNode,n)}t["s-ol"]=n};const ot=t=>t["s-sn"]||t.nodeType===1&&t.getAttribute("slot")||t.slot||"";const lt=(t,e)=>{let n=0;let s;if(!t)return null;for(;n<t.length;n++){s=t[n];if(s["s-sr"]&&s["s-sn"]===e){return s}s=lt(s.childNodes,e);if(s){return s}}return null};const ft=t=>{const e=[t];const n=t["s-sn"]||"";while((t=t.nextSibling)&&t["s-sn"]===n){e.push(t)}return e};const ct=(t,e,n,s)=>{const i=d("hydrateClient",e);const o=t.shadowRoot;const l=[];const f=[];const c=[];const r=o?[]:null;let u=k(e,null);u.p=t;if(!ke.g){ut(Ee.body,ke.g=new Map)}t[g]=n;t.removeAttribute(g);s.j=rt(u,l,f,r,t,t,n,c);let a=0;const h=l.length;let b;for(a;a<h;a++){b=l[a];const n=b.v+"."+b.O;const s=ke.g.get(n);const i=b.p;if(!o){i["s-hn"]=e.toUpperCase();if(b.m==="slot"){i["s-cr"]=t["s-cr"]}}if(s&&s.isConnected){if(o&&s["s-en"]===""){s.parentNode.insertBefore(i,s.nextSibling)}s.parentNode.removeChild(s)}ke.g.delete(n)}const $=[];let m=0;const p=c.length;let j;let y;let v;let O;for(m;m<p;m++){j=c[m];if(!j||!j.length)continue;v=j.length;y=0;for(y;y<v;y++){O=j[y];if(!$[O.hostId]){$[O.hostId]=ke.g.get(O.hostId)}if(!$[O.hostId])continue;const t=$[O.hostId];if(!t.shadowRoot||!o){O.slot["s-cr"]=t["s-cr"];if(!O.slot["s-cr"]&&t.shadowRoot){O.slot["s-cr"]=t}else{const e=t.__childNodes||t.childNodes;O.slot["s-cr"]=e[0]}it(O.node,O.slot);X(O.node)}if(t.shadowRoot){t.appendChild(O.node)}}}if(o){let e=0;const n=r.length;for(e;e<n;e++){o.appendChild(r[e])}Array.from(t.childNodes).forEach((t=>{if(t.nodeType===8&&typeof t["s-sn"]!=="string"){t.parentNode.removeChild(t)}}))}s.S=t;i()};const rt=(t,e,n,s,i,o,l,f=[])=>{let c;let r;let u;let a;const d=i["s-sc"];if(o.nodeType===1){c=o.getAttribute(y);if(c){r=c.split(".");if(r[0]===l||r[0]==="0"){u=at({v:r[0],O:r[1],_:r[2],T:r[3],m:o.tagName.toLowerCase(),p:o,o:{class:o.className}});e.push(u);o.removeAttribute(y);if(!t.l){t.l=[]}const l=u.p.getAttribute("s-sn");if(typeof l==="string"){u.p["s-sn"]=l;u.p.removeAttribute("s-sn")}const f=u.p.getAttribute(O);if(f){u.p.removeAttribute(O);const t=n.find((t=>t.p["s-sn"]===u.p["s-sn"]||t.h===u.p["s-sn"]));if(t){u.p["s-sf"]=true;u.p["s-hn"]=i.tagName;t.l=t.l||[];t.l[u.T]=u;if(t.p.nodeType===1){t.p.appendChild(u.p)}}}else if(u.T!==undefined){t.l[u.T]=u}if(d)o["s-si"]=d;t=u;if(s&&u._==="0"&&!f){s[u.T]=u.p}}}const h=o.__childNodes||o.childNodes;for(a=h.length-1;a>=0;a--){rt(t,e,n,s,i,h[a],l,f)}if(o.shadowRoot){for(a=o.shadowRoot.childNodes.length-1;a>=0;a--){rt(t,e,n,s,i,o.shadowRoot.childNodes[a],l,f)}}}else if(o.nodeType===8){r=o.nodeValue.split(".");if(r[1]===l||r[1]==="0"){c=r[0];u=at({v:r[1],O:r[2],_:r[3],T:r[4]||"0",p:o});if(c===p){let f=u.p=o.nextSibling;if(u.p&&u.p.nodeType===3){u.i=u.p.textContent;e.push(u);o.remove();if(r[5]==="1"){f["s-sf"]=true;f["s-sn"]=r[6]||"";f["s-sfc"]=f.textContent;f["s-hn"]=i.tagName;const t=n.find((t=>t.p["s-sn"]===f["s-sn"]||t.h===f["s-sn"]));if(t){t.l=t.l||[];t.l[u.T]=u;if(t.p.nodeType===1){t.p.appendChild(f)}}}else{if(l===u.v){if(!t.l){t.l=[]}t.l[u.T]=u}if(s&&u._==="0"){s[u.T]=u.p}}}}else if(u.v===l){if(c===m){u.m="slot";t.o=undefined;const i=o["s-sn"]=u.h=r[5]||"";o["s-sr"]=true;if(r[6]==="1"){o["s-hsf"]=true}if(r[7]==="1"){let t=o.previousSibling;while(!!t&&t.nodeType!==8){t=t.previousSibling}o["s-sfc"]=t.nodeValue}const l=(t===null||t===void 0?void 0:t.p)?t.p["s-id"]||t.p.getAttribute("s-id"):"";if(s){const e=u.p=Ee.createElement(u.m);if(u.h){u.p.setAttribute("name",i)}if(l&&l!==u.v){t.p.insertBefore(e,t.p.children[0])}else{o.parentNode.insertBefore(u.p,o)}dt(f,r[2],i,o,u.v);o.remove();if(u._==="0"){s[u.T]=u.p}}else{const n=u.p;const s=l&&l!==u.v&&t.p.shadowRoot;dt(f,r[2],i,o,s?l:u.v);if(s){t.p.insertBefore(n,t.p.children[0])}e.push(u)}n.push(u);if(!t.l){t.l=[]}t.l[u.T]=u}else if(c===b){if(s){o.remove()}else{i["s-cr"]=o;o["s-cn"]=true}}}}}else if(t&&t.m==="style"){const e=k(null,o.textContent);e.p=o;e.T="0";t.l=[e]}return t};const ut=(t,e)=>{if(t.nodeType===1){const n=t[g]||t.getAttribute(g);if(n){e.set(n,t)}let s=0;const i=t.__childNodes||t.childNodes;for(;s<i.length;s++){ut(i[s],e)}if(t.shadowRoot){for(s=0;s<t.shadowRoot.childNodes.length;s++){ut(t.shadowRoot.childNodes[s],e)}}}else if(t.nodeType===8){const n=t.nodeValue.split(".");if(n[0]===$){e.set(n[1]+"."+n[2],t);t["s-en"]=n[3]}}};const at=t=>{const e={$:0,v:null,O:null,_:null,T:"0",p:null,o:null,l:null,u:null,h:null,m:null,i:null};return Object.assign(Object.assign({},e),t)};const dt=(t,e,n,s,i)=>{let o=s.nextSibling;t[e]=t[e]||[];while(o&&(o["s-sn"]===n||n===""&&!o["s-sn"]&&(o.nodeType===8&&o.nodeValue.indexOf(".")!==1||o.nodeType===3))&&!o["s-sf"]){o["s-sn"]=n;t[e].push({slot:s,node:o,hostId:i});o=o.nextSibling}};const ht=t=>xe.map((e=>e(t))).find((t=>!!t));const bt=(t,e)=>{if(t!=null&&!_(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const $t=t=>pe(t).S;const mt=(t,e,n)=>{const s=$t(t);return{emit:t=>pt(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const pt=(t,e,n)=>{const s=ke.ce(e,n);t.dispatchEvent(s);return s};const gt=new WeakMap;const jt=(t,e,n)=>{let s=Se.get(t);if(Me&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}Se.set(t,s)};const yt=(t,e,n,s)=>{var i;let o=Ot(e);const l=Se.get(o);t=t.nodeType===11?t:Ee;if(l){if(typeof l==="string"){t=t.head||t;let e=gt.get(t);let n;if(!e){gt.set(t,e=new Set)}if(!e.has(o)){if(t.host&&(n=t.querySelector(`[${j}="${o}"]`))){n.innerHTML=l}else{{n=Ee.createElement("style");n.innerHTML=l}const e=(i=ke.k)!==null&&i!==void 0?i:E(Ee);if(e!=null){n.setAttribute("nonce",e)}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(o)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return o};const vt=t=>{const e=t.C;const n=t.S;const s=e.$;const i=d("attachStyles",e.M);const o=yt(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}i()};const Ot=(t,e)=>"sc-"+t.M;const wt=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{");const St=(t,e,n,s,i,o)=>{if(n!==s){let l=ye(t,e);let f=e.toLowerCase();if(e==="class"){const e=t.classList;const i=_t(n);const o=_t(s);if(t["s-si"]&&o.indexOf(t["s-si"])<0){o.push(t["s-si"])}e.remove(...i.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!i.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!l&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(ye(_e,f)){e=f.slice(2)}else{e=f[2]+e.slice(3)}if(n){ke.rel(t,e,n,false)}if(s){ke.ael(t,e,s,false)}}else{const c=_(s);if((l||c&&s!==null)&&!i){try{if(!t.tagName.includes("-")){const i=s==null?"":s;if(e==="list"){l=false}else if(n==null||t[e]!=i){t[e]=i}}else{t[e]=s}}catch(t){}}let r=false;{if(f!==(f=f.replace(/^xlink\:?/,""))){e=f;r=true}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){if(r){t.removeAttributeNS(w,e)}else{t.removeAttribute(e)}}}else if((!l||o&4||i)&&!c){s=s===true?"":s;if(r){t.setAttributeNS(w,e,s)}else{t.setAttribute(e,s)}}}}};const xt=/\s/;const _t=t=>!t?[]:t.split(xt);const Et=(t,e,n,s)=>{const i=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.o||S;const l=e.o||S;{for(s in o){if(!(s in l)){St(i,s,o[s],undefined,n,e.$)}}}for(s in l){St(i,s,o[s],l[s],n,e.$)}};const Tt=(t,o,c,r)=>{const u=o.l[c];let a=0;let d;let h;let b;if(!i){l=true;if(u.m==="slot"){if(e){r.classList.add(e+"-s")}u.$|=u.l?2:1}}if(u.i!==null){d=u.p=Ee.createTextNode(u.i)}else if(u.$&(1|2)){d=u.p=Ee.createTextNode("")}else{d=u.p=Ee.createElement(u.m);{Et(null,u,f)}if(x(e)&&d["s-si"]!==e){d.classList.add(d["s-si"]=e)}if(u.l){for(a=0;a<u.l.length;++a){h=Tt(t,u,a,d);if(h){d.__appendChild?d.__appendChild(h):d.appendChild(h)}}}}{d["s-hn"]=s;if(u.$&(2|1)){d["s-sr"]=true;d["s-cr"]=n;d["s-sn"]=u.h||"";if(o.h){d["s-psn"]=o.h}if(u.$&2){if(u.l){for(a=0;a<u.l.length;++a){let e=d.nodeType===1?d:r;while(e.nodeType!==1){e=e.parentNode}h=Tt(t,u,a,e);h["s-sf"]=d["s-hsf"]=true;if(typeof h["s-sn"]==="undefined"){h["s-sn"]=u.h||""}if(h.nodeType===3){h["s-sfc"]=h.textContent}if(h&&(!t||!t.l)){e.appendChild(h)}}}if(t&&t.l)Ut(t,u)}b=t&&t.l&&t.l[c];if(b&&b.m===u.m&&t.p){kt(t.p,false)}}}return d};const kt=(t,e)=>{ke.$|=1;const n=t.__childNodes||t.childNodes;for(let t=n.length-1;t>=0;t--){const i=n[t];if(i["s-hn"]!==s&&i["s-ol"]){Ht(i).insertBefore(i,Rt(i));i["s-ol"].remove();i["s-ol"]=undefined;l=true}if(e){kt(i,e)}}ke.$&=~1};const Ct=(t,e,n,i,o,l)=>{let f=t["s-cr"]&&t["s-cr"].parentNode||t;let c;if(f.shadowRoot&&f.tagName===s){f=f.shadowRoot}for(;o<=l;++o){if(i[o]){c=Tt(null,n,o,t);if(c){i[o].p=c;f.insertBefore(c,Rt(e))}}}};const Mt=t=>{const e=t.__childNodes||t.childNodes;let n;let s;let i;for(s=0,i=e.length;s<i;s++){n=e[s];if(n["s-ol"]){if(n["s-hn"])n["s-hn"]=undefined}else{Mt(n)}}};const Nt=(t,e,n,s,i)=>{for(;e<=n;++e){if(s=t[e]){i=s.p;Wt(s);{o=true;Mt(i);if(i["s-ol"]){i["s-ol"].remove()}else{kt(i,true)}}i.remove()}}};const Lt=(t,e,n,s)=>{const i=[];const l={};let f=0;let c=0;let r=0;let u=0;let a=0;let d=e.length-1;let h=e[0];let b=e[d];let $=s.length-1;let m=s[0];let p=s[$];let g;let j;let y;let v;let O;let w;let S;let x;let _;while(f<=d&&c<=$){if(h==null){h=e[++f]}else if(b==null){b=e[--d]}else if(m==null){m=s[++c]}else if(p==null){p=s[--$]}else if(It(h,m)){Ut(h,m);h=e[++f];m=s[++c]}else if(It(b,p)){Ut(b,p);b=e[--d];p=s[--$]}else if(It(h,p)){if(h.m==="slot"||p.m==="slot"){kt(h.p.parentNode,false)}Ut(h,p);t.insertBefore(h.p,b.p.nextSibling);h=e[++f];p=s[--$]}else if(It(b,m)){if(h.m==="slot"||p.m==="slot"){kt(b.p.parentNode,false)}Ut(b,m);t.insertBefore(b.p,h.p);b=e[--d];m=s[++c]}else{r=-1;{for(u=f;u<=d;++u){if(e[u]&&e[u].u!==null&&e[u].u===m.u){r=u;break}}}if(r>=0){j=e[r];if(j.m!==m.m){g=Tt(e&&e[c],n,r,t)}else{Ut(j,m);e[r]=undefined;g=j.p}m=s[++c]}else{g=Tt(e&&e[c],n,c,t);m=s[++c]}if(g){{Ht(h.p).insertBefore(g,Rt(h.p))}}}}if(f>d){Ct(t,s[$+1]==null?null:s[$+1].p,n,s,c,$)}else if(c>$){Nt(e,f,d)}if(t.parentNode&&n.p["s-hsf"]){y=t.parentNode.__childNodes||t.parentNode.childNodes;v=y.length-1;for(u=0;u<=v;++u){S=y[u];if(S["s-hsf"]){i.push(S);continue}if(S["s-sf"]){if(!l[S["s-sn"]])l[S["s-sn"]]=[];l[S["s-sn"]].push(S)}}O=i.length-1;for(u=0;u<=O;++u){x=i[u];if(typeof l[x["s-sn"]]==="undefined")continue;w=l[x["s-sn"]].length-1;for(a=0;a<=w;++a){_=l[x["s-sn"]][a];x.parentNode.insertBefore(_,x)}}o=true}};const It=(t,e)=>{if(t.m===e.m){if(t.m==="slot"){return t.h===e.h}{return t.u===e.u}}return false};const Rt=t=>t&&t["s-ol"]||t;const Ht=t=>(t["s-ol"]?t["s-ol"]:t).parentNode;const Ut=(t,e)=>{const n=e.p=t.p;const s=t.l;const i=e.l;const o=e.m;const l=e.i;let c;if(l===null){{if(o==="slot");else{Et(t,e,f)}}if(s!==null&&i!==null){Lt(n,s,e,i)}else if(i!==null){if(t.i!==null){n.textContent=""}Ct(n,null,e,i,0,i.length-1)}else if(s!==null){Nt(s,0,s.length-1)}}else if(c=n["s-cr"]){c.parentNode.textContent=l}else if(t.i!==l){n.textContent=l;if(n["s-sf"]){n["s-sfc"]=l}}};const At=[];const Pt=t=>{let e;let n;let s;let i;let l;let f;let c=0;const r=t.__childNodes||t.childNodes;const u=r.length;for(;c<u;c++){e=r[c];if(e["s-sr"]&&(n=e["s-cr"])&&n.parentNode){if(e["s-hsf"]){o=true}s=n.parentNode.__childNodes||n.parentNode.childNodes;i=e["s-sn"];for(f=s.length-1;f>=0;f--){n=s[f];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==e["s-hn"]){if(Dt(n,i)){l=At.find((t=>t.N===n));o=true;n["s-sn"]=n["s-sn"]||i;if(l){l.L=e}else{At.push({L:e,N:n})}if(n["s-sr"]){At.map((t=>{if(Dt(t.N,n["s-sn"])){l=At.find((t=>t.N===n));if(l&&!t.L){t.L=l.L}}}))}}else if(!At.some((t=>t.N===n))){At.push({N:n})}}}}if(e.nodeType===1){Pt(e)}}};const Dt=(t,e)=>{if(t.nodeType===1){if(t.getAttribute("slot")===null&&e===""){return true}if(t.getAttribute("slot")===e){return true}return false}if(t["s-sn"]===e){return true}return e===""};const Wt=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.l&&t.l.map(Wt)}};const Ft=(t,f)=>{const c=t.S;const r=t.C;const u=t.j||k(null,null);const a=M(f)?f:T(null,null,f);s=c.tagName;if(r.I){a.o=a.o||{};r.I.map((([t,e])=>a.o[e]=c[t]))}a.m=null;a.$|=4;t.j=a;a.p=u.p=c.shadowRoot||c;{e=c["s-sc"]}{n=c["s-cr"];i=(r.$&1)!==0;o=false}Ut(u,a);{ke.$|=1;if(l){Pt(a.p);let t;let e;let n;let s;let i;let o;let l;let f=0;for(;f<At.length;f++){t=At[f];e=t.N;if(!e["s-ol"]){n=Ee.createTextNode("");n["s-nr"]=e;e.parentNode.insertBefore(e["s-ol"]=n,e)}}for(f=0;f<At.length;f++){t=At[f];e=t.N;if(t.L){s=t.L.parentNode;i=t.L.__nextSibling||t.L.nextSibling;n=e["s-ol"];l=i;while(n=n.__previousSibling||n.previousSibling){o=n["s-nr"];if(o&&o["s-sn"]===e["s-sn"]&&s===o.parentNode){o=o.__nextSibling||o.nextSibling;if(!o||!o["s-nr"]){i=o;break}}}if(!i&&s!==e.parentNode||(e.__nextSibling||e.nextSibling)!==i){if(e!==i){if(!e["s-hn"]&&e["s-ol"]){e["s-hn"]=e["s-ol"].parentNode.nodeName}s.insertBefore(e,i);e.hidden=false}else{s.insertBefore(e,l)}}}else{if(e.nodeType===1){e.hidden=true}}}}if(o){H(a.p)}ke.$&=~1;At.length=0}};const Bt=(t,e)=>{if(e&&!t.R&&e["s-p"]){e["s-p"].push(new Promise((e=>t.R=e)))}};const qt=(t,e)=>{{t.$|=16}if(t.$&4){t.$|=512;return}Bt(t,t.H);const n=()=>Vt(t,e);return Pe(n)};const Vt=(t,e)=>{const n=t.S;const s=d("scheduleUpdate",t.C.M);const i=t.U;let o;if(e){{t.$|=256;if(t.A){t.A.map((([t,e])=>Yt(i,t,e,n)));t.A=null}}{o=Yt(i,"componentWillLoad",undefined,n)}}{o=Zt(o,(()=>Yt(i,"componentWillRender",undefined,n)))}s();return Zt(o,(()=>zt(t,i,e)))};const zt=async(t,e,n)=>{const s=t.S;const i=d("update",t.C.M);const o=s["s-rc"];if(n){vt(t)}const l=d("render",t.C.M);{Gt(t,e)}if(o){o.map((t=>t()));s["s-rc"]=undefined}l();i();{const e=s["s-p"];const n=()=>Kt(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.$|=4;e.length=0}}};const Gt=(t,e,n)=>{try{c=e;e=e.render();{t.$&=~16}{t.$|=2}{{{Ft(t,e)}}}}catch(e){ve(e,t.S)}c=null;return null};const Jt=()=>c;const Kt=t=>{const e=t.C.M;const n=t.S;const s=d("postUpdate",e);const i=t.U;const o=t.H;{Yt(i,"componentDidRender",undefined,n)}if(!(t.$&64)){t.$|=64;{te(n)}{Yt(i,"componentDidLoad",undefined,n)}s();{t.P(n);if(!o){Xt()}}}else{{Yt(i,"componentDidUpdate",undefined,n)}s()}{t.D(n)}{if(t.R){t.R();t.R=undefined}if(t.$&512){Ue((()=>qt(t,false)))}t.$&=~(4|512)}};const Qt=t=>{{const e=pe(t);const n=e.S.isConnected;if(n&&(e.$&(2|16))===2){qt(e,false)}return n}};const Xt=e=>{{te(Ee.documentElement)}Ue((()=>pt(_e,"appload",{detail:{namespace:t}})))};const Yt=(t,e,n,s)=>{if(t&&t[e]){try{return t[e](n)}catch(t){ve(t,s)}}return undefined};const Zt=(t,e)=>t&&t.then?t.then(e):e();const te=t=>t.classList.add("hydrated");const ee=(t,e)=>pe(t).W.get(e);const ne=(t,e,n,s,i=true)=>{const o=pe(t);const l=o.S;const f=o.W.get(e);const c=o.$;const r=o.U;n=bt(n,s.F[e][0]);const u=Number.isNaN(f)&&Number.isNaN(n);const a=n!==f&&!u;if((!(c&8)||f===undefined)&&a){o.W.set(e,n);if(r){if(s.B&&c&128&&i){const t=s.B[e];if(t){t.map((t=>{try{r[t](n,f,e)}catch(t){ve(t,l)}}))}}if((c&(2|16))===2){if(r.componentShouldUpdate){if(r.componentShouldUpdate(n,f,e)===false){return}}qt(o,false)}}}};const se=(t,e,n)=>{if(e.F){if(t.watchers){e.B=t.watchers}const s=Object.entries(e.F);const i=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){if((s&2048)===0){Object.defineProperty(i,t,{get(){return ee(this,t)},set(n){ne(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&2048){{Object.defineProperty(i,t,{get(){const e=pe(this);const n=e?e.U:i;if(!n)return;return n[t]},configurable:true,enumerable:true})}}if(s&4096){const n=Object.getOwnPropertyDescriptor(i,t).set;Object.defineProperty(i,t,{set(s){const i=pe(this);if(n){n.apply(this,[s]);ne(this,t,i.S[t],e);return}if(!i)return;const o=(n=false)=>{i.U[t]=s;ne(this,t,i.U[t],e,!n)};if(i.U){o()}else{i.q.then((()=>o(true)))}}})}}else if(n&1&&s&64){Object.defineProperty(i,t,{value(...e){const n=pe(this);return n.q.then((()=>n.U[t](...e)))}})}}));if(n&1){const n=new Map;i.attributeChangedCallback=function(t,e,s){ke.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(i.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}const o=Object.getOwnPropertyDescriptor(i,e);if(!o.get||!!o.set){this[e]=s===null&&typeof this[e]==="boolean"?false:s}}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,s])=>{const i=s[1]||t;n.set(i,t);if(s[0]&512){e.I.push([t,i])}return i}))}}return t};const ie=async(t,e,n,s,i)=>{if((e.$&32)===0){{e.$|=32;i=we(n,e);if(i.then){const t=h();i=await i;t()}if(!i.isProxied){{n.B=i.watchers}se(i,n,2);i.isProxied=true}const s=d("createInstance",n.M);{e.$|=8}try{new i(e)}catch(e){ve(e,t)}{e.$&=~8}{e.$|=128}s();oe(e.U,t)}if(i.style){let t=i.style;const e=Ot(n);if(!Se.has(e)){const s=d("registerStyles",n.M);jt(e,t,!!(n.$&1));s()}}}const o=e.H;const l=()=>qt(e,true);if(o&&o["s-rc"]){o["s-rc"].push(l)}else{l()}};const oe=(t,e)=>{{Yt(t,"connectedCallback",undefined,e)}};const le=t=>{if((ke.$&1)===0){const e=pe(t);const n=e.C;const s=d("connectedCallback",n.M);if(!(e.$&1)){e.$|=1;let s;{s=t.getAttribute(g);if(s){if(n.$&1){const e=yt(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}else if(n.$&2){let e=Ot(n);t["s-sc"]=e}ct(t,n.M,s,e)}}if(!s){if(n.$&(4|8)){fe(t)}}{let n=t;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Bt(e,e.H=n);break}}}if(n.F){Object.entries(n.F).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{ie(t,e,n)}}else if(e){ae(t,e,n.V);oe(e.U)}s()}};const fe=t=>{const e=t["s-cr"]=Ee.createComment("");e["s-cn"]=true;if(!!t.firstChild)t.insertBefore(e,t.firstChild);else t.appendChild(e)};const ce=t=>{if((ke.$&1)===0){const e=pe(t);const n=e.U;{if(e.G){e.G.map((t=>t()));e.G=undefined}}{Yt(n,"disconnectedCallback",undefined,t)}}};const re=(t,e={})=>{var n;const s=d();const i=[];const o=e.exclude||[];const l=_e.customElements;const f=Ee.head;const c=f.querySelector("meta[charset]");const r=Ee.createElement("style");const u=[];const a=Ee.querySelectorAll(`[${j}]`);let h;let b=true;Object.assign(ke,e);ke.t=new URL(e.resourcesUrl||"./",Ee.baseURI).href;{ke.$|=2}t.map((t=>{t[1].map((n=>{const s={$:n[0],M:n[1],F:n[2],V:n[3]};{s.F=n[2]}{s.V=n[3]}{s.I=[]}{s.B={}}const f=e.transformTagName?e.transformTagName(s.M):s.M;const c=class extends HTMLElement{constructor(t){super(t);t=this;{const e=Ot(s,ht(t));const n=Array.from(a).find((t=>t.getAttribute(j)===e));if(n){if(s.$&1){jt(e,wt(n.innerHTML),true)}else{jt(e,n.innerHTML,false)}}}je(t,s);if(s.$&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(b){u.push(this)}else{ke.jmp((()=>le(this)))}}disconnectedCallback(){ke.jmp((()=>ce(this)))}componentOnReady(){return pe(this).J}};if(s.$&4||s.$&8){U(c.prototype);{A(c.prototype)}}s.K=t[0];if(!o.includes(f)&&!l.get(f)){i.push(f);l.define(f,se(c,s,1))}}))}));{r.innerHTML=i+v;r.setAttribute("data-styles","");const t=(n=ke.k)!==null&&n!==void 0?n:E(Ee);if(t!=null){r.setAttribute("nonce",t)}f.insertBefore(r,c?c.nextSibling:f.firstChild)}b=false;if(u.length){u.map((t=>t.connectedCallback()))}else{{ke.jmp((()=>h=setTimeout(Xt,30)))}}s()};const ue=(t,e)=>e;const ae=(t,e,n,s)=>{if(n){n.map((([n,s,i])=>{const o=he(t,n);const l=de(e,i);const f=be(n);ke.ael(o,s,l,f);(e.G=e.G||[]).push((()=>ke.rel(o,s,l,f)))}))}};const de=(t,e)=>n=>{try{{if(t.$&256){t.U[e](n)}else{(t.A=t.A||[]).push([e,n])}}}catch(e){ve(e,t.S||null)}};const he=(t,e)=>{if(e&8)return _e;if(e&16)return Ee.body;return t};const be=t=>(t&2)!==0;const $e=t=>ke.k=t;const me=new WeakMap;const pe=t=>me.get(t);const ge=(t,e)=>me.set(e.U=t,e);const je=(t,e)=>{const n={$:0,S:t,C:e,W:new Map};{n.q=new Promise((t=>n.D=t))}{n.J=new Promise((t=>n.P=t));t["s-p"]=[];t["s-rc"]=[]}ae(t,n,e.V);return me.set(t,n)};const ye=(t,e)=>e in t;const ve=(t,e)=>(0,console.error)(t,e);const Oe=new Map;const we=(t,e,n)=>{const s=t.M.replace(/-/g,"_");const i=t.K;const o=Oe.get(i);if(o){return o[s]}
|
4
|
+
const t="nano-components";let e;let n;let s;let i=false;let o=false;let l=false;let f=false;let c=null;let r=false;const u={isDev:false,isBrowser:true,isServer:false,isTesting:false};const a=t=>{const e=new URL(t,ke.t);return e.origin!==_e.location.origin?e.href:e.pathname};const d=(t,e="")=>{{return()=>{}}};const h=(t,e)=>{{return()=>{}}};const b="r";const $="o";const m="s";const p="t";const g="s-id";const j="sty-id";const y="c-id";const v="{visibility:hidden}.hydrated{visibility:inherit}";const O="sf-id";const w="http://www.w3.org/1999/xlink";const S={};const x=t=>t!=null;const _=t=>{t=typeof t;return t==="object"||t==="function"};function E(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const T=(t,e,...n)=>{let s=null;let i=null;let o=null;let l=false;let f=false;const c=[];const r=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){r(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!_(s)){s=String(s)}if(l&&f){c[c.length-1].i+=s}else{c.push(l?k(null,s):s)}f=l}}};r(n);if(e){if(e.key){i=e.key}if(e.name){o=e.name}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,c,N)}const u=k(t,null);u.o=e;if(c.length>0){u.l=c}{u.u=i}{u.h=o}return u};const k=(t,e)=>{const n={$:0,m:t,i:e,p:null,l:null};{n.o=null}{n.u=null}{n.h=null}return n};const C={};const M=t=>t&&t.m===C;const N={forEach:(t,e)=>t.map(L).forEach(e),map:(t,e)=>t.map(L).map(e).map(I)};const L=t=>({vattrs:t.o,vchildren:t.l,vkey:t.u,vname:t.h,vtag:t.m,vtext:t.i});const I=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return T(t.vtag,e,...t.vchildren||[])}const e=k(t.vtag,t.vtext);e.o=t.vattrs;e.l=t.vchildren;e.u=t.vkey;e.h=t.vname;return e};const R=(t,e)=>{if(!t["s-hsf"]||!t.parentNode)return;let n=t.parentNode.__childNodes||t.parentNode.childNodes;let s;const i=n.length;let o=0;for(o;o<i;o++){s=n[o];if(s["s-sr"]&&e&&s["s-psn"]===t["s-sn"]){R(s,true);continue}if(s["s-sn"]!==t["s-sn"])continue;if(s.nodeType===1&&s["s-sf"]){s.hidden=e;s.style.display=e?"none":""}else if(!!s["s-sfc"]){if(e){s["s-sfc"]=s.textContent||undefined;s.textContent=""}else if(!s.textContent||s.textContent.trim()===""){s.textContent=s["s-sfc"]}}}};const H=t=>{if(!t)return;const e=t.__childNodes||t.childNodes;let n;let s;let i;let o;let l;let f;for(s=0,i=e.length;s<i;s++){if(e[s]["s-sr"]){l=e[s]["s-sn"];n=e[s];R(n,false);for(o=0;o<i;o++){f=e[o].nodeType;if(e[o]["s-sf"])continue;if(e[o]["s-hn"]!==n["s-hn"]||l!==""){if(f===1&&l===e[o]["s-sn"]){R(n,true);nt(e[o]);break}}else if(e[o]["s-sn"]===l){if(f===1||f===3&&e[o]&&e[o].textContent&&e[o].textContent.trim()!==""){R(n,true);nt(e[o]);break}}}}H(e[s])}};const U=t=>{P(t);B(t);q(t);z(t);V(t);J(t);K(t);Q(t);G(t);D(t);W(t);F(t)};const A=t=>{t.__cloneNode=t.cloneNode;t.cloneNode=function(e){const n=this;const s=t.__cloneNode.call(n,false);if(e){let t=0;let e,i;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-sf","s-sfc","s-hsf"];for(;t<n.__childNodes.length;t++){e=n.__childNodes[t]["s-nr"];i=o.every((e=>!n.__childNodes[t][e]));if(e){s.__appendChild(e.cloneNode(true))}if(i){s.__appendChild(n.__childNodes[t].cloneNode(true))}}}return s}};const P=t=>{if(!globalThis.Node)return;class e extends Array{item(t){return this[t]}}let n=Object.getOwnPropertyDescriptor(Node.prototype,"childNodes");if(!n){n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Node.prototype),"childNodes")}if(n)Object.defineProperty(t,"__childNodes",n);let s=Object.getOwnPropertyDescriptor(Element.prototype,"children");if(s)Object.defineProperty(t,"__children",s);const i=Object.getOwnPropertyDescriptor(Element.prototype,"childElementCount");if(i)Object.defineProperty(t,"__childElementCount",i);Object.defineProperty(t,"children",{get(){return this.childNodes.map((t=>{if(t.nodeType===1)return t;else return null})).filter((t=>!!t))}});Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}});Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}});Object.defineProperty(t,"childElementCount",{get(){return t.children.length}});if(!n)return;Object.defineProperty(t,"childNodes",{get(){const t=this.__childNodes;const n=new e;for(let e=0;e<t.length;e++){const s=t[e]["s-nr"];if(s&&(s.nodeType!==8||s.nodeValue.indexOf($+".")!==0)){n.push(s)}}return n}})};const D=t=>{if(!globalThis.Element)return;let e=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML");if(!e)e=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML");if(e)Object.defineProperty(t,"__innerHTML",e);Object.defineProperty(t,"innerHTML",{get:function(){let t="";this.childNodes.forEach((e=>t+=e.outerHTML||e.textContent));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const W=t=>{if(!globalThis.Element)return;let e=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");if(!e)e=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerText");if(e)Object.defineProperty(t,"__innerText",e);Object.defineProperty(t,"innerText",{get:function(){let t="";this.childNodes.forEach((e=>{if(e.innerText)t+=e.innerText;else if(e.textContent)t+=e.textContent.trimEnd()}));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const F=t=>{if(!globalThis.Node)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"textContent");if(e)Object.defineProperty(t,"__textContent",e);Object.defineProperty(t,"textContent",{get:function(){let t="";this.childNodes.forEach((e=>t+=e.textContent||""));return t},set:function(t){this.childNodes.forEach((t=>{if(t["s-ol"])t["s-ol"].remove();t.remove()}));this.insertAdjacentHTML("beforeend",t)}})};const B=t=>{if(t.__insertBefore)return;t.__insertBefore=t.insertBefore;t.insertBefore=function(t,e){const n=t["s-sn"]=ot(t);const s=lt(this.__childNodes,n);if(s){let i=false;this.childNodes.forEach((o=>{if(o===e||e===null){i=true;it(t,s);if(e===null){this.__append(t);return}if(n===e["s-sn"]){const n=e.parentNode.__insertBefore||e.parentNode.insertBefore;n.call(e.parentNode,t,e);nt(t)}else{this.__append(t)}return}}));if(i){return t}}return this.__insertBefore(t,e)}};const q=t=>{if(t.__appendChild)return;t.__appendChild=t.appendChild;t.appendChild=function(t){const e=t["s-sn"]=ot(t);const n=lt(this.__childNodes||this.childNodes,e);if(n){it(t,n);const e=ft(n);const s=e[e.length-1];if(s.parentNode){const e=s.parentNode;e.__insertBefore?e.__insertBefore(t,s.nextSibling):e.insertBefore(t,s.nextSibling);nt(t)}if(n["s-hsf"]){H(n.parentNode)}return t}if(t.nodeType===1&&!!t.getAttribute("slot")&&this.__childNodes)t.hidden=true;return this.__appendChild(t)}};const V=t=>{if(t.__prepend)return;t.__prepend=t.prepend;t.prepend=function(...t){t.forEach((t=>{if(typeof t==="string"){t=this.ownerDocument.createTextNode(t)}const e=t["s-sn"]=ot(t);const n=lt(this.__childNodes,e);if(n){it(t,n);const e=ft(n);const s=e[0];if(s.parentNode){s.parentNode.insertBefore(t,s.nextSibling);nt(t)}if(n["s-hsf"]){H(n.parentNode)}return}if(t.nodeType===1&&!!t.getAttribute("slot")&&this.__childNodes)t.hidden=true;return this.__prepend(t)}))}};const z=t=>{if(t.__append)return;t.__append=t.append;t.append=function(...t){t.forEach((t=>{if(typeof t==="string"){t=this.ownerDocument.createTextNode(t)}this.appendChild(t)}))}};const G=t=>{if(t.__replaceChildren)return;t.__replaceChildren=t.replaceChildren;t.replaceChildren=function(...t){const e=lt(this.__childNodes,"");if(e){const n=ft(e);n.forEach((t=>{if(!t["s-sr"]){t.remove()}}));this.append(...t)}}};const J=t=>{if(t.__insertAdjacentHTML)return;t.__insertAdjacentHTML=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,e){if(t!=="afterbegin"&&t!=="beforeend"){return this.__insertAdjacentHTML(t,e)}const n=this.ownerDocument.createElement("_");let s;n.innerHTML=e;if(t==="afterbegin"){while(s=n.firstChild){this.prepend(s)}}else if(t==="beforeend"){while(s=n.firstChild){this.append(s)}}}};const K=t=>{if(t.__insertAdjacentText)return;t.__insertAdjacentText=t.insertAdjacentText;t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}};const Q=t=>{if(t.__insertAdjacentElement)return;t.__insertAdjacentElement=t.insertAdjacentElement;t.insertAdjacentElement=function(t,e){if(t!=="afterbegin"&&t!=="beforeend"){return this.__insertAdjacentElement(t,e)}if(t==="afterbegin"){this.prepend(e)}else if(t==="beforeend"){this.append(e)}}};const X=t=>{if(!t||t.__nextSibling||!globalThis.Node)return;Y(t);tt(t);Z(t);et(t)};const Y=t=>{if(!t||t.__nextSibling)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling");if(e)Object.defineProperty(t,"__nextSibling",e);else{t.__nextSibling=t.nextSibling||true}Object.defineProperty(t,"nextSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.childNodes;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n+1]}return this.__nextSibling}})};const Z=t=>{if(!t||t.__nextElementSibling||!t.nextSiblingElement)return;const e=Object.getOwnPropertyDescriptor(Element.prototype,"nextElementSibling");if(e)Object.defineProperty(t,"__nextElementSibling",e);else{t.__nextElementSibling=t.nextSiblingElement||true}Object.defineProperty(t,"nextElementSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.children;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n+1]}return this.__nextElementSibling}})};const tt=t=>{if(!t||t.__previousSibling)return;const e=Object.getOwnPropertyDescriptor(Node.prototype,"previousSibling");if(e)Object.defineProperty(t,"__previousSibling",e);else{t.__previousSibling=t.previousSibling||true}Object.defineProperty(t,"previousSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.childNodes;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n-1]}return this.__previousSibling}})};const et=t=>{if(!t||t.__previousElementSibling||!t.previousElementSibling)return;const e=Object.getOwnPropertyDescriptor(Element.prototype,"previousElementSibling");if(e)Object.defineProperty(t,"__previousElementSibling",e);else{t.__previousElementSibling=t.previousSiblingElement||true}Object.defineProperty(t,"previousElementSibling",{get:function(){var t;const e=(t=this["s-ol"])===null||t===void 0?void 0:t.parentNode.children;const n=e===null||e===void 0?void 0:e.indexOf(this);if(e&&n>-1){return e[n-1]}return this.__previousElementSibling}})};const nt=t=>{if(!t||t.__remove)return;t.__remove=t.remove||true;st(t.parentNode);t.remove=function(){if(this.parentNode){return this.parentNode.removeChild(this)}return this.__remove()}};const st=t=>{if(!t||t.__removeChild)return;t.__removeChild=t.removeChild;t.removeChild=function(t){if(t&&typeof t["s-sn"]!=="undefined"){const e=lt(this.__childNodes||this.childNodes,t["s-sn"]);t.parentElement.__removeChild(t);if(e&&e["s-hsf"]){H(e.parentElement)}return}return this.__removeChild(t)}};const it=(t,e)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const n=document.createTextNode("");n["s-nr"]=t;if(e["s-cr"]&&e["s-cr"].parentNode){const t=e["s-cr"].parentNode.__appendChild||e["s-cr"].parentNode.appendChild;t.call(e["s-cr"].parentNode,n)}t["s-ol"]=n};const ot=t=>t["s-sn"]||t.nodeType===1&&t.getAttribute("slot")||t.slot||"";const lt=(t,e)=>{let n=0;let s;if(!t)return null;for(;n<t.length;n++){s=t[n];if(s["s-sr"]&&s["s-sn"]===e){return s}s=lt(s.childNodes,e);if(s){return s}}return null};const ft=t=>{const e=[t];const n=t["s-sn"]||"";while((t=t.nextSibling)&&t["s-sn"]===n){e.push(t)}return e};const ct=(t,e,n,s)=>{const i=d("hydrateClient",e);const o=t.shadowRoot;const l=[];const f=[];const c=[];const r=o?[]:null;let u=k(e,null);u.p=t;if(!ke.g){ut(Ee.body,ke.g=new Map)}t[g]=n;t.removeAttribute(g);s.j=rt(u,l,f,r,t,t,n,c);let a=0;const h=l.length;let b;for(a;a<h;a++){b=l[a];const n=b.v+"."+b.O;const s=ke.g.get(n);const i=b.p;if(!o){i["s-hn"]=e.toUpperCase();if(b.m==="slot"){i["s-cr"]=t["s-cr"]}}if(s&&s.isConnected){if(o&&s["s-en"]===""){s.parentNode.insertBefore(i,s.nextSibling)}s.parentNode.removeChild(s)}ke.g.delete(n)}const $=[];let m=0;const p=c.length;let j;let y;let v;let O;for(m;m<p;m++){j=c[m];if(!j||!j.length)continue;v=j.length;y=0;for(y;y<v;y++){O=j[y];if(!$[O.hostId]){$[O.hostId]=ke.g.get(O.hostId)}if(!$[O.hostId])continue;const t=$[O.hostId];if(!t.shadowRoot||!o){O.slot["s-cr"]=t["s-cr"];if(!O.slot["s-cr"]&&t.shadowRoot){O.slot["s-cr"]=t}else{const e=t.__childNodes||t.childNodes;O.slot["s-cr"]=e[0]}it(O.node,O.slot);X(O.node)}if(t.shadowRoot){t.appendChild(O.node)}}}if(o){let e=0;const n=r.length;for(e;e<n;e++){o.appendChild(r[e])}Array.from(t.childNodes).forEach((t=>{if(t.nodeType===8&&typeof t["s-sn"]!=="string"){t.parentNode.removeChild(t)}}))}s.S=t;i()};const rt=(t,e,n,s,i,o,l,f=[])=>{let c;let r;let u;let a;const d=i["s-sc"];if(o.nodeType===1){c=o.getAttribute(y);if(c){r=c.split(".");if(r[0]===l||r[0]==="0"){u=at({v:r[0],O:r[1],_:r[2],T:r[3],m:o.tagName.toLowerCase(),p:o,o:{class:o.className}});e.push(u);o.removeAttribute(y);if(!t.l){t.l=[]}const l=u.p.getAttribute("s-sn");if(typeof l==="string"){u.p["s-sn"]=l;u.p.removeAttribute("s-sn")}const f=u.p.getAttribute(O);if(f){u.p.removeAttribute(O);const t=n.find((t=>t.p["s-sn"]===u.p["s-sn"]||t.h===u.p["s-sn"]));if(t){u.p["s-sf"]=true;u.p["s-hn"]=i.tagName;t.l=t.l||[];t.l[u.T]=u;if(t.p.nodeType===1){t.p.appendChild(u.p)}}}else if(u.T!==undefined){t.l[u.T]=u}if(d)o["s-si"]=d;t=u;if(s&&u._==="0"&&!f){s[u.T]=u.p}}}const h=o.__childNodes||o.childNodes;for(a=h.length-1;a>=0;a--){rt(t,e,n,s,i,h[a],l,f)}if(o.shadowRoot){for(a=o.shadowRoot.childNodes.length-1;a>=0;a--){rt(t,e,n,s,i,o.shadowRoot.childNodes[a],l,f)}}}else if(o.nodeType===8){r=o.nodeValue.split(".");if(r[1]===l||r[1]==="0"){c=r[0];u=at({v:r[1],O:r[2],_:r[3],T:r[4]||"0",p:o});if(c===p){let f=u.p=o.nextSibling;if(u.p&&u.p.nodeType===3){u.i=u.p.textContent;e.push(u);o.remove();if(r[5]==="1"){f["s-sf"]=true;f["s-sn"]=r[6]||"";f["s-sfc"]=f.textContent;f["s-hn"]=i.tagName;const t=n.find((t=>t.p["s-sn"]===f["s-sn"]||t.h===f["s-sn"]));if(t){t.l=t.l||[];t.l[u.T]=u;if(t.p.nodeType===1){t.p.appendChild(f)}}}else{if(l===u.v){if(!t.l){t.l=[]}t.l[u.T]=u}if(s&&u._==="0"){s[u.T]=u.p}}}}else if(u.v===l){if(c===m){u.m="slot";t.o=undefined;const i=o["s-sn"]=u.h=r[5]||"";o["s-sr"]=true;if(r[6]==="1"){o["s-hsf"]=true}if(r[7]==="1"){let t=o.previousSibling;while(!!t&&t.nodeType!==8){t=t.previousSibling}o["s-sfc"]=t.nodeValue}const l=(t===null||t===void 0?void 0:t.p)?t.p["s-id"]||t.p.getAttribute("s-id"):"";if(s){const e=u.p=Ee.createElement(u.m);if(u.h){u.p.setAttribute("name",i)}if(l&&l!==u.v){t.p.insertBefore(e,t.p.children[0])}else{o.parentNode.insertBefore(u.p,o)}dt(f,r[2],i,o,u.v);o.remove();if(u._==="0"){s[u.T]=u.p}}else{const n=u.p;const s=l&&l!==u.v&&t.p.shadowRoot;dt(f,r[2],i,o,s?l:u.v);if(s){t.p.insertBefore(n,t.p.children[0])}e.push(u)}n.push(u);if(!t.l){t.l=[]}t.l[u.T]=u}else if(c===b){if(s){o.remove()}else{i["s-cr"]=o;o["s-cn"]=true}}}}}else if(t&&t.m==="style"){const e=k(null,o.textContent);e.p=o;e.T="0";t.l=[e]}return t};const ut=(t,e)=>{if(t.nodeType===1){const n=t[g]||t.getAttribute(g);if(n){e.set(n,t)}let s=0;const i=t.__childNodes||t.childNodes;for(;s<i.length;s++){ut(i[s],e)}if(t.shadowRoot){for(s=0;s<t.shadowRoot.childNodes.length;s++){ut(t.shadowRoot.childNodes[s],e)}}}else if(t.nodeType===8){const n=t.nodeValue.split(".");if(n[0]===$){e.set(n[1]+"."+n[2],t);t["s-en"]=n[3]}}};const at=t=>{const e={$:0,v:null,O:null,_:null,T:"0",p:null,o:null,l:null,u:null,h:null,m:null,i:null};return Object.assign(Object.assign({},e),t)};const dt=(t,e,n,s,i)=>{let o=s.nextSibling;t[e]=t[e]||[];while(o&&(o["s-sn"]===n||n===""&&!o["s-sn"]&&(o.nodeType===8&&o.nodeValue.indexOf(".")!==1||o.nodeType===3))&&!o["s-sf"]){o["s-sn"]=n;t[e].push({slot:s,node:o,hostId:i});o=o.nextSibling}};const ht=t=>xe.map((e=>e(t))).find((t=>!!t));const bt=(t,e)=>{if(t!=null&&!_(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const $t=t=>pe(t).S;const mt=(t,e,n)=>{const s=$t(t);return{emit:t=>pt(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const pt=(t,e,n)=>{const s=ke.ce(e,n);t.dispatchEvent(s);return s};const gt=new WeakMap;const jt=(t,e,n)=>{let s=Se.get(t);if(Me&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}Se.set(t,s)};const yt=(t,e,n,s)=>{var i;let o=Ot(e);const l=Se.get(o);t=t.nodeType===11?t:Ee;if(l){if(typeof l==="string"){t=t.head||t;let e=gt.get(t);let n;if(!e){gt.set(t,e=new Set)}if(!e.has(o)){if(t.host&&(n=t.querySelector(`[${j}="${o}"]`))){n.innerHTML=l}else{{n=Ee.createElement("style");n.innerHTML=l}const e=(i=ke.k)!==null&&i!==void 0?i:E(Ee);if(e!=null){n.setAttribute("nonce",e)}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(o)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return o};const vt=t=>{const e=t.C;const n=t.S;const s=e.$;const i=d("attachStyles",e.M);const o=yt(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}i()};const Ot=(t,e)=>"sc-"+t.M;const wt=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{");const St=(t,e,n,s,i,o)=>{if(n!==s){let l=ye(t,e);let f=e.toLowerCase();if(e==="class"){const e=t.classList;const i=_t(n);const o=_t(s);if(t["s-si"]&&o.indexOf(t["s-si"])<0){o.push(t["s-si"])}e.remove(...i.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!i.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!l&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(ye(_e,f)){e=f.slice(2)}else{e=f[2]+e.slice(3)}if(n){ke.rel(t,e,n,false)}if(s){ke.ael(t,e,s,false)}}else{const c=_(s);if((l||c&&s!==null)&&!i){try{if(!t.tagName.includes("-")){const i=s==null?"":s;if(e==="list"){l=false}else if(n==null||t[e]!=i){t[e]=i}}else{t[e]=s}}catch(t){}}let r=false;{if(f!==(f=f.replace(/^xlink\:?/,""))){e=f;r=true}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){if(r){t.removeAttributeNS(w,e)}else{t.removeAttribute(e)}}}else if((!l||o&4||i)&&!c){s=s===true?"":s;if(r){t.setAttributeNS(w,e,s)}else{t.setAttribute(e,s)}}}}};const xt=/\s/;const _t=t=>!t?[]:t.split(xt);const Et=(t,e,n,s)=>{const i=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.o||S;const l=e.o||S;{for(s in o){if(!(s in l)){St(i,s,o[s],undefined,n,e.$)}}}for(s in l){St(i,s,o[s],l[s],n,e.$)}};const Tt=(t,o,c,r)=>{const u=o.l[c];let a=0;let d;let h;let b;if(!i){l=true;if(u.m==="slot"){if(e){r.classList.add(e+"-s")}u.$|=u.l?2:1}}if(u.i!==null){d=u.p=Ee.createTextNode(u.i)}else if(u.$&(1|2)){d=u.p=Ee.createTextNode("")}else{d=u.p=Ee.createElement(u.m);{Et(null,u,f)}if(x(e)&&d["s-si"]!==e){d.classList.add(d["s-si"]=e)}if(u.l){for(a=0;a<u.l.length;++a){h=Tt(t,u,a,d);if(h){d.__appendChild?d.__appendChild(h):d.appendChild(h)}}}}{d["s-hn"]=s;if(u.$&(2|1)){d["s-sr"]=true;d["s-cr"]=n;d["s-sn"]=u.h||"";if(o.h){d["s-psn"]=o.h}if(u.$&2){if(u.l){for(a=0;a<u.l.length;++a){let e=d.nodeType===1?d:r;while(e.nodeType!==1){e=e.parentNode}h=Tt(t,u,a,e);h["s-sf"]=d["s-hsf"]=true;if(typeof h["s-sn"]==="undefined"){h["s-sn"]=u.h||""}if(h.nodeType===3){h["s-sfc"]=h.textContent}if(h&&(!t||!t.l)){e.appendChild(h)}}}if(t&&t.l)Ut(t,u)}b=t&&t.l&&t.l[c];if(b&&b.m===u.m&&t.p){kt(t.p,false)}}}return d};const kt=(t,e)=>{ke.$|=1;const n=t.__childNodes||t.childNodes;for(let t=n.length-1;t>=0;t--){const i=n[t];if(i["s-hn"]!==s&&i["s-ol"]){Ht(i).insertBefore(i,Rt(i));i["s-ol"].remove();i["s-ol"]=undefined;l=true}if(e){kt(i,e)}}ke.$&=~1};const Ct=(t,e,n,i,o,l)=>{let f=t["s-cr"]&&t["s-cr"].parentNode||t;let c;if(f.shadowRoot&&f.tagName===s){f=f.shadowRoot}for(;o<=l;++o){if(i[o]){c=Tt(null,n,o,t);if(c){i[o].p=c;f.insertBefore(c,Rt(e))}}}};const Mt=t=>{const e=t.__childNodes||t.childNodes;let n;let s;let i;for(s=0,i=e.length;s<i;s++){n=e[s];if(n["s-ol"]){if(n["s-hn"])n["s-hn"]=undefined}else{Mt(n)}}};const Nt=(t,e,n,s,i)=>{for(;e<=n;++e){if(s=t[e]){i=s.p;Wt(s);{o=true;Mt(i);if(i["s-ol"]){i["s-ol"].remove()}else{kt(i,true)}}i.remove()}}};const Lt=(t,e,n,s)=>{const i=[];const l={};let f=0;let c=0;let r=0;let u=0;let a=0;let d=e.length-1;let h=e[0];let b=e[d];let $=s.length-1;let m=s[0];let p=s[$];let g;let j;let y;let v;let O;let w;let S;let x;let _;while(f<=d&&c<=$){if(h==null){h=e[++f]}else if(b==null){b=e[--d]}else if(m==null){m=s[++c]}else if(p==null){p=s[--$]}else if(It(h,m)){Ut(h,m);h=e[++f];m=s[++c]}else if(It(b,p)){Ut(b,p);b=e[--d];p=s[--$]}else if(It(h,p)){if(h.m==="slot"||p.m==="slot"){kt(h.p.parentNode,false)}Ut(h,p);t.insertBefore(h.p,b.p.nextSibling);h=e[++f];p=s[--$]}else if(It(b,m)){if(h.m==="slot"||p.m==="slot"){kt(b.p.parentNode,false)}Ut(b,m);t.insertBefore(b.p,h.p);b=e[--d];m=s[++c]}else{r=-1;{for(u=f;u<=d;++u){if(e[u]&&e[u].u!==null&&e[u].u===m.u){r=u;break}}}if(r>=0){j=e[r];if(j.m!==m.m){g=Tt(e&&e[c],n,r,t)}else{Ut(j,m);e[r]=undefined;g=j.p}m=s[++c]}else{g=Tt(e&&e[c],n,c,t);m=s[++c]}if(g){{Ht(h.p).insertBefore(g,Rt(h.p))}}}}if(f>d){Ct(t,s[$+1]==null?null:s[$+1].p,n,s,c,$)}else if(c>$){Nt(e,f,d)}if(t.parentNode&&n.p["s-hsf"]){y=t.parentNode.__childNodes||t.parentNode.childNodes;v=y.length-1;for(u=0;u<=v;++u){S=y[u];if(S["s-hsf"]){i.push(S);continue}if(S["s-sf"]){if(!l[S["s-sn"]])l[S["s-sn"]]=[];l[S["s-sn"]].push(S)}}O=i.length-1;for(u=0;u<=O;++u){x=i[u];if(typeof l[x["s-sn"]]==="undefined")continue;w=l[x["s-sn"]].length-1;for(a=0;a<=w;++a){_=l[x["s-sn"]][a];x.parentNode.insertBefore(_,x)}}o=true}};const It=(t,e)=>{if(t.m===e.m){if(t.m==="slot"){return t.h===e.h}{return t.u===e.u}}return false};const Rt=t=>t&&t["s-ol"]||t;const Ht=t=>(t["s-ol"]?t["s-ol"]:t).parentNode;const Ut=(t,e)=>{const n=e.p=t.p;const s=t.l;const i=e.l;const o=e.m;const l=e.i;let c;if(l===null){{if(o==="slot");else{Et(t,e,f)}}if(s!==null&&i!==null){Lt(n,s,e,i)}else if(i!==null){if(t.i!==null){n.textContent=""}Ct(n,null,e,i,0,i.length-1)}else if(s!==null){Nt(s,0,s.length-1)}}else if(c=n["s-cr"]){c.parentNode.textContent=l}else if(t.i!==l){n.textContent=l;if(n["s-sf"]){n["s-sfc"]=l}}};const At=[];const Pt=t=>{let e;let n;let s;let i;let l;let f;let c=0;const r=t.__childNodes||t.childNodes;const u=r.length;for(;c<u;c++){e=r[c];if(e["s-sr"]&&(n=e["s-cr"])&&n.parentNode){if(e["s-hsf"]){o=true}s=n.parentNode.__childNodes||n.parentNode.childNodes;i=e["s-sn"];for(f=s.length-1;f>=0;f--){n=s[f];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==e["s-hn"]){if(Dt(n,i)){l=At.find((t=>t.N===n));o=true;n["s-sn"]=n["s-sn"]||i;if(l){l.L=e}else{At.push({L:e,N:n})}if(n["s-sr"]){At.map((t=>{if(Dt(t.N,n["s-sn"])){l=At.find((t=>t.N===n));if(l&&!t.L){t.L=l.L}}}))}}else if(!At.some((t=>t.N===n))){At.push({N:n})}}}}if(e.nodeType===1){Pt(e)}}};const Dt=(t,e)=>{if(t.nodeType===1){if(t.getAttribute("slot")===null&&e===""){return true}if(t.getAttribute("slot")===e){return true}return false}if(t["s-sn"]===e){return true}return e===""};const Wt=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.l&&t.l.map(Wt)}};const Ft=(t,f)=>{const c=t.S;const r=t.C;const u=t.j||k(null,null);const a=M(f)?f:T(null,null,f);s=c.tagName;if(r.I){a.o=a.o||{};r.I.map((([t,e])=>a.o[e]=c[t]))}a.m=null;a.$|=4;t.j=a;a.p=u.p=c.shadowRoot||c;{e=c["s-sc"]}{n=c["s-cr"];i=(r.$&1)!==0;o=false}Ut(u,a);{ke.$|=1;if(l){Pt(a.p);let t;let e;let n;let s;let i;let o;let l;let f=0;for(;f<At.length;f++){t=At[f];e=t.N;if(!e["s-ol"]){n=Ee.createTextNode("");n["s-nr"]=e;e.parentNode.insertBefore(e["s-ol"]=n,e)}}for(f=0;f<At.length;f++){t=At[f];e=t.N;if(t.L){s=t.L.parentNode;i=t.L.__nextSibling||t.L.nextSibling;n=e["s-ol"];l=i;while(n=n.__previousSibling||n.previousSibling){o=n["s-nr"];if(o&&o["s-sn"]===e["s-sn"]&&s===o.parentNode){o=o.__nextSibling||o.nextSibling;if(!o||!o["s-nr"]){i=o;break}}}if(!i&&s!==e.parentNode||(e.__nextSibling||e.nextSibling)!==i){if(e!==i){if(!e["s-hn"]&&e["s-ol"]){e["s-hn"]=e["s-ol"].parentNode.nodeName}s.insertBefore(e,i);e.hidden=false}else{s.insertBefore(e,l)}}}else{if(e.nodeType===1){e.hidden=true}}}}if(o){H(a.p)}ke.$&=~1;At.length=0}};const Bt=(t,e)=>{if(e&&!t.R&&e["s-p"]){e["s-p"].push(new Promise((e=>t.R=e)))}};const qt=(t,e)=>{{t.$|=16}if(t.$&4){t.$|=512;return}Bt(t,t.H);const n=()=>Vt(t,e);return Pe(n)};const Vt=(t,e)=>{const n=t.S;const s=d("scheduleUpdate",t.C.M);const i=t.U;let o;if(e){{t.$|=256;if(t.A){t.A.map((([t,e])=>Yt(i,t,e,n)));t.A=null}}{o=Yt(i,"componentWillLoad",undefined,n)}}{o=Zt(o,(()=>Yt(i,"componentWillRender",undefined,n)))}s();return Zt(o,(()=>zt(t,i,e)))};const zt=async(t,e,n)=>{const s=t.S;const i=d("update",t.C.M);const o=s["s-rc"];if(n){vt(t)}const l=d("render",t.C.M);{Gt(t,e)}if(o){o.map((t=>t()));s["s-rc"]=undefined}l();i();{const e=s["s-p"];const n=()=>Kt(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.$|=4;e.length=0}}};const Gt=(t,e,n)=>{try{c=e;e=e.render();{t.$&=~16}{t.$|=2}{{{Ft(t,e)}}}}catch(e){ve(e,t.S)}c=null;return null};const Jt=()=>c;const Kt=t=>{const e=t.C.M;const n=t.S;const s=d("postUpdate",e);const i=t.U;const o=t.H;{Yt(i,"componentDidRender",undefined,n)}if(!(t.$&64)){t.$|=64;{te(n)}{Yt(i,"componentDidLoad",undefined,n)}s();{t.P(n);if(!o){Xt()}}}else{{Yt(i,"componentDidUpdate",undefined,n)}s()}{t.D(n)}{if(t.R){t.R();t.R=undefined}if(t.$&512){Ue((()=>qt(t,false)))}t.$&=~(4|512)}};const Qt=t=>{{const e=pe(t);const n=e.S.isConnected;if(n&&(e.$&(2|16))===2){qt(e,false)}return n}};const Xt=e=>{{te(Ee.documentElement)}Ue((()=>pt(_e,"appload",{detail:{namespace:t}})))};const Yt=(t,e,n,s)=>{if(t&&t[e]){try{return t[e](n)}catch(t){ve(t,s)}}return undefined};const Zt=(t,e)=>t&&t.then?t.then(e):e();const te=t=>t.classList.add("hydrated");const ee=(t,e)=>pe(t).W.get(e);const ne=(t,e,n,s,i=true)=>{const o=pe(t);const l=o.S;const f=o.W.get(e);const c=o.$;const r=o.U;n=bt(n,s.F[e][0]);const u=Number.isNaN(f)&&Number.isNaN(n);const a=n!==f&&!u;if((!(c&8)||f===undefined)&&a){o.W.set(e,n);if(r){if(s.B&&c&128&&i){const t=s.B[e];if(t){t.map((t=>{try{r[t](n,f,e)}catch(t){ve(t,l)}}))}}if((c&(2|16))===2){if(r.componentShouldUpdate){if(r.componentShouldUpdate(n,f,e)===false){return}}qt(o,false)}}}};const se=(t,e,n)=>{if(e.F){if(t.watchers){e.B=t.watchers}const s=Object.entries(e.F);const i=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){if((s&2048)===0){Object.defineProperty(i,t,{get(){return ee(this,t)},set(n){ne(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&2048){{Object.defineProperty(i,t,{get(){const e=pe(this);const n=e?e.U:i;if(!n)return;return n[t]},configurable:true,enumerable:true})}}if(s&4096){const n=Object.getOwnPropertyDescriptor(i,t).set;Object.defineProperty(i,t,{set(s){const i=pe(this);if(n){n.apply(this,[s]);ne(this,t,i.S[t],e);return}if(!i)return;const o=(n=false)=>{i.U[t]=s;ne(this,t,i.U[t],e,!n)};if(i.U){o()}else{i.q.then((()=>o(true)))}}})}}else if(n&1&&s&64){Object.defineProperty(i,t,{value(...e){const n=pe(this);return n.q.then((()=>n.U[t](...e)))}})}}));if(n&1){const n=new Map;i.attributeChangedCallback=function(t,e,s){ke.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(i.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}const o=Object.getOwnPropertyDescriptor(i,e);if(!o.get||!!o.set){this[e]=s===null&&typeof this[e]==="boolean"?false:s}}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,s])=>{const i=s[1]||t;n.set(i,t);if(s[0]&512){e.I.push([t,i])}return i}))}}return t};const ie=async(t,e,n,s,i)=>{if((e.$&32)===0){{e.$|=32;i=we(n,e);if(i.then){const t=h();i=await i;t()}if(!i.isProxied){{n.B=i.watchers}se(i,n,2);i.isProxied=true}const s=d("createInstance",n.M);{e.$|=8}try{new i(e)}catch(e){ve(e,t)}{e.$&=~8}{e.$|=128}s();oe(e.U,t)}if(i.style){let t=i.style;const e=Ot(n);if(!Se.has(e)){const s=d("registerStyles",n.M);jt(e,t,!!(n.$&1));s()}}}const o=e.H;const l=()=>qt(e,true);if(o&&o["s-rc"]){o["s-rc"].push(l)}else{l()}};const oe=(t,e)=>{{Yt(t,"connectedCallback",undefined,e)}};const le=t=>{if((ke.$&1)===0){const e=pe(t);const n=e.C;const s=d("connectedCallback",n.M);if(!(e.$&1)){e.$|=1;let s;{s=t.getAttribute(g);if(s){if(n.$&1){const e=yt(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}else if(n.$&2){let e=Ot(n);t["s-sc"]=e}ct(t,n.M,s,e)}}if(!s){if(n.$&(4|8)){fe(t)}}{let n=t;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Bt(e,e.H=n);break}}}if(n.F){Object.entries(n.F).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{ie(t,e,n)}}else if(e){ae(t,e,n.V);oe(e.U)}s()}};const fe=t=>{const e=t["s-cr"]=Ee.createComment("");e["s-cn"]=true;const n=t.__firstChild||t.firstChild;if(!!n){t.__insertBefore?t.__insertBefore(e,n):t.insertBefore(e,n)}else{t.__appendChild?t.__appendChild(e):t.appendChild(e)}};const ce=t=>{if((ke.$&1)===0){const e=pe(t);const n=e.U;{if(e.G){e.G.map((t=>t()));e.G=undefined}}{Yt(n,"disconnectedCallback",undefined,t)}}};const re=(t,e={})=>{var n;const s=d();const i=[];const o=e.exclude||[];const l=_e.customElements;const f=Ee.head;const c=f.querySelector("meta[charset]");const r=Ee.createElement("style");const u=[];const a=Ee.querySelectorAll(`[${j}]`);let h;let b=true;Object.assign(ke,e);ke.t=new URL(e.resourcesUrl||"./",Ee.baseURI).href;{ke.$|=2}t.map((t=>{t[1].map((n=>{const s={$:n[0],M:n[1],F:n[2],V:n[3]};{s.F=n[2]}{s.V=n[3]}{s.I=[]}{s.B={}}const f=e.transformTagName?e.transformTagName(s.M):s.M;const c=class extends HTMLElement{constructor(t){super(t);t=this;{const e=Ot(s,ht(t));const n=Array.from(a).find((t=>t.getAttribute(j)===e));if(n){if(s.$&1){jt(e,wt(n.innerHTML),true)}else{jt(e,n.innerHTML,false)}}}je(t,s);if(s.$&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(b){u.push(this)}else{ke.jmp((()=>le(this)))}}disconnectedCallback(){ke.jmp((()=>ce(this)))}componentOnReady(){return pe(this).J}};if(s.$&4||s.$&8){U(c.prototype);{A(c.prototype)}}s.K=t[0];if(!o.includes(f)&&!l.get(f)){i.push(f);l.define(f,se(c,s,1))}}))}));{r.innerHTML=i+v;r.setAttribute("data-styles","");const t=(n=ke.k)!==null&&n!==void 0?n:E(Ee);if(t!=null){r.setAttribute("nonce",t)}f.insertBefore(r,c?c.nextSibling:f.firstChild)}b=false;if(u.length){u.map((t=>t.connectedCallback()))}else{{ke.jmp((()=>h=setTimeout(Xt,30)))}}s()};const ue=(t,e)=>e;const ae=(t,e,n,s)=>{if(n){n.map((([n,s,i])=>{const o=he(t,n);const l=de(e,i);const f=be(n);ke.ael(o,s,l,f);(e.G=e.G||[]).push((()=>ke.rel(o,s,l,f)))}))}};const de=(t,e)=>n=>{try{{if(t.$&256){t.U[e](n)}else{(t.A=t.A||[]).push([e,n])}}}catch(e){ve(e,t.S||null)}};const he=(t,e)=>{if(e&8)return _e;if(e&16)return Ee.body;return t};const be=t=>(t&2)!==0;const $e=t=>ke.k=t;const me=new WeakMap;const pe=t=>me.get(t);const ge=(t,e)=>me.set(e.U=t,e);const je=(t,e)=>{const n={$:0,S:t,C:e,W:new Map};{n.q=new Promise((t=>n.D=t))}{n.J=new Promise((t=>n.P=t));t["s-p"]=[];t["s-rc"]=[]}ae(t,n,e.V);return me.set(t,n)};const ye=(t,e)=>e in t;const ve=(t,e)=>(0,console.error)(t,e);const Oe=new Map;const we=(t,e,n)=>{const s=t.M.replace(/-/g,"_");const i=t.K;const o=Oe.get(i);if(o){return o[s]}
|
5
5
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${i}.entry.js${""}`).then((t=>{if(i){Oe.set(i,t)}return t[s]}),(t=>{ve(t,e.S)}))};const Se=new Map;const xe=[];const _e=typeof window!=="undefined"?window:{};const Ee=_e.document||{head:{}};const Te=_e.HTMLElement||class{};const ke={$:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Ce=t=>Promise.resolve(t);const Me=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Ne=[];const Le=[];const Ie=(t,e)=>n=>{t.push(n);if(!r){r=true;if(e&&ke.$&4){Ue(He)}else{ke.raf(He)}}};const Re=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){ve(t)}}t.length=0};const He=()=>{Re(Ne);{Re(Le);if(r=Ne.length>0){ke.raf(He)}}};const Ue=t=>Ce().then(t);const Ae=Ie(Ne,false);const Pe=Ie(Le,true);export{u as B,ue as F,Te as H,C as a,re as b,mt as c,Ae as d,Jt as e,Qt as f,$t as g,T as h,a as i,ve as j,Ce as p,ge as r,$e as s,Pe as w};
|
6
|
-
//# sourceMappingURL=p-
|
6
|
+
//# sourceMappingURL=p-6ef53fa1.js.map
|