@nanoporetech-digital/components 2.6.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/dist/cjs/form-control-d54a847f.js +85 -0
- package/dist/cjs/form-control-d54a847f.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +4 -3
- package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +50 -47
- package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +14 -10
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-nav-item_2.cjs.entry.js +16 -14
- package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +6 -4
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{popover-8c86d338.js → popover-5f152a19.js} +3 -8
- package/dist/cjs/{popover-8c86d338.js.map → popover-5f152a19.js.map} +1 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/algolia/algolia-filter.js +2 -2
- package/dist/collection/components/algolia/algolia-input.js +5 -5
- package/dist/collection/components/algolia/algolia-results.js +1 -1
- package/dist/collection/components/algolia/algolia.js +6 -6
- package/dist/collection/components/checkbox/checkbox-group.css +4 -1
- package/dist/collection/components/checkbox/checkbox-group.js +2 -2
- package/dist/collection/components/checkbox/checkbox.css +2 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/datalist/datalist.js +4 -2
- package/dist/collection/components/datalist/datalist.js.map +1 -1
- package/dist/collection/components/date-input/date-input.css +1 -0
- package/dist/collection/components/date-input/date-input.js +7 -7
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/details/details.js +1 -1
- package/dist/collection/components/dialog/dialog.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/file-upload/file-upload.css +2 -2
- package/dist/collection/components/file-upload/file-upload.js +4 -4
- package/dist/collection/components/form-control/form-control.js +37 -32
- package/dist/collection/components/form-control/form-control.js.map +1 -1
- package/dist/collection/components/global-nav/global-nav.js +78 -50
- package/dist/collection/components/global-nav/global-nav.js.map +1 -1
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.css +251 -258
- package/dist/collection/components/input/input.js +21 -14
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/menu/menu.js +1 -2
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/nav-item/nav-item.js +4 -4
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +7 -6
- package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
- package/dist/collection/components/select/select.css +277 -274
- package/dist/collection/components/select/select.js +25 -21
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/slides/slides.js +7 -7
- package/dist/collection/components/tabs/tab-group.js +2 -2
- package/dist/collection/utils/popover.js +2 -7
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/components/datalist.js +3 -1
- package/dist/components/datalist.js.map +1 -1
- package/dist/components/form-control.js +37 -32
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/input.js +15 -10
- package/dist/components/input.js.map +1 -1
- package/dist/components/menu.js +1 -2
- package/dist/components/menu.js.map +1 -1
- package/dist/components/nano-checkbox-group.js +1 -1
- package/dist/components/nano-checkbox-group.js.map +1 -1
- package/dist/components/nano-checkbox.js +1 -1
- package/dist/components/nano-date-input.js +1 -1
- package/dist/components/nano-date-input.js.map +1 -1
- package/dist/components/nano-file-upload.js +1 -1
- package/dist/components/nano-file-upload.js.map +1 -1
- package/dist/components/nano-global-nav.js +51 -47
- package/dist/components/nano-global-nav.js.map +1 -1
- package/dist/components/popover.js +2 -7
- package/dist/components/popover.js.map +1 -1
- package/dist/components/resize-observe.js +6 -4
- package/dist/components/resize-observe.js.map +1 -1
- package/dist/components/select.js +16 -13
- package/dist/components/select.js.map +1 -1
- package/dist/custom-elements/index.js +134 -122
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/form-control-cf23c6a2.js +82 -0
- package/dist/esm/form-control-cf23c6a2.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-datalist_3.entry.js +4 -3
- package/dist/esm/nano-datalist_3.entry.js.map +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-input.entry.js.map +1 -1
- package/dist/esm/nano-dropdown.entry.js +1 -1
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-file-upload.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +50 -47
- package/dist/esm/nano-global-nav.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +14 -10
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-nav-item_2.entry.js +16 -14
- package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +6 -4
- package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm/nano-tooltip.entry.js +1 -1
- package/dist/esm/{popover-7639005b.js → popover-a03563f3.js} +3 -8
- package/dist/esm/{popover-7639005b.js.map → popover-a03563f3.js.map} +1 -1
- package/dist/esm-es5/form-control-cf23c6a2.js +5 -0
- package/dist/esm-es5/form-control-cf23c6a2.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm-es5/nano-checkbox.entry.js +1 -1
- package/dist/esm-es5/nano-components.js +1 -1
- package/dist/esm-es5/nano-components.js.map +1 -1
- package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
- package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
- package/dist/esm-es5/nano-date-input.entry.js +1 -1
- package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-dropdown.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js.map +1 -1
- package/dist/esm-es5/nano-input.entry.js +2 -2
- package/dist/esm-es5/nano-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-resize-observe_2.entry.js +2 -2
- package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js +1 -1
- package/dist/esm-es5/{popover-7639005b.js → popover-a03563f3.js} +2 -2
- package/dist/esm-es5/popover-a03563f3.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-096682d9.system.js +1 -1
- package/dist/nano-components/p-096682d9.system.js.map +1 -1
- package/dist/nano-components/{p-820d9e23.system.entry.js → p-09e38c5f.system.entry.js} +2 -2
- package/dist/nano-components/p-09e38c5f.system.entry.js.map +1 -0
- package/dist/nano-components/p-10a6216d.system.entry.js +5 -0
- package/dist/nano-components/p-10a6216d.system.entry.js.map +1 -0
- package/dist/nano-components/p-1ca46443.entry.js +5 -0
- package/dist/nano-components/p-1ca46443.entry.js.map +1 -0
- package/dist/nano-components/{p-e7fdc62d.entry.js → p-1e8321ea.entry.js} +2 -2
- package/dist/nano-components/{p-e7fdc62d.entry.js.map → p-1e8321ea.entry.js.map} +0 -0
- package/dist/nano-components/{p-f9e30f31.system.entry.js → p-2057d480.system.entry.js} +2 -2
- package/dist/nano-components/p-2057d480.system.entry.js.map +1 -0
- package/dist/nano-components/{p-9acc4596.system.entry.js → p-2ae4918d.system.entry.js} +3 -3
- package/dist/nano-components/{p-9acc4596.system.entry.js.map → p-2ae4918d.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-c9d09839.entry.js → p-313970ff.entry.js} +2 -2
- package/dist/nano-components/{p-c9d09839.entry.js.map → p-313970ff.entry.js.map} +0 -0
- package/dist/nano-components/p-39a5280e.system.entry.js +5 -0
- package/dist/nano-components/p-39a5280e.system.entry.js.map +1 -0
- package/dist/nano-components/{p-178c34e3.js → p-3de7735c.js} +2 -2
- package/dist/nano-components/p-3de7735c.js.map +1 -0
- package/dist/nano-components/{p-93448bcd.system.entry.js → p-4265cf95.system.entry.js} +2 -2
- package/dist/nano-components/{p-93448bcd.system.entry.js.map → p-4265cf95.system.entry.js.map} +0 -0
- package/dist/nano-components/p-44c08842.system.entry.js +5 -0
- package/dist/nano-components/p-44c08842.system.entry.js.map +1 -0
- package/dist/nano-components/{p-f3bf942d.entry.js → p-457d4893.entry.js} +2 -2
- package/dist/nano-components/p-457d4893.entry.js.map +1 -0
- package/dist/nano-components/{p-383fda90.system.entry.js → p-4870e76d.system.entry.js} +2 -2
- package/dist/nano-components/{p-383fda90.system.entry.js.map → p-4870e76d.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-20db18f3.entry.js → p-5a315696.entry.js} +2 -2
- package/dist/nano-components/{p-20db18f3.entry.js.map → p-5a315696.entry.js.map} +0 -0
- package/dist/nano-components/p-6eb25600.system.js +5 -0
- package/dist/nano-components/p-6eb25600.system.js.map +1 -0
- package/dist/nano-components/p-6f94d755.entry.js +5 -0
- package/dist/nano-components/p-6f94d755.entry.js.map +1 -0
- package/dist/nano-components/p-802e1416.system.entry.js +5 -0
- package/dist/nano-components/{p-ef4e0912.system.entry.js.map → p-802e1416.system.entry.js.map} +1 -1
- package/dist/nano-components/p-84767e87.entry.js +5 -0
- package/dist/nano-components/p-84767e87.entry.js.map +1 -0
- package/dist/nano-components/p-933c35a6.system.entry.js +5 -0
- package/dist/nano-components/p-933c35a6.system.entry.js.map +1 -0
- package/dist/nano-components/p-971b40a4.system.entry.js +5 -0
- package/dist/nano-components/p-971b40a4.system.entry.js.map +1 -0
- package/dist/nano-components/p-9d35768b.entry.js +5 -0
- package/dist/nano-components/p-9d35768b.entry.js.map +1 -0
- package/dist/nano-components/p-9ea13fbe.entry.js +5 -0
- package/dist/nano-components/p-9ea13fbe.entry.js.map +1 -0
- package/dist/nano-components/p-a6c84740.js +5 -0
- package/dist/nano-components/p-a6c84740.js.map +1 -0
- package/dist/nano-components/{p-8de6e276.entry.js → p-b4f8e541.entry.js} +2 -2
- package/dist/nano-components/p-b4f8e541.entry.js.map +1 -0
- package/dist/nano-components/{p-9745d44e.system.js → p-e43ec257.system.js} +2 -2
- package/dist/nano-components/p-e43ec257.system.js.map +1 -0
- package/dist/nano-components/p-e7c69d4f.entry.js +5 -0
- package/dist/nano-components/{p-d6569144.entry.js.map → p-e7c69d4f.entry.js.map} +1 -1
- package/dist/types/components/form-control/form-control.d.ts +2 -0
- package/dist/types/components/global-nav/global-nav.d.ts +10 -3
- package/dist/types/components/input/input.d.ts +3 -0
- package/dist/types/components/resize-observe/resize-observe.d.ts +0 -1
- package/dist/types/components/select/select.d.ts +2 -1
- package/dist/types/components.d.ts +11 -3
- package/docs-json.json +51 -17
- package/docs-vscode.json +6 -2
- package/package.json +4 -3
- package/dist/cjs/form-control-3bc82e3e.js +0 -80
- package/dist/cjs/form-control-3bc82e3e.js.map +0 -1
- package/dist/esm/form-control-67eeb108.js +0 -77
- package/dist/esm/form-control-67eeb108.js.map +0 -1
- package/dist/esm-es5/form-control-67eeb108.js +0 -5
- package/dist/esm-es5/form-control-67eeb108.js.map +0 -1
- package/dist/esm-es5/popover-7639005b.js.map +0 -1
- package/dist/nano-components/p-0618fac6.system.entry.js +0 -5
- package/dist/nano-components/p-0618fac6.system.entry.js.map +0 -1
- package/dist/nano-components/p-173bae15.system.entry.js +0 -5
- package/dist/nano-components/p-173bae15.system.entry.js.map +0 -1
- package/dist/nano-components/p-178c34e3.js.map +0 -1
- package/dist/nano-components/p-2559e9c1.entry.js +0 -5
- package/dist/nano-components/p-2559e9c1.entry.js.map +0 -1
- package/dist/nano-components/p-2be7aab0.system.entry.js +0 -5
- package/dist/nano-components/p-2be7aab0.system.entry.js.map +0 -1
- package/dist/nano-components/p-2e38a927.entry.js +0 -5
- package/dist/nano-components/p-2e38a927.entry.js.map +0 -1
- package/dist/nano-components/p-3a13948a.system.entry.js +0 -5
- package/dist/nano-components/p-3a13948a.system.entry.js.map +0 -1
- package/dist/nano-components/p-4ee978ff.entry.js +0 -5
- package/dist/nano-components/p-4ee978ff.entry.js.map +0 -1
- package/dist/nano-components/p-5e7c7d3d.entry.js +0 -5
- package/dist/nano-components/p-5e7c7d3d.entry.js.map +0 -1
- package/dist/nano-components/p-672e5547.js +0 -5
- package/dist/nano-components/p-672e5547.js.map +0 -1
- package/dist/nano-components/p-820d9e23.system.entry.js.map +0 -1
- package/dist/nano-components/p-8de6e276.entry.js.map +0 -1
- package/dist/nano-components/p-9745d44e.system.js.map +0 -1
- package/dist/nano-components/p-99acaa4f.system.entry.js +0 -5
- package/dist/nano-components/p-99acaa4f.system.entry.js.map +0 -1
- package/dist/nano-components/p-d4dfa4c5.entry.js +0 -5
- package/dist/nano-components/p-d4dfa4c5.entry.js.map +0 -1
- package/dist/nano-components/p-d6569144.entry.js +0 -5
- package/dist/nano-components/p-ea5eb591.system.js +0 -5
- package/dist/nano-components/p-ea5eb591.system.js.map +0 -1
- package/dist/nano-components/p-ef4e0912.system.entry.js +0 -5
- package/dist/nano-components/p-f3bf942d.entry.js.map +0 -1
- package/dist/nano-components/p-f9e30f31.system.entry.js.map +0 -1
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
* Web Components for Nanopore digital Web Apps
|
3
|
+
*/
|
4
|
+
import{r as t,c as i,f as e,h as s,e as n,g as o}from"./p-ab5813a7.js";import{r as a}from"./p-289aa03f.js";import{d as r}from"./p-1da5f8df.js";import{g as l}from"./p-b619500f.js";import{g as h}from"./p-8971a867.js";import{g as d}from"./p-74a7fc4f.js";const c=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--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%);height:1px;width: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 p(t){let i;if(t.id){i=document.querySelector(`label[for='${t.id}']`)}if(!i){i=t.closest("label")}return i}let f=0;let u=class{constructor(e){t(this,e);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-${f++}`;this.isFiltered=false;this.shouldFocus=false;this._allOptEles=[];this.actvOptEles=[];this.canOpen=true;this.optionIds=[];this.selected=[];this._dropDownConfig={skidding:-1};this.options=[];this.type="input";this.open=false;this.disableFilter=false;this.disabled=false;this.optSelected=t=>{t.stopPropagation();this.changeInputValue(t.detail);a((()=>this.inputChange()));if(this.type==="select")this.shouldOpen=false};this.handleShow=async()=>{if(this.shouldFocus){this.shouldFocus=false;this.listBox.setFocus()}else if(this.type==="select")this.listBox.showActiveElement()};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))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 e=["Delete","Backspace"];if(this.type!=="select"&&(!this.exactMatch||e.includes(t.key))){this.connectedInput.focus()}};this.inputChange=r(this.inputChange.bind(this),50)}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)}}))}get dropDownConfig(){return this._dropDownConfig}set dropDownConfig(t){this._dropDownConfig=Object.assign(Object.assign({},this._dropDownConfig),t)}get activeOptions(){return this.allOptEles}openWatcher(){e((()=>{this.nanoDropdown.open=this.open;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(this.input instanceof HTMLElement){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}e((()=>{var t;this.allOptEles=this.options.flatMap(((t,i)=>{if(t.value||t.label){const e=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(e);return e}}));if(((t=this.connectedInput)===null||t===void 0?void 0:t.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 e=false;switch(this.type){case"selctMulti":break;case"select":i="list";e=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=e}manageInputEvents(t,i){var s;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;e((()=>{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=((s=t===null||t===void 0?void 0:t.labels)===null||s===void 0?void 0:s.item(0))||p(t);e((()=>{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 s=((t=this.connectedInput)===null||t===void 0?void 0:t.value)||"";const n=[];e((()=>{this.allOptEles.forEach(((t,e)=>{if(this.actvOptEles.includes(t)){i++;t.setAttribute("aria-posinset",i+"");t.setAttribute("aria-setsize",this.actvOptEles.length+"");t.hidden=false;this.isSelected(t,s)}else{t.removeAttribute("aria-posinset");t.removeAttribute("aria-setsize");t.hidden=true;t.selected=false}t.id=this.listId+"-option-"+e;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}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 e;if(this.selected.includes(t.value)){this.selected=this.selected.filter((i=>i!==t.value));e=this.nanoDeselect.emit(t)}else{this.selected=[...this.selected];e=this.nanoSelect.emit(t)}if(!e.defaultPrevented){if(this.connectedInput)this.connectedInput.value=t.value;const e=new window.Event("change");(i=this.connectedInput)===null||i===void 0?void 0:i.dispatchEvent(e)}}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(){a((()=>{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 e=false;const s=[];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;e=true}else this.isSelected(i,t)}));this.allOptEles.forEach((t=>{if(!i.length||e){s.push(t)}else if(t.value.trim().length>0&&!t.disabled&&(n(t.textContent)||n(t.value)||n(t.label)||n(t.filterMeta))){s.push(t)}}));this.isFiltered=i.length&&!e;this.actvOptEles=s}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 s(n,{role:"listbox","aria-owns":this.optionIds.join(" "),"aria-label":"Select options from the list below"},s("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:t=>this.open=false}),s("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},s("slot",{name:"list-top"}),!this.options.length&&s("slot",null),!!this.options.length&&s("slot",{name:"internal-opts"}),s("slot",{name:"list-bottom"})),s("nano-menu",{type:"listbox",label:"No results found",hidden:!!this.actvOptEles.length,class:{dlist__menu:true,"dlist__menu--open":this.dropwdownOpen}},s("slot",{name:"no-result"})),!!this.actvOptEles&&s("div",{"aria-live":"polite",role:"status",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 g=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--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);-ms-scroll-chaining:none;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-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:block}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted(*:not(nano-nav-item):not(nano-option):not(hr):not(slot)){padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}";const b=!!document.head.attachShadow;let m=class{constructor(e){t(this,e);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.type="menu";this.handleFocus=()=>{this.setActiveFocusItem(this.selectedItem||this.getItems[0]);this._hasFocus=true;this.nanoFocus.emit()};this.handleClick=t=>{const i=t.target;const e=i.closest("nano-nav-item");if(e&&!e.disabled){this.nanoSelect.emit(e)}};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 e=this.activeItem;let s=i.indexOf(e);if(i.length){t.preventDefault();if(t.key==="ArrowDown"){s++}else if(t.key==="ArrowUp"){s--}else if(t.key==="Home"||t.key==="PageUp"){s=0}else if(t.key==="End"||t.key==="PageDown"){s=i.length-1}if(s<0)s=i.length-1;if(s>i.length-1)s=0;this.setActiveFocusItem(i[s]);if(i[s])i[s].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 e=h(i).toLowerCase().trim();if(e.substring(0,this.typeToSelect.length)===this.typeToSelect){this.setActiveFocusItem(t);break}}}};this.handleMouseOver=t=>{const i=t.target;const e=i.closest("nano-nav-item")||i.closest("nano-option");if(e&&!this.ignoreMouseEvents){this.setActiveFocusItem(e)}}}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;let i=this.el.querySelectorAll("nano-nav-item.secondary-open");if(i.length){const e=i[i.length-1];t=Array.from(e.querySelectorAll("nano-nav-item, nano-option"))}else{t=l(this.el,"nano-nav-item, nano-option","slot")}return t.filter((t=>!t.disabled&&!t.hidden))}get activeItem(){const t=d();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 e=this.getItems;let s=!t||t.disabled?e.find((t=>t.selected))||e[0]:t;e.filter((t=>t.tagName.toLowerCase()==="nano-option")).map((t=>t.setAttribute("tabindex",t===s?"0":"-1")));if(!i)return;if(s){s.setFocus?s.setFocus():s.focus()}else this.menu.focus()}handleBlur(t){if(!this.hasFocus)return;const i=t;let e;if(i.key){if(i.key!=="Tab")return;e=d()&&d().closest(this.el.tagName.toLowerCase())===this.el}else e=!!t.composedPath().find((t=>t===this.el));if(!e){this.resetActiveItem();this._hasFocus=false;this.nanoBlur.emit()}}render(){return s(n,{class:{legacy:!b}},s("div",{onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseOver:this.handleMouseOver,onFocus:this.handleFocus,"aria-label":this.label?this.label:undefined,role:this.type,ref:t=>this.menu=t,part:"base",class:{menu:true,["menu--"+this.type]:true,"menu--has-focus":this.hasFocus},tabIndex:-1},s("slot",null)))}get el(){return o(this)}};m.style=g;const v=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--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;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%;background:var(--bg);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.option{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}: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{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.option__start{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.option__start ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__start ::slotted(:last-child){margin-right:0.5em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.option__start ::slotted(:last-child){margin-right:unset;-webkit-margin-end:0.5em;margin-inline-end:0.5em}}.option__end{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.option__end ::slotted(nano-icon){font-size:var(--opt-icon-size)}.option__end ::slotted(:first-child){margin-left:0.5em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.option__end ::slotted(:first-child){margin-left:unset;-webkit-margin-start:0.5em;margin-inline-start:0.5em;}}.option__check{visibility:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;left:0.6em;top:calc(50% - 0.6em);-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:0.9em}.option--selected:not(.option--novalue) .option__check{visibility:visible}";let w=0;let x=class{constructor(e){t(this,e);this.nanoSelect=i(this,"nanoSelect",7);this.optId=`nano-option-${w++}`;this.hasFocus=false;this.value="";this.label="";this.selected=false;this.disabled=false;this.filterMeta="";this.handleClick=r(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 l(this.host,"*:not([slot])",false).map((t=>t.textContent)).join(" ").trim()}componentWillLoad(){this.valueChanged();this.labelChanged()}render(){return s(n,{role:"option","aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false"},s("div",{onMouseDown:this.handleClick,id:this.optId,class:{option:true,"option--selected":this.selected,"option--disabled":this.disabled,"option--novalue":!this.value}},s("div",{part:"check-icon",class:"option__check"},s("slot",{name:"check-icon"},s("nano-icon",{name:"light/check","aria-hidden":"true"}))),s("div",{part:"start",class:"option__start"},s("slot",{name:"start"})),s("div",{part:"label",class:"option__label"},s("slot",null,this.label||this.value)),s("div",{part:"end",class:"option__end"},s("slot",{name:"end"}))))}get host(){return o(this)}static get watchers(){return{value:["valueChanged"],label:["labelChanged"]}}};x.style=v;export{u as nano_datalist,m as nano_menu,x as nano_option};
|
5
|
+
//# sourceMappingURL=p-1ca46443.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/components/datalist/datalist.scss?tag=nano-datalist&encapsulation=shadow","src/components/datalist/datalist.tsx","src/components/menu/menu.scss?tag=nano-menu&encapsulation=shadow","src/components/menu/menu.tsx","src/components/option/option.scss?tag=nano-option&encapsulation=shadow","src/components/option/option.tsx"],"names":["datalistCss","findLabel","formCtrl","foundLabel","id","document","querySelector","closest","listIds","DataList","[object Object]","hostRef","this","isNanoInput","typeToSelect","listId","isFiltered","shouldFocus","_allOptEles","actvOptEles","canOpen","optionIds","selected","_dropDownConfig","skidding","options","type","open","disableFilter","disabled","optSelected","e","stopPropagation","changeInputValue","detail","raf","inputChange","shouldOpen","handleShow","async","listBox","setFocus","showActiveElement","inputClick","manageDropdownDisplay","inputKeydown","ignoreKeys","includes","key","typeToSelectTimeout","test","clearTimeout","window","setTimeout","setOptStartsWith","optionKeyDown","connectedInput","focus","deleteKeys","exactMatch","debounce","bind","allOptEles","opts","_a","value","forEach","opt","dropDownConfig","ddc","Object","assign","activeOptions","writeTask","nanoDropdown","setAttribute","toString","nanoInput","host","getInputElement","input","HTMLElement","length","mo","MutationObserver","processSlottedContent","observe","childList","subtree","disconnect","undefined","flatMap","option","i","label","createElement","ariaPosinset","ariaSetsize","textContent","slot","append","dwConfig","closeOnSelect","autocompleteType","readonly","placement","tetherTo","readOnly","newInput","oldInput","removeEventListener","inputLabel","removeAttribute","addEventListener","labels","item","c","val","optIds","hidden","isSelected","push","hasNoResult","nanoOptionsUpdated","emit","dropwdownOpen","find","nanoSelected","filter","nanoDeselect","nanoSelect","defaultPrevented","event","Event","dispatchEvent","attrFind","toFind","toLowerCase","substring","foundEle","trim","filterMeta","Array","from","querySelectorAll","valStr","activeEles","indexOf","watchInputChange","manageSlotChangeListener","openWatcher","console","warn","h","Host","role","aria-owns","join","aria-label","ref","el","dialogTitle","class","dlist__dropdown","dlist--isfiltered","onNanoAfterShow","onNanoAfterHide","_","dlist__menu","dlist__menu--open","tabIndex","onNanoSelect","onKeyDown","name","aria-live","menuCss","CANSHADOW","head","attachShadow","Menu","ignoreMouseEvents","_hasFocus","handleFocus","setActiveFocusItem","selectedItem","getItems","nanoFocus","handleClick","target","handleKeyDown","ignoreMouseTimeout","activeItem","click","items","index","preventDefault","scrollIntoView","block","shadowRoot","getTextContent","handleMouseOver","hasFocus","menu","preventScroll","blur","tagName","map","opened","ctx","getDirectChildren","activeElement","getActiveElement","getAttribute","classList","contains","kev","found","composedPath","resetActiveItem","nanoBlur","legacy","onClick","onMouseOver","onFocus","part","menu--has-focus","optionCss","Option","optId","labelContent","valueChanged","labelChanged","aria-selected","aria-disabled","onMouseDown","option--selected","option--disabled","option--novalue","aria-hidden"],"mappings":";;;2PAAA,MAAMA,EAAc,u4BCkBpB,SAASC,EAAUC,GACjB,IAAIC,EAEJ,GAAID,EAASE,GAAI,CACfD,EAAaE,SAASC,cAAc,cAAcJ,EAASE,QAE7D,IAAKD,EAAY,CACfA,EAAaD,EAASK,QAAQ,SAEhC,OAAOJ,EAGT,IAAIK,EAAU,MAkBDC,EAAQ,MA2CnBC,YAAAC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AAM,gBAAiB,OAClDgI,KAAK9C,GAAOA,EAAG9D,cACf2D,KAAK,KACLjB,OAKLlI,oBACEE,KAAK0N,eACL1N,KAAK2N,eAGP7N,SACE,OACE+I,EAACC,EAAI,CACHC,KAAK,SAAQ6E,gBACE5N,KAAKU,SAAW,OAAS,QAAOmN,gBAChC7N,KAAKiB,SAAW,OAAS,SAExC4H,EAAA,MAAA,CACEiF,YAAa9N,KAAK+K,YAClBvL,GAAIQ,KAAKwN,MACTlE,MAAO,CACLtE,OAAQ,KACR+I,mBAAoB/N,KAAKU,SACzBsN,mBAAoBhO,KAAKiB,SACzBgN,mBAAoBjO,KAAKqD,QAG3BwF,EAAA,MAAA,CAAKuE,KAAK,aAAa9D,MAAM,iBAC3BT,EAAA,OAAA,CAAMoB,KAAK,cACTpB,EAAA,YAAA,CAAWoB,KAAK,cAAaiE,cAAa,WAG9CrF,EAAA,MAAA,CAAKuE,KAAK,QAAQ9D,MAAM,iBACtBT,EAAA,OAAA,CAAMoB,KAAK,WAEbpB,EAAA,MAAA,CAAKuE,KAAK,QAAQ9D,MAAM,iBACtBT,EAAA,OAAA,KAAO7I,KAAKkF,OAASlF,KAAKqD,QAE5BwF,EAAA,MAAA,CAAKuE,KAAK,MAAM9D,MAAM,eACpBT,EAAA,OAAA,CAAMoB,KAAK","sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n:host {\n /**\n * @prop --padding-top: for all nested `nano-option` elements. Defaults to #{$spacing-small};\n * @prop --padding-bottom: for all nested `nano-option` elements. Defaults to #{$spacing-small};\n * @prop --padding-start: for all nested `nano-option` elements. Defaults to #{$spacing-xlarge};\n * @prop --padding-end: for all nested `nano-option` elements. Defaults to #{$spacing-xlarge};\n * @prop --font-size: for all nested `nano-option` elements. Defaults to .8em;\n * @prop --color: default text color of content other than `nano-option`. Defaults to #{map.get($colors, palegrey)};\n */\n\n --padding-top: #{$spacing-small};\n --padding-bottom: #{$spacing-small};\n --padding-start: #{$spacing-xlarge};\n --padding-end: #{$spacing-xlarge};\n --font-size: 0.8em;\n --color: #{map.get($colors, palegrey)};\n\n color: var(--color);\n}\n\n.dlist {\n &--isfiltered {\n ::slotted(*:not(nano-option):not([slot='no-result']):not([slot='list-top']):not([slot='list-bottom'])) {\n display: none !important;\n }\n }\n\n &__dropdown {\n --min-width: 100%;\n --overflow: auto;\n }\n\n &__status {\n @include visually-hide();\n }\n\n &__menu {\n --padding-top: inherit;\n --padding-bottom: inherit;\n --padding-start: inherit;\n --padding-end: inherit;\n --font-size: inherit;\n }\n}\n","import {\n Component,\n ComponentInterface,\n h,\n Host,\n Element,\n State,\n Watch,\n Prop,\n Event,\n EventEmitter,\n writeTask,\n Build,\n} from '@stencil/core';\nimport { debounce, raf } from '../../utils';\nimport type { Dropdown } from '../dropdown/dropdown';\nimport type { OptionInterface } from '../../interface';\n\nfunction findLabel(formCtrl: Element) {\n let foundLabel: HTMLLabelElement;\n\n if (formCtrl.id) {\n foundLabel = document.querySelector(`label[for='${formCtrl.id}']`);\n }\n if (!foundLabel) {\n foundLabel = formCtrl.closest('label');\n }\n return foundLabel;\n}\n\nlet listIds = 0;\n\n/**\n * `nano-datalist` a visually consistent and more flexible replacement for a native\n * [datalist](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist). Can be nested within a `nano-input`\n * or linked to any input control via the `input` prop. Is used internally within `nano-select`.\n * Options can be defined declaratively by nesting `<nano-option>` elements or imperatively using the `options` prop\n *\n * @slot - use `<nano-option>` elements for more complex html. Alternatively use the `options` prop\n * @slot list-top - shows at the top of the list when there are options present\n * @slot list-bottom - shows at the bottom of the list when there are options present\n * @slot no-result - shown when there are no results otherwise nothing will be shown\n */\n@Component({\n tag: 'nano-datalist',\n styleUrl: 'datalist.scss',\n shadow: true,\n})\nexport class DataList implements ComponentInterface {\n // Private State\n\n private isNanoInput = false;\n private typeToSelect = '';\n private typeToSelectTimeout: number;\n private nanoDropdown: HTMLNanoDropdownElement;\n private listBox: HTMLNanoMenuElement;\n private mo?: MutationObserver;\n private listId = `nano-datalist-${listIds++}`;\n private isFiltered = false;\n private shouldFocus = false;\n // all potential option eles. Set via slot or `options` prop.\n // Some may get hidden due to filtering\n private get allOptEles() {\n return this._allOptEles;\n }\n private set allOptEles(opts) {\n // when allOptEles are initially set (on slot change / options) -\n // add options to 'selected' and fire selected event *if*\n // value isn't set on the input\n this._allOptEles = opts;\n if (this.connectedInput?.value) return;\n\n opts.forEach((opt) => {\n if (opt.selected && !this.selected.includes(opt.value)) {\n this.changeInputValue(opt);\n }\n });\n }\n private _allOptEles: HTMLNanoOptionElement[] = [];\n\n @Element() host: HTMLNanoDatalistElement;\n\n // active option eles that are not hidden.\n @State() actvOptEles: HTMLNanoOptionElement[] = [];\n @State() connectedInput: HTMLInputElement | HTMLTextAreaElement;\n @State() inputLabel: HTMLLabelElement;\n @State() hasNoResult: boolean;\n @State() shouldOpen: boolean;\n @State() canOpen: boolean = true;\n @State() optionIds: string[] = [];\n\n constructor() {\n this.inputChange = debounce(this.inputChange.bind(this), 50);\n }\n\n // Public API\n\n /** By default, items in the list will appear 'selected' when the value in the linked input control matches.\n * However you can add other selected options via the the selected prop. */\n @Prop({ mutable: true }) selected: string[] = [];\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop()\n get dropDownConfig() {\n return this._dropDownConfig;\n }\n set dropDownConfig(ddc: Partial<Dropdown>) {\n this._dropDownConfig = { ...this._dropDownConfig, ...ddc };\n }\n private _dropDownConfig: Partial<Dropdown> = {\n skidding: -1,\n };\n\n /** Provide an option list.\n * Options can be defined declaratively by nesting `<nano-option>` elements or imperatively using this prop */\n @Prop() options?: OptionInterface[] = [];\n\n /** A selector to a HTMLInputElement */\n @Prop() input?: string | HTMLInputElement;\n\n /** Tweaks the datalist behaviour and linked control semantics and behaviour.\n * e.g. 'select' will make the linked input control `readonly`.\n */\n @Prop() type: 'select' | 'selctMulti' | 'input' = 'input';\n\n /** return all the active options currently within the datalist. Can be useful for validation */\n @Prop()\n get activeOptions() {\n return this.allOptEles;\n }\n\n /** Force datalist open */\n @Prop({ mutable: true }) open: boolean = false;\n\n @Watch('open')\n openWatcher() {\n writeTask(() => {\n this.nanoDropdown.open = this.open;\n this.connectedInput.setAttribute('aria-expanded', this.open.toString());\n });\n }\n\n /** Use this option to disable to default filtering. This is useful if filtering happens\n * externally via another method (e.g. via ajax)\n */\n @Prop() disableFilter = false;\n\n /** Activate / deactivate the datalist control */\n @Prop() disabled = false;\n\n // State change watchers\n\n @Watch('input')\n async watchInputChange() {\n let nanoInput;\n if ((nanoInput = this.host.closest('nano-input'))) {\n this.isNanoInput = true;\n this.connectedInput = await nanoInput.getInputElement();\n } else if (\n this.input &&\n typeof this.input === 'string' &&\n (nanoInput = document.querySelector(this.input))\n ) {\n this.isNanoInput = false;\n this.connectedInput = nanoInput;\n } else if (this.input instanceof HTMLElement) {\n this.connectedInput = this.input;\n }\n }\n\n @Watch('options')\n manageSlotChangeListener() {\n if (!this.host) return;\n\n // we're not using `options` - setup new MO\n if ((!this.options || !this.options.length) && !this.mo) {\n if (Build.isBrowser) {\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.host, { childList: true, subtree: true });\n }\n this.processSlottedContent();\n return;\n }\n\n // we're using `options` - trash current MO\n if (this.options?.length) {\n if (!!this.mo) {\n this.mo.disconnect();\n this.mo = undefined;\n }\n\n // add imperative `options`\n writeTask(() => {\n this.allOptEles = this.options.flatMap((option, i) => {\n if (option.value || option.label) {\n const opt = Object.assign(document.createElement('nano-option'), {\n label: option.label,\n value: option.value,\n ariaPosinset: i,\n ariaSetsize: this.options.length,\n selected: option.selected,\n id: this.listId + '-option-' + i,\n textContent: option.label ? option.label : option.value,\n slot: 'internal-opts',\n });\n this.host.append(opt);\n return opt;\n }\n });\n\n if (this.connectedInput?.value.length && this.type !== 'select') {\n this.inputChange();\n } else this.actvOptEles = [...this.allOptEles];\n });\n }\n // forceUpdate(this.host);\n }\n\n @Watch('type')\n @Watch('connectedInput')\n watchTypeChange() {\n if (!this.connectedInput) return;\n\n let dwConfig: Partial<Dropdown> = { closeOnSelect: false };\n let autocompleteType: 'list' | 'both' = 'both';\n let readonly = false;\n\n switch (this.type) {\n case 'selctMulti':\n // dwConfig.closeOnSelect = false;\n break;\n case 'select':\n autocompleteType = 'list';\n readonly = true;\n dwConfig = { closeOnSelect: true, placement: 'center' };\n break;\n }\n\n if (!this.isNanoInput) {\n dwConfig.tetherTo = this.connectedInput;\n }\n\n this.dropDownConfig = { ...this.dropDownConfig, ...dwConfig };\n this.connectedInput.setAttribute('aria-autocomplete', autocompleteType);\n this.connectedInput.readOnly = readonly;\n }\n\n @Watch('connectedInput')\n manageInputEvents(newInput?: HTMLInputElement, oldInput?: HTMLInputElement) {\n if (!!oldInput) {\n const nanoInput = oldInput.closest('nano-input');\n if (nanoInput) {\n nanoInput.removeEventListener('nanoChange', this.inputChange);\n }\n oldInput.removeEventListener('change', this.inputChange);\n oldInput.removeEventListener('click', this.inputClick);\n oldInput.removeEventListener('keydown', this.inputKeydown);\n oldInput.removeEventListener('input', this.inputChange);\n\n this.inputLabel = null;\n\n writeTask(() => {\n oldInput.removeAttribute('role');\n oldInput.removeAttribute('aria-expanded');\n oldInput.removeAttribute('aria-controls');\n oldInput.removeAttribute('aria-owns');\n oldInput.removeAttribute('aria-haspopup');\n oldInput.removeAttribute('aria-autocomplete');\n oldInput.removeAttribute('autocomplete');\n });\n }\n if (!!newInput) {\n const nanoInput = newInput.closest('nano-input');\n if (nanoInput) {\n nanoInput.addEventListener('nanoChange', this.inputChange);\n }\n newInput.addEventListener('change', this.inputChange);\n newInput.addEventListener('click', this.inputClick);\n newInput.addEventListener('keydown', this.inputKeydown);\n newInput.addEventListener('input', this.inputChange);\n this.listId = this.host.id || this.listId;\n\n this.inputLabel = newInput?.labels?.item(0) || findLabel(newInput);\n\n writeTask(() => {\n this.host.id = this.listId;\n newInput.setAttribute('role', 'combobox');\n newInput.setAttribute('aria-expanded', 'false');\n newInput.setAttribute('aria-controls', this.listId);\n newInput.setAttribute('aria-owns', this.listId);\n newInput.setAttribute('aria-haspopup', 'listbox');\n newInput.setAttribute('autocomplete', 'off');\n });\n }\n }\n\n @Watch('selected')\n @Watch('actvOptEles')\n watchActvOptChange() {\n let c = 0;\n const val = this.connectedInput?.value || '';\n const optIds = [];\n\n writeTask(() => {\n this.allOptEles.forEach((opt, i) => {\n if (this.actvOptEles.includes(opt)) {\n c++;\n opt.setAttribute('aria-posinset', c + '');\n opt.setAttribute('aria-setsize', this.actvOptEles.length + '');\n opt.hidden = false;\n this.isSelected(opt, val);\n } else {\n opt.removeAttribute('aria-posinset');\n opt.removeAttribute('aria-setsize');\n opt.hidden = true;\n opt.selected = false;\n }\n opt.id = this.listId + '-option-' + i;\n optIds.push(opt.id);\n });\n this.optionIds = optIds;\n });\n }\n\n @Watch('actvOptEles')\n @Watch('hasNoResult')\n manageCanOpen() {\n if (this.actvOptEles.length || this.hasNoResult) this.canOpen = true;\n else this.canOpen = false;\n }\n\n /**\n * Opens the dropdown if it can, it should and there are items to display.\n */\n @Watch('shouldOpen')\n @Watch('canOpen')\n manageDropdownDisplay() {\n if (this.shouldOpen && this.canOpen && !this.disabled) this.open = true;\n if (!this.shouldOpen || !this.canOpen) this.open = false;\n }\n\n @Watch('actvOptEles')\n fireActiveOptsEvent() {\n this.nanoOptionsUpdated.emit(this.actvOptEles);\n }\n\n // Events\n\n /** Fired when an item is selected. */\n @Event() nanoSelect: EventEmitter<HTMLNanoOptionElement>;\n\n /** Fired when a currently selected item is reselected. */\n @Event() nanoDeselect: EventEmitter<HTMLNanoOptionElement>;\n\n /** Fired when active options change */\n @Event() nanoOptionsUpdated: EventEmitter<HTMLNanoOptionElement[]>;\n\n // Private logic\n\n private isSelected(opt: HTMLNanoOptionElement, val: string) {\n if (val === opt.value || this.selected.includes(opt.value)) {\n opt.selected = true;\n } else opt.selected = false;\n }\n\n private get dropwdownOpen() {\n if (!this.nanoDropdown || !this.open) return false;\n return true;\n }\n\n private get exactMatch() {\n return this.allOptEles.find(\n (opt) => this.connectedInput.value === opt.value\n );\n }\n\n /** reflect value back to the connected input unless the event is cancelled */\n private changeInputValue(opt: HTMLNanoOptionElement) {\n let nanoSelected;\n\n if (this.selected.includes(opt.value)) {\n // deselect option\n this.selected = this.selected.filter((val) => val !== opt.value);\n nanoSelected = this.nanoDeselect.emit(opt);\n } else {\n // select new option\n this.selected = [...this.selected];\n nanoSelected = this.nanoSelect.emit(opt);\n }\n\n if (!nanoSelected.defaultPrevented) {\n if (this.connectedInput) this.connectedInput.value = opt.value;\n\n const event = new window.Event('change');\n this.connectedInput?.dispatchEvent(event);\n }\n }\n\n // a new option has been picked\n private optSelected = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.stopPropagation();\n this.changeInputValue(e.detail);\n raf(() => this.inputChange());\n\n if (this.type === 'select') this.shouldOpen = false;\n };\n\n // this is for type=\"select\" only.\n // Filter options that start with text - aggregates letters (as opposed to getting the value from input)\n private setOptStartsWith() {\n const attrFind = (toFind: string) =>\n toFind.toLowerCase().substring(0, this.typeToSelect.length) ===\n this.typeToSelect;\n\n const foundEle = this.allOptEles.find(\n (opt) =>\n opt.value.trim().length > 0 &&\n !opt.disabled &&\n (attrFind(opt.textContent) ||\n attrFind(opt.value) ||\n attrFind(opt.label) ||\n attrFind(opt.filterMeta))\n );\n if (foundEle) this.changeInputValue(foundEle);\n }\n\n // Event handlers\n\n private processSlottedContent() {\n raf(() => {\n this.allOptEles = Array.from(this.host.querySelectorAll('nano-option'));\n this.hasNoResult = !!this.host.querySelector('[slot=\"no-result\"]');\n\n if (this.connectedInput?.value.length && this.type !== 'select') {\n this.inputChange();\n } else this.actvOptEles = this.allOptEles;\n });\n }\n\n // sets focus immediately on open when 'select' - mirroring native behaviour\n private handleShow = async () => {\n if (this.shouldFocus) {\n this.shouldFocus = false;\n this.listBox.setFocus();\n } else if (this.type === 'select') this.listBox.showActiveElement();\n };\n\n // any changes to the connected input value will filter the list of active options\n private inputChange() {\n if (this.disableFilter) {\n this.actvOptEles = this.allOptEles;\n return;\n }\n\n const val = this.connectedInput.value;\n const valStr = val.trim().toLowerCase();\n\n let exactMatch = false;\n const activeEles = [];\n const attrFind = (toFind: string) =>\n toFind.toLowerCase().indexOf(valStr) > -1;\n\n this.allOptEles.forEach((opt) => {\n if (\n (val === opt.value || val === opt.label) &&\n this.type !== 'selctMulti'\n ) {\n opt.selected = true;\n exactMatch = true;\n } else this.isSelected(opt, val);\n });\n\n this.allOptEles.forEach((opt) => {\n if (!valStr.length || exactMatch) {\n activeEles.push(opt);\n } else if (\n opt.value.trim().length > 0 &&\n !opt.disabled &&\n (attrFind(opt.textContent) ||\n attrFind(opt.value) ||\n attrFind(opt.label) ||\n attrFind(opt.filterMeta))\n ) {\n activeEles.push(opt);\n }\n });\n\n this.isFiltered = valStr.length && !exactMatch;\n this.actvOptEles = activeEles;\n }\n\n private inputClick = () => {\n this.shouldOpen = true;\n // open dropdown if possible\n this.manageDropdownDisplay();\n };\n\n private inputKeydown = (e: KeyboardEvent) => {\n const ignoreKeys = [\n 'Shift',\n 'ArrowRight',\n 'ArrowLeft',\n 'Escape',\n 'Enter',\n 'Tab',\n ];\n if (ignoreKeys.includes(e.key)) {\n if (e.key === 'Tab') this.shouldOpen = false;\n return;\n }\n\n // When select, mirror native select behaviour. Search on closed list\n if (\n this.type === 'select' &&\n !['ArrowDown', 'ArrowUp'].includes(e.key) &&\n (e.key !== ' ' || this.typeToSelectTimeout)\n ) {\n if (e.key === ' ' || /^[a-z0-9]+$/i.test(e.key)) {\n clearTimeout(this.typeToSelectTimeout);\n this.typeToSelectTimeout = window.setTimeout(() => {\n this.typeToSelect = '';\n this.typeToSelectTimeout = 0;\n }, 750);\n this.typeToSelect += e.key;\n this.setOptStartsWith();\n }\n return;\n }\n\n this.shouldOpen = true;\n // open dropdown if possible\n this.manageDropdownDisplay();\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) this.shouldFocus = true;\n };\n\n // handles key down on options. Either 'picks'\n // an option or passes event back to input for search / filter\n private optionKeyDown = (\n e: KeyboardEvent & { target: HTMLNanoOptionElement }\n ) => {\n const ignoreKeys = [\n 'Shift',\n 'ArrowUp',\n 'ArrowDown',\n 'Escape',\n 'Enter',\n 'Tab',\n 'Space',\n 'PageUp',\n 'PageDown',\n 'Home',\n 'End',\n ' ',\n ];\n if (ignoreKeys.includes(e.key)) {\n if (e.key === 'Escape') this.connectedInput.focus();\n return;\n }\n\n const deleteKeys = ['Delete', 'Backspace'];\n // this passes whatever's typed back to our input control\n if (\n this.type !== 'select' &&\n (!this.exactMatch || deleteKeys.includes(e.key))\n ) {\n this.connectedInput.focus();\n }\n };\n\n // Component lifecycle\n\n connectedCallback() {\n this.watchInputChange();\n }\n\n componentDidLoad() {\n this.manageSlotChangeListener();\n this.openWatcher();\n }\n\n componentDidRender(): void {\n setTimeout(() => {\n if (!this.connectedInput)\n console.warn(\n 'no `nano-input` found. `nano-datalist` should be nested within an `nano-input` or linked via `input` prop',\n this.host\n );\n }, 500);\n }\n\n render() {\n return (\n <Host\n role=\"listbox\"\n aria-owns={this.optionIds.join(' ')}\n aria-label=\"Select options from the list below\"\n >\n <nano-dropdown\n {...this.dropDownConfig}\n ref={(el) => (this.nanoDropdown = el)}\n dialogTitle=\"Select options from the list below\"\n class={{\n dlist__dropdown: true,\n 'dlist--isfiltered': this.isFiltered,\n }}\n onNanoAfterShow={this.handleShow}\n onNanoAfterHide={(_) => (this.open = false)}\n >\n <nano-menu\n hidden={!this.actvOptEles.length}\n type=\"listbox\"\n label={this.inputLabel ? this.inputLabel.textContent : undefined}\n class={{\n dlist__menu: true,\n 'dlist__menu--open': this.dropwdownOpen,\n }}\n tabIndex={-1}\n onNanoSelect={this.optSelected}\n onKeyDown={this.optionKeyDown}\n ref={(el) => (this.listBox = el)}\n >\n <slot name=\"list-top\" />\n {!this.options.length && <slot />}\n {!!this.options.length && <slot name=\"internal-opts\" />}\n <slot name=\"list-bottom\" />\n </nano-menu>\n <nano-menu\n type=\"listbox\"\n label=\"No results found\"\n hidden={!!this.actvOptEles.length}\n class={{\n dlist__menu: true,\n 'dlist__menu--open': this.dropwdownOpen,\n }}\n >\n <slot name=\"no-result\" />\n </nano-menu>\n {!!this.actvOptEles && (\n <div aria-live=\"polite\" role=\"status\" class=\"dlist__status\">\n {this.actvOptEles.length} result\n {this.actvOptEles.length > 1 ? 's' : ''} available.\n </div>\n )}\n </nano-dropdown>\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/colours';\n@import '../../global/style/nano-theme/layers';\n\n:host {\n /**\n * @prop --padding-start: padding at the start of nav-items (left r2l / right l2r). Defaults to '10px'\n * @prop --padding-end: padding at the end of nav-items (right r2l / left l2r). Defaults to '10px'\n * @prop --padding-top: padding at the top of nav-items. Defaults to '10px'\n * @prop --padding-bottom: padding at the bottom of nav-items. Defaults to '10px'\n\n * @prop --secondary-padding-top: padding at the top of nested nav-items. Defaults to 0\n * @prop --secondary-padding-bottom: padding at the bottom of nested nav-items. Defaults to 0\n\n * @prop --bg-color-hover: bg hover color of nav-items. Defaults to #{map.get($colors, blue--faded)};\n * @prop --bg-color-focus: bg focus color of nav-items. Defaults to #{map.get($colors, blue--faded)};\n * @prop --bg-color-selected: bg selected color of nav-items. Defaults to #{map.get($colors, blue--faded)};\n\n * @prop --color-hover: text hover color of nav-items. Defaults to #{map.get($colors, blue)}\n * @prop --color-selected: text selected color of nav-items. Defaults to #{map.get($colors, blue)}\n * @prop --color-focus: text focus color of nav-items. Defaults to #{map.get($colors, blue)}\n\n * @prop --focus-outline: the focus style of nav-items. Defaults to 'none'\n * @prop --font-size: default font-size for all items. Defaults .9em;\n */\n\n --padding-start: #{$spacing-medium};\n --padding-end: #{$spacing-medium};\n --padding-top: #{$spacing-small};\n --padding-bottom: #{$spacing-small};\n --secondary-padding-top: 0;\n --secondary-padding-bottom: 0;\n --bg-color-hover: #{map.get($colors, blue--faded)};\n --bg-color-focus: #{map.get($colors, blue--faded)};\n --bg-color-selected: #{map.get($colors, blue--faded)};\n --color-hover: #{map.get($colors, blue)};\n --color-selected: #{map.get($colors, blue)};\n --color-focus: #{map.get($colors, blue)};\n --focus-outline: none;\n --font-size: 0.9em;\n\n display: block;\n}\n\n.menu {\n font-size: var(--font-size, 0.9em);\n overscroll-behavior: none;\n min-width: var(--width);\n position: relative;\n\n &:focus {\n outline: none;\n }\n}\n\n::slotted(*:not(nano-nav-item):not(nano-option):not(hr):not(slot)) {\n @include padding(\n var(--padding-top),\n var(--padding-end),\n var(--padding-bottom),\n var(--padding-start)\n );\n\n display: block;\n}\n","import {\n Component,\n Event,\n EventEmitter,\n Method,\n h,\n Host,\n Element,\n Prop,\n Listen,\n} from '@stencil/core';\nimport {\n getTextContent,\n getDirectChildren,\n getActiveElement,\n} from '../../utils';\n\nconst CANSHADOW = !!document.head.attachShadow;\n\ntype ValidElement = HTMLNanoNavItemElement | HTMLNanoOptionElement;\ntype NNI = HTMLNanoNavItemElement;\n\n/**\n * Menu element. Commonly wrapped by `nano-dropdown` with `nano-option` and `nano-nav-item` elements nested.\n * Manages focus state / active.\n * @slot - The menu's content; `nano-option`, `nano-nav-item` elements as well as <hr> and more.\n */\n@Component({\n tag: 'nano-menu',\n styleUrl: 'menu.scss',\n shadow: true,\n})\nexport class Menu {\n private ignoreMouseEvents = false;\n private ignoreMouseTimeout: any;\n private menu: HTMLElement;\n private typeToSelect = '';\n private typeToSelectTimeout: any;\n\n @Element() private el: HTMLNanoMenuElement;\n\n // Public API\n\n /** get the focus state of the menu @readonly */\n @Prop()\n get hasFocus() {\n return this._hasFocus;\n }\n private _hasFocus = false;\n\n /** changes the role of the underlying control - sometimes required for semantics */\n @Prop() type: 'menu' | 'listbox' = 'menu';\n\n /** an accessible label */\n @Prop() label: string;\n\n // Events\n\n /** Emitted when the menu gains focus. */\n @Event() nanoFocus: EventEmitter;\n\n /** Emitted when the menu loses focus. */\n @Event() nanoBlur: EventEmitter;\n\n /** Emitted when a menu item is selected. */\n @Event() nanoSelect: EventEmitter<\n HTMLNanoOptionElement | HTMLNanoNavItemElement\n >;\n\n // Public Methods\n\n /** Sets focus on the menu. */\n @Method()\n async setFocus() {\n if (this.menu?.focus) this.menu.focus({ preventScroll: true });\n }\n\n /** Removes focus from the menu. */\n @Method()\n async removeFocus() {\n if (this.menu?.blur) this.menu.blur();\n }\n\n /** Sets the current active item */\n @Method()\n async showActiveElement() {\n if (this.selectedItem)\n this.selectedItem.scrollIntoView({ block: 'nearest' });\n }\n\n /** Removes any active item's state */\n @Method()\n async resetActiveItem() {\n this.getItems\n .filter((i) => i.tagName.toLowerCase() === 'nano-option')\n .map((i) => i.setAttribute('tabindex', '-1'));\n }\n\n // Private methods\n\n get getItems() {\n let items: ValidElement[];\n let opened = this.el.querySelectorAll('nano-nav-item.secondary-open');\n if (opened.length) {\n const ctx = opened[opened.length - 1] as HTMLNanoNavItemElement;\n items = Array.from(ctx.querySelectorAll('nano-nav-item, nano-option'));\n } else {\n items = getDirectChildren(\n this.el,\n 'nano-nav-item, nano-option',\n 'slot'\n ) as ValidElement[];\n }\n return items.filter((el) => !el.disabled && !el.hidden);\n }\n\n get activeItem() {\n const activeElement = getActiveElement();\n return this.getItems.find(\n (i) =>\n i.getAttribute('tabindex') === '0' ||\n i === activeElement ||\n i.classList.contains('has-focus')\n );\n }\n\n get selectedItem() {\n return this.getItems.find((i) => i.selected);\n }\n\n private async setActiveFocusItem(item?: ValidElement, focus = true) {\n const items = this.getItems;\n let activeItem =\n !item || item.disabled ? items.find((i) => i.selected) || items[0] : item;\n\n items\n .filter((i) => i.tagName.toLowerCase() === 'nano-option')\n .map((i: HTMLNanoOptionElement) =>\n i.setAttribute('tabindex', i === activeItem ? '0' : '-1')\n );\n\n if (!focus) return;\n\n if (activeItem) {\n (activeItem as NNI).setFocus\n ? (activeItem as NNI).setFocus()\n : activeItem.focus();\n } else this.menu.focus();\n }\n\n // Event Handlers\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let found: boolean;\n\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n found =\n getActiveElement() &&\n getActiveElement().closest(this.el.tagName.toLowerCase()) === this.el;\n } else found = !!e.composedPath().find((el) => el === this.el);\n\n if (!found) {\n this.resetActiveItem();\n this._hasFocus = false;\n this.nanoBlur.emit();\n }\n }\n\n private handleFocus = () => {\n this.setActiveFocusItem(this.selectedItem || this.getItems[0]);\n\n this._hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const item = target.closest('nano-nav-item');\n\n if (item && !item.disabled) {\n this.nanoSelect.emit(item);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // When keying through the menu, if the mouse happens to be hovering over a menu item and the menu scrolls, the\n // mouseout/mouseover event will fire causing the selection to be different than what the user expects. This gives\n // us a way to temporarily ignore mouse events while the user is interacting with a keyboard.\n clearTimeout(this.ignoreMouseTimeout);\n this.ignoreMouseTimeout = setTimeout(\n () => (this.ignoreMouseEvents = false),\n 500\n );\n this.ignoreMouseEvents = true;\n\n // Make a selection when pressing enter\n switch (event.key) {\n case ' ':\n if (this.activeItem) this.activeItem.click();\n break;\n case 'ArrowDown':\n case 'ArrowUp':\n case 'PageDown':\n case 'PageUp':\n case 'Home':\n case 'End':\n const items = this.getItems;\n const selectedItem = this.activeItem;\n let index = items.indexOf(selectedItem);\n\n if (items.length) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n index++;\n } else if (event.key === 'ArrowUp') {\n index--;\n } else if (event.key === 'Home' || event.key === 'PageUp') {\n index = 0;\n } else if (event.key === 'End' || event.key === 'PageDown') {\n index = items.length - 1;\n }\n\n if (index < 0) index = items.length - 1;\n if (index > items.length - 1) index = 0;\n\n this.setActiveFocusItem(items[index]);\n if (items[index]) items[index].scrollIntoView({ block: 'nearest' });\n return;\n }\n break;\n }\n\n // Handle type-to-search behavior when non-control characters are entered\n if (event.key === ' ' || /^[a-z0-9]+$/i.test(event.key)) {\n clearTimeout(this.typeToSelectTimeout);\n this.typeToSelectTimeout = setTimeout(\n () => (this.typeToSelect = ''),\n 750\n );\n this.typeToSelect += event.key;\n\n const items = this.getItems;\n for (const item of items) {\n const slot = item.shadowRoot.querySelector(\n 'slot:not([name])'\n ) as HTMLSlotElement;\n const label = getTextContent(slot).toLowerCase().trim();\n if (\n label.substring(0, this.typeToSelect.length) === this.typeToSelect\n ) {\n this.setActiveFocusItem(item);\n break;\n }\n }\n }\n };\n\n private handleMouseOver = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const item =\n target.closest('nano-nav-item') || target.closest('nano-option');\n\n if (item && !this.ignoreMouseEvents) {\n this.setActiveFocusItem(item);\n }\n };\n\n // Component Lifecycle\n\n render() {\n return (\n <Host\n class={{\n legacy: !CANSHADOW,\n }}\n >\n <div\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onMouseOver={this.handleMouseOver}\n onFocus={this.handleFocus}\n aria-label={this.label ? this.label : undefined}\n role={this.type}\n ref={(el) => (this.menu = el)}\n part=\"base\"\n class={{\n menu: true,\n ['menu--' + this.type]: true,\n 'menu--has-focus': this.hasFocus,\n }}\n tabIndex={-1}\n >\n <slot />\n </div>\n </Host>\n );\n }\n}\n","@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n:host {\n /**\n * @prop --padding-top: Defaults to #{$spacing-small};\n * @prop --padding-bottom: Defaults to #{$spacing-small};\n * @prop --padding-start: Defaults to #{$spacing-small};\n * @prop --padding-end: Defaults to #{$spacing-small};\n\n * @prop --bg: default background. Defaults to none;\n * @prop --bg-selected: background when selected. Defaults to #{$select-opt-selected};\n * @prop --bg-focus: background when focused. Defaults to var(--nano-color-base, #{nano-color(primary, tint)});\n * @prop --bg-disabled: background when disabled. Defaults to none;\n\n * @prop --color: default text color. Defaults to var(--input-text-color, #{$input-text-color});\n * @prop --color-selected: text color when selected. Defaults to var(--nano-color-base, #{nano-color(primary, base)});\n * @prop --color-focus: text color when focused. Defaults to var(--nano-color-base, #{nano-color(primary, contrast)});\n * @prop --color-disabled: text color when disabled. Defaults to #{map.get($colors, palegrey)};\n\n * @prop --opt-icon-size: Sizes all icons within the option. Defaults to 1.4em;\n */\n\n --bg: none;\n --bg-selected: #{$select-opt-selected};\n --bg-focus: var(--nano-color-base, #{nano-color(primary, tint)});\n --bg-disabled: none;\n --color: var(--input-text-color, #{$input-text-color});\n --color-selected: var(--nano-color-base, #{nano-color(primary, base)});\n --color-focus: var(--nano-color-contrast, #{nano-color(primary, contrast)});\n --color-disabled: #{map.get($colors, palegrey)};\n --opt-icon-size: 1.6em;\n\n display: block;\n color: var(--color);\n overflow: hidden;\n font-size: 14px;\n font-size: #{'clamp(12px, .9em, 16px)'};\n}\n\n:host(:focus) {\n outline: none;\n}\n\n.option {\n $self: &;\n\n position: relative;\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: stretch;\n width: 100%;\n background: var(--bg);\n\n @include padding(\n var(--padding-top),\n var(--padding-end),\n var(--padding-bottom),\n var(--padding-start)\n );\n\n // focus\n :host(:focus) &:not(.option--disabled),\n :host &.option--selected {\n outline: none;\n background: var(--bg-selected);\n color: var(--color-selected);\n }\n\n :host(:focus) &:not(.option--disabled) {\n background: var(--bg-focus);\n color: var(--color-focus);\n }\n\n // disabled\n &.option--disabled {\n outline: none;\n color: var(--color-disabled);\n cursor: not-allowed;\n background: var(--bg-disabled);\n }\n\n // no value\n &.option--novalue {\n font-style: italic;\n opacity: 0.7;\n }\n\n &__label {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n }\n\n &__start {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(nano-icon) {\n font-size: var(--opt-icon-size);\n }\n\n ::slotted(:last-child) {\n @include margin(null, 0.5em, null, null);\n }\n }\n\n &__end {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(nano-icon) {\n font-size: var(--opt-icon-size);\n }\n\n ::slotted(:first-child) {\n @include margin(null, null, null, 0.5em);\n }\n }\n\n &__check {\n visibility: hidden;\n display: flex;\n position: absolute;\n left: 0.6em;\n top: calc(50% - 0.6em);\n align-items: center;\n font-size: 0.9em;\n\n #{$self}--selected:not(#{$self}--novalue) & {\n visibility: visible;\n }\n }\n}\n","import {\n Component,\n Prop,\n h,\n Host,\n State,\n Watch,\n Element,\n Listen,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { OptionInterface } from '../../interface';\nimport { debounce, getDirectChildren } from '../../utils';\n\nlet optIds = 0;\n\n/**\n * Select options to be used with [nano-select](/story/nano-components-select) or [nano-datalist](/story/nano-components-select)\n *\n * @slot - main label. Defaults to `label` or `value` prop\n * @slot checked-icon - icon to indicated checked / selected state. Defaults to fontawesome light/check\n * @slot start - suitable for an icon or content displayed at the start of the main label\n * @slot end - suitable for an icon or content displayed at the end of the main label\n */\n@Component({\n tag: 'nano-option',\n styleUrl: 'option.scss',\n shadow: true,\n})\nexport class Option implements OptionInterface {\n private optId = `nano-option-${optIds++}`;\n @Element() host: HTMLNanoOptionElement;\n @State() hasFocus = false;\n\n constructor() {\n this.handleClick = debounce(this.handleClick.bind(this), 5);\n }\n\n // Public API\n\n /**\n * Value of the option\n */\n @Prop({ mutable: true, reflect: true }) value: string = '';\n\n @Watch('value')\n valueChanged() {\n if (!this.value || !this.value.length) this.value = this.labelContent;\n }\n\n /**\n * Label of the option\n */\n @Prop({ mutable: true, reflect: true }) label: string = '';\n\n @Watch('label')\n labelChanged() {\n if (!this.label || !this.label.length)\n this.label = this.labelContent.length ? this.labelContent : this.value;\n }\n\n /**\n * Whether this option is selected\n */\n @Prop({ reflect: true }) selected: boolean = false;\n\n /**\n * Whether this option should be disabled\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** You can add extra meta for this option. When displayed in a list, users\n * search / filter via extra related terms. Another usecase is 'endonyms'\n */\n @Prop() filterMeta: string = '';\n\n /** Fired when an option is selected */\n @Event() nanoSelect!: EventEmitter<HTMLNanoOptionElement>;\n\n // Event handlers\n\n // stop scrolling on select\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (e.key !== ' ' && e.key !== 'Enter') return;\n e.preventDefault();\n this.nanoSelect.emit(this.host);\n }\n\n private handleClick() {\n if (this.disabled) return;\n this.nanoSelect.emit(this.host);\n }\n\n // Private logic\n\n private get labelContent() {\n return getDirectChildren(this.host, '*:not([slot])', false)\n .map((el) => el.textContent)\n .join(' ')\n .trim();\n }\n\n // Component lifecycle\n\n componentWillLoad() {\n this.valueChanged();\n this.labelChanged();\n }\n\n render() {\n return (\n <Host\n role=\"option\"\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <div\n onMouseDown={this.handleClick}\n id={this.optId}\n class={{\n option: true,\n 'option--selected': this.selected,\n 'option--disabled': this.disabled,\n 'option--novalue': !this.value,\n }}\n >\n <div part=\"check-icon\" class=\"option__check\">\n <slot name=\"check-icon\">\n <nano-icon name=\"light/check\" aria-hidden=\"true\" />\n </slot>\n </div>\n <div part=\"start\" class=\"option__start\">\n <slot name=\"start\"></slot>\n </div>\n <div part=\"label\" class=\"option__label\">\n <slot>{this.label || this.value}</slot>\n </div>\n <div part=\"end\" class=\"option__end\">\n <slot name=\"end\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as o,h as i,e as r,g as s}from"./p-ab5813a7.js";import{P as e}from"./p-
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{r as t,c as o,h as i,e as r,g as s}from"./p-ab5813a7.js";import{P as e}from"./p-3de7735c.js";import"./p-289aa03f.js";const n=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--max-width:20rem;--hide-delay:0s;--hide-duration:0.125s;--hide-timing-function:ease;--show-delay:0.125s;--show-duration:0.125s;--show-timing-function:ease;display:contents}.tooltip{max-width:var(--max-width);border-radius:var(--nano-tooltip-border-radius, var(--nano-border-radius-small, 2px));background-color:black;font-size:var(--nano-fontsize-small, 0.875rem);line-height:1.5;color:white;opacity:0;padding:var(--nano-tooltip-padding, var(--nano-spacing-xsmall, 4px) var(--nano-spacing-small, 8px));-webkit-transform:translateY(10px) translateZ(0);transform:translateY(10px) translateZ(0);-webkit-transform-origin:bottom;transform-origin:bottom;-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:opacity, transform;transition-property:opacity, transform, -webkit-transform;-webkit-transition-delay:var(--hide-delay);transition-delay:var(--hide-delay);-webkit-transition-duration:var(--hide-duration);transition-duration:var(--hide-duration);-webkit-transition-timing-function:var(--hide-timing-function);transition-timing-function:var(--hide-timing-function);white-space:normal}.tooltip-arrow{content:"";position:absolute;width:0;height:0;color:black;-webkit-transition:0.2s ease transform;transition:0.2s ease transform}.tooltip-positioner{position:absolute;z-index:var(--nano-layer-index-tooltip, 1000);pointer-events:none}.tooltip-positioner[data-popper-placement^=top] .tooltip{-webkit-transform-origin:bottom;transform-origin:bottom;-webkit-transform:translateY(-10px) translateZ(0);transform:translateY(-10px) translateZ(0)}.tooltip-positioner[data-popper-placement^=bottom] .tooltip{-webkit-transform-origin:top;transform-origin:top}.tooltip-positioner[data-popper-placement^=left] .tooltip{-webkit-transform-origin:right;transform-origin:right}.tooltip-positioner[data-popper-placement^=right] .tooltip{-webkit-transform-origin:left;transform-origin:left}.tooltip-positioner.popover-visible .tooltip{opacity:1;-webkit-transform:none;transform:none;-webkit-transition-delay:var(--show-delay);transition-delay:var(--show-delay);-webkit-transition-duration:var(--show-duration);transition-duration:var(--show-duration);-webkit-transition-timing-function:var(--show-timing-function);transition-timing-function:var(--show-timing-function)}.tooltip-positioner[data-popper-placement^=bottom] .tooltip-arrow{bottom:100%;left:calc(50% - 5px);border-bottom:5px solid;border-left:5px solid transparent;border-right:5px solid transparent}.tooltip-positioner[data-popper-placement=bottom-start] .tooltip-arrow{left:5px}.tooltip-positioner[data-popper-placement=bottom-end] .tooltip-arrow{right:5px;left:auto}.tooltip-positioner[data-popper-placement^=top] .tooltip-arrow{top:100%;left:calc(50% - 5px);border-top:5px solid;border-left:5px solid transparent;border-right:5px solid transparent}.tooltip-positioner[data-popper-placement=top-start] .tooltip-arrow{left:5px}.tooltip-positioner[data-popper-placement=top-end] .tooltip-arrow{right:5px;left:auto}.tooltip-positioner[data-popper-placement^=left] .tooltip-arrow{top:calc(50% - 5px);left:100%;border-left:5px solid;border-top:5px solid transparent;border-bottom:5px solid transparent}.tooltip-positioner[data-popper-placement=left-start] .tooltip-arrow{top:5px}.tooltip-positioner[data-popper-placement=left-end] .tooltip-arrow{top:auto;bottom:5px}.tooltip-positioner[data-popper-placement^=right] .tooltip-arrow{top:calc(50% - 5px);right:100%;border-right:5px solid;border-top:5px solid transparent;border-bottom:5px solid transparent}.tooltip-positioner[data-popper-placement=right-start] .tooltip-arrow{top:5px}.tooltip-positioner[data-popper-placement=right-end] .tooltip-arrow{top:auto;bottom:5px}';let a=0;let p=class{constructor(i){t(this,i);this.nanoShow=o(this,"nanoShow",7);this.nanoAfterShow=o(this,"nanoAfterShow",7);this.nanoHide=o(this,"nanoHide",7);this.nanoAfterHide=o(this,"nanoAfterHide",7);this.componentId=`tooltip-${++a}`;this.isVisible=false;this.content="";this.placement="top";this.disabled=false;this.distance=10;this.open=false;this.skidding=0;this.trigger="hover focus";this.handleBlur=()=>{if(this.hasTrigger("focus")){this.hide()}};this.handleClick=()=>{if(this.hasTrigger("click")){this.open?this.hide():this.show()}};this.handleFocus=()=>{if(this.hasTrigger("focus")){this.show()}};this.handleKeyDown=t=>{if(this.open&&t.key==="Escape"){t.stopPropagation();this.hide()}};this.handleMouseOver=()=>{if(this.hasTrigger("hover")){this.show()}};this.handleMouseOut=()=>{if(this.hasTrigger("hover")){this.hide()}};this.handleSlotChange=()=>{this.target=this.getTarget()};this.handleTTSlotChange=()=>{const t=this.host.querySelector(`[id="${this.componentId}"]`)||this.host.shadowRoot.getElementById(this.componentId);Array.from(this.host.querySelectorAll('[slot="content"]')).filter((o=>o!==t)).forEach((o=>{t.appendChild(o)}))}}get target(){return this._target}set target(t){if(t!==this._target&&this._target){this._target.removeAttribute("aria-describedby")}t.setAttribute("aria-describedby",this.componentId);this._target=t}handleOpenChange(){this.open?this.show():this.hide()}async show(){if(this.isVisible){return}const t=this.nanoShow.emit();if(t.defaultPrevented){this.open=false;return}this.isVisible=true;this.open=true;this.popover.show()}async hide(){if(!this.isVisible){return}const t=this.nanoHide.emit();if(t.defaultPrevented){this.open=true;return}this.isVisible=false;this.open=false;this.popover.hide()}getTarget(){const t=[...Array.from(this.host.children)].find((t=>t.tagName.toLowerCase()!=="style"&&t.getAttribute("slot")!=="content"));if(!t){throw new Error("Invalid tooltip target: no child element was found.")}return t}hasTrigger(t){const o=this.trigger.split(" ");return o.includes(t)}syncOptions(){this.popover.setOptions({placement:this.placement,distance:this.distance,skidding:this.skidding,transitionElement:this.tooltip,onAfterHide:()=>this.nanoAfterHide.emit(),onAfterShow:()=>this.nanoAfterShow.emit()})}componentDidLoad(){this.target=this.getTarget();this.popover=new e(this.target,this.tooltipPositioner);this.syncOptions();const t=this.host.shadowRoot.getElementById(this.componentId);t.slot="content";this.host.appendChild(t);this.handleTTSlotChange();this.tooltipPositioner.hidden=!this.open;if(this.open){this.show()}}componentDidUpdate(){this.syncOptions()}disconnectedCallback(){this.popover.destroy()}render(){return i(r,{onKeyDown:this.handleKeyDown,onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.handleClick},i("slot",{onSlotchange:this.handleSlotChange}),!this.disabled&&i("div",{ref:t=>this.tooltipPositioner=t,class:"tooltip-positioner"},i("div",{part:"base",ref:t=>this.tooltip=t,class:{tooltip:true,"tooltip--open":this.open},role:"tooltip","aria-hidden":this.open?"false":"true"},i("slot",{name:"content",onSlotchange:this.handleTTSlotChange},i("div",{id:this.componentId},this.content)),i("div",{class:"tooltip-arrow","data-popper-arrow":true}))))}get host(){return s(this)}static get watchers(){return{open:["handleOpenChange"]}}};p.style=n;export{p as nano_tooltip};
|
5
|
+
//# sourceMappingURL=p-1e8321ea.entry.js.map
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,n,a){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function o(e){try{l(a.next(e))}catch(t){s(t)}}function r(e){try{l(a["throw"](e))}catch(t){s(t)}}function l(e){e.done?n(e.value):i(e.value).then(o,r)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,i,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return l([e,t])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(r){o=[6,r];i=0}finally{a=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var n=0,a=t.length,i=e.length;n<a;n++,i++)e[i]=t[n];return e};
|
2
2
|
/*!
|
3
3
|
* Web Components for Nanopore digital Web Apps
|
4
|
-
*/System.register(["./p-59b3d24b.system.js","./p-d24811c8.system.js","./p-1c216ca4.system.js","./p-e1f46998.system.js","./p-ef053a2f.system.js","./p-1d13dbdf.system.js","./p-9edbf25d.system.js"],(function(e,t){"use strict";var n,a,i,s,o,r,l,c,h,u,d,p,m;return{setters:[function(e){n=e.r;a=e.c;i=e.i;s=e.f;o=e.h;r=e.k;l=e.e;c=e.g},function(e){h=e.a},function(e){u=e.d},function(e){d=e.C},function(e){p=e.d},function(e){m=e.c},function(){}],execute:function(){var g=undefined&&undefined.__rest||function(e,t){var n={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0)n[a]=e[a];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++){if(t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i]))n[a[i]]=e[a[i]]}return n};function b(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,s,o,r,l,c,h,u;return __generator(this,(function(d){switch(d.label){case 0:n=t.body,a=g(t,["body"]);i={Accept:"application/json, text/plain, */*","Access-Control-Allow-Origin":"*","Content-Type":"application/json",Cache:"no-cache"};s=Object.assign(Object.assign({method:n?"POST":"GET",credentials:"include",keepalive:true,mode:"cors"},a),{headers:Object.assign(Object.assign({},i),a.headers)});if(n){s.body=JSON.stringify(n)}o=setTimeout((function(){}),0);if(window.AbortController){r=new AbortController;l=a.timeout,c=l===void 0?500:l;o=setTimeout((function(){return r.abort()}),c);s.signal=r.signal}return[4,fetch(e,s)];case 1:h=d.sent();clearTimeout(o);if(!h.ok)return[3,3];return[4,h.json()];case 2:return[2,d.sent()];case 3:return[4,h.text()];case 4:u=d.sent();return[2,new Error(u)]}}))}))}var f=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--padding:12px;--padding-top:var(--padding);--padding-end:var(--padding);--padding-bottom:var(--padding);--padding-start:var(--padding);--bar-background:#005c75;--bar-text-color:white;--bar-color-shade:rgb(19, 89, 111);--bar-color-tint:rgb(19, 89, 111);--bar-color-focus:#90c6e7;--menu-background:#001a21;--menu-text-color:white;--menu-dropdown-bg:#196c82;--menu-dropdown-color:white;display:block;position:relative;line-height:1.5;height:100%}:host *{-webkit-box-sizing:inherit;box-sizing:inherit}.global-nav{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;font-size:0.88em;z-index:var(--nano-layer-index-menubar, 10)}.global-nav button{background:none;color:inherit;border:none;padding:0}.global-nav .icon-btn{position:relative;background:none;color:inherit;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px 7px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .icon-btn nano-icon{width:18px;height:18px}.global-nav ::slotted(nano-nav-item[slot=icon]){--padding-top:9px;--padding-bottom:9px;--padding-start:7px;--padding-end:7px;--display:flex;font-size:18px}.global-nav a{color:inherit;text-decoration:none;white-space:nowrap}.global-nav .nav-links_title{margin:8px 0 3px}.global-nav .nav-links ul{margin:0;padding:0}.global-nav .nav-links li{list-style:none}.global-nav .login-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:0.94em}.global-nav .menu-btn{padding:9px var(--padding) 9px var(--padding)}.gn-menu{position:fixed;top:0;left:0;z-index:-1;display:none;-webkit-transition:z-index 0.01s ease 0.2s;transition:z-index 0.01s ease 0.2s;height:100vh;width:100vw;overflow-y:auto}:host([dir=rtl]) .gn-menu{left:auto;right:0}:host(.threshold-2) .gn-menu{position:absolute;width:calc(100vw - 20px)}.gn-menu.menu-full-screen{width:100vw !important}.gn-menu_wrap{max-width:92vw;width:335px;background:var(--menu-background);color:var(--menu-text-color);padding:var(--padding) 0;-webkit-box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);position:relative;pointer-events:all;margin-bottom:36px;opacity:0;outline:none;-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease}.gn-menu_wrap.has-promotion{padding:var(--padding) 0 0}.gn-menu.open{z-index:var(--nano-layer-index-dropdown, 300);-webkit-transition:z-index 0.01s ease;transition:z-index 0.01s ease}.gn-menu.open .gn-menu_wrap{opacity:1;-webkit-transform:translate3d(0, 0, 0) !important;transform:translate3d(0, 0, 0) !important;-webkit-transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s}.gn-menu_actions{padding-right:calc(var(--padding) / 2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu_actions{padding-right:unset;-webkit-padding-end:calc(var(--padding) / 2);padding-inline-end:calc(var(--padding) / 2)}}.gn-menu_actions-counter{background:#d0021b;color:#fff;position:absolute;bottom:4px;right:0;left:auto;font-size:9px;height:14px;line-height:14px;width:auto;min-width:14px;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;text-indent:0}.gn-menu .content-wrap{position:relative;overflow:hidden;-webkit-transition:0.2s ease min-height;transition:0.2s ease min-height;min-height:190px}.gn-menu .content--sub{padding:var(--padding) 0 var(--padding) 7px}.gn-menu .menu-btn{margin-right:auto}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .menu-btn{margin-right:unset;-webkit-margin-end:auto;margin-inline-end:auto}}.gn-menu .nav-links{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links ::slotted(nano-nav-item),.gn-menu .nav-links nano-nav-item{--icon-size:14px;--display:inline-block;--secondary-bg-color:#001a21;--padding-top:10px;--padding-bottom:10px;--padding-end:calc(var(--padding) * 2);--padding-start:calc(var(--padding) + 3px);--color:white;--color-hover:#90c6e7;--bg-color-hover:transparent;--bg-color-focus:#002530;--focus-outline:none;font-size:0.99em;width:100%}.gn-menu .nav-links .user-nav{--bg-color:#193037;--padding-top:9px;--padding-bottom:9px;font-weight:bold;margin:5px 0 0}.gn-menu .nav-links .user-nav ::slotted(nano-nav-item),.gn-menu .nav-links .user-nav nano-nav-item{font-weight:500;--bg-color:transparent}.gn-menu .nav-links_title{margin:0 var(--padding) 4px;border-bottom:1px solid #33484d;padding-bottom:8px;font-size:0.86em;text-transform:uppercase;color:#90c6e7;letter-spacing:1px;font-weight:700}.gn-menu .nav-links-wrap{margin:18px 0}.gn-menu .nav-links-wrap:last-child{margin-bottom:0}.gn-menu .nav-links .back-btn{border-top:1px solid #33484d;border-bottom:1px solid #33484d;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 11px 10px 0;width:100%;font-size:12px;text-transform:uppercase;color:#90c6e7;letter-spacing:1px;font-weight:700}.gn-menu .nav-links .back-btn nano-icon{margin-right:10px;font-size:12px;color:white}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .nav-links .back-btn nano-icon{margin-right:unset;-webkit-margin-end:10px;margin-inline-end:10px}}.gn-menu .nav-links--sub{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links--sub ::slotted(nano-nav-item),.gn-menu .nav-links--sub nano-nav-item{--border-bottom:none;--padding-end:var(--padding);--padding-start:var(--padding);--padding-top:8px;--padding-bottom:8px;margin:0;width:50%;line-height:1.8}.gn-menu .nav-links .content{padding:8px var(--padding)}.gn-menu .login-btn{padding-left:7px;padding-right:var(--padding);padding-top:9px;padding-bottom:9px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .login-btn{padding-left:unset;padding-right:unset;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:var(--padding);padding-inline-end:var(--padding)}}.gn-menu .login-btn nano-icon{margin-left:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .login-btn nano-icon{margin-left:unset;-webkit-margin-start:10px;margin-inline-start:10px;}}.gn-menu .logout-btn{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.gn-menu .logout-btn a{padding:0 5px}.sticker-trigger{background:var(--bar-background);width:100%;z-index:calc(var(--nano-layer-index-menubar, 10) + 1)}.bars{color:var(--bar-text-color);z-index:var(--nano-layer-index-menubar, 10);position:relative;max-width:100%;min-width:100%;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:0.2s ease box-shadow;transition:0.2s ease box-shadow}[stuck] .bars{-webkit-box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15);box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15)}.bars::before{content:"";width:100%;height:100%;z-index:-1;background:var(--bar-background);position:absolute}.bars .search-widget{margin-left:11px;margin-right:auto;position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:45vw;min-width:269px;max-height:36px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.bars .search-widget{margin-left:unset;margin-right:unset;-webkit-margin-start:11px;margin-inline-start:11px;-webkit-margin-end:auto;margin-inline-end:auto}}.bars .search-inputs{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0}.bars .search-inputs input[type=submit]{display:none}.bars .search-autocomplete{position:absolute;top:calc(100% - 2px);width:100%;left:0;background:white;border:2px solid var(--bar-color-tint);border-radius:0 0 5px 5px;color:#4a4a4a;font-size:0.85em;padding:calc(var(--padding) / 2) 0 1px 0;z-index:1}:host([dir=rtl]) .bars .search-autocomplete{left:auto;right:0}.bars .search-autocomplete-hit{padding:calc(var(--padding) / 4) var(--padding) calc(var(--padding) / 4) var(--padding);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;text-align:left;line-height:1.5;cursor:pointer}:host([dir=rtl]) .bars .search-autocomplete-hit{text-align:right}.bars .search-autocomplete-hit-scope{font-size:0.76em;color:#a7b0b3;font-weight:600}.bars .search-autocomplete-hit:hover,.bars .search-autocomplete-hit:focus{background-color:#e4e6e8}.bars .search-autocomplete-hit .search__highlight,.bars .search-autocomplete-hit em{font-weight:bold;font-style:normal}.bars .search-autocomplete-hit--no-result:hover,.bars .search-autocomplete-hit--no-result:focus{background:none !important}.bars .search-autocomplete-foot{margin:7px 0 0}.bars .search-autocomplete-submit{background:none;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px var(--padding);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#007495;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;width:100%;text-decoration:underline;border-top:1px solid #e8eaea}.bars .search-autocomplete-submit:hover,.bars .search-autocomplete-submit:focus{background-color:#e4e6e8}.bars .search-input{--input-border-style:solid 1px rgb(85, 140, 157);--input-border-style--focus:solid 1px var(--bar-color-focus, #90c6e7);--input-border-width:1px;font-size:0.9em}.bars nano-select.search-input{--input-bg-color:var(--bar-color-tint, rgb(88, 140, 161));--input-text-color:inherit;--input-border-radius:5px 0 0 5px;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;left:1px}:host([dir=rtl]) .bars nano-select.search-input{--input-border-radius:0 5px 5px 0}:host(:not(.ready)) .bars nano-select.search-input{overflow:hidden;max-height:1em}.bars nano-select.search-input .down-arrow{font-size:0.65em}.bars nano-input.search-input{--input-text-color:inherit;--input-bg-color:var(--bar-color-shade, rgb(40, 110, 133));--clear-btn-color:#4a4a4a;--input-border-radius:0 5px 5px 0;--placeholder-color:white;width:206px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}:host([dir=rtl]) .bars nano-input.search-input{--input-border-radius:5px 0 0 5px}:host(:not(.ready)) .bars nano-input.search-input{overflow:hidden;max-height:1em}.bars nano-input.search-input.has-value{--input-bg-color:#fff;--input-text-color:#4a4a4a}.bars nano-input.search-input.has-value .search-icon{color:#4a4a4a}.bars nano-input.search-input .search-icon{background:none;color:white;padding:0 8px;display:none}.bars nano-input.search-input .search-icon--show{display:-webkit-box;display:-ms-flexbox;display:flex}.bars nano-input.search-input .search-icon--loader{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.bars nano-input.search-input .search-icon nano-icon{height:1.4em}.main-bar{width:100%;padding-left:0;padding-right:var(--padding);padding-top:var(--padding);padding-bottom:var(--padding);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow-x:hidden}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar{padding-left:unset;padding-right:unset;-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--padding);padding-inline-end:var(--padding)}}.main-bar:focus{outline:none}:host(.ready) .main-bar{overflow-x:visible}.main-bar>*,.main-bar ::slotted(*){-webkit-transition:opacity 0.2s ease;transition:opacity 0.2s ease}:host(:not(.ready)) .main-bar>*,:host(:not(.ready)) .main-bar ::slotted(*){opacity:0 !important}:host(.ready) .main-bar>*,:host(.ready) .main-bar ::slotted(*){opacity:1}:host(.resizing) .main-bar>*,:host(.resizing) .main-bar ::slotted(*){opacity:0 !important}.main-bar>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.main-bar>* ::slotted(nano-nav-item[slot=icon]){margin-left:11px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar>* ::slotted(nano-nav-item[slot=icon]){margin-left:unset;-webkit-margin-start:11px;margin-inline-start:11px;}}.main-bar>* ::slotted(nano-nav-item),.main-bar>* nano-nav-item{--color-hover:#e4e6e8;--secondary-bg-color:var(--menu-dropdown-bg);--secondary-color:var(--menu-dropdown-color);--bg-color-open:var(--bar-background);text-decoration:none !important}.main-bar .icon-btn{margin-left:6px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .icon-btn{margin-left:unset;-webkit-margin-start:6px;margin-inline-start:6px;}}:host(.threshold-2) .main-bar .icon-btn{margin-left:11px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.threshold-2) .main-bar .icon-btn{margin-left:unset;-webkit-margin-start:11px;margin-inline-start:11px;}}.main-bar .menu-btn.icon-btn{margin:0 !important}:host(:not([dir=rtl])) .main-bar .menu-btn.icon-btn{border-right:1.5px solid var(--bar-color-shade)}:host([dir=rtl]) .main-bar .menu-btn.icon-btn{border-left:1.5px solid var(--bar-color-shade)}.main-bar .user-links{position:relative}.main-bar .user-links .icon-btn{padding-right:0;font-size:0.93em;font-weight:500}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .user-links .icon-btn{padding-right:unset;-webkit-padding-end:0;padding-inline-end:0}}.main-bar .user-links .icon-btn nano-icon{margin-left:5px;width:16px;height:16px;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, color 0.2s ease;transition:transform 0.2s ease, color 0.2s ease, -webkit-transform 0.2s ease}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .user-links .icon-btn nano-icon{margin-left:unset;-webkit-margin-start:5px;margin-inline-start:5px;}}.main-bar .user-links .icon-btn.open nano-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);color:#007495}.main-bar .user-links-panel{display:none;position:absolute;border-radius:4px 0 4px 4px;-webkit-box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);background-color:#568c9d;opacity:0;-webkit-transform:translate3d(0, 24px, 0);transform:translate3d(0, 24px, 0);-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease;right:0;font-size:0.85em;min-width:250px;z-index:1}:host([dir=rtl]) .main-bar .user-links-panel{right:auto;left:0}.main-bar .user-links-panel:focus{outline:none}.main-bar .user-links-panel.show{opacity:1;-webkit-transform:translate3d(0, 4px, 0);transform:translate3d(0, 4px, 0)}.main-bar .user-links-panel-content{padding:0 18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main-bar .user-links-panel-content a{padding:11px 0;border-bottom:#669dac 1px solid}.main-bar .user-links-panel-content a:hover,.main-bar .user-links-panel-content a:focus{color:#455556}.main-bar .user-links-panel-content a:last-child{border-bottom:none}.main-bar .user-links-panel-foot{background-color:#aac5cd;border-radius:0 0 4px 4px;padding:var(--padding);color:#455556;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:500;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.main-bar .user-links-panel-foot a:hover{text-decoration:underline}.main-bar .logo{height:34px;width:auto;min-width:196px}:host(:not(.threshold-1)) .main-bar .logo{height:30px}.main-bar .logo-link{margin-left:0;margin-right:auto;padding-left:11px;padding-right:11px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .logo-link{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:auto;margin-inline-end:auto}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .logo-link{padding-left:unset;padding-right:unset;-webkit-padding-start:11px;padding-inline-start:11px;-webkit-padding-end:11px;padding-inline-end:11px}}.main-bar .nav-links{font-size:0.75rem;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ::slotted(nano-nav-item),.main-bar .nav-links nano-nav-item{--padding-top:7px;--padding-bottom:7px;--padding-end:2px;--padding-start:2px;--margin:0 8px}.main-bar .nav-links--main{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;letter-spacing:0.33px;font-weight:600;font-stretch:expanded;font-size:0.8125rem}.main-bar .nav-links--main ::slotted(nano-nav-item){--color:#fff;--padding-end:3px;--padding-start:0}.main-bar .nav-links--sub{margin-left:6px;--color:#e2e2e2;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .nav-links--sub{margin-left:unset;-webkit-margin-start:6px;margin-inline-start:6px;}}.main-bar .login-btn{display:inline-block;border-radius:4px;background-color:#17bb75;color:#fff;padding:3px 10px;position:relative;left:auto;bottom:auto;margin-left:11px;margin-right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .login-btn{margin-left:unset;margin-right:unset;-webkit-margin-start:11px;margin-inline-start:11px;-webkit-margin-end:0;margin-inline-end:0}}.main-bar .measure-ele{min-width:1px;display:block;margin:0;padding:0}.search-bar{height:0;overflow:hidden;-webkit-transition:0.2s ease height;transition:0.2s ease height;padding:0 var(--padding);outline:none;max-width:45em;margin-left:auto}.search-bar .search-widget{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;overflow:inherit;max-width:none;max-height:none;padding:0 0 var(--padding)}.search-bar .search-inputs{padding:0 0;margin:0 0}.search-bar .search-autocomplete{top:calc(100% - (var(--padding) + 1px))}.site-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:min-height 0.2s ease;transition:min-height 0.2s ease;min-height:calc(100% - 61px);position:relative;z-index:auto;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.mask{opacity:0;background:rgba(0, 0, 0, 0.3);position:fixed;left:0;right:0;top:0;height:100vh;z-index:-1;-webkit-transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;visibility:hidden}.mask.open{opacity:1;-webkit-transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;z-index:3;visibility:visible}';var v={search:0,about:1,main:2,login:3,icon:4};var x=e("nano_global_nav",function(){function e(e){var t=this;n(this,e);this.nanoIsReady=a(this,"nanoIsReady",7);this.nanoSearchResult=a(this,"nanoSearchResult",7);this.nanoSearchError=a(this,"nanoSearchError",7);this.nanoSearchReset=a(this,"nanoSearchReset",7);this.currSize=0;this.thresholdsGoingUp=false;this.THRESHOLDLIMIT=Object.keys(v).length;this.autocompleteEles=[];this.currAIndex=-1;this.isLoggedIn=false;this.myAccData=null;this.aboutNavItms=[];this.siteNavItms=[];this.loggedInNavItms=[];this.hasLoggedinSlot=false;this.hasSiteSlot=false;this.hasPromotionSlot=false;this.aboutSlotLen=0;this.iconSlotLen=0;this.mainSlotLen=0;this.overflowSlotLen=0;this.searchSlotLen=0;this.internalSearchIndeces=[];this.thresholdReady=false;this.remoteDataReady=false;this.ready=false;this.isResizing=false;this.threshold=this.THRESHOLDLIMIT;this.modalOpen=false;this.modalIsOpen=false;this.searchBarShown=false;this.scrollingUp=true;this.searchLoading=false;this.showAutocomplete=false;this.secondaryMenuOpen=false;this.userMenuOpen=false;this.menuFullScreen=false;this.searchValInternal="";this.env="prod";this.ssoRedirect=encodeURIComponent(window.location.href);this.getMyAccountData=true;this.activeMyAccountSections=null;this.showSearch=true;this.showLogo=true;this.logoUrl=location.protocol+"//"+location.host;this.searchIndeces=[];this.myAccountUser=null;this.searchValue="";this.searchIndex="all_prod_en";this.cartCount=0;this.msgCount=0;this.cartUrl=null;this.msgUrl=null;this.setResizingState=function(e){if(e===void 0){e=false}if(typeof t.debounceSetResizingState==="undefined"){t.debounceSetResizingState=p(t.setResizingState,600)}if(e){t.isResizing=true;t.debounceSetResizingState()}else{t.isResizing=false;t.thresholdsGoingUp=false}};this.onMenuBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.modalOpen?t.menuClose(e,true):t.menuOpen();break}};this.onMenuBtnClick=function(e){t.menuClose(e,true)};this.menuOpen=function(e){if(e)e.preventDefault();t.menuDiv.style.display="block";t.modalOpen=true;t.modalIsOpen=true;t.menuWrapDiv.addEventListener("focusout",t.menuClose);t.menuWrapDiv.focus({preventScroll:true});if(t.threshold<2||t.menuWrapDiv.scrollHeight>window.innerHeight){document.body.style.overflow="hidden";t.menuFullScreen=true}else document.body.style.overflowX="hidden"};this.onMenuHidden=function(){t.menuDiv.removeEventListener("transitionend",t.onMenuHidden);t.menuWrapDiv.removeEventListener("focusout",t.menuClose);document.body.style.overflow="";t.menuDiv.style.display="none";t.modalIsOpen=false;t.menuFullScreen=false;setTimeout((function(){if(document.activeElement===document.body&&t.menuBtn)t.mainBarDiv.focus({preventScroll:true})}),50)};this.menuClose=function(e,n){if(n===void 0){n=false}if(!n){var a=e;if(a&&a.relatedTarget&&m("#global-nav-menu",a.relatedTarget))return;if(a&&a.relatedTarget&&a.relatedTarget.closest("#global-nav-menu"))return;if(a&&a.relatedTarget&&a.relatedTarget.closest('[slot="promotion"]'))return;if(t.secondaryMenuOpen)return}t.modalOpen=false;t.menuDiv.addEventListener("transitionend",t.onMenuHidden)};this.subMenuClose=function(e){e.preventDefault();e.target.closest("nano-nav-item").open=false};this.onUserBtnClick=function(e){e.preventDefault();t.userMenuOpen=!t.userMenuOpen};this.onUserBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.userMenuOpen=!t.userMenuOpen;break}};this.onUserMenuBlur=function(e){if(!e.relatedTarget){t.userMenuOpen=false;return}if(!!e.relatedTarget.closest(".user-links-panel"))return false;t.userMenuOpen=false};this.onSearchBtnClick=function(e){e.preventDefault();if(!t.searchBarShown)t.searchbarShow();else t.searchbarHide()};this.onSearchBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.searchBarShown?t.searchbarHide():t.searchbarShow();break}};this.onSearchBarShown=function(){t.searchBarEl.removeEventListener("transitionend",t.onSearchBarShown);if(t.searchInput)t.searchInput.setFocus();t.searchBarEl.style.overflow="visible"};this.searchbarHide=function(e){if(e&&e.relatedTarget&&e.relatedTarget.closest("#global-nav-search-bar"))return;t.showAutocomplete=false;if(t.searchValInternal.length&&e)return;t.searchBarEl.addEventListener("transitionend",t.onSearchBarHidden);t.searchBarEl.style.overflow="hidden";t.searchBarEl.style.height="0px"};this.onSearchBarHidden=function(){t.searchBarEl.removeEventListener("transitionend",t.onSearchBarHidden);t.searchBarEl.style.display="none";t.searchBarShown=false};this.onSearchInput=function(e){t.searchValInternal=t.searchInput.value;if(!t.isSearchValSet()){t.searchLoading=false;return}if(e.detail.type==="input"){t.showAutocomplete=false;t.searchLoading=true}};this.onSearchChange=function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,a,i;return __generator(this,(function(s){switch(s.label){case 0:this.searchValInternal=this.searchValue=e?e.detail.value:this.searchValInternal;this.showAutocomplete=false;this.autocompleteResults=null;if(!this.isSearchValSet()){if(!this.searchValInternal.length){this.nanoSearchReset.emit()}this.searchLoading=false;return[2]}if(!this.currentIndex)this.currentSelectedIndex();s.label=1;case 1:s.trys.push([1,3,,4]);t=this;n=this.processSearchResults;return[4,this.currentIndex.alogliaIndex.search(this.searchValInternal,{attributesToSnippet:["body:5","title:8"],hitsPerPage:5,filters:"created > "+Math.floor((Date.now()-631152e5)/1e3)})];case 2:t.autocompleteResults=n.apply(this,[s.sent()]);return[3,4];case 3:a=s.sent();console.error(a);return[3,4];case 4:this.scopeSearch=null;i=this;return[4,this.onSearchSubmit(null,false)];case 5:i.scopeSearch=s.sent();this.searchLoading=false;this.showAutocompleteResults();return[2]}}))}))};this.onSearchSubmit=function(e,n){if(n===void 0){n=true}return __awaiter(t,void 0,void 0,(function(){var t,a,i,s;var o=this;return __generator(this,(function(r){switch(r.label){case 0:if(e)e.preventDefault();if(!this.isSearchValSet())return[2];this.searchLoading=true;this.algoliaSearchResults=null;if(!this.currentIndex)this.currentSelectedIndex();t=this.internalSearchIndeces.map((function(e){return{indexName:e.index,query:o.searchValInternal,facets:e.filters,hitsPerPage:10,filters:"created > "+Math.floor((Date.now()-631152e5)/1e3)}}));r.label=1;case 1:r.trys.push([1,3,,4]);a=this;i=this.processSearchResults;return[4,this.algoliaClient.multipleQueries(t)];case 2:a.algoliaSearchResults=i.apply(this,[r.sent()]);return[3,4];case 3:s=r.sent();this.nanoSearchError.emit(s);return[3,4];case 4:this.searchLoading=false;if(!this.algoliaSearchResults)return[2];this.algoliaSearchResults.results.map((function(e,t){e.indexName=o.internalSearchIndeces[t].name;e.selected=o.currentIndex.name===o.internalSearchIndeces[t].name;e.domain=o.currentIndex.domain||null;e.domains=o.myAccData.domains||null;e.allGroup=!!o.internalSearchIndeces[t].allGroup;e.filters=o.internalSearchIndeces[t].filters}));if(n){this.nanoSearchResult.emit({results:this.algoliaSearchResults.results,client:{apiKey:this.searchApiKey,appId:this.searchAppId}});this.showAutocomplete=false}return[2,this.algoliaSearchResults]}}))}))};this.onSearchIndexChange=function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=e;n=e;if(!this.currentIndex)this.currentSelectedIndex();if(t.detail&&t.detail.value.length)n=t.detail.value;if(!n||!n.length)return[2];if(this.currentIndex.index===n)return[2];a=this.internalSearchIndeces.find((function(e){return e.index===n}));if(!a||!a.alogliaIndex)return[2];this.searchIndex=a.index;if(!this.isSearchValSet())return[3,2];return[4,this.onSearchChange()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};this.switchIndexSubmit=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.isSearchValSet())return[3,2];return[4,this.onSearchIndexChange(e)];case 1:t.sent();this.onSearchSubmit();return[3,3];case 2:this.onSearchIndexChange(e);t.label=3;case 3:return[2]}}))}))};this.onAutocompleteBlur=function(e){if(!t.showAutocomplete||!t.autocompleteResults)return;if(e&&e.target&&e.target.closest(".search-widget"))return;t.showAutocomplete=false};this.showAutocompleteResults=function(){if(!t.autocompleteResults||!t.autocompleteResults.hits)return;t.showAutocomplete=true};this.onAutocompleteInteract=function(e){if(!t.showAutocomplete||!t.autocompleteResults)return;var n=t.currAIndex;switch(e.key){case"Tab":setTimeout((function(){if(!t.el.shadowRoot.activeElement||!t.el.shadowRoot.activeElement.closest(".search-widget")){t.showAutocomplete=false;return}else{var e=t.autocompleteEles.find((function(e,n){if(e===t.el.shadowRoot.activeElement){t.currAIndex=n;return true}}));if(e)t.setActiveElement(e);else t.currAIndex=-1}}));break;case"ArrowDown":case"ArrowUp":if(e.key==="ArrowDown")n++;else if(e.key==="ArrowUp")n--;var a=t.autocompleteEles[n];if(a||n<0||n>t.autocompleteEles.length-1)e.preventDefault();if(a){t.setActiveElement(a);t.currAIndex=n}else if(n<0){t.searchInput.setFocus();t.currAIndex=-1}break;case"Enter":case" ":if(t.autocompleteEles[t.currAIndex]){t.autocompleteEles[t.currAIndex].click()}break}}}e.prototype.submitSearch=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.onSearchSubmit();this.showAutocomplete=false;return[2]}))}))};e.prototype.currentSelectedIndex=function(){var e=this;if(!this.internalSearchIndeces.length){return}var t=this.internalSearchIndeces.find((function(t){return t.index===e.searchIndex}));if(!t){this.currentIndex=this.internalSearchIndeces[0];console.error("index not found");return}this.currentIndex=t;return t};e.prototype.changeInternalSearchVal=function(){if(this.searchValInternal!==this.searchValue)this.searchValue=this.searchValInternal};e.prototype.initAlgoliaClient=function(){if(!this.searchAppId||!this.searchApiKey)return;this.algoliaClient=h(this.searchAppId,this.searchApiKey);this.addAlgoliaIndeces()};e.prototype.addIndeces=function(){this.internalSearchIndeces=__spreadArray(__spreadArray([],this.internalSearchIndeces),this.searchIndeces)};e.prototype.addAlgoliaIndeces=function(){var e=this;if(!this.algoliaClient||!this.internalSearchIndeces.length)return;this.internalSearchIndeces.forEach((function(t){t.alogliaIndex=e.algoliaClient.initIndex(t.index)}));if(!this.searchIndex)this.searchIndex=this.internalSearchIndeces[0].index};e.prototype.thresholdChange=function(e,t){if(e>t){this.thresholdsGoingUp=true;this.setResizingState(true)}};e.prototype.ratioChange=function(){var e=this;if(this.intersectRatio<1&&this.threshold>0){if(this.thresholdsGoingUp)this.setResizingState(true);this.threshold--;setTimeout((function(){return e.ratioChange()}),500)}else{this.thresholdReady=true;this.siteContent.style.minHeight="calc(100% - "+(this.barsDiv.clientHeight+1)+"px)";var t,n;i((function(){t=__spreadArray(__spreadArray([],Array.from(e.el.querySelectorAll('nano-nav-item[slot="site"]'))),Array.from(e.el.querySelectorAll('nano-nav-item[slot="overflow"]')));n=[];if(e.threshold<e.THRESHOLDLIMIT-v.icon)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="icon"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="icon"]')));if(e.threshold<e.THRESHOLDLIMIT-v.login)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="loggedin"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="loggedin"]')));if(e.threshold<e.THRESHOLDLIMIT-v.main)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="main"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="main"]')));if(e.threshold<e.THRESHOLDLIMIT-v.about)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="about"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="about"]')))}));s((function(){t.forEach((function(e){e.classList.add("nano-global-nav-menu");e.classList.remove("nano-global-nav-bar")}));n.forEach((function(e){e.classList.remove("nano-global-nav-menu");e.classList.add("nano-global-nav-bar")}))}))}};e.prototype.assessReady=function(){if(this.thresholdReady&&this.remoteDataReady){this.ready=true}};e.prototype.remoteReady=function(){this.attachIO()};e.prototype.isReady=function(){this.nanoIsReady.emit()};e.prototype.setupAutocompleteBlur=function(){if(this.showAutocomplete){this.el.shadowRoot.addEventListener("click",this.onAutocompleteBlur)}else{this.el.shadowRoot.removeEventListener("click",this.onAutocompleteBlur)}};e.prototype.slotChange=function(){this.threshold=this.THRESHOLDLIMIT};e.prototype.thresholdClasses=function(){var e=[];var t=0;for(t;t<this.threshold;t++)e.push("threshold-"+(t+1));return e};e.prototype.onWindowResize=function(){if(this.threshold<this.THRESHOLDLIMIT&&window.innerWidth>this.currSize){this.threshold=this.THRESHOLDLIMIT}this.currSize=window.innerWidth;this.searchBarShown=false};e.prototype.secondaryOpen=function(e){if(!e.detail.secondaryMenu)return;e.stopPropagation();this.secondaryMenuOpen=true;this.menuContentDiv.style.minHeight=e.detail.secondaryMenu.scrollHeight+"px"};e.prototype.secondaryClose=function(e){if(!e.detail.secondaryMenu)return;e.stopPropagation();this.secondaryMenuOpen=false;this.menuContentDiv.style.minHeight=""};e.prototype.handleUserMenu=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,u(this.userLinkPanel,"show",this.userMenuOpen)];case 1:e.sent();if(this.userMenuOpen){this.userLinkPanel.focus();this.userLinkPanel.addEventListener("focusout",this.onUserMenuBlur)}else{this.userLinkPanel.removeEventListener("focusout",this.onUserMenuBlur);this.el.focus()}return[2]}}))}))};e.prototype.searchbarShow=function(){var e=this;this.searchBarShown=true;this.searchBarEl.addEventListener("transitionend",this.onSearchBarShown);this.searchBarEl.style.display="block";setTimeout((function(){e.searchBarEl.style.height=e.searchBarEl.querySelector(".search-widget").scrollHeight+"px"}),50)};e.prototype.autocompleteSnippet=function(e){var t=["title"];if(e._snippetResult){var n=t.find((function(t){return e._snippetResult[t]&&e._snippetResult[t].matchLevel!=="none"}));if(n){if(n!=="title")return(e.title.length>15?e.title.substring(0,15)+" ...":e.title)+" "+e._snippetResult[n].value;else return e._snippetResult["title"].value}}return e.title};e.prototype.isSearchValSet=function(){if(this.searchValInternal.length<3)return false;return true};e.prototype.resetHitFocus=function(){this.currAIndex=-1};e.prototype.setActiveElement=function(e){this.autocompleteEles.map((function(e){return e.setAttribute("aria-selected","false")}));e.focus({preventScroll:true});e.setAttribute("aria-selected","true")};e.prototype.assessSlottedContent=function(){var e=this;i((function(){e.hasSiteSlot=!!e.el.querySelectorAll('[slot="site"]').length;e.hasLoggedinSlot=!!e.el.querySelectorAll('[slot="loggedin"]').length;e.hasPromotionSlot=!!e.el.querySelectorAll('[slot="promotion"]').length;e.aboutSlotLen=e.el.querySelectorAll('[slot="about"]').length;e.iconSlotLen=e.el.querySelectorAll('[slot="icon"]').length;e.mainSlotLen=e.el.querySelectorAll('[slot="main"]').length;e.overflowSlotLen=e.el.querySelectorAll('[slot="overflow"]').length;e.searchSlotLen=e.el.querySelectorAll('[slot="search"]').length}))};e.prototype.attachIO=function(){var e=this;if(this.io)return;var t=this.el.shadowRoot.querySelector(".global-nav .main-bar");if(typeof window!=="undefined"&&window.IntersectionObserver&&!!t){var n=this.io=new window.IntersectionObserver((function(t){e.intersectRatio=t.slice(-1)[0].intersectionRatio}),{root:t,threshold:1});n.observe(t.querySelector(".measure-ele"))}};e.prototype.componentDidLoad=function(){{this.debounceResize=p(this.onWindowResize.bind(this),300);window.addEventListener("resize",this.debounceResize);this.currSize=window.innerWidth}this.initAlgoliaClient();this.addAlgoliaIndeces();if(this.remoteDataReady)this.attachIO()};e.prototype.componentWillLoad=function(){var e=this;d.init(this,["searchIndex","searchValue"],"url-hash","gns");if(typeof window!=="undefined"&&window.MutationObserver){var t=this.mo=new MutationObserver((function(){e.assessSlottedContent()}));t.observe(this.el,{childList:true,subtree:false})}this.assessSlottedContent()};e.prototype.disconnectedCallback=function(){if(this.io){this.io.disconnect();this.io=undefined}if(this.mo){this.mo.disconnect();this.mo=undefined}window.removeEventListener("resize",this.debounceResize)};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.getMyAccData();return[2]}))}))};e.prototype.autocompleteList=function(){var e=this;var t;if(this.showAutocomplete&&this.scrollingUp){var n=0;var a=0;var i=function(t,n){return n.index!==e.currentIndex.index?t+n.hits.length:t};var s=function(t,n){return n.index===e.currentIndex.index?t+n.hits.length:t};if(this.scopeSearch){a=this.scopeSearch.results.reduce(i,0);n=this.scopeSearch.results.reduce(s,0)}if(this.autocompleteResults&&this.autocompleteResults.hits.length||a&&!n){var r=0;t=o("div",null,!n&&o("div",{class:"search-autocomplete-hit search-autocomplete-hit--no-result"},"No results matching '",this.searchValInternal,"' were found in"," ",o("strong",null,this.currentIndex.name),". Try another phrase."),this.autocompleteResults&&[this.autocompleteResults.hits.map((function(t,n){return o("a",{role:"option",ref:function(t){return e.autocompleteEles.push(t)},tabindex:"-1",id:"autocomplete-hit-"+n,href:t.url,class:"search-autocomplete-hit",innerHTML:e.autocompleteSnippet(t)})}))],(!n||this.currentIndex.allGroup)&&this.scopeSearch&&this.scopeSearch.results&&[this.scopeSearch.results.map((function(t,n){if(!t.hits.length||t.index===e.currentIndex.index||r>1)return;r++;return o("button",{role:"option",ref:function(t){return e.autocompleteEles.push(t)},tabindex:"-1",id:"autocomplete-scope-"+n,class:"search-autocomplete-hit",onClick:function(){return e.switchIndexSubmit(t.index)},onMouseDown:function(){return e.switchIndexSubmit(t.index)}},'"',e.searchValInternal,'"'," ",o("div",{class:"search-autocomplete-hit-scope"},"in ",t.indexName))}))],!!n&&o("div",{class:"search-autocomplete-foot"},o("button",{role:"option",class:"search-autocomplete-submit",ref:function(t){return e.autocompleteEles.push(t)},id:"autocomplete-foot",onClick:this.onSearchSubmit,onMouseDown:this.onSearchSubmit},"View all results")))}else if(!n){t=o("div",{class:"search-autocomplete-hit search-autocomplete-hit--no-result"},"No results matching '",this.searchValInternal,"' were found. Try another phrase.")}}return o("div",{class:"search-autocomplete",role:"listbox",id:"autocomplete-results","aria-expanded":this.showAutocomplete?"true":"false",hidden:!this.showAutocomplete,onKeyDown:this.onAutocompleteInteract},t)};e.prototype.searchWidget=function(){var e=this;return[o("form",{class:"search-inputs",onSubmit:this.onSearchSubmit,id:"global-nav-search"},o("nano-select",{class:"search-input",label:"Which area of content would you like to search?",hideLabel:true,showInlineError:false,value:this.searchIndex,onNanoChange:this.onSearchIndexChange,mask:true},this.internalSearchIndeces.map((function(t){return o("nano-option",{selected:t.index===e.searchIndex,value:t.index},t.name||t.index)})),o("nano-icon",{name:"solid/caret-down",class:"down-arrow",slot:"down-arrow"})),o("nano-input",{class:"search-input",label:"What would you like to search for?","aria-label":"What would you like to search for?",hideLabel:true,showInlineError:false,"clear-input":true,placeholder:"Search...",type:"text",ref:function(t){return e.searchInput=t},onNanoChange:this.onSearchChange,onNanoInput:this.onSearchInput,onKeyDown:this.onAutocompleteInteract,debounce:500,"aria-autocomplete":"list","aria-activedescendant":this.autocompleteEles[this.currAIndex]?this.autocompleteEles[this.currAIndex].id:false,"aria-controls":"autocomplete-results",onNanoFocus:this.showAutocompleteResults,value:this.searchValue,role:"textbox"},o("button",{class:{"search-icon":true,"search-icon--search":true,"search-icon--show":!this.searchValInternal.length},slot:"end",onMouseDown:function(t){e.searchValInternal=e.searchInput.value;e.onSearchSubmit(t,true)}},o("nano-icon",{name:"light/search"})),o("span",{class:{"search-icon":true,"search-icon--loader":true,"search-icon--show":this.searchLoading},slot:"end"},o("nano-icon",{name:"light/spinner-third"}))),o("input",{type:"submit"}))]};e.prototype.render=function(){var e;var t=this;this.autocompleteEles=[];var n=this.el.ownerDocument.dir==="rtl";var a=this.searchWidget();a.push(this.autocompleteList());return o(l,{class:(e={},e[this.thresholdClasses().join(" ")]=true,e.ready=this.ready,e["search-bar-shown"]=this.searchBarShown&&this.scrollingUp,e["search-auto-complete-shown"]=this.showAutocomplete&&this.scrollingUp,e["modal-open"]=this.modalIsOpen,e.resizing=this.isResizing,e),dir:n?"rtl":null},o("div",{class:{"global-nav":true,"scrolling-down":!this.scrollingUp}},o("nav",{id:"global-nav-menu",class:{"gn-menu":true,open:this.modalOpen,"has-promotion":this.hasPromotionSlot,"menu-full-screen":this.menuFullScreen,"secondary-open":this.secondaryMenuOpen},"aria-expanded":this.modalOpen?"true":"false",ref:function(e){return t.menuDiv=e}},o("div",{class:"gn-menu_wrap",ref:function(e){return t.menuWrapDiv=e},tabindex:"-1"},o("div",{class:"gn-menu_actions"},o("button",{class:"menu-btn icon-btn icon-btn",onMouseDown:this.onMenuBtnClick,onKeyDown:this.onMenuBtnKeyDown},this.threshold<this.THRESHOLDLIMIT-3&&o("nano-icon",{name:"light/times","aria-label":"close menu"}),this.threshold>=this.THRESHOLDLIMIT-3&&o("nano-icon",{name:"light/bars","aria-label":"close menu"})),this.threshold<this.THRESHOLDLIMIT-v.icon&&[!!this.iconSlotLen&&o("slot",{name:"icon"}),this.myAccData&&(!this.activeMyAccountSections||this.activeMyAccountSections.includes("icons"))&&[this.msgUrl&&o("a",{href:this.msgUrl,class:"icon-btn"},o("nano-icon",{name:"light/bell"}),this.msgCount>0&&o("span",{class:"gn-menu_actions-counter"},this.msgCount)),this.cartUrl&&o("a",{href:this.cartUrl,class:"icon-btn"},o("nano-icon",{name:"light/shopping-cart"}),this.cartCount>0&&o("span",{class:"gn-menu_actions-counter"},this.cartCount))]],this.myAccData&&this.myAccData.urls.login&&o("a",{href:this.myAccData.urls.login+this.ssoRedirect,class:"login-btn"},"Login / Register"," ",o("nano-icon",{name:"solid/chevron-right"}))),o("div",{class:"content-wrap",ref:function(e){return t.menuContentDiv=e}},o("div",{class:"content"},o("nav",{class:"nav-links nav-links--main"},o("slot",{name:"overflow"}),this.threshold<this.THRESHOLDLIMIT-v.main&&!!this.mainSlotLen&&o("slot",{name:"main"})),((!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about||this.hasSiteSlot||!!this.siteNavItms.length)&&o("div",null,(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about&&[(this.threshold>=this.THRESHOLDLIMIT-(v.about+1)||this.mainSlotLen<2)&&this.overflowSlotLen<2&&o("div",{class:"nav-links-wrap"},!!this.aboutNavItms.length&&o("h4",{class:"nav-links_title"},"About"),o("nav",{class:"nav-links nav-links--sub","aria-label":"About the company links"},o("slot",{name:"about"}),this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))),(this.threshold<this.THRESHOLDLIMIT-(v.about+1)&&this.mainSlotLen>=2||this.overflowSlotLen>=2)&&o("nav",{class:"nav-links","aria-label":"About the company links"},!this.aboutNavItms.length&&o("slot",{name:"about"}),!!this.aboutNavItms.length&&o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},"Company",o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),"Company"),o("slot",{name:"about"}),o("div",{class:"content--sub"},this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))))))],(this.hasSiteSlot||!!this.siteNavItms.length)&&[(this.threshold>=this.THRESHOLDLIMIT-2||this.mainSlotLen<2)&&this.overflowSlotLen<2&&o("div",{class:"nav-links-wrap"},o("h4",{class:"nav-links_title"},"Sites"),o("nav",{class:"nav-links nav-links--sub","aria-label":"Different company site links"},o("slot",{name:"site"}),this.siteNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))),(this.threshold<this.THRESHOLDLIMIT-2&&this.mainSlotLen>=2||this.overflowSlotLen>=2)&&o("nav",{class:"nav-links","aria-label":"Different company site links"},o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},"Sites",o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),"Sites"),o("div",{class:"content--sub"},o("slot",{name:"site"}),this.siteNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))))))])),this.isLoggedIn&&this.threshold<this.THRESHOLDLIMIT-v.login&&(this.loggedInNavItms.length||this.hasLoggedinSlot)&&o("nav",{class:"nav-links","aria-label":"Your user account links"},o("nano-nav-item",{class:"nano-global-nav user-nav nano-global-nav-menu"},this.myAccountUser.name,o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),this.myAccountUser.name),o("div",{class:"content--sub"},o("slot",{name:"loggedin"}),this.loggedInNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})),o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:this.myAccData.urls.forgot_password+this.ssoRedirect},"Change Password"))))))),o("slot",{name:"promotion"}),this.myAccData&&this.myAccData.urls.logout&&o("div",{class:"login-btn logout-btn"},o("a",{href:this.myAccData.urls.logout+this.ssoRedirect},"Logout"))))),o("nano-sticker",{"auto-resize":"false","break-point-max":"800",quietMode:{h:600,w:800}},o("div",{class:"bars",ref:function(e){return t.barsDiv=e}},o("nav",{class:"main-bar","aria-label":"Main site navigation",tabindex:"-1",ref:function(e){return t.mainBarDiv=e}},(this.hasPromotionSlot||!!this.overflowSlotLen||(this.myAccData||!!this.iconSlotLen)&&this.threshold<this.THRESHOLDLIMIT-v.icon||this.isLoggedIn&&(!!this.loggedInNavItms.length||this.hasLoggedinSlot)&&this.threshold<this.THRESHOLDLIMIT-v.login||!!this.mainSlotLen&&this.threshold<this.THRESHOLDLIMIT-v.main||(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about||this.hasSiteSlot||!!this.siteNavItms.length)&&o("button",{class:"menu-btn icon-btn",onMouseDown:this.menuOpen,onKeyDown:this.onMenuBtnKeyDown,"aria-expanded":this.modalOpen?"true":"false","aria-controls":"global-nav-menu",ref:function(e){return t.menuBtn=e}},o("nano-icon",{name:"light/bars","aria-label":"open menu"})),this.showLogo&&o("a",{href:this.logoUrl,class:"logo-link"},o("img",{src:r("./assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies Logo",class:"logo"})),!this.showLogo&&o("div",{class:"logo-link"},o("slot",{name:"logo"})),o("div",{class:"nav-links nav-links--main"},o("slot",{name:"main"})),this.threshold>=this.THRESHOLDLIMIT-v.search&&[this.showSearch&&!!this.internalSearchIndeces.length&&o("div",{class:"search-widget",role:"combobox","aria-owns":"autocomplete-results","aria-expanded":this.showAutocomplete&&this.autocompleteResults?"true":"false"},a),(!this.showSearch||!this.myAccData)&&!!this.searchSlotLen&&o("slot",{name:"search"})],this.threshold>=this.THRESHOLDLIMIT-v.about&&o("nav",{class:"nav-links nav-links--sub","aria-label":"About the company links"},(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold>=this.THRESHOLDLIMIT-v.about&&[o("slot",{name:"about"}),this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-bar"},o("a",{href:e.address,target:e.target},e.title))}))]),this.threshold<this.THRESHOLDLIMIT-v.search&&(this.showSearch&&!!this.internalSearchIndeces.length||!!this.searchSlotLen)&&o("button",{class:"icon-btn","aria-controls":"global-nav-search-bar","aria-expanded":this.searchBarShown?"true":"false",onMouseDown:this.onSearchBtnClick,onKeyDown:this.onSearchBtnKeyDown},o("nano-icon",{name:"light/search"})),this.threshold>=this.THRESHOLDLIMIT-v.icon&&[!!this.iconSlotLen&&o("slot",{name:"icon"}),this.myAccData&&(!this.activeMyAccountSections||this.activeMyAccountSections.includes("icons"))&&[this.msgUrl&&o("a",{href:this.msgUrl,class:"icon-btn"},o("nano-icon",{name:"light/bell"}),this.msgCount>0&&o("span",{class:"gn-menu_actions-counter"},this.msgCount)),this.cartUrl&&o("a",{href:this.cartUrl,class:"icon-btn"},o("nano-icon",{name:"light/shopping-cart"}),this.cartCount>0&&o("span",{class:"gn-menu_actions-counter"},this.cartCount))]],this.myAccData&&this.threshold>=this.THRESHOLDLIMIT-v.login&&[this.myAccData.urls.login&&o("a",{href:this.myAccData.urls.login+this.ssoRedirect,class:"login-btn"},"Login / Register"),this.myAccountUser&&o("div",{class:"user-links"},o("button",{class:{"icon-btn":true,"user-links-btn":true,open:this.userMenuOpen},onMouseDown:this.onUserBtnClick,onKeyDown:this.onUserBtnKeyDown}," ",this.myAccountUser.name,o("nano-icon",{name:"solid/caret-down"})),o("div",{class:"user-links-panel",tabindex:"-1",ref:function(e){return t.userLinkPanel=e}},o("div",{class:"user-links-panel-content"},this.loggedInNavItms.map((function(e){return o("a",{href:e.address,target:e.target},e.title)}))),o("div",{class:"user-links-panel-foot"},o("a",{href:this.myAccData.urls.forgot_password+this.ssoRedirect},"Change Password"),o("a",{href:this.myAccData.urls.logout+this.ssoRedirect},"Logout"))))],o("span",{class:"measure-ele"})),this.threshold<this.THRESHOLDLIMIT-v.search&&o("div",{id:"global-nav-search-bar",class:{"search-bar":true,show:this.searchBarShown},"aria-expanded":this.searchBarShown?"true":"false",role:"region",tabindex:"-1",ref:function(e){return t.searchBarEl=e}},o("div",{class:"search-widget"},this.showSearch&&!!this.internalSearchIndeces.length&&o("div",null,a),(!this.showSearch||!this.myAccData)&&!!this.searchSlotLen&&o("slot",{name:"search"}))))),(this.threshold<this.THRESHOLDLIMIT-3||this.menuFullScreen)&&o("div",{class:{mask:true,open:this.modalOpen},onClick:this.menuClose,onTouchEnd:this.menuClose})),o("div",{class:"site-content",ref:function(e){return t.siteContent=e}},o("slot",null)))};e.prototype.domainFor=function(e){if(!this.myAccData)return"";var t=this.myAccData.domains.find((function(t){return t.origin===e}));return t?t.domain:""};e.prototype.processSearchResults=function(e){var t=this;var n=e;var a=e;if(n.results){n.results.forEach((function(e,a){n.results[a]=t.processSearchResults(e)}));return n}else{a.hits.map((function(e){if(e.url&&!e.url.match(/^http/))e.url=location.protocol+"//"+t.domainFor(e.origin)+e.url}));return a}};e.prototype.getMyAccData=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,a,i,s;var o=this;return __generator(this,(function(r){switch(r.label){case 0:if(!this.getMyAccountData||this.myAccData){this.remoteDataReady=true;return[2]}switch(this.env){case"dev":e="https://myaccount-dev.nanoporetech.com/";break;case"test":e="https://myaccount-test.nanoporetech.com/";break;default:e="https://myaccount.nanoporetech.com/";break}n={timeout:5e3};r.label=1;case 1:r.trys.push([1,6,,7]);if(!(this.env==="local"))return[3,3];a=this;return[4,t.import("./p-755ca2d6.system.js")];case 2:a.myAccData=r.sent();return[3,5];case 3:i=this;return[4,b(e+"nav_bar_data.json",n)];case 4:i.myAccData=r.sent();r.label=5;case 5:if(this.myAccData.user.id){this.isLoggedIn=true;this.myAccountUser=this.myAccData.user}this.processMyAccLinks();this.processMyAccData();setTimeout((function(){return o.remoteDataReady=true}),300);return[3,7];case 6:s=r.sent();console.error(s);this.remoteDataReady=true;return[3,7];case 7:return[2]}}))}))};e.prototype.processMyAccData=function(){if(!this.myAccData||!this.myAccData.search.indeces.length)return;if(this.myAccData.search.api_key)this.searchApiKey=this.myAccData.search.api_key;if(this.myAccData.search.app_id)this.searchAppId=this.myAccData.search.app_id;if(this.myAccData.cart.count)this.cartCount=this.myAccData.cart.count;if(this.myAccData.notifications.count)this.msgCount=this.myAccData.notifications.count;if(!this.searchAppId||!this.searchApiKey)return;this.internalSearchIndeces=__spreadArray(__spreadArray([],this.myAccData.search.indeces),this.searchIndeces);if(this.myAccData.urls.cart&&!this.cartUrl)this.cartUrl=this.myAccData.urls.cart;if(this.myAccData.urls.messages&&!this.msgUrl)this.msgUrl=this.myAccData.urls.messages};e.prototype.processMyAccLinks=function(){var e=this;if(!this.myAccData.links||!this.myAccData.links.length)return;this.myAccData.links.forEach((function(t){switch(t.area){case"left-side-logged-in":case"left-side-logged-out":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("sites"))break;if(e.isLoggedIn&&t.area==="left-side-logged-in")e.siteNavItms.push(t);else if(!e.isLoggedIn&&t.area==="left-side-logged-out")e.siteNavItms.push(t);break;case"right-side-logged-in":case"right-side-logged-out":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("about"))break;if(e.isLoggedIn&&t.area==="right-side-logged-in")e.aboutNavItms.push(t);else if(!e.isLoggedIn&&t.area==="right-side-logged-out")e.aboutNavItms.push(t);break;case"profile-panel-list":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("loggedin"))break;e.loggedInNavItms.push(t);break}}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return c(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{searchIndex:["currentSelectedIndex"],searchValInternal:["changeInternalSearchVal"],searchApiKey:["initAlgoliaClient"],searchAppId:["initAlgoliaClient"],searchIndeces:["addIndeces"],internalSearchIndeces:["addAlgoliaIndeces"],threshold:["thresholdChange"],intersectRatio:["ratioChange"],thresholdReady:["assessReady"],remoteDataReady:["assessReady","remoteReady"],ready:["isReady"],showAutocomplete:["setupAutocompleteBlur","resetHitFocus"],aboutSlotLen:["slotChange"],iconSlotLen:["slotChange"],mainSlotLen:["slotChange"],overflowSlotLen:["slotChange"],searchSlotLen:["slotChange"],userMenuOpen:["handleUserMenu"]}},enumerable:false,configurable:true});return e}());x.style=f}}}));
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
*/System.register(["./p-59b3d24b.system.js","./p-d24811c8.system.js","./p-1c216ca4.system.js","./p-e1f46998.system.js","./p-ef053a2f.system.js","./p-1d13dbdf.system.js","./p-9edbf25d.system.js"],(function(e,t){"use strict";var n,a,i,s,o,r,l,c,h,u,d,p,m;return{setters:[function(e){n=e.r;a=e.c;i=e.i;s=e.f;o=e.h;r=e.k;l=e.e;c=e.g},function(e){h=e.a},function(e){u=e.d},function(e){d=e.C},function(e){p=e.d},function(e){m=e.c},function(){}],execute:function(){var g=undefined&&undefined.__rest||function(e,t){var n={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0)n[a]=e[a];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++){if(t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i]))n[a[i]]=e[a[i]]}return n};function b(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,s,o,r,l,c,h,u;return __generator(this,(function(d){switch(d.label){case 0:n=t.body,a=g(t,["body"]);i={Accept:"application/json, text/plain, */*","Access-Control-Allow-Origin":"*","Content-Type":"application/json",Cache:"no-cache"};s=Object.assign(Object.assign({method:n?"POST":"GET",credentials:"include",keepalive:true,mode:"cors"},a),{headers:Object.assign(Object.assign({},i),a.headers)});if(n){s.body=JSON.stringify(n)}o=setTimeout((function(){}),0);if(window.AbortController){r=new AbortController;l=a.timeout,c=l===void 0?500:l;o=setTimeout((function(){return r.abort()}),c);s.signal=r.signal}return[4,fetch(e,s)];case 1:h=d.sent();clearTimeout(o);if(!h.ok)return[3,3];return[4,h.json()];case 2:return[2,d.sent()];case 3:return[4,h.text()];case 4:u=d.sent();return[2,new Error(u)]}}))}))}var f=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--padding:12px;--padding-top:var(--padding);--padding-end:var(--padding);--padding-bottom:var(--padding);--padding-start:var(--padding);--bar-background:#005c75;--bar-text-color:white;--bar-color-shade:rgb(19, 89, 111);--bar-color-tint:rgb(19, 89, 111);--bar-color-focus:#90c6e7;--menu-background:#001a21;--menu-text-color:white;--menu-dropdown-bg:#196c82;--menu-dropdown-color:white;display:block;position:relative;line-height:1.5;height:100%}:host *{-webkit-box-sizing:inherit;box-sizing:inherit}.global-nav{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;font-size:0.88em;z-index:var(--nano-layer-index-menubar, 10)}.global-nav button{background:none;color:inherit;border:none;padding:0}.global-nav .icon-btn{position:relative;background:none;color:inherit;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px 7px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.global-nav .icon-btn nano-icon{width:18px;height:18px}.global-nav ::slotted(nano-nav-item[slot=icon]){--padding-top:9px;--padding-bottom:9px;--padding-start:7px;--padding-end:7px;--display:flex;font-size:18px}.global-nav a{color:inherit;text-decoration:none;white-space:nowrap}.global-nav .nav-links_title{margin:8px 0 3px}.global-nav .nav-links ul{margin:0;padding:0}.global-nav .nav-links li{list-style:none}.global-nav .login-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:0.94em}.global-nav .menu-btn{padding:9px var(--padding) 9px var(--padding)}.gn-menu{position:fixed;top:0;left:0;z-index:-1;display:none;-webkit-transition:z-index 0.01s ease 0.2s;transition:z-index 0.01s ease 0.2s;height:100vh;width:100vw;overflow-y:auto}:host([dir=rtl]) .gn-menu{left:auto;right:0}:host(.threshold-2) .gn-menu{position:absolute;width:calc(100vw - 20px)}.gn-menu.menu-full-screen{width:100vw !important}.gn-menu_wrap{max-width:92vw;width:335px;background:var(--menu-background);color:var(--menu-text-color);padding:var(--padding) 0;-webkit-box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);box-shadow:0 0 36px 0 rgba(0, 0, 0, 0.8);position:relative;pointer-events:all;margin-bottom:36px;opacity:0;outline:none;-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease}.gn-menu_wrap.has-promotion{padding:var(--padding) 0 0}.gn-menu.open{z-index:var(--nano-layer-index-dropdown, 300);-webkit-transition:z-index 0.01s ease;transition:z-index 0.01s ease}.gn-menu.open .gn-menu_wrap{opacity:1;-webkit-transform:translate3d(0, 0, 0) !important;transform:translate3d(0, 0, 0) !important;-webkit-transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s}.gn-menu_actions{padding-right:calc(var(--padding) / 2);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu_actions{padding-right:unset;-webkit-padding-end:calc(var(--padding) / 2);padding-inline-end:calc(var(--padding) / 2)}}.gn-menu_actions-counter{background:#d0021b;color:#fff;position:absolute;bottom:4px;right:0;left:auto;font-size:9px;height:14px;line-height:14px;width:auto;min-width:14px;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;text-indent:0}.gn-menu .content-wrap{position:relative;overflow:hidden;-webkit-transition:0.2s ease min-height;transition:0.2s ease min-height;min-height:190px}.gn-menu .content--sub{padding:var(--padding) 0 var(--padding) 7px}.gn-menu .menu-btn{margin-right:auto}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .menu-btn{margin-right:unset;-webkit-margin-end:auto;margin-inline-end:auto}}.gn-menu .nav-links{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links ::slotted(nano-nav-item),.gn-menu .nav-links nano-nav-item{--icon-size:14px;--display:inline-block;--secondary-bg-color:#001a21;--padding-top:10px;--padding-bottom:10px;--padding-end:calc(var(--padding) * 2);--padding-start:calc(var(--padding) + 3px);--color:white;--color-hover:#90c6e7;--bg-color-hover:transparent;--bg-color-focus:#002530;--focus-outline:none;font-size:0.99em;width:100%}.gn-menu .nav-links .user-nav{--bg-color:#193037;--padding-top:9px;--padding-bottom:9px;font-weight:bold;margin:5px 0 0}.gn-menu .nav-links .user-nav ::slotted(nano-nav-item),.gn-menu .nav-links .user-nav nano-nav-item{font-weight:500;--bg-color:transparent}.gn-menu .nav-links_title{margin:0 var(--padding) 4px;border-bottom:1px solid #33484d;padding-bottom:8px;font-size:0.86em;text-transform:uppercase;color:#90c6e7;letter-spacing:1px;font-weight:700}.gn-menu .nav-links-wrap{margin:18px 0}.gn-menu .nav-links-wrap:last-child{margin-bottom:0}.gn-menu .nav-links .back-btn{border-top:1px solid #33484d;border-bottom:1px solid #33484d;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 11px 10px 0;width:100%;font-size:12px;text-transform:uppercase;color:#90c6e7;letter-spacing:1px;font-weight:700}.gn-menu .nav-links .back-btn nano-icon{margin-right:10px;font-size:12px;color:white}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .nav-links .back-btn nano-icon{margin-right:unset;-webkit-margin-end:10px;margin-inline-end:10px}}.gn-menu .nav-links--sub{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.gn-menu .nav-links--sub ::slotted(nano-nav-item),.gn-menu .nav-links--sub nano-nav-item{--border-bottom:none;--padding-end:var(--padding);--padding-start:var(--padding);--padding-top:8px;--padding-bottom:8px;margin:0;width:50%;line-height:1.8}.gn-menu .nav-links .content{padding:8px var(--padding)}.gn-menu .login-btn{padding-left:7px;padding-right:var(--padding);padding-top:9px;padding-bottom:9px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .login-btn{padding-left:unset;padding-right:unset;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:var(--padding);padding-inline-end:var(--padding)}}.gn-menu .login-btn nano-icon{margin-left:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.gn-menu .login-btn nano-icon{margin-left:unset;-webkit-margin-start:10px;margin-inline-start:10px;}}.gn-menu .logout-btn{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.gn-menu .logout-btn a{padding:0 5px}.sticker-trigger{background:var(--bar-background);width:100%;z-index:calc(var(--nano-layer-index-menubar, 10) + 1)}.bars{color:var(--bar-text-color);z-index:var(--nano-layer-index-menubar, 10);position:relative;max-width:100%;min-width:100%;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:0.2s ease box-shadow;transition:0.2s ease box-shadow}[stuck] .bars{-webkit-box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15);box-shadow:0 1px 25px 0 rgba(0, 0, 0, 0.15)}.bars::before{content:"";width:100%;height:100%;z-index:-1;background:var(--bar-background);position:absolute}.bars .search-widget{margin-left:11px;margin-right:auto;position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:45vw;min-width:269px;max-height:36px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.bars .search-widget{margin-left:unset;margin-right:unset;-webkit-margin-start:11px;margin-inline-start:11px;-webkit-margin-end:auto;margin-inline-end:auto}}.bars .search-inputs{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0}.bars .search-inputs input[type=submit]{display:none}.bars .search-autocomplete{position:absolute;top:calc(100% - 2px);width:100%;left:0;background:white;border:2px solid var(--bar-color-tint);border-radius:0 0 5px 5px;color:#4a4a4a;font-size:0.85em;padding:calc(var(--padding) / 2) 0 1px 0;z-index:1}:host([dir=rtl]) .bars .search-autocomplete{left:auto;right:0}.bars .search-autocomplete-hit{padding:calc(var(--padding) / 4) var(--padding) calc(var(--padding) / 4) var(--padding);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;text-align:left;line-height:1.5;cursor:pointer}:host([dir=rtl]) .bars .search-autocomplete-hit{text-align:right}.bars .search-autocomplete-hit-scope{font-size:0.76em;color:#a7b0b3;font-weight:600}.bars .search-autocomplete-hit:hover,.bars .search-autocomplete-hit:focus{background-color:#e4e6e8}.bars .search-autocomplete-hit .search__highlight,.bars .search-autocomplete-hit em{font-weight:bold;font-style:normal}.bars .search-autocomplete-hit--no-result:hover,.bars .search-autocomplete-hit--no-result:focus{background:none !important}.bars .search-autocomplete-foot{margin:7px 0 0}.bars .search-autocomplete-submit{background:none;border:none;-ms-flex-item-align:normal;-ms-grid-row-align:normal;align-self:normal;padding:9px var(--padding);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#007495;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;width:100%;text-decoration:underline;border-top:1px solid #e8eaea}.bars .search-autocomplete-submit:hover,.bars .search-autocomplete-submit:focus{background-color:#e4e6e8}.bars .search-input{--input-border-style:solid 1px rgb(85, 140, 157);--input-border-style--focus:solid 1px var(--bar-color-focus, #90c6e7);--input-border-width:1px;font-size:0.9em}.bars nano-select.search-input{--input-bg-color:var(--bar-color-tint, rgb(88, 140, 161));--input-text-color:inherit;--input-border-radius:5px 0 0 5px;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;left:1px}:host([dir=rtl]) .bars nano-select.search-input{--input-border-radius:0 5px 5px 0}:host(:not(.ready)) .bars nano-select.search-input{overflow:hidden;max-height:1em}.bars nano-select.search-input .down-arrow{font-size:0.65em}.bars nano-input.search-input{--input-text-color:inherit;--input-bg-color:var(--bar-color-shade, rgb(40, 110, 133));--clear-btn-color:#4a4a4a;--input-border-radius:0 5px 5px 0;--placeholder-color:white;width:206px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}:host([dir=rtl]) .bars nano-input.search-input{--input-border-radius:5px 0 0 5px}:host(:not(.ready)) .bars nano-input.search-input{overflow:hidden;max-height:1em}.bars nano-input.search-input.has-value{--input-bg-color:#fff;--input-text-color:#4a4a4a}.bars nano-input.search-input.has-value .search-icon{color:#4a4a4a}.bars nano-input.search-input .search-icon{background:none;color:white;padding:0 8px;display:none}.bars nano-input.search-input .search-icon--show{display:-webkit-box;display:-ms-flexbox;display:flex}.bars nano-input.search-input .search-icon--loader{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.bars nano-input.search-input .search-icon nano-icon{height:1.4em}.main-bar{width:100%;padding-left:0;padding-right:var(--padding);padding-top:var(--padding);padding-bottom:var(--padding);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow-x:hidden}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar{padding-left:unset;padding-right:unset;-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--padding);padding-inline-end:var(--padding)}}.main-bar:focus{outline:none}:host(.ready) .main-bar{overflow-x:visible}.main-bar>*,.main-bar ::slotted(*){-webkit-transition:opacity 0.2s ease;transition:opacity 0.2s ease}:host(:not(.ready)) .main-bar>*,:host(:not(.ready)) .main-bar ::slotted(*){opacity:0 !important}:host(.ready) .main-bar>*,:host(.ready) .main-bar ::slotted(*){opacity:1}:host(.resizing) .main-bar>*,:host(.resizing) .main-bar ::slotted(*){opacity:0 !important}.main-bar>*{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.main-bar>* ::slotted(nano-nav-item[slot=icon]){margin-left:11px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar>* ::slotted(nano-nav-item[slot=icon]){margin-left:unset;-webkit-margin-start:11px;margin-inline-start:11px;}}.main-bar>* ::slotted(nano-nav-item),.main-bar>* nano-nav-item{--color-hover:#e4e6e8;--secondary-bg-color:var(--menu-dropdown-bg);--secondary-color:var(--menu-dropdown-color);--bg-color-open:var(--bar-background);text-decoration:none !important}.main-bar .icon-btn{margin-left:6px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .icon-btn{margin-left:unset;-webkit-margin-start:6px;margin-inline-start:6px;}}:host(.threshold-2) .main-bar .icon-btn{margin-left:11px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.threshold-2) .main-bar .icon-btn{margin-left:unset;-webkit-margin-start:11px;margin-inline-start:11px;}}.main-bar .menu-btn.icon-btn{margin:0 !important}:host(:not([dir=rtl])) .main-bar .menu-btn.icon-btn{border-right:1.5px solid var(--bar-color-shade)}:host([dir=rtl]) .main-bar .menu-btn.icon-btn{border-left:1.5px solid var(--bar-color-shade)}.main-bar .user-links{position:relative}.main-bar .user-links .icon-btn{padding-right:0;font-size:0.93em;font-weight:500}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .user-links .icon-btn{padding-right:unset;-webkit-padding-end:0;padding-inline-end:0}}.main-bar .user-links .icon-btn nano-icon{margin-left:5px;width:16px;height:16px;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:color 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, color 0.2s ease;transition:transform 0.2s ease, color 0.2s ease, -webkit-transform 0.2s ease}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .user-links .icon-btn nano-icon{margin-left:unset;-webkit-margin-start:5px;margin-inline-start:5px;}}.main-bar .user-links .icon-btn.open nano-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);color:#007495}.main-bar .user-links-panel{display:none;position:absolute;border-radius:4px 0 4px 4px;-webkit-box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.4);background-color:#568c9d;opacity:0;-webkit-transform:translate3d(0, 24px, 0);transform:translate3d(0, 24px, 0);-webkit-transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease;right:0;font-size:0.85em;min-width:250px;z-index:1}:host([dir=rtl]) .main-bar .user-links-panel{right:auto;left:0}.main-bar .user-links-panel:focus{outline:none}.main-bar .user-links-panel.show{opacity:1;-webkit-transform:translate3d(0, 4px, 0);transform:translate3d(0, 4px, 0)}.main-bar .user-links-panel-content{padding:0 18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main-bar .user-links-panel-content a{padding:11px 0;border-bottom:#669dac 1px solid}.main-bar .user-links-panel-content a:hover,.main-bar .user-links-panel-content a:focus{color:#455556}.main-bar .user-links-panel-content a:last-child{border-bottom:none}.main-bar .user-links-panel-foot{background-color:#aac5cd;border-radius:0 0 4px 4px;padding:var(--padding);color:#455556;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:500;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.main-bar .user-links-panel-foot a:hover{text-decoration:underline}.main-bar .logo{height:34px;width:auto;min-width:196px}:host(:not(.threshold-1)) .main-bar .logo{height:30px}.main-bar .logo-link{margin-left:0;margin-right:auto;padding-left:11px;padding-right:11px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .logo-link{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:auto;margin-inline-end:auto}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .logo-link{padding-left:unset;padding-right:unset;-webkit-padding-start:11px;padding-inline-start:11px;-webkit-padding-end:11px;padding-inline-end:11px}}.main-bar .nav-links{font-size:0.75rem;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.main-bar .nav-links ::slotted(nano-nav-item),.main-bar .nav-links nano-nav-item{--padding-top:7px;--padding-bottom:7px;--padding-end:2px;--padding-start:2px;--margin:0 8px}.main-bar .nav-links--main{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;letter-spacing:0.33px;font-weight:600;font-stretch:expanded;font-size:0.8125rem}.main-bar .nav-links--main ::slotted(nano-nav-item){--color:#fff;--padding-end:3px;--padding-start:0}.main-bar .nav-links--sub{margin-left:6px;--color:#e2e2e2;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .nav-links--sub{margin-left:unset;-webkit-margin-start:6px;margin-inline-start:6px;}}.main-bar .login-btn{display:inline-block;border-radius:4px;background-color:#17bb75;color:#fff;padding:3px 10px;position:relative;left:auto;bottom:auto;margin-left:11px;margin-right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.main-bar .login-btn{margin-left:unset;margin-right:unset;-webkit-margin-start:11px;margin-inline-start:11px;-webkit-margin-end:0;margin-inline-end:0}}.main-bar .measure-ele{min-width:1px;display:block;margin:0;padding:0}.search-bar{height:0;overflow:hidden;-webkit-transition:0.2s ease height;transition:0.2s ease height;padding:0 var(--padding);outline:none;max-width:45em;margin-left:auto}.search-bar .search-widget{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;overflow:inherit;max-width:none;max-height:none;padding:0 0 var(--padding)}.search-bar .search-inputs{padding:0 0;margin:0 0}.search-bar .search-autocomplete{top:calc(100% - (var(--padding) + 1px))}.site-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:min-height 0.2s ease;transition:min-height 0.2s ease;min-height:calc(100% - 61px);position:relative;z-index:auto;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.mask{opacity:0;background:rgba(0, 0, 0, 0.3);position:fixed;left:0;right:0;top:0;height:100vh;z-index:-1;-webkit-transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s;transition:transform 0.2s ease, opacity 0.2s ease, visibility 0.01s ease 0.2s, z-index 0.01s ease 0.2s, -webkit-transform 0.2s ease;visibility:hidden}.mask.open{opacity:1;-webkit-transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s;transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.2s ease 0.01s, opacity 0.2s ease 0.01s, -webkit-transform 0.2s ease 0.01s;z-index:3;visibility:visible}';var v={search:0,about:1,main:2,login:3,icon:4};var x=e("nano_global_nav",function(){function e(e){var t=this;n(this,e);this.nanoIsReady=a(this,"nanoIsReady",7);this.nanoSearchResult=a(this,"nanoSearchResult",7);this.nanoSearchError=a(this,"nanoSearchError",7);this.nanoSearchReset=a(this,"nanoSearchReset",7);this.currSize=0;this.thresholdsGoingUp=false;this.THRESHOLDLIMIT=Object.keys(v).length;this.autocompleteEles=[];this.currAIndex=-1;this.isLoggedIn=false;this.myAccData=null;this.aboutNavItms=[];this.siteNavItms=[];this.loggedInNavItms=[];this.hasLoggedinSlot=false;this.hasSiteSlot=false;this.hasPromotionSlot=false;this.aboutSlotLen=0;this.iconSlotLen=0;this.mainSlotLen=0;this.overflowSlotLen=0;this.searchSlotLen=0;this.internalSearchIndeces=[];this.thresholdReady=false;this.remoteDataReady=false;this.ready=false;this.isResizing=false;this.threshold=this.THRESHOLDLIMIT;this.modalOpen=false;this.modalIsOpen=false;this.searchBarShown=false;this.scrollingUp=true;this.searchLoading=false;this.showAutocomplete=false;this.secondaryMenuOpen=false;this.userMenuOpen=false;this.menuFullScreen=false;this.searchValInternal="";this.env="prod";this.ssoRedirect=encodeURIComponent(window.location.href);this.getMyAccountData=true;this.activeMyAccountSections=null;this.showSearch=true;this.showLogo=true;this.logoUrl=location.protocol+"//"+location.host;this.searchIndeces=[];this.myAccountUser=null;this.searchValue="";this.searchIndex="all_prod_en";this.cartCount=0;this.msgCount=0;this.cartUrl=null;this.msgUrl=null;this.setResizingState=function(e){if(e===void 0){e=false}if(typeof t.debounceSetResizingState==="undefined"){t.debounceSetResizingState=p(t.setResizingState,600)}if(e){t.isResizing=true;t.debounceSetResizingState()}else{t.isResizing=false;t.thresholdsGoingUp=false}};this.onMenuBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.modalOpen?t.menuClose(e,true):t.menuOpen();break}};this.onMenuBtnClick=function(e){t.menuClose(e,true)};this.menuOpen=function(e){if(e)e.preventDefault();t.menuDiv.style.display="block";t.modalOpen=true;t.modalIsOpen=true;t.menuWrapDiv.addEventListener("focusout",t.menuClose);t.menuWrapDiv.focus({preventScroll:true});if(t.threshold<2||t.menuWrapDiv.scrollHeight>window.innerHeight){document.body.style.overflow="hidden";t.menuFullScreen=true}else document.body.style.overflowX="hidden"};this.onMenuHidden=function(){t.menuDiv.removeEventListener("transitionend",t.onMenuHidden);t.menuWrapDiv.removeEventListener("focusout",t.menuClose);document.body.style.overflow="";t.menuDiv.style.display="none";t.modalIsOpen=false;t.menuFullScreen=false;setTimeout((function(){if(document.activeElement===document.body&&t.menuBtn)t.mainBarDiv.focus({preventScroll:true})}),50)};this.menuClose=function(e,n){if(n===void 0){n=false}if(!n){var a=e;if(a&&a.relatedTarget&&m("#global-nav-menu",a.relatedTarget))return;if(a&&a.relatedTarget&&a.relatedTarget.closest("#global-nav-menu"))return;if(a&&a.relatedTarget&&a.relatedTarget.closest('[slot="promotion"]'))return;if(t.secondaryMenuOpen)return}t.modalOpen=false;t.menuDiv.addEventListener("transitionend",t.onMenuHidden)};this.subMenuClose=function(e){e.preventDefault();e.target.closest("nano-nav-item").open=false};this.onUserBtnClick=function(e){e.preventDefault();t.userMenuOpen=!t.userMenuOpen};this.onUserBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.userMenuOpen=!t.userMenuOpen;break}};this.onUserMenuBlur=function(e){if(!e.relatedTarget){t.userMenuOpen=false;return}if(!!e.relatedTarget.closest(".user-links-panel"))return false;t.userMenuOpen=false};this.onSearchBtnClick=function(e){e.preventDefault();if(!t.searchBarShown)t.searchbarShow();else t.searchbarHide()};this.onSearchBtnKeyDown=function(e){switch(e.key){case"Enter":case" ":t.searchBarShown?t.searchbarHide():t.searchbarShow();break}};this.onSearchBarShown=function(){t.searchBarEl.removeEventListener("transitionend",t.onSearchBarShown);if(t.searchInput)t.searchInput.setFocus();t.searchBarEl.style.overflow="visible"};this.searchbarHide=function(e){if(e&&e.relatedTarget&&e.relatedTarget.closest("#global-nav-search-bar"))return;t.showAutocomplete=false;if(t.searchValInternal.length&&e)return;t.searchBarEl.addEventListener("transitionend",t.onSearchBarHidden);t.searchBarEl.style.overflow="hidden";t.searchBarEl.style.height="0px"};this.onSearchBarHidden=function(){t.searchBarEl.removeEventListener("transitionend",t.onSearchBarHidden);t.searchBarEl.style.display="none";t.searchBarShown=false};this.onSearchInput=function(e){t.searchValInternal=t.searchInput.value;if(!t.isSearchValSet()){t.searchLoading=false;return}if(e.detail.type==="input"){t.showAutocomplete=false;t.searchLoading=true}};this.onSearchChange=function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,a,i;return __generator(this,(function(s){switch(s.label){case 0:this.searchValInternal=this.searchValue=e?e.detail.value:this.searchValInternal;this.showAutocomplete=false;this.autocompleteResults=null;if(!this.isSearchValSet()){if(!this.searchValInternal.length){this.nanoSearchReset.emit()}this.searchLoading=false;return[2]}if(!this.currentIndex)this.currentSelectedIndex();s.label=1;case 1:s.trys.push([1,3,,4]);t=this;n=this.processSearchResults;return[4,this.currentIndex.alogliaIndex.search(this.searchValInternal,{attributesToSnippet:["body:5","title:8"],hitsPerPage:5,filters:"created > "+Math.floor((Date.now()-631152e5)/1e3)})];case 2:t.autocompleteResults=n.apply(this,[s.sent()]);return[3,4];case 3:a=s.sent();console.error(a);return[3,4];case 4:this.scopeSearch=null;i=this;return[4,this.onSearchSubmit(null,false)];case 5:i.scopeSearch=s.sent();this.searchLoading=false;this.showAutocompleteResults();return[2]}}))}))};this.onSearchSubmit=function(e,n){if(n===void 0){n=true}return __awaiter(t,void 0,void 0,(function(){var t,a,i,s;var o=this;return __generator(this,(function(r){switch(r.label){case 0:if(e)e.preventDefault();if(!this.isSearchValSet())return[2];this.searchLoading=true;this.algoliaSearchResults=null;if(!this.currentIndex)this.currentSelectedIndex();t=this.internalSearchIndeces.map((function(e){return{indexName:e.index,query:o.searchValInternal,facets:e.filters,hitsPerPage:10,filters:"created > "+Math.floor((Date.now()-631152e5)/1e3)}}));r.label=1;case 1:r.trys.push([1,3,,4]);a=this;i=this.processSearchResults;return[4,this.algoliaClient.multipleQueries(t)];case 2:a.algoliaSearchResults=i.apply(this,[r.sent()]);return[3,4];case 3:s=r.sent();this.nanoSearchError.emit(s);return[3,4];case 4:this.searchLoading=false;if(!this.algoliaSearchResults)return[2];this.algoliaSearchResults.results.map((function(e,t){e.indexName=o.internalSearchIndeces[t].name;e.selected=o.currentIndex.name===o.internalSearchIndeces[t].name;e.domain=o.currentIndex.domain||null;e.domains=o.myAccData.domains||null;e.allGroup=!!o.internalSearchIndeces[t].allGroup;e.filters=o.internalSearchIndeces[t].filters}));if(n){this.nanoSearchResult.emit({results:this.algoliaSearchResults.results,client:{apiKey:this.searchApiKey,appId:this.searchAppId}});this.showAutocomplete=false}return[2,this.algoliaSearchResults]}}))}))};this.onSearchIndexChange=function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=e;n=e;if(!this.currentIndex)this.currentSelectedIndex();if(t.detail&&t.detail.value.length)n=t.detail.value;if(!n||!n.length)return[2];if(this.currentIndex.index===n)return[2];a=this.internalSearchIndeces.find((function(e){return e.index===n}));if(!a||!a.alogliaIndex)return[2];this.searchIndex=a.index;if(!this.isSearchValSet())return[3,2];return[4,this.onSearchChange()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};this.switchIndexSubmit=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.isSearchValSet())return[3,2];return[4,this.onSearchIndexChange(e)];case 1:t.sent();this.onSearchSubmit();return[3,3];case 2:this.onSearchIndexChange(e);t.label=3;case 3:return[2]}}))}))};this.onAutocompleteBlur=function(e){if(!t.showAutocomplete||!t.autocompleteResults)return;if(e&&e.target&&e.target.closest(".search-widget"))return;t.showAutocomplete=false};this.showAutocompleteResults=function(){if(!t.autocompleteResults||!t.autocompleteResults.hits)return;t.showAutocomplete=true};this.onAutocompleteInteract=function(e){if(!t.showAutocomplete||!t.autocompleteResults)return;var n=t.currAIndex;switch(e.key){case"Tab":setTimeout((function(){if(!t.el.shadowRoot.activeElement||!t.el.shadowRoot.activeElement.closest(".search-widget")){t.showAutocomplete=false;return}else{var e=t.autocompleteEles.find((function(e,n){if(e===t.el.shadowRoot.activeElement){t.currAIndex=n;return true}}));if(e)t.setActiveElement(e);else t.currAIndex=-1}}));break;case"ArrowDown":case"ArrowUp":if(e.key==="ArrowDown")n++;else if(e.key==="ArrowUp")n--;var a=t.autocompleteEles[n];if(a||n<0||n>t.autocompleteEles.length-1)e.preventDefault();if(a){t.setActiveElement(a);t.currAIndex=n}else if(n<0){t.searchInput.setFocus();t.currAIndex=-1}break;case"Enter":case" ":if(t.autocompleteEles[t.currAIndex]){t.autocompleteEles[t.currAIndex].click()}break}}}e.prototype.submitSearch=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.onSearchSubmit();this.showAutocomplete=false;return[2]}))}))};e.prototype.getMyAccData=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,a,i,s;var o=this;return __generator(this,(function(r){switch(r.label){case 0:if(!this.getMyAccountData||this.myAccData){this.remoteDataReady=true;return[2]}e=this.ssoDataUrl;if(!e){switch(this.env){case"dev":e="https://myaccount-dev.nanoporetech.com/";break;case"test":e="https://myaccount-test.nanoporetech.com/";break;default:e="https://myaccount.nanoporetech.com/";break}}n={timeout:5e3};r.label=1;case 1:r.trys.push([1,6,,7]);if(!(this.env==="local"))return[3,3];a=this;return[4,t.import("./p-755ca2d6.system.js")];case 2:a.myAccData=r.sent();return[3,5];case 3:i=this;return[4,b(e+"nav_bar_data.json",n)];case 4:i.myAccData=r.sent();r.label=5;case 5:if(this.myAccData.user.id){this.isLoggedIn=true;this.myAccountUser=this.myAccData.user}this.processMyAccLinks();this.processMyAccData();setTimeout((function(){return o.remoteDataReady=true}),300);return[3,7];case 6:s=r.sent();console.error(s);this.remoteDataReady=true;return[3,7];case 7:return[2]}}))}))};e.prototype.currentSelectedIndex=function(){var e=this;if(!this.internalSearchIndeces.length){return}var t=this.internalSearchIndeces.find((function(t){return t.index===e.searchIndex}));if(!t){this.currentIndex=this.internalSearchIndeces[0];console.error("index not found");return}this.currentIndex=t;return t};e.prototype.changeInternalSearchVal=function(){if(this.searchValInternal!==this.searchValue)this.searchValue=this.searchValInternal};e.prototype.initAlgoliaClient=function(){if(!this.searchAppId||!this.searchApiKey)return;this.algoliaClient=h(this.searchAppId,this.searchApiKey);this.addAlgoliaIndeces()};e.prototype.addIndeces=function(){this.internalSearchIndeces=__spreadArray(__spreadArray([],this.internalSearchIndeces),this.searchIndeces)};e.prototype.addAlgoliaIndeces=function(){var e=this;if(!this.algoliaClient||!this.internalSearchIndeces.length)return;this.internalSearchIndeces.forEach((function(t){t.alogliaIndex=e.algoliaClient.initIndex(t.index)}));if(!this.searchIndex)this.searchIndex=this.internalSearchIndeces[0].index};e.prototype.thresholdChange=function(e,t){if(e>t){this.thresholdsGoingUp=true;this.setResizingState(true)}};e.prototype.ratioChange=function(){var e=this;if(this.intersectRatio<1&&this.threshold>0){if(this.thresholdsGoingUp)this.setResizingState(true);this.threshold--;setTimeout((function(){return e.ratioChange()}),500)}else{this.thresholdReady=true;this.siteContent.style.minHeight="calc(100% - "+(this.barsDiv.clientHeight+1)+"px)";var t,n;i((function(){t=__spreadArray(__spreadArray([],Array.from(e.el.querySelectorAll('nano-nav-item[slot="site"]'))),Array.from(e.el.querySelectorAll('nano-nav-item[slot="overflow"]')));n=[];if(e.threshold<e.THRESHOLDLIMIT-v.icon)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="icon"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="icon"]')));if(e.threshold<e.THRESHOLDLIMIT-v.login)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="loggedin"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="loggedin"]')));if(e.threshold<e.THRESHOLDLIMIT-v.main)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="main"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="main"]')));if(e.threshold<e.THRESHOLDLIMIT-v.about)t.push.apply(t,Array.from(e.el.querySelectorAll('nano-nav-item[slot="about"]')));else n.push.apply(n,Array.from(e.el.querySelectorAll('nano-nav-item[slot="about"]')))}));s((function(){t.forEach((function(e){e.classList.add("nano-global-nav-menu");e.classList.remove("nano-global-nav-bar")}));n.forEach((function(e){e.classList.remove("nano-global-nav-menu");e.classList.add("nano-global-nav-bar")}))}))}};e.prototype.assessReady=function(){if(this.thresholdReady&&this.remoteDataReady){this.ready=true}};e.prototype.remoteReady=function(){this.attachIO()};e.prototype.isReady=function(){this.nanoIsReady.emit()};e.prototype.setupAutocompleteBlur=function(){if(this.showAutocomplete){this.el.shadowRoot.addEventListener("click",this.onAutocompleteBlur)}else{this.el.shadowRoot.removeEventListener("click",this.onAutocompleteBlur)}};e.prototype.slotChange=function(){this.threshold=this.THRESHOLDLIMIT};e.prototype.thresholdClasses=function(){var e=[];var t=0;for(t;t<this.threshold;t++)e.push("threshold-"+(t+1));return e};e.prototype.onWindowResize=function(){if(this.threshold<this.THRESHOLDLIMIT&&window.innerWidth>this.currSize){this.threshold=this.THRESHOLDLIMIT}this.currSize=window.innerWidth;this.searchBarShown=false};e.prototype.secondaryOpen=function(e){if(!e.detail.secondaryMenu)return;e.stopPropagation();this.secondaryMenuOpen=true;this.menuContentDiv.style.minHeight=e.detail.secondaryMenu.scrollHeight+"px"};e.prototype.secondaryClose=function(e){if(!e.detail.secondaryMenu)return;e.stopPropagation();this.secondaryMenuOpen=false;this.menuContentDiv.style.minHeight=""};e.prototype.handleUserMenu=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,u(this.userLinkPanel,"show",this.userMenuOpen)];case 1:e.sent();if(this.userMenuOpen){this.userLinkPanel.focus();this.userLinkPanel.addEventListener("focusout",this.onUserMenuBlur)}else{this.userLinkPanel.removeEventListener("focusout",this.onUserMenuBlur);this.el.focus()}return[2]}}))}))};e.prototype.searchbarShow=function(){var e=this;this.searchBarShown=true;this.searchBarEl.addEventListener("transitionend",this.onSearchBarShown);this.searchBarEl.style.display="block";setTimeout((function(){e.searchBarEl.style.height=e.searchBarEl.querySelector(".search-widget").scrollHeight+"px"}),50)};e.prototype.autocompleteSnippet=function(e){var t=["title"];if(e._snippetResult){var n=t.find((function(t){return e._snippetResult[t]&&e._snippetResult[t].matchLevel!=="none"}));if(n){if(n!=="title")return(e.title.length>15?e.title.substring(0,15)+" ...":e.title)+" "+e._snippetResult[n].value;else return e._snippetResult["title"].value}}return e.title};e.prototype.isSearchValSet=function(){if(this.searchValInternal.length<3)return false;return true};e.prototype.resetHitFocus=function(){this.currAIndex=-1};e.prototype.setActiveElement=function(e){this.autocompleteEles.map((function(e){return e.setAttribute("aria-selected","false")}));e.focus({preventScroll:true});e.setAttribute("aria-selected","true")};e.prototype.assessSlottedContent=function(){var e=this;i((function(){e.hasSiteSlot=!!e.el.querySelectorAll('[slot="site"]').length;e.hasLoggedinSlot=!!e.el.querySelectorAll('[slot="loggedin"]').length;e.hasPromotionSlot=!!e.el.querySelectorAll('[slot="promotion"]').length;e.aboutSlotLen=e.el.querySelectorAll('[slot="about"]').length;e.iconSlotLen=e.el.querySelectorAll('[slot="icon"]').length;e.mainSlotLen=e.el.querySelectorAll('[slot="main"]').length;e.overflowSlotLen=e.el.querySelectorAll('[slot="overflow"]').length;e.searchSlotLen=e.el.querySelectorAll('[slot="search"]').length}))};e.prototype.attachIO=function(){var e=this;if(this.io)return;var t=this.el.shadowRoot.querySelector(".global-nav .main-bar");if(typeof window!=="undefined"&&window.IntersectionObserver&&!!t){var n=this.io=new window.IntersectionObserver((function(t){e.intersectRatio=t.slice(-1)[0].intersectionRatio}),{root:t,threshold:1});n.observe(t.querySelector(".measure-ele"))}};e.prototype.componentDidLoad=function(){{this.debounceResize=p(this.onWindowResize.bind(this),300);window.addEventListener("resize",this.debounceResize);this.currSize=window.innerWidth}this.initAlgoliaClient();this.addAlgoliaIndeces();if(this.remoteDataReady)this.attachIO()};e.prototype.componentWillLoad=function(){var e=this;d.init(this,["searchIndex","searchValue"],"url-hash","gns");if(typeof window!=="undefined"&&window.MutationObserver){var t=this.mo=new MutationObserver((function(){e.assessSlottedContent()}));t.observe(this.el,{childList:true,subtree:false})}this.assessSlottedContent()};e.prototype.disconnectedCallback=function(){if(this.io){this.io.disconnect();this.io=undefined}if(this.mo){this.mo.disconnect();this.mo=undefined}window.removeEventListener("resize",this.debounceResize)};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.getMyAccData();return[2]}))}))};e.prototype.autocompleteList=function(){var e=this;var t;if(this.showAutocomplete&&this.scrollingUp){var n=0;var a=0;var i=function(t,n){return n.index!==e.currentIndex.index?t+n.hits.length:t};var s=function(t,n){return n.index===e.currentIndex.index?t+n.hits.length:t};if(this.scopeSearch){a=this.scopeSearch.results.reduce(i,0);n=this.scopeSearch.results.reduce(s,0)}if(this.autocompleteResults&&this.autocompleteResults.hits.length||a&&!n){var r=0;t=o("div",null,!n&&o("div",{class:"search-autocomplete-hit search-autocomplete-hit--no-result"},"No results matching '",this.searchValInternal,"' were found in"," ",o("strong",null,this.currentIndex.name),". Try another phrase."),this.autocompleteResults&&[this.autocompleteResults.hits.map((function(t,n){return o("a",{role:"option",ref:function(t){return e.autocompleteEles.push(t)},tabindex:"-1",id:"autocomplete-hit-"+n,href:t.url,class:"search-autocomplete-hit",innerHTML:e.autocompleteSnippet(t)})}))],(!n||this.currentIndex.allGroup)&&this.scopeSearch&&this.scopeSearch.results&&[this.scopeSearch.results.map((function(t,n){if(!t.hits.length||t.index===e.currentIndex.index||r>1)return;r++;return o("button",{role:"option",ref:function(t){return e.autocompleteEles.push(t)},tabindex:"-1",id:"autocomplete-scope-"+n,class:"search-autocomplete-hit",onClick:function(){return e.switchIndexSubmit(t.index)},onMouseDown:function(){return e.switchIndexSubmit(t.index)}},'"',e.searchValInternal,'"'," ",o("div",{class:"search-autocomplete-hit-scope"},"in ",t.indexName))}))],!!n&&o("div",{class:"search-autocomplete-foot"},o("button",{role:"option",class:"search-autocomplete-submit",ref:function(t){return e.autocompleteEles.push(t)},id:"autocomplete-foot",onClick:this.onSearchSubmit,onMouseDown:this.onSearchSubmit},"View all results")))}else if(!n){t=o("div",{class:"search-autocomplete-hit search-autocomplete-hit--no-result"},"No results matching '",this.searchValInternal,"' were found. Try another phrase.")}}return o("div",{class:"search-autocomplete",role:"listbox",id:"autocomplete-results","aria-expanded":this.showAutocomplete?"true":"false",hidden:!this.showAutocomplete,onKeyDown:this.onAutocompleteInteract},t)};e.prototype.searchWidget=function(){var e=this;return[o("form",{class:"search-inputs",onSubmit:this.onSearchSubmit,id:"global-nav-search"},o("nano-select",{class:"search-input",label:"Which area of content would you like to search?",hideLabel:true,showInlineError:false,value:this.searchIndex,onNanoChange:this.onSearchIndexChange,mask:true},this.internalSearchIndeces.map((function(t){return o("nano-option",{selected:t.index===e.searchIndex,value:t.index},t.name||t.index)})),o("nano-icon",{name:"solid/caret-down",class:"down-arrow",slot:"down-arrow"})),o("nano-input",{class:"search-input",label:"What would you like to search for?","aria-label":"What would you like to search for?",hideLabel:true,showInlineError:false,"clear-input":true,placeholder:"Search...",type:"text",ref:function(t){return e.searchInput=t},onNanoChange:this.onSearchChange,onNanoInput:this.onSearchInput,onKeyDown:this.onAutocompleteInteract,debounce:500,"aria-autocomplete":"list","aria-activedescendant":this.autocompleteEles[this.currAIndex]?this.autocompleteEles[this.currAIndex].id:false,"aria-controls":"autocomplete-results",onNanoFocus:this.showAutocompleteResults,value:this.searchValue,role:"textbox"},o("button",{class:{"search-icon":true,"search-icon--search":true,"search-icon--show":!this.searchValInternal.length},slot:"end",onMouseDown:function(t){e.searchValInternal=e.searchInput.value;e.onSearchSubmit(t,true)}},o("nano-icon",{name:"light/search"})),o("span",{class:{"search-icon":true,"search-icon--loader":true,"search-icon--show":this.searchLoading},slot:"end"},o("nano-icon",{name:"light/spinner-third"}))),o("input",{type:"submit"}))]};e.prototype.render=function(){var e;var t=this;this.autocompleteEles=[];var n=this.el.ownerDocument.dir==="rtl";var a=this.searchWidget();a.push(this.autocompleteList());return o(l,{class:(e={},e[this.thresholdClasses().join(" ")]=true,e.ready=this.ready,e["search-bar-shown"]=this.searchBarShown&&this.scrollingUp,e["search-auto-complete-shown"]=this.showAutocomplete&&this.scrollingUp,e["modal-open"]=this.modalIsOpen,e.resizing=this.isResizing,e),dir:n?"rtl":null},o("div",{class:{"global-nav":true,"scrolling-down":!this.scrollingUp}},o("nav",{id:"global-nav-menu",class:{"gn-menu":true,open:this.modalOpen,"has-promotion":this.hasPromotionSlot,"menu-full-screen":this.menuFullScreen,"secondary-open":this.secondaryMenuOpen},"aria-expanded":this.modalOpen?"true":"false",ref:function(e){return t.menuDiv=e}},o("div",{class:"gn-menu_wrap",ref:function(e){return t.menuWrapDiv=e},tabindex:"-1"},o("div",{class:"gn-menu_actions"},o("button",{class:"menu-btn icon-btn icon-btn",onMouseDown:this.onMenuBtnClick,onKeyDown:this.onMenuBtnKeyDown},this.threshold<this.THRESHOLDLIMIT-3&&o("nano-icon",{name:"light/times","aria-label":"close menu"}),this.threshold>=this.THRESHOLDLIMIT-3&&o("nano-icon",{name:"light/bars","aria-label":"close menu"})),this.threshold<this.THRESHOLDLIMIT-v.icon&&[!!this.iconSlotLen&&o("slot",{name:"icon"}),this.myAccData&&(!this.activeMyAccountSections||this.activeMyAccountSections.includes("icons"))&&[this.msgUrl&&o("a",{href:this.msgUrl,class:"icon-btn"},o("nano-icon",{name:"light/bell"}),this.msgCount>0&&o("span",{class:"gn-menu_actions-counter"},this.msgCount)),this.cartUrl&&o("a",{href:this.cartUrl,class:"icon-btn"},o("nano-icon",{name:"light/shopping-cart"}),this.cartCount>0&&o("span",{class:"gn-menu_actions-counter"},this.cartCount))]],this.myAccData&&this.myAccData.urls.login&&o("a",{href:this.myAccData.urls.login+this.ssoRedirect,class:"login-btn"},"Login / Register"," ",o("nano-icon",{name:"solid/chevron-right"}))),o("div",{class:"content-wrap",ref:function(e){return t.menuContentDiv=e}},o("div",{class:"content"},o("nav",{class:"nav-links nav-links--main"},o("slot",{name:"overflow"}),this.threshold<this.THRESHOLDLIMIT-v.main&&!!this.mainSlotLen&&o("slot",{name:"main"})),((!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about||this.hasSiteSlot||!!this.siteNavItms.length)&&o("div",null,(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about&&[(this.threshold>=this.THRESHOLDLIMIT-(v.about+1)||this.mainSlotLen<2)&&this.overflowSlotLen<2&&o("div",{class:"nav-links-wrap"},!!this.aboutNavItms.length&&o("h4",{class:"nav-links_title"},"About"),o("nav",{class:"nav-links nav-links--sub","aria-label":"About the company links"},o("slot",{name:"about"}),this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))),(this.threshold<this.THRESHOLDLIMIT-(v.about+1)&&this.mainSlotLen>=2||this.overflowSlotLen>=2)&&o("nav",{class:"nav-links","aria-label":"About the company links"},!this.aboutNavItms.length&&o("slot",{name:"about"}),!!this.aboutNavItms.length&&o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},"Company",o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),"Company"),o("slot",{name:"about"}),o("div",{class:"content--sub"},this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))))))],(this.hasSiteSlot||!!this.siteNavItms.length)&&[(this.threshold>=this.THRESHOLDLIMIT-2||this.mainSlotLen<2)&&this.overflowSlotLen<2&&o("div",{class:"nav-links-wrap"},o("h4",{class:"nav-links_title"},"Sites"),o("nav",{class:"nav-links nav-links--sub","aria-label":"Different company site links"},o("slot",{name:"site"}),this.siteNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))),(this.threshold<this.THRESHOLDLIMIT-2&&this.mainSlotLen>=2||this.overflowSlotLen>=2)&&o("nav",{class:"nav-links","aria-label":"Different company site links"},o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},"Sites",o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),"Sites"),o("div",{class:"content--sub"},o("slot",{name:"site"}),this.siteNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})))))))])),this.isLoggedIn&&this.threshold<this.THRESHOLDLIMIT-v.login&&(this.loggedInNavItms.length||this.hasLoggedinSlot)&&o("nav",{class:"nav-links","aria-label":"Your user account links"},o("nano-nav-item",{class:"nano-global-nav user-nav nano-global-nav-menu"},this.myAccountUser.name,o("nano-icon",{slot:"icon-end",name:"solid/chevron-right"}),o("div",{slot:"secondary"},o("div",{class:"content"},o("button",{class:"back-btn",onClick:this.subMenuClose},o("nano-icon",{slot:"icon-end",name:"solid/chevron-left","aria-label":"go back"}),this.myAccountUser.name),o("div",{class:"content--sub"},o("slot",{name:"loggedin"}),this.loggedInNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:e.address,target:e.target},e.title))})),o("nano-nav-item",{class:"nano-global-nav nano-global-nav-menu"},o("a",{href:this.myAccData.urls.forgot_password+this.ssoRedirect},"Change Password"))))))),o("slot",{name:"promotion"}),this.myAccData&&this.myAccData.urls.logout&&o("div",{class:"login-btn logout-btn"},o("a",{href:this.myAccData.urls.logout+this.ssoRedirect},"Logout"))))),o("nano-sticker",{"auto-resize":"false","break-point-max":"800",quietMode:{h:600,w:800}},o("div",{class:"bars",ref:function(e){return t.barsDiv=e}},o("nav",{class:"main-bar","aria-label":"Main site navigation",tabindex:"-1",ref:function(e){return t.mainBarDiv=e}},(this.hasPromotionSlot||!!this.overflowSlotLen||(this.myAccData||!!this.iconSlotLen)&&this.threshold<this.THRESHOLDLIMIT-v.icon||this.isLoggedIn&&(!!this.loggedInNavItms.length||this.hasLoggedinSlot)&&this.threshold<this.THRESHOLDLIMIT-v.login||!!this.mainSlotLen&&this.threshold<this.THRESHOLDLIMIT-v.main||(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold<this.THRESHOLDLIMIT-v.about||this.hasSiteSlot||!!this.siteNavItms.length)&&o("button",{class:"menu-btn icon-btn",onMouseDown:this.menuOpen,onKeyDown:this.onMenuBtnKeyDown,"aria-expanded":this.modalOpen?"true":"false","aria-controls":"global-nav-menu",ref:function(e){return t.menuBtn=e}},o("nano-icon",{name:"light/bars","aria-label":"open menu"})),this.showLogo&&o("a",{href:this.logoUrl,class:"logo-link"},o("img",{src:r("./assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies Logo",class:"logo"})),!this.showLogo&&o("div",{class:"logo-link"},o("slot",{name:"logo"})),o("div",{class:"nav-links nav-links--main"},o("slot",{name:"main"})),this.threshold>=this.THRESHOLDLIMIT-v.search&&[this.showSearch&&!!this.internalSearchIndeces.length&&o("div",{class:"search-widget",role:"combobox","aria-owns":"autocomplete-results","aria-expanded":this.showAutocomplete&&this.autocompleteResults?"true":"false"},a),(!this.showSearch||!this.myAccData)&&!!this.searchSlotLen&&o("slot",{name:"search"})],(!!this.aboutSlotLen||!!this.aboutNavItms.length)&&this.threshold>=this.THRESHOLDLIMIT-v.about&&o("nav",{class:"nav-links nav-links--sub","aria-label":"About the company. Links"},o("slot",{name:"about"}),this.aboutNavItms.map((function(e){return o("nano-nav-item",{class:"nano-global-nav nano-global-nav-bar"},o("a",{href:e.address,target:e.target},e.title))}))),this.threshold<this.THRESHOLDLIMIT-v.search&&(this.showSearch&&!!this.internalSearchIndeces.length||!!this.searchSlotLen)&&o("button",{class:"icon-btn","aria-controls":"global-nav-search-bar","aria-expanded":this.searchBarShown?"true":"false",onMouseDown:this.onSearchBtnClick,onKeyDown:this.onSearchBtnKeyDown},o("nano-icon",{name:"light/search"})),this.threshold>=this.THRESHOLDLIMIT-v.icon&&[!!this.iconSlotLen&&o("slot",{name:"icon"}),this.myAccData&&(!this.activeMyAccountSections||this.activeMyAccountSections.includes("icons"))&&[this.msgUrl&&o("a",{href:this.msgUrl,class:"icon-btn"},o("nano-icon",{name:"light/bell"}),this.msgCount>0&&o("span",{class:"gn-menu_actions-counter"},this.msgCount)),this.cartUrl&&o("a",{href:this.cartUrl,class:"icon-btn"},o("nano-icon",{name:"light/shopping-cart"}),this.cartCount>0&&o("span",{class:"gn-menu_actions-counter"},this.cartCount))]],this.myAccData&&(!this.activeMyAccountSections||this.activeMyAccountSections.includes("loggedin"))&&this.threshold>=this.THRESHOLDLIMIT-v.login&&[this.myAccData.urls.login&&o("a",{href:this.myAccData.urls.login+this.ssoRedirect,class:"login-btn"},"Login / Register"),this.myAccountUser&&o("div",{class:"user-links"},o("button",{class:{"icon-btn":true,"user-links-btn":true,open:this.userMenuOpen},onMouseDown:this.onUserBtnClick,onKeyDown:this.onUserBtnKeyDown}," ",this.myAccountUser.name,o("nano-icon",{name:"solid/caret-down"})),o("div",{class:"user-links-panel",tabindex:"-1",ref:function(e){return t.userLinkPanel=e}},o("div",{class:"user-links-panel-content"},this.loggedInNavItms.map((function(e){return o("a",{href:e.address,target:e.target},e.title)}))),o("div",{class:"user-links-panel-foot"},o("a",{href:this.myAccData.urls.forgot_password+this.ssoRedirect},"Change Password"),o("a",{href:this.myAccData.urls.logout+this.ssoRedirect},"Logout"))))],o("span",{class:"measure-ele"})),this.threshold<this.THRESHOLDLIMIT-v.search&&o("div",{id:"global-nav-search-bar",class:{"search-bar":true,show:this.searchBarShown},"aria-expanded":this.searchBarShown?"true":"false",role:"region",tabindex:"-1",ref:function(e){return t.searchBarEl=e}},o("div",{class:"search-widget"},this.showSearch&&!!this.internalSearchIndeces.length&&o("div",null,a),(!this.showSearch||!this.myAccData)&&!!this.searchSlotLen&&o("slot",{name:"search"}))))),(this.threshold<this.THRESHOLDLIMIT-3||this.menuFullScreen)&&o("div",{class:{mask:true,open:this.modalOpen},onClick:this.menuClose,onTouchEnd:this.menuClose})),o("div",{class:"site-content",ref:function(e){return t.siteContent=e}},o("slot",null)))};e.prototype.domainFor=function(e){if(!this.myAccData)return"";var t=this.myAccData.domains.find((function(t){return t.origin===e}));return t?t.domain:""};e.prototype.processSearchResults=function(e){var t=this;var n=e;var a=e;if(n.results){n.results.forEach((function(e,a){n.results[a]=t.processSearchResults(e)}));return n}else{a.hits.map((function(e){if(e.url&&!e.url.match(/^http/))e.url=location.protocol+"//"+t.domainFor(e.origin)+e.url}));return a}};e.prototype.processMyAccData=function(){if(!this.myAccData||!this.myAccData.search.indeces.length)return;if(this.myAccData.search.api_key)this.searchApiKey=this.myAccData.search.api_key;if(this.myAccData.search.app_id)this.searchAppId=this.myAccData.search.app_id;if(this.myAccData.cart.count)this.cartCount=this.myAccData.cart.count;if(this.myAccData.notifications.count)this.msgCount=this.myAccData.notifications.count;if(!this.searchAppId||!this.searchApiKey)return;this.internalSearchIndeces=__spreadArray(__spreadArray([],this.myAccData.search.indeces),this.searchIndeces);if(this.myAccData.urls.cart&&!this.cartUrl)this.cartUrl=this.myAccData.urls.cart;if(this.myAccData.urls.messages&&!this.msgUrl)this.msgUrl=this.myAccData.urls.messages};e.prototype.processMyAccLinks=function(){var e=this;if(!this.myAccData.links||!this.myAccData.links.length)return;this.myAccData.links.forEach((function(t){switch(t.area){case"left-side-logged-in":case"left-side-logged-out":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("sites"))break;if(e.isLoggedIn&&t.area==="left-side-logged-in")e.siteNavItms.push(t);else if(!e.isLoggedIn&&t.area==="left-side-logged-out")e.siteNavItms.push(t);break;case"right-side-logged-in":case"right-side-logged-out":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("about"))break;if(e.isLoggedIn&&t.area==="right-side-logged-in")e.aboutNavItms.push(t);else if(!e.isLoggedIn&&t.area==="right-side-logged-out")e.aboutNavItms.push(t);break;case"profile-panel-list":if(e.activeMyAccountSections&&!e.activeMyAccountSections.includes("loggedin"))break;e.loggedInNavItms.push(t);break}}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return c(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{env:["getMyAccData"],ssoDataUrl:["getMyAccData"],searchIndex:["currentSelectedIndex"],searchValInternal:["changeInternalSearchVal"],searchApiKey:["initAlgoliaClient"],searchAppId:["initAlgoliaClient"],searchIndeces:["addIndeces"],internalSearchIndeces:["addAlgoliaIndeces"],threshold:["thresholdChange"],intersectRatio:["ratioChange"],thresholdReady:["assessReady"],remoteDataReady:["assessReady","remoteReady"],ready:["isReady"],showAutocomplete:["setupAutocompleteBlur","resetHitFocus"],aboutSlotLen:["slotChange"],iconSlotLen:["slotChange"],mainSlotLen:["slotChange"],overflowSlotLen:["slotChange"],searchSlotLen:["slotChange"],userMenuOpen:["handleUserMenu"]}},enumerable:false,configurable:true});return e}());x.style=f}}}));
|
5
|
+
//# sourceMappingURL=p-2057d480.system.entry.js.map
|