@nanoporetech-digital/components 5.4.2 → 5.5.1

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +1 -1
  3. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-global-nav.cjs.entry.js +1 -4
  5. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-slides.cjs.entry.js +64 -33
  7. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  8. package/dist/cjs/{nano-table-201b1ee2.js → nano-table-884ce575.js} +2 -2
  9. package/dist/cjs/{nano-table-201b1ee2.js.map → nano-table-884ce575.js.map} +1 -1
  10. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  11. package/dist/cjs/{table.worker-1b295406.js → table.worker-670457aa.js} +2 -2
  12. package/dist/cjs/table.worker-670457aa.js.map +1 -0
  13. package/dist/collection/components/global-nav/global-nav.js +1 -4
  14. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  15. package/dist/collection/components/nav-item/nav-item.js +1 -1
  16. package/dist/collection/components/nav-item/nav-item.js.map +1 -1
  17. package/dist/collection/components/slides/lib/js/animate.js +5 -3
  18. package/dist/collection/components/slides/lib/js/flickity.js +1 -0
  19. package/dist/collection/components/slides/lib/js/page-dots.js +5 -0
  20. package/dist/collection/components/slides/lib/js/prev-next-button.js +23 -6
  21. package/dist/collection/components/slides/slides-interface.js.map +1 -1
  22. package/dist/collection/components/slides/slides.js +47 -28
  23. package/dist/collection/components/slides/slides.js.map +1 -1
  24. package/dist/components/nano-global-nav.js +1 -4
  25. package/dist/components/nano-global-nav.js.map +1 -1
  26. package/dist/components/nano-slides.js +64 -33
  27. package/dist/components/nano-slides.js.map +1 -1
  28. package/dist/components/nav-item.js +1 -1
  29. package/dist/components/nav-item.js.map +1 -1
  30. package/dist/esm/nano-global-nav-user-profile_3.entry.js +1 -1
  31. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  32. package/dist/esm/nano-global-nav.entry.js +1 -4
  33. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  34. package/dist/esm/nano-slides.entry.js +64 -33
  35. package/dist/esm/nano-slides.entry.js.map +1 -1
  36. package/dist/esm/{nano-table-f2c222e8.js → nano-table-c6a4e1dc.js} +2 -2
  37. package/dist/esm/{nano-table-f2c222e8.js.map → nano-table-c6a4e1dc.js.map} +1 -1
  38. package/dist/esm/nano-table.entry.js +1 -1
  39. package/dist/esm/{table.worker-8356a40e.js → table.worker-2568f20c.js} +2 -2
  40. package/dist/esm/table.worker-2568f20c.js.map +1 -0
  41. package/dist/nano-components/nano-components.esm.js +1 -1
  42. package/dist/nano-components/{p-bdb5dfc3.js → p-4ef3200a.js} +2 -2
  43. package/dist/nano-components/p-7c4ac519.entry.js +23 -0
  44. package/dist/nano-components/p-7c4ac519.entry.js.map +1 -0
  45. package/dist/nano-components/{p-fa9f834b.entry.js → p-997319eb.entry.js} +2 -2
  46. package/dist/nano-components/{p-fa9f834b.entry.js.map → p-997319eb.entry.js.map} +1 -1
  47. package/dist/nano-components/{p-e94da35a.entry.js → p-9a0191c7.entry.js} +2 -2
  48. package/dist/nano-components/p-afd3cd17.entry.js +5 -0
  49. package/dist/nano-components/p-afd3cd17.entry.js.map +1 -0
  50. package/dist/nano-components/{p-a593dac2.js → p-f5698b41.js} +2 -2
  51. package/dist/types/components/slides/slides-interface.d.ts +2 -0
  52. package/dist/types/components/slides/slides.d.ts +39 -74
  53. package/dist/types/components.d.ts +3 -3
  54. package/docs-json.json +104 -7
  55. package/hydrate/index.js +80 -39
  56. package/package.json +2 -2
  57. package/dist/cjs/table.worker-1b295406.js.map +0 -1
  58. package/dist/esm/table.worker-8356a40e.js.map +0 -1
  59. package/dist/nano-components/p-37c7eda3.entry.js +0 -5
  60. package/dist/nano-components/p-37c7eda3.entry.js.map +0 -1
  61. package/dist/nano-components/p-7f5fb917.entry.js +0 -23
  62. package/dist/nano-components/p-7f5fb917.entry.js.map +0 -1
  63. /package/dist/nano-components/{p-bdb5dfc3.js.map → p-4ef3200a.js.map} +0 -0
  64. /package/dist/nano-components/{p-a593dac2.js.map → p-9a0191c7.entry.js.map} +0 -0
  65. /package/dist/nano-components/{p-e94da35a.entry.js.map → p-f5698b41.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- export { T as nano_table } from './nano-table-f2c222e8.js';
4
+ export { T as nano_table } from './nano-table-c6a4e1dc.js';
5
5
  import './index-06666022.js';
6
6
  import './math-c02ddfda.js';
7
7
  import './throttle-ac4fcefa.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import { c as createWorker } from './nano-table-f2c222e8.js';
4
+ import { c as createWorker } from './nano-table-c6a4e1dc.js';
5
5
  import './index-06666022.js';
6
6
  import './math-c02ddfda.js';
7
7
  import './throttle-ac4fcefa.js';
@@ -17,4 +17,4 @@ URL.revokeObjectURL(url);
17
17
 
18
18
  export { worker, workerMsgId, workerName, workerPath };
19
19
 
20
- //# sourceMappingURL=table.worker-8356a40e.js.map
20
+ //# sourceMappingURL=table.worker-2568f20c.js.map
@@ -0,0 +1 @@
1
+ {"file":"table.worker-2568f20c.js","mappings":";;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import{p as e,H as a,b as o}from"./p-d6a04b3a.js";export{s as setNonce}from"./p-d6a04b3a.js";import"./p-d4f6ec9f.js";const n=()=>{{t(a.prototype)}const o=import.meta.url;const n={};if(o!==""){n.resourcesUrl=new URL(".",o).href}return e(n)};const t=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const o=a.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){o.appendChild(n[e].cloneNode(true))}}}return o}};n().then((e=>o(JSON.parse('[["p-fa9f834b",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"myAccountData":[16],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"userProfileUrl":[32],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchLoading":[32],"searchValInternal":[32],"internalSearchIndeces":[32],"submitSearch":[64],"toggleOverflowMenu":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[16,"click","menuClose"]]]]],["p-e98835e2",[[1,"nano-demo"]]],["p-d4e44f93",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-04d5c9ea",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-ac7953e0",[[1,"nano-drawer",{"open":[516],"label":[513],"placement":[513],"contained":[516],"noHeader":[516,"no-header"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"noUserDismiss":[4,"no-user-dismiss"],"hoist":[4],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-328ef9d3",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-6bdbcaa6",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"hoist":[4],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"noDismiss":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-0bc40dd1",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-73312f19",[[1,"nano-overflow-nav",{"scrollControls":[4,"scroll-controls"],"orientation":[513],"activeHandler":[16],"inActiveHandler":[16],"isActiveHandler":[16],"instantReCalc":[32],"hasScrollControls":[32],"hideControlEnd":[32],"hideControlStart":[32],"syncActiveItem":[64]}]]],["p-d62b48bc",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-02b727d3",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-760d80d2",[[1,"nano-menu-drawer",{"open":[1028],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-6c4171fa",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-bedada62",[[1,"nano-tab-group",{"placement":[513],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-800c4260",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-650aa197",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-7dd30a3f",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-4d0c0873",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-0e0f07f0",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-87329424",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-16e75af9",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-0563e812",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"value":[1025],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleValueChange"],[0,"nanoChange","handleCbChange"]]]]],["p-a03993f9",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-3eeaba47",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64],"scrollToFirstInvalid":[64]},[[0,"nanoChange","handleFieldChange"],[0,"input","handlePlainFieldChange"],[0,"change","handlePlainFieldChange"],[0,"submit","handleSubmit"]]]]],["p-9c290055",[[1,"nano-grid-item"]]],["p-1a55e282",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-17eb456c",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-50f2fdb3",[[1,"nano-slide",{"ready":[1540]}]]],["p-7f5fb917",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-3ae362ae",[[1,"nano-sortable",{"itemSelector":[1,"item-selector"],"handleSelector":[1,"handle-selector"],"dropzoneSelector":[1,"dropzone-selector"],"helperText":[1,"helper-text"],"itemDescriptor":[16],"grabbedHelperText":[16],"droppedHelperText":[16],"reorderHelperText":[16],"createKeyboardHandle":[16],"sortableHostElement":[16],"animationEnabled":[4,"animation-enabled"],"draggedClass":[1,"dragged-class"],"handleDraggedClass":[1,"handle-dragged-class"],"placeholderClass":[1,"placeholder-class"],"dropzoneActiveClass":[1,"dropzone-active-class"],"animationTiming":[8,"animation-timing"],"orientation":[1],"dragResize":[4,"drag-resize"],"keyboardSortActive":[32],"ariaTextList":[32],"refreshKeyboardHandles":[64]}]]],["p-3f40e370",[[1,"nano-tab-content",{"name":[513],"active":[516],"ready":[32]}]]],["p-9925e504",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-e94da35a",[[4,"nano-table",{"customRenderer":[16],"type":[1],"caption":[1],"showCaption":[4,"show-caption"],"loading":[4],"placeholderSize":[2,"placeholder-size"],"rows":[1040],"columns":[1040],"headRender":[16],"rowRender":[16],"footRender":[16],"showFooter":[4,"show-footer"],"perBlock":[2,"per-block"],"blocksLength":[2050,"blocks-length"],"searchTerm":[1,"search-term"],"customFilterFn":[16],"customSortFn":[16],"defaultSort":[4,"default-sort"],"virtualTotalItems":[2,"virtual-total-items"],"appliedFilters":[2064],"internalLoading":[32],"blocks":[32],"activeBlocks":[32],"resetSorting":[64],"addSort":[64],"resetFilters":[64],"addFilters":[64],"removeFilters":[64],"updateRow":[64]}]]],["p-03f8b115",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-efd3e121",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-9d65f5de",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[8,"s-size"],"mSize":[8,"m-size"],"lSize":[8,"l-size"],"xlSize":[8,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"sTpl":[1,"s-tpl"],"mTpl":[1,"m-tpl"],"lTpl":[1,"l-tpl"],"xlTpl":[1,"xl-tpl"],"xxlTpl":[1,"xxl-tpl"],"showHelper":[516,"show-helper"],"cacheKey":[32]}]]],["p-4a79eafe",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-54c4a2f5",[[1,"nano-progress-bar",{"value":[2],"indeterminate":[4],"showPercent":[4,"show-percent"]}]]],["p-fcd8df14",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-79c96564",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"eventType":[16],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-18e0d957",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-37c7eda3",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[0,"nano-global-nav-user-profile",{"myAccountUser":[16],"userProfileUrl":[1,"user-profile-url"]}],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"hasAnchorEle":[32],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]},[[16,"click","handleClose"],[16,"keyup","handleClose"]]]]],["p-e6a0675e",[[1,"nano-resize-observe",{"notifyContentFit":[1,"notify-content-fit"],"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32],"contentFitX":[32],"contentFitY":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-fcbc9122",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-2a7d0c13",[[1,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"showTooltip":[4,"show-tooltip"],"disabled":[516],"href":[1],"rel":[1],"target":[1],"form":[1],"setFocus":[64]}],[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"hoist":[4],"trigger":[1],"show":[64],"hide":[64]}]]]]'),e)));
4
+ import{p as e,H as a,b as o}from"./p-d6a04b3a.js";export{s as setNonce}from"./p-d6a04b3a.js";import"./p-d4f6ec9f.js";const n=()=>{{t(a.prototype)}const o=import.meta.url;const n={};if(o!==""){n.resourcesUrl=new URL(".",o).href}return e(n)};const t=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const o=a.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){o.appendChild(n[e].cloneNode(true))}}}return o}};n().then((e=>o(JSON.parse('[["p-997319eb",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"myAccountData":[16],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"userProfileUrl":[32],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchLoading":[32],"searchValInternal":[32],"internalSearchIndeces":[32],"submitSearch":[64],"toggleOverflowMenu":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[16,"click","menuClose"]]]]],["p-e98835e2",[[1,"nano-demo"]]],["p-d4e44f93",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-04d5c9ea",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-ac7953e0",[[1,"nano-drawer",{"open":[516],"label":[513],"placement":[513],"contained":[516],"noHeader":[516,"no-header"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"noUserDismiss":[4,"no-user-dismiss"],"hoist":[4],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-328ef9d3",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-6bdbcaa6",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"hoist":[4],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"noDismiss":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-0bc40dd1",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-73312f19",[[1,"nano-overflow-nav",{"scrollControls":[4,"scroll-controls"],"orientation":[513],"activeHandler":[16],"inActiveHandler":[16],"isActiveHandler":[16],"instantReCalc":[32],"hasScrollControls":[32],"hideControlEnd":[32],"hideControlStart":[32],"syncActiveItem":[64]}]]],["p-d62b48bc",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-02b727d3",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-760d80d2",[[1,"nano-menu-drawer",{"open":[1028],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-6c4171fa",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-bedada62",[[1,"nano-tab-group",{"placement":[513],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-800c4260",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-650aa197",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-7dd30a3f",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-4d0c0873",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-0e0f07f0",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-87329424",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-16e75af9",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-0563e812",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"value":[1025],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleValueChange"],[0,"nanoChange","handleCbChange"]]]]],["p-a03993f9",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-3eeaba47",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64],"scrollToFirstInvalid":[64]},[[0,"nanoChange","handleFieldChange"],[0,"input","handlePlainFieldChange"],[0,"change","handlePlainFieldChange"],[0,"submit","handleSubmit"]]]]],["p-9c290055",[[1,"nano-grid-item"]]],["p-1a55e282",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-17eb456c",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-50f2fdb3",[[1,"nano-slide",{"ready":[1540]}]]],["p-7c4ac519",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-3ae362ae",[[1,"nano-sortable",{"itemSelector":[1,"item-selector"],"handleSelector":[1,"handle-selector"],"dropzoneSelector":[1,"dropzone-selector"],"helperText":[1,"helper-text"],"itemDescriptor":[16],"grabbedHelperText":[16],"droppedHelperText":[16],"reorderHelperText":[16],"createKeyboardHandle":[16],"sortableHostElement":[16],"animationEnabled":[4,"animation-enabled"],"draggedClass":[1,"dragged-class"],"handleDraggedClass":[1,"handle-dragged-class"],"placeholderClass":[1,"placeholder-class"],"dropzoneActiveClass":[1,"dropzone-active-class"],"animationTiming":[8,"animation-timing"],"orientation":[1],"dragResize":[4,"drag-resize"],"keyboardSortActive":[32],"ariaTextList":[32],"refreshKeyboardHandles":[64]}]]],["p-3f40e370",[[1,"nano-tab-content",{"name":[513],"active":[516],"ready":[32]}]]],["p-9925e504",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-9a0191c7",[[4,"nano-table",{"customRenderer":[16],"type":[1],"caption":[1],"showCaption":[4,"show-caption"],"loading":[4],"placeholderSize":[2,"placeholder-size"],"rows":[1040],"columns":[1040],"headRender":[16],"rowRender":[16],"footRender":[16],"showFooter":[4,"show-footer"],"perBlock":[2,"per-block"],"blocksLength":[2050,"blocks-length"],"searchTerm":[1,"search-term"],"customFilterFn":[16],"customSortFn":[16],"defaultSort":[4,"default-sort"],"virtualTotalItems":[2,"virtual-total-items"],"appliedFilters":[2064],"internalLoading":[32],"blocks":[32],"activeBlocks":[32],"resetSorting":[64],"addSort":[64],"resetFilters":[64],"addFilters":[64],"removeFilters":[64],"updateRow":[64]}]]],["p-03f8b115",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-efd3e121",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-9d65f5de",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[8,"s-size"],"mSize":[8,"m-size"],"lSize":[8,"l-size"],"xlSize":[8,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"sTpl":[1,"s-tpl"],"mTpl":[1,"m-tpl"],"lTpl":[1,"l-tpl"],"xlTpl":[1,"xl-tpl"],"xxlTpl":[1,"xxl-tpl"],"showHelper":[516,"show-helper"],"cacheKey":[32]}]]],["p-4a79eafe",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-54c4a2f5",[[1,"nano-progress-bar",{"value":[2],"indeterminate":[4],"showPercent":[4,"show-percent"]}]]],["p-fcd8df14",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-79c96564",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"eventType":[16],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-18e0d957",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-afd3cd17",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[0,"nano-global-nav-user-profile",{"myAccountUser":[16],"userProfileUrl":[1,"user-profile-url"]}],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"hasAnchorEle":[32],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]},[[16,"click","handleClose"],[16,"keyup","handleClose"]]]]],["p-e6a0675e",[[1,"nano-resize-observe",{"notifyContentFit":[1,"notify-content-fit"],"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32],"contentFitX":[32],"contentFitY":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-fcbc9122",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-2a7d0c13",[[1,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"showTooltip":[4,"show-tooltip"],"disabled":[516],"href":[1],"rel":[1],"target":[1],"form":[1],"setFocus":[64]}],[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"hoist":[4],"trigger":[1],"show":[64],"hide":[64]}]]]]'),e)));
5
5
  //# sourceMappingURL=nano-components.esm.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import{j as t,h as n,F as e,g as i,e as o,w as s,d as r,r as a,c as l,a as d}from"./p-d6a04b3a.js";import{a as c}from"./p-ee045579.js";import{d as h}from"./p-7bff5224.js";import{c as b}from"./p-70747f20.js";const p="nano-tbl";const f=(t,n)=>{const e=globalThis[n];return e!=null&&t instanceof e};const u=t=>{if(t!=null){if(f(t,"ArrayBuffer")||f(t,"MessagePort")||f(t,"ImageBitmap")||f(t,"OffscreenCanvas")){return[t]}if(typeof t==="object"){if(t.constructor===Object){t=Object.values(t)}if(Array.isArray(t)){return t.flatMap(u)}return u(t.buffer)}}return[]};let _=0;let m=0;const g=new Map;const w=new Map;const v=(n,e,i)=>{const o=new Worker(n,{name:e});o.addEventListener("message",(({data:n})=>{if(n){const e=n[0];const o=n[1];const s=n[2];if(e===i){const e=n[3];const[i,r,a]=g.get(o);g.delete(o);if(e){const n=e.isError?Object.assign(new Error(e.value.message),e.value):e.value;t(n);r(n)}else{if(a){a.forEach((t=>w.delete(t)))}i(s)}}else if(e===i+".cb"){try{w.get(o)(...s)}catch(n){t(n)}}}}));return o};const y=(t,n,e)=>(...i)=>new Promise(((o,s)=>{let r=_++;let a=0;let l=i.length;let d=[o,s];g.set(r,d);for(;a<l;a++){if(typeof i[a]==="function"){const t=m++;w.set(t,i[a]);i[a]=[n+".cb",t];(d[2]=d[2]||[]).push(t)}}const c=t=>t.postMessage([n,r,e,i],u(i));if(t.then){t.then(c)}else{c(t)}}));const k=import("./p-a593dac2.js").then((t=>t.worker));const x=y(k,"stencil.table.worker","createWorkerStore");const $=y(k,"stencil.table.worker","syncConfigToWorker");const j=y(k,"stencil.table.worker","syncDataToWorker");const z=y(k,"stencil.table.worker","workerFilter");const O=y(k,"stencil.table.worker","workerSearch");const C=y(k,"stencil.table.worker","workerSort");function S(t){const n=JSON.parse(JSON.stringify(t));t.forEach((t=>{if(!!(t===null||t===void 0?void 0:t.sortCompareFn)){const e=n.find((n=>n.prop===t.prop));e.sortCompareFn=t.sortCompareFn.toString()}}));return n}const I=new WeakMap;async function R(t,n,e,i){const o={data:b({rows:[]}),config:b({columns:n}),general:b({workerId:null,scrollParent:e,host:t,isReady:i})};const s=await x(o.data.state.rows,S(o.config.state.columns));o.general.state.workerId=s;I.set(t,o);o.data.use({reset:()=>{if(o.general.state.workerId)j(o.general.state.workerId,null)},dispose:()=>{if(o.general.state.workerId)j(o.general.state.workerId,null)}});o.config.use({reset:()=>{if(o.general.state.workerId)$(o.general.state.workerId,null)},dispose:()=>{if(o.general.state.workerId)$(o.general.state.workerId,null)}});return o}function P(t){return I.get(t)}function T(t){if(t instanceof Date){return"date"}if(["number","string","boolean"].includes(typeof t)){return typeof t}return"unknown"}function A(t,n){const e=I.get(t);if(!e)return;const i=e.config.state.columns;const o=i.filter((t=>t.type==="date")).reduce(((t,n)=>[...t,n.prop]),[]);const s=i.filter((t=>!t.type));n=n.map(((t,n)=>{if(s.length&&n===0){e.config.state.columns=i.map((n=>{if(s.includes(n)&&t[n.prop]&&!n.type){n.type=T(t[n.prop]);if(n.type==="date")o.push(n.prop)}return n}))}o.forEach((n=>{var e;const i=(e=new Date(t[n]))!==null&&e!==void 0?e:null;if(!!i&&Number(i))t[n]=Number(i)}));t["__index"]=n;t["__uuid"]=c(i.map((n=>t[n.prop])).join());return t}));e.data.state.rows=n;if(e.general.state.workerId)return j(e.general.state.workerId,n)}function M(t,n){const e=I.get(t);if(!e)return;e.config.state.columns=n;if(e.general.state.workerId)return $(e.general.state.workerId,S(n))}async function B(t,n){const e=I.get(t);if(!e||!e.general.state.workerId)return;try{e.data.state.rows=await O(e.general.state.workerId,n)}catch(t){console.warn(t)}}async function F(t,n){const e=I.get(t);if(!e||!e.general.state.workerId)return;try{e.data.state.rows=await z(e.general.state.workerId,n)}catch(t){console.warn(t)}}async function N(t,n,e){const i=I.get(t);if(!i||!i.general.state.workerId)return;try{i.data.state.rows=await C(i.general.state.workerId,n,e)}catch(t){console.warn(t)}}function D(t,n){const e=H();const i=e.config.state.columns;const o=e.data.state.rows;const s=i[n];const r=s===null||s===void 0?void 0:s.prop;const a=o[t];const l=a?a[i[n].prop]:"";return{prop:r,cellModel:l,column:s,rowIndex:t,rowModel:a}}function E(t){const n=H();const e=n.data.state.rows;const i=e[t];return{rowModel:i,rowIndex:t}}function W(t,n){if(!n)return t;const e=Object.assign(Object.assign({},n),t);if(n.class){if(typeof n.class==="object"&&typeof e.class==="object"){e.class=Object.assign(Object.assign({},n.class),e.class)}else if(typeof n.class==="string"&&typeof e.class==="object"){e.class[n.class]=true}else if(typeof e.class==="string"){e.class+=" "+n.class}}if(n.style){e.style=Object.assign(Object.assign({},n.style),e.style)}return e}function H(){return P(i(o()))}function L(t,n,e){var i;const o=Object.assign({},e);const s=(i=H().config.state.columns[n])===null||i===void 0?void 0:i.cellProperties;if(!s)return o;const r=D(t,n);const a=s(r);if(!a)return o;return W(o,a)}function J(t){const i=t===null||t===void 0?void 0:t.columnTemplate;return i?i(n,t):n(e,null,t.title)}function Y(t,n,e=false){const i={[`${p}__${t}`]:true,[`${p}__pin`]:!!n,[`${p}__pin--top`]:n==="top",[`${p}__pin--bottom`]:n==="bottom"};if(e)return q(i);return i}function q(t){let n="";Object.entries(t).forEach((([t,e])=>{if(e)n+=t+" "}));return n}function K(t){let n=getComputedStyle(t);const e=n.position==="absolute";const i=/(auto|scroll)/;if(n.position==="fixed")return document.documentElement;for(let o=t;o=o.parentElement;){n=getComputedStyle(o);if(e&&n.position==="static"){continue}if(i.test(n.overflow+n.overflowY+n.overflowX))return o}return document.documentElement}function X(t,n=100){const e=t.getBoundingClientRect();const i=window.innerHeight||document.documentElement.clientHeight;if(!e.bottom&&!e.top&&!e.left&&!e.right&&!e.height&&!e.width&&!e.x&&!e.y)return false;return!(Math.floor(100-(e.top>=0?0:e.top)/+-e.height*100)<n||Math.floor(100-(e.bottom-i)/e.height*100)<n)}const U=({column:t,onColumnSortClick:i,defaults:o})=>{function s(n){let e;switch(t.order){case"asc":e="desc";break;case"desc":e=null;break;default:e="asc"}i(e,t.prop,n.target.closest("th"))}function r(){return!!o.sortable&&t.sortable!==false||!o.sortable&&t.sortable===true}let a={};if(t.columnProperties){a=t.columnProperties(t)||a}const l={class:Object.assign(Object.assign({},Y("th",t.pinned)),{[`${p}__pin--start`]:t.pinned==="start",[`${p}__pin--end`]:t.pinned==="end",[`${p}__ordered`]:!!t.order,[`${p}__filtered`]:t.filter!==undefined&&t.filter!==null})};let d=a?W(l,a):l;const c=J(t);if(!c)return n(e,null);d=Number(d.colSpan)>1?Object.assign(Object.assign({},d),{scope:"colgroup"}):Object.assign(Object.assign({},d),{scope:"col"});if(r()){const n=t.order?t.order==="asc"?"ascending":"descending":"none";d=Object.assign(Object.assign({},d),{"aria-sort":n})}return n("th",Object.assign({},d,{key:t.prop}),r()?n("button",{class:{[`${p}__order-btn`]:true,[`${p}__cell-content`]:true},onClick:s},J(t),t.filter!==undefined&&t.filter!==null&&n("nano-icon",{name:"light/filter"}),!!t.order&&(t.order==="desc"?n("nano-icon",{name:"solid/long-arrow-down"}):n("nano-icon",{name:"solid/long-arrow-up"})),n("div",{class:`${p}__status-icons`},n("nano-icon",{name:"light/chevron-down"}))):n("div",{class:`${p}__cell-content`},J(t),t.filter!==undefined&&t.filter!==null&&n("nano-icon",{name:"light/bars-filter"})))};function G(t,i){var s,r;const a=H();const l=a.config.state.columns;const d=(s=l[i])===null||s===void 0?void 0:s.cellTemplate;const c=D(t,i);const h=o();if(!!c.cellModel&&l[i].type==="date"){const t=new Date(c.cellModel);if(t instanceof Date&&!isNaN(t)){c.cellModel=!d?`${new Date(c.cellModel).toLocaleDateString()} ${new Date(c.cellModel).toLocaleTimeString()}`:t}}let b=false;const p=(...t)=>{b=true;return n(...t)};let f=d?d(p,c):undefined;if(f&&h.customRenderer&&f["t"]===undefined&&!(f instanceof Element)&&typeof f!=="string"&&!b){const t=document.createElement("template");h.customRenderer(f,t.content);f=t}return f?f:c.cellModel!==undefined&&c.cellModel!==null?n(e,null,(r=c.cellModel)===null||r===void 0?void 0:r.toString()):""}const Q=(t,n=false)=>{const e=H();const i=e.config.state.columns[t];const o={[`${p}__td`]:true,[`${p}__ordered`]:!!i.order,[`${p}__pin`]:!!i.pinned,[`${p}__pin--start`]:i.pinned==="start",[`${p}__pin--end`]:i.pinned==="end"};if(n)return q(o);return o};const V=({rowIndex:t,colIndex:e,nestedContent:i})=>{const s=()=>i?i():G(t,e)||n("span",{class:"placeholder"}," ");let r="td";const a=o();const l=H();const d=l.config.state.columns[e];let c=L(t,e,{class:Q(e)});if(d.rowHeader){c=Number(c.rowSpan)>1?Object.assign(Object.assign({},c),{scope:"rowgroup"}):Object.assign(Object.assign({},c),{scope:"row"});r="th"}const h=t=>{const e=s();return n("div",Object.assign({ref:t=>{if(t&&e instanceof Element){t.replaceChildren();t.append(e["content"]||e)}}},t,{class:{[`${p}__cell-content`]:true,[`${p}__cell-content--wrap`]:!!d.wrap},innerHTML:typeof e==="string"&&e.includes("<")?e:undefined}),(typeof e!=="string"||!e.includes("<"))&&!(e instanceof Element)&&e)};return n(r,Object.assign({role:a.type==="grid"?"gridcell":undefined},c),d.autoTooltip&&!d.wrap?n("nano-resize-observe",{notifyContentFit:"x",onNanoResizeContentFitChange:t=>t.target.firstElementChild.disabled=t.detail.x},n("nano-tooltip",{disabled:true,placement:"top",onNanoShow:t=>t.target.closest(r).style.zIndex="100",onNanoHide:t=>t.target.closest(r).style.zIndex=""},n(h,null),n("span",{slot:"content"},n(s,null)))):n(h,null))};const Z=(t,e,i)=>{const o=n("div",Object.assign({},t.wrapperProps,{class:{[`${p}__cell-content`]:true,[`${p}__cell-content--wrap`]:t.wrap}}),e);return t.header?n("th",Object.assign({scope:i},t.cellProps),o):n("td",Object.assign({},t.cellProps),o)};const tt=({rowRenderer:t,rowIndex:e,rowModel:i},o,s)=>{const r=({header:t,wrap:n,cellProps:e,wrapperProps:i},o)=>Z({header:t,wrap:n,cellProps:e,wrapperProps:i},o,"row");let a={};if(!i){const t=E(e);i=t.rowModel}if(t===null||t===void 0?void 0:t.rowProperties){a=t.rowProperties({rowModel:i,rowIndex:e})||a}let l;if((t===null||t===void 0?void 0:t.pinned)&&typeof t.pinned==="function"){l=t.pinned({rowModel:i,rowIndex:e})}const d=W({class:Y("tr",l,true)},a);const c=t===null||t===void 0?void 0:t.template;const h=t=>s.map(t,((t,n)=>{if(["td","th"].includes(t.vtag.toString())){t.vattrs=W({class:Q(n,true)},t.vattrs)}return t}));if(c){let t=c(n,{renderedRow:n("tr",Object.assign({},d,{key:i.__uuid}),o),rowModel:i,rowIndex:e},r);if(Array.isArray(t)){t=s.map(t,((t,n)=>{if(t.vtag==="tr"){if(!t.vkey)t.vkey=`${i.__uuid}_${n}`;t.vattrs=W({class:Y("tr",l,true)},t.vattrs);if(!!t.vchildren){t.vchildren=h(t.vchildren)}}return t}))}return t}return n("tr",Object.assign({},d,{key:i.__uuid}),h(o))};const nt=({rowRenderer:t},e,i)=>{let o={};if(t.rowProperties){o=t.rowProperties()||{}}const s=({header:t,wrap:n,cellProps:e,wrapperProps:i},o)=>Z({header:t,wrap:n,cellProps:e,wrapperProps:i},o,"col");const r=t.pinned||null;const a={class:Y("tr",r)};const l=o?W(a,o):a;const d=t===null||t===void 0?void 0:t.template;if(d){let t=d(n,{renderedRow:n("tr",Object.assign({},l),e)},s);if(Array.isArray(t)){t=i.map(t,(t=>{if(t.vtag==="tr"){t.vattrs=W({class:Y("tr",r,true)},t.vattrs);if(!!t.vchildren){t.vchildren=i.map(t.vchildren,(t=>{if(["td","th"].includes(t.vtag.toString())){t.vattrs=W({class:Y(t.vtag.toString(),r,true)},t.vattrs)}return t}))}}return t}))}return t}return n("tr",Object.assign({},l),e)};function et(t,n){const e=document.getElementById(t)||document.createElement("style");e.id=t;e.innerHTML=n;if(!e.isConnected)document.head.append(e)}class it{constructor(t,n){this.cachedColMeta=new WeakMap;this._pinnedStart=[];this._pinnedEnd=[];this._cssColDimensionCacheKey="";this.cacheX=0;this.cacheY=0;this.tableEle=t;this.tableId=this.tableEle.id;this.scrollElement=n;this.startColumns=t.querySelector("thead").getElementsByClassName(`${p}__pin--start`);this.endColumns=t.querySelector("thead").getElementsByClassName(`${p}__pin--end`);this.topRows=t.getElementsByClassName(`${p}__pin--top`);this.bottomRows=t.getElementsByClassName(`${p}__pin--bottom`);this.onResize()}get pinnedStart(){return this._pinnedStart}set pinnedStart(t){this._pinnedStart=t;this.handlePinnedStartChange()}handlePinnedStartChange(){s((()=>{if(this.pinnedStart.length){this.tableEle.classList.add(`${p}__pinned--start`);const t=this.cachedColMeta.get(this.pinnedStart[this.pinnedStart.length-1]);et(`${this.tableId}-col-start-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) {\n --pin-start-active: 1;\n }\n `)}else{this.tableEle.classList.remove(`${p}__pinned--start`);et(`${this.tableId}-col-start-active-style`,``)}}))}get pinnedEnd(){return this._pinnedEnd}set pinnedEnd(t){this._pinnedEnd=t;this.handlePinnedEndChange()}handlePinnedEndChange(){s((()=>{if(this.pinnedEnd.length){this.tableEle.classList.add(`${p}__pinned--end`);const t=this.cachedColMeta.get(this.pinnedEnd[0]);et(`${this.tableId}-col-end-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) { --pin-end-active: 1; }\n `)}else{this.tableEle.classList.remove(`${p}__pinned--end`);et(`${this.tableId}-col-end-active-style`,``)}}))}get cssColDimensionCacheKey(){return this._cssColDimensionCacheKey}set cssColDimensionCacheKey(t){if(t===this._cssColDimensionCacheKey)return;this._cssColDimensionCacheKey=t;this.createPinnedColDimensionStyles()}generateCssCacheKey(){let t="";for(const n of this.startColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}for(const n of this.endColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}this.cssColDimensionCacheKey=t}createPinnedColDimensionStyles(){let t=0;let n=0;const e=Array.from(this.startColumns);const i=Array.from(this.endColumns).reverse();const o=`\n ${e.map((n=>{const e=this.cachedColMeta.get(n);t+=e.width-1||-1;return`\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ td,\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ th {\n --pin-start: ${t-1}px;\n }\n `})).join("")}\n ${i.map((t=>{const e=this.cachedColMeta.get(t);n+=e.width-1||-1;return`\n #${this.tableId} tr > td:has(~ :nth-child(${e.idx+1})),\n #${this.tableId} tr > th:has(~ :nth-child(${e.idx+1})) {\n --pin-end: ${n-1}px;\n }\n `})).join("")}\n `;et(`${this.tableId}-dimension-style`,o)}getParentOffsets(){const{x:t,y:n}=this.scrollElement.getBoundingClientRect();let e=t;let i=n;if(this.scrollElement===document.documentElement){e=this.scrollElement.offsetLeft;i=this.scrollElement.offsetTop}return{offsetX:e,offsetY:i}}assessRows(){if(!this.topRows.length&&!this.bottomRows.length)return;if(this.topRows.length){r((async()=>{let t=0;let n;const{offsetY:e}=this.getParentOffsets();for(const i of this.topRows){const{y:o,height:r}=i.getBoundingClientRect();const a=i.parentElement;const l=getComputedStyle(i).getPropertyValue("--pin-top");const d=l!==""?parseFloat(l):t;await new Promise((l=>s((()=>{if(o-e<=d){i.classList.add(`${p}__pinned`,`${p}__pinned--top`)}else{i.classList.remove(`${p}__pinned`,`${p}__pinned--top`)}if(n!==a){a.style.setProperty("--pin-top",`${t-1}px`);t+=r-1;n=a}l()}))))}}))}if(this.bottomRows.length){const t=Array.from(this.bottomRows).reverse();r((async()=>{let n;let e=0;const{offsetY:i}=this.getParentOffsets();for(const o of t){if(!o.isConnected)continue;const{y:t,height:r}=o.getBoundingClientRect();const a=o.parentElement;const l=getComputedStyle(o).getPropertyValue("--pin-bottom");const d=l!==""?parseFloat(l):e;await new Promise((l=>s((()=>{if(this.tableDims.height+i-(t+r)<=d){o.classList.add(`${p}__pinned`,`${p}__pinned--bottom`)}else{o.classList.remove(`${p}__pinned`,`${p}__pinned--bottom`)}if(n!==a){a.style.setProperty("--pin-bottom",`${e-1}px`);e+=r-1;n=a}l()}))))}}))}}async assessCols(){if(!this.startColumns.length&&!this.endColumns.length)return;let t;let n;let e;const i=new Promise((i=>{if(this.startColumns.length){r((()=>{const{offsetX:o}=this.getParentOffsets();let s=o;e=Array.from(this.startColumns[0].parentElement.children);for(const i of this.startColumns){t=i.getBoundingClientRect();this.cachedColMeta.set(i,{width:t.width,idx:e.indexOf(i)});n=this.pinnedStart.find((t=>t===i));if(t.x<s){if(!n)this.pinnedStart=[...this.pinnedStart,i]}else if(n){this.pinnedStart=this.pinnedStart.filter((t=>t!==i))}s+=t.width}if(!this.endColumns.length)i()}))}if(this.endColumns.length){r((()=>{const o=Array.from(this.endColumns).reverse();e=Array.from(this.endColumns[0].parentElement.children);const{offsetX:s}=this.getParentOffsets();let r=0;for(const i of o){t=i.getBoundingClientRect();this.cachedColMeta.set(i,{width:t.width,idx:e.indexOf(i)});n=this.pinnedEnd.find((t=>t===i));if(this.tableDims.width+s-t.right<=r){if(!n)this.pinnedEnd=[i,...this.pinnedEnd]}else if(n){this.pinnedEnd=this.pinnedEnd.filter((t=>t!==i))}r+=t.width}i()}))}}));await i;this.generateCssCacheKey()}onScroll(t){if(this.cacheX!==t.x){this.cacheX=t.x;this.assessCols()}if(this.cacheY!==t.y){this.cacheY=t.y;this.assessRows()}}onResize(){const t=this.scrollElement.clientWidth;const n=this.scrollElement.clientHeight;this.tableDims={width:t,height:n};this.assessCols();this.assessRows()}}const ot=':host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}nano-table{display:block;width:100%;--max-col-width:clamp(200px, 500px, 50vw);--color:var(--nano-color-mediumgrey, #68767e);--font-size:0.87rem;--cell-line-height:1.5;--thead-font-size:0.95rem;--thead-color:#455560;--tfoot-color:#455560;--border-color:#dddbda;--border-style:thin solid var(--border-color);--border-tint-color:#0084a9;--border-tint-style:3px solid var(--border-tint-color);--cell-bg-rgb:var(--nano-color-white-rgb, 255 255 255);--head-bg-rgb:250 250 249;--foot-bg-rgb:var(--head-bg-rgb);--th-row-bg-rgb:var(--cell-bg-rgb);--ordered-bg-rgb:var(--nano-color-offwhite-rgb, 249 249 251);--td-padding-start:0.625rem;--td-padding-end:0.625rem;--td-padding-top:0.6rem;--td-padding-bottom:0.6125rem;--th-padding-start:0.725rem;--th-padding-end:0.625rem;--th-padding-top:0.875rem;--th-padding-bottom:0.6875rem;--td-padding-v:var(--td-padding-top) var(--td-padding-bottom);--td-padding-h:var(--td-padding-start) var(--td-padding-end);--th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--th-padding-h:var(--th-padding-start) var(--th-padding-end);--foot-th-padding-v:var(--td-padding-top) var(--td-padding-bottom);--foot-th-padding-h:var(--td-padding-start) var(--td-padding-end);--head-th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--head-th-padding-h:var(--th-padding-start) var(--th-padding-end);--bookend-col-padding:2rem}.nano-tbl{color:var(--color);text-align:start;width:100%;font-size:var(--font-size);border-spacing:0 0;border-collapse:separate;background:rgb(var(--cell-bg-rgb));-webkit-border-end:1px solid transparent;border-inline-end:1px solid transparent;-webkit-border-before:1px solid transparent;border-block-start:1px solid transparent;position:relative;z-index:1}.nano-tbl__wrap{display:table;min-width:100%}.nano-tbl__top-anchor{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;position:relative}.nano-tbl__ordered{background-color:var(--ordered-bg);-webkit-border-start:var(--border-style);border-inline-start:var(--border-style);-webkit-border-end:var(--border-style);border-inline-end:var(--border-style)}.nano-tbl__order-btn{padding:0;border:none;outline:none;font:inherit;background:none;-webkit-appearance:none;appearance:none;color:inherit;display:flex;gap:10px;align-items:center;width:100%}.nano-tbl__order-btn:focus-visible{outline:none;box-shadow:var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8))) inset}.nano-tbl__status-icons{margin-inline:auto 10px;display:flex;gap:10px}.nano-tbl__progress-bar{font-size:0.2rem;position:sticky;inset-block-start:0;inset-inline:0;z-index:10;transition:scale 0.25s;transform:scale(0);width:100%;height:0}.nano-tbl__progress-bar--show{transform:scale(1);height:auto}.nano-tbl__caption--hide{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.nano-tbl__td,.nano-tbl__th{line-height:var(--cell-line-height);text-align:start;-webkit-border-before:var(--border-style);border-block-start:var(--border-style);max-width:var(--max-col-width);background-color:rgb(var(--cell-bg-rgb))}tbody:first-of-type tr:first-child .nano-tbl__td,tbody:first-of-type tr:first-child .nano-tbl__th{-webkit-border-before:none;border-block-start:none}tbody:last-of-type tr:last-child .nano-tbl__td,tbody:last-of-type tr:last-child .nano-tbl__th{-webkit-border-after:var(--border-style);border-block-end:var(--border-style)}.md .nano-tbl__td:first-child .nano-tbl__cell-content,.md .nano-tbl__th:first-child .nano-tbl__cell-content{-webkit-padding-start:var(--bookend-col-padding);padding-inline-start:var(--bookend-col-padding)}.md .nano-tbl__td:last-child .nano-tbl__cell-content,.md .nano-tbl__th:last-child .nano-tbl__cell-content{-webkit-padding-end:var(--bookend-col-padding);padding-inline-end:var(--bookend-col-padding)}@media (max-width: 768px){.nano-tbl__td:first-child .nano-tbl__cell-content,.nano-tbl__th:first-child .nano-tbl__cell-content{-webkit-padding-start:var(--td-padding-start) !important;padding-inline-start:var(--td-padding-start) !important}.nano-tbl__td:last-child .nano-tbl__cell-content,.nano-tbl__th:last-child .nano-tbl__cell-content{-webkit-padding-end:var(--td-padding-end) !important;padding-inline-end:var(--td-padding-end) !important}}thead .nano-tbl__td,thead .nano-tbl__th{color:var(--thead-color);font-weight:800;background:rgb(var(--head-bg-rgb)/100%);font-size:var(--thead-font-size);-webkit-border-before:none !important;border-block-start:none !important}thead .nano-tbl__td .nano-tbl__cell-content,thead .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--head-th-padding-v);padding-inline:var(--head-th-padding-h)}thead .nano-tbl__td .nano-sortable__keyboard-handle,thead .nano-tbl__th .nano-sortable__keyboard-handle{position:absolute;inset-inline-end:5px;inset-block-start:50%;transform:translateY(-50%);background:white;z-index:10}tfoot .nano-tbl__td,tfoot .nano-tbl__th{color:var(--tfoot-color);font-weight:800;-webkit-border-before:none;border-block-start:none;background:rgb(var(--foot-bg-rgb)/100%);font-size:var(--thead-font-size)}tfoot .nano-tbl__td .nano-tbl__cell-content,tfoot .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--foot-th-padding-v);padding-inline:var(--foot-th-padding-h)}.nano-tbl__td.nano-tbl__ordered,.nano-tbl__th.nano-tbl__ordered{background-color:rgb(var(--ordered-bg-rgb)/80%) !important}.nano-tbl__cell-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:var(--td-padding-v);padding-inline:var(--td-padding-h)}.nano-tbl__cell-content--no-result{padding-block:2rem}.nano-tbl__cell-content--wrap{white-space:normal;overflow:visible}.nano-tbl tbody{will-change:scroll-position;opacity:1;transition:0.1s ease opacity}.nano-tbl tbody.nano-tbl__loading{z-index:-1;position:relative}.nano-tbl tbody.nano-tbl__inactive{opacity:0}.nano-tbl tbody .nano-tbl__tr:has(~.nano-tbl__tr--placeholder){display:none}.nano-tbl tbody .nano-tbl__tr--placeholder~.nano-tbl__tr{display:none}.nano-tbl th[scope=row]{font-weight:800;margin:0}.nano-tbl__tr{--base-z:0}.nano-tbl__pin{z-index:var(--z, var(--base-z, 0))}.nano-tbl__pin .nano-tbl__th,.nano-tbl__pin .nano-tbl__td{z-index:var(--z, var(--base-z, 0))}.nano-tbl__pin--start{position:sticky;inset-inline-start:var(--pin-start, -1px)}.nano-tbl__pin--start::after{content:"";position:absolute;inset:0;box-shadow:5px 0 4px -1px rgba(0, 0, 0, 0.2);opacity:var(--pin-start-active, 0);z-index:-1}.nano-tbl__pinned--start .nano-tbl__pin--start{--z:calc(var(--base-z) + 3) !important}.nano-tbl__pin--end{position:sticky}.nano-tbl__pin--start+.nano-tbl__pin--end{inset-inline-end:auto !important}.nano-tbl__pin--start+.nano-tbl__pin--end::after{display:none}.sm .nano-tbl__pin--end{inset-inline-end:var(--pin-end, -1px);max-width:min(50vw, 200px)}.sm .nano-tbl__pin--end::after{display:block !important;content:"";position:absolute;inset:0;box-shadow:-5px 1px 4px -1px rgba(0, 0, 0, 0.2);opacity:var(--pin-end-active, 0);z-index:-1}.sm .nano-tbl__pinned--end .nano-tbl__pin--end{--z:calc(var(--base-z) + 2) !important}.nano-tbl__pin--top .nano-tbl__th,.nano-tbl__pin--top .nano-tbl__td{position:sticky;inset-block-start:var(--pin-top, -1px)}.nano-tbl__pin--top .nano-tbl__pin--end,.nano-tbl__pin--top .nano-tbl__pin--start{--z:calc(var(--base-z) + 1)}.nano-tbl__pin--top.nano-tbl__pinned--top{--base-z:4}tbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__th,tbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__td{box-shadow:1px 3px 4px -1px rgba(0, 0, 0, 0.1)}.nano-tbl__pin--bottom .nano-tbl__th,.nano-tbl__pin--bottom .nano-tbl__td{position:sticky;inset-block-end:var(--pin-bottom, -1px)}.nano-tbl__pin--bottom .nano-tbl__pin--end,.nano-tbl__pin--bottom .nano-tbl__pin--start{--z:calc(var(--base-z) + 1)}.nano-tbl__pin--bottom.nano-tbl__pinned--bottom{--base-z:5}.nano-tbl__pin--bottom.nano-tbl__pinned--bottom:has(~.nano-tbl__pin--bottom.nano-tbl__pinned--bottom) .nano-tbl__pin{--base-z:6}tbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__th,tbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__td{box-shadow:1px -3px 4px -1px rgba(0, 0, 0, 0.07)}.nano-tbl thead tr:last-of-type td,.nano-tbl thead tr:last-of-type th{-webkit-border-after:var(--border-tint-style);border-block-end:var(--border-tint-style)}.nano-tbl tfoot tr:first-of-type td,.nano-tbl tfoot tr:first-of-type th{-webkit-border-before:none;border-block-start:none}.nano-tbl tfoot tr:last-of-type td,.nano-tbl tfoot tr:last-of-type th{-webkit-border-before:var(--border-style);border-block-start:var(--border-style);-webkit-border-after:var(--border-tint-style);border-block-end:var(--border-tint-style)}.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:first-of-type td,.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:first-of-type th{-webkit-border-before:var(--border-tint-style) !important;border-block-start:var(--border-tint-style) !important}.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:last-of-type td,.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:last-of-type th{-webkit-border-after:none !important;border-block-end:none !important}.nano-tbl .unlimited-width{max-width:none}.nano-tbl__spinner{font-size:1.5rem;transition:scale 0.25s;scale:0;padding:0.5rem;position:absolute;inset-block-end:0;inset-inline-start:calc(50% - 0.75rem);z-index:0}.nano-tbl__spinner--show{scale:1;position:sticky}.nano-tbl nano-skeleton{line-height:var(--cell-line-height)}';const st=false;function rt(t,n=false){if(!performance||!st)return;if(n){performance===null||performance===void 0?void 0:performance.mark("end"+t);performance===null||performance===void 0?void 0:performance.measure(t,"start"+t,"end"+t);const n=performance===null||performance===void 0?void 0:performance.getEntriesByName(t);console.log(n[n.length?n.length-1:0])}else{performance===null||performance===void 0?void 0:performance.mark("start"+t)}}let at=0;const lt=class{constructor(t){a(this,t);this.nanoTblReady=l(this,"nanoTblReady",7);this.nanoTblBlockRendered=l(this,"nanoTblBlockRendered",7);this.nanoTblBeforeSort=l(this,"nanoTblBeforeSort",7);this.nanoTblAfterSort=l(this,"nanoTblAfterSort",7);this.nanoTblBeforeFilter=l(this,"nanoTblBeforeFilter",7);this.nanoTblAfterFilter=l(this,"nanoTblAfterFilter",7);this.nanoTblBeforeSearch=l(this,"nanoTblBeforeSearch",7);this.nanoTblAfterSearch=l(this,"nanoTblAfterSearch",7);this.nanoTblBeforeEdit=l(this,"nanoTblBeforeEdit",7);this.renderId="tbl-"+at++;this.filters=[];this.currentFilters="[]";this.currentSort="";this.measureHeight=0;this.blockHeights=[];this.unitHeight=0;this._isReady=false;this.sortStart=async(t,n,e)=>{if(this.currentSort===t+":"+n)return;this._loading=true;const i=this.nanoTblBeforeSort.emit({column:n,order:t});if(i.defaultPrevented)return;rt("sort");this.currentSort=t+":"+n;this.scrollToTop(e);if(this.customSortFn){try{const e=await this.customSortFn(n,t);if(e===true){this.sortComplete(t,n);this._loading=false;return}}catch(t){console.warn("custom sort failed",t);this.currentSort="";this._loading=false;return}}try{await N(this.host,n,t);this.sortComplete(t,n)}catch(t){console.warn("sort failed",t);this.currentSort=""}finally{if(this.blocks.length)this._loading=false}};this.scrollHandler=()=>{var t;let n=0;rt("scrollHandler");if(!((t=this.store)===null||t===void 0?void 0:t.general.state.isActive)||!this.rows)return;if(this.primaryBlockIndex===undefined)this.primaryBlockIndex=0;r((()=>{n=typeof this.scrollParent.scrollTop!=="undefined"?this.scrollParent.scrollTop:window.scrollY;n+=this.host.offsetTop;if(this.tablePinnedService){this.tablePinnedService.onScroll({x:typeof this.scrollParent.scrollLeft!=="undefined"?this.scrollParent.scrollLeft:window.scrollX,y:n})}let t=this.host.offsetTop;let e=0;const i=this.blocks.length;while(e<i&&n>=t){t+=this.getBlockHeight(e);if(n<t){const t=[e,e+1];if(t.toString()!==this.activeBlocks.toString()){this.activeBlocks=t}this.primaryBlockIndex=e}e++}rt("scrollHandler",true)}))};this.handleResizeChange=t=>{var n;this.tableWrapperEle.className="";let e=[`${p}__wrap`];if((n=t.target)===null||n===void 0?void 0:n.className)e=[...t.target.className.split(" "),...e];this.tableWrapperEle.classList.add(...e.filter((t=>!!t)))};this.customRenderer=undefined;this.type="table";this.caption=undefined;this.showCaption=false;this.loading=undefined;this.internalLoading=true;this.placeholderSize=5;this.rows=undefined;this.columns=[];this.headRender={pinned:"top"};this.rowRender=undefined;this.footRender={pinned:"bottom"};this.showFooter=false;this.perBlock=50;this.searchTerm=undefined;this.customFilterFn=undefined;this.customSortFn=undefined;this.defaultSort=true;this.virtualTotalItems=0;this.blocks=[];this.activeBlocks=[0,1];this.debounceSetLoading=h(this.debounceSetLoading.bind(this),50)}get _loading(){return this.loading!==undefined?this.loading:this.internalLoading}set _loading(t){if(this.loading!==undefined)return;this.debounceSetLoading(t)}debounceSetLoading(t){this.internalLoading=t}handleRowsChange(){if(!this.rows){this._loading=true;return}this._loading=true;Promise.resolve(this.rows).then((async t=>{await A(this.host,t);this.currentFilters="";this.currentSort="";await this.columnInit();if(!this.isReady)requestAnimationFrame((()=>this.setInitialBlockDimension()));this._loading=false;if(this.tablePinnedService)this.tablePinnedService.assessRows()}))}async handleColsChange(){await M(this.host,this.columns);if(this.isReady)this.columnInit()}get blocksLength(){return this.blocks.length}handleSearchTermChange(){this.searchStart()}virtualTotalItemsChangeHandler(){this.setBlocks()}get appliedFilters(){return this.filters}async resetSorting(){const t=this.columns.find((t=>!!t.order));if(!t)return;return this.sortStart(null,t.prop)}async addSort(t,n){const e=this.columns.find((n=>n.prop===t));if(!e)throw"Cannot find column with "+t;return this.sortStart(n,e.prop)}async resetFilters(){this.filters=[];return this.filterStart()}async addFilters(t,n=true){if(!n)this.filters=[];return this.filterStart(t,n)}async removeFilters(t){this.filters=this.filters.filter((n=>!t.includes(n.prop)));return this.filterStart()}async updateRow(t,n){this.rows.splice(n,1,t);this.handleRowsChange()}set measureEle(t){var n;if(!t)return;const e=t.getBoundingClientRect().height;this.measureHeight=Math.abs(this.measureHeight-e)<5?this.measureHeight:e;this.unitHeight=((n=t.querySelector("tr"))===null||n===void 0?void 0:n.getBoundingClientRect().height)||this.unitHeight}get scrollParent(){return this._scrollParent}set scrollParent(t){if(t===this._scrollParent)return;if(this._scrollParent){(this._scrollParent===document.documentElement?document:this._scrollParent).removeEventListener("scroll",this.scrollHandler)}(t===document.documentElement?document:t).addEventListener("scroll",this.scrollHandler);this._scrollParent=t}get primaryBlockIndex(){return this._primaryBlockIndex}set primaryBlockIndex(t){if(this._primaryBlockIndex===t)return;this._primaryBlockIndex=t;this.nanoTblBlockRendered.emit({block:t,totalBlocks:this.blockElements.length})}get isReady(){return this._isReady}set isReady(t){if(t===this._isReady)return;this._isReady=t;if(this.isReady)requestAnimationFrame((()=>this.handleReady()))}handleReady(){const t=window.location.hash;if(t.length>1){try{const n=document.querySelector(t);if(n)n.scrollIntoView()}catch(t){}}this.nanoTblReady.emit()}sortComplete(t,n){this.columns=this.columns.map((e=>{if(e.prop===n)return Object.assign(Object.assign({},e),{order:t});return Object.assign(Object.assign({},e),{order:null})}));this.nanoTblAfterSort.emit({column:n,order:t});rt("sort",true)}async searchStart(){this._loading=true;const t=this.nanoTblBeforeSearch.emit({term:this.searchTerm});if(t.defaultPrevented)return;rt("search");this.scrollToTop();try{await B(this.host,this.searchTerm);this.nanoTblAfterSearch.emit({term:this.searchTerm});rt("search",true)}catch(t){console.warn("search failed",t)}finally{this._loading=false}}async filterStart(t,n=true){if(t){if(n){this.filters=[...this.filters.filter((n=>!t.find((t=>t.prop===n.prop)))),...t]}else{this.filters=t}}if(this.currentFilters===JSON.stringify(this.filters))return;this._loading=true;const e=this.nanoTblBeforeFilter.emit({filters:this.filters});if(e.defaultPrevented)return;rt("filter");this.currentFilters=JSON.stringify(this.filters);this.scrollToTop();if(this.customFilterFn){try{const t=await this.customFilterFn(this.filters);if(t===true){this.filterComplete();this._loading=false;return}}catch(t){console.warn("custom filter failed",t);this.currentFilters="";this._loading=false;return}}try{await F(this.host,this.filters);this.filterComplete()}catch(t){console.warn("filter failed",t)}finally{this._loading=false}}filterComplete(){this.columns=this.columns.map((t=>{const n=this.filters.find((n=>n.prop===t.prop));if(n&&(typeof n.filter!=="boolean"&&n.filter.length||typeof n.filter==="boolean"))t.filter=n.filter;else if(t.filter!==null&&t.filter!==undefined||!!t.filter&&typeof t.filter!=="boolean"&&!t.filter.length)t.filter=undefined;return t}));this.nanoTblAfterFilter.emit({filters:this.filters});rt("filter",true)}scrollToTop(t){var n;const e=(n=this.scrollParent.style)===null||n===void 0?void 0:n.scrollBehavior;const i=this.scrollParent.scrollLeft;this.scrollParent.style.scrollBehavior="auto";if(this.topAnchorEle&&!X(this.topAnchorEle,.1)){this.host.scrollIntoView()}if(t&&!X(t,1))setTimeout((()=>t.scrollIntoView({block:"start"})),500);if(i)this.scrollParent.scrollLeft=i;if(e)this.scrollParent.style.scrollBehavior=e;this.scrollHandler()}setMeasureElement(){return new Promise((t=>{r((()=>{this.measureEle=this.blockElements.find((t=>{var n;return!((n=t===null||t===void 0?void 0:t.classList)===null||n===void 0?void 0:n.contains(`${p}__inactive`))}));t()}))}))}setInitialBlockDimension(){var t;if(!((t=this.blockElements)===null||t===void 0?void 0:t.length))return;rt("blockDims");const n=async()=>{await this.setMeasureElement();if(this.unitHeight)return true;return false};const e=new Promise((async t=>{if(await n())t();else{const e=new IntersectionObserver((async()=>{if(await n()){t();e.disconnect()}}),{root:this.scrollParent});e.observe(this.tableEle)}}));e.then((()=>{rt("blockDims",true);rt("init",true);requestAnimationFrame((()=>this.isReady=true))}))}async columnInit(){this.filters=this.columns.filter((t=>t.filter!==undefined&&t.filter!==null)).map((t=>{const{filter:n,prop:e}=t;return{filter:n,prop:e}}));if(this.searchTerm){await this.searchStart()}if(this.filters.length){await this.filterStart()}const t=this.columns.find((t=>!!t.order));if(!!t){await this.sortStart(t.order,t.prop)}if(this.tablePinnedService)this.tablePinnedService.assessCols()}setBlocks(){const t=this.store.data.state.rows;if(!t.length){this.blocks=[];return}rt("setBlocks");let n=1;const e=this.virtualTotalItems>t.length?this.virtualTotalItems:t.length;let i=[];const o=[];for(n;n<=e;n++){i.push(this.store.data.state.rows[n-1]||{__uuid:""});if(n%this.perBlock===0){o.push({rows:i,__uuid:c(i.map((t=>t.__uuid)).join())});i=[]}}if(i.length){o.push({rows:i,__uuid:c(i.map((t=>t.__uuid)).join())})}this.blocks=o;rt("setBlocks",true)}getBlockHeight(t){if(this.blockHeights.length){const n=this.blockHeights.find((n=>n.blockIndex===t));if(n&&n.height)return n.height}const n=this.blocks[t].rows.length;if(n===this.perBlock&&this.measureHeight){return this.measureHeight}return this.unitHeight?this.unitHeight*n:100}setBlockHeight(){this.activeBlocks.forEach((t=>{const n=this.blockElements[t];if(!n)return;r((()=>{if(n.classList.contains(`${p}__inactive`))return;const e=n.getBoundingClientRect().height;const i=this.blockHeights.findIndex((n=>n.blockIndex===t));if(i>-1){this.blockHeights[i]={height:e,blockIndex:t}}else this.blockHeights.push({height:e,blockIndex:t})}))}))}processSlots(){if(!this.caption&&!this.host.querySelector('[slot="caption"]')){console.error("For accessibility you must set a `caption` prop or use the `caption` slot")}}setupActiveWatcher(){if(!this.host||!this.scrollParent||!this.store)return;if(this.activeWatcherIo){this.activeWatcherIo.disconnect();this.activeWatcherIo=undefined}const t=this.activeWatcherIo=new IntersectionObserver((async([t])=>{if(t.isIntersecting)this.store.general.state.isActive=true;else this.store.general.state.isActive=false}),{root:this.scrollParent,threshold:0});t.observe(this.host)}async componentWillLoad(){rt("init");this.store=await R(this.host,this.columns,this.scrollParent,this.isReady);await this.handleRowsChange();this.store.general.onChange("isActive",(()=>{this.scrollHandler()}));this.store.data.onChange("rows",(()=>this.setBlocks()));this.processSlots();this.setBlocks();this.scrollParent=K(this.host);this.setupActiveWatcher()}connectedCallback(){this.scrollParent=K(this.host);this.setupActiveWatcher()}componentDidLoad(){this.setInitialBlockDimension();if(!this.tablePinnedService){this.tablePinnedService=new it(this.tableEle,this.scrollParent)}}componentShouldUpdate(t,n,e){if(["rows","columns"].includes(e))return false}componentWillRender(){rt("render")}componentDidRender(){this.setMeasureElement().then((()=>this.setBlockHeight()));rt("render",true)}disconnectedCallback(){if(!this.activeWatcherIo)return;this.activeWatcherIo.disconnect();this.activeWatcherIo=undefined;(this.scrollParent===document.documentElement?document:this.scrollParent).removeEventListener("scroll",this.scrollHandler)}render(){this.blockElements=[];return n(d,null,n("div",{class:`${p}__top-anchor`,ref:t=>this.topAnchorEle=t}," "),n("nano-resize-observe",{states:"576w sm, 768w md",class:"sm md",onNanoResizeStateChange:this.handleResizeChange,onNanoResize:()=>{if(this.tablePinnedService)this.tablePinnedService.onResize()}}),n("div",{class:`${p}__wrap sm md`,ref:t=>this.tableWrapperEle=t,"aria-labelledby":"nano-table-caption-"+this.renderId,tabindex:this.type==="grid"?"0":undefined},n("nano-progress-bar",{indeterminate:true,class:{[`${p}__progress-bar`]:true,[`${p}__progress-bar--show`]:this._loading}}),n("table",{role:this.type==="grid"?"grid":undefined,"aria-rowcount":this.store.data.state.rows.length,"aria-colcount":this.store.config.state.columns.length,class:`${p}`,ref:t=>this.tableEle=t,id:"nano-table-"+this.renderId},n("caption",{class:{[`${p}__caption`]:true,[`${p}__caption--hide`]:!this.showCaption},id:"nano-table-caption-"+this.renderId},n("slot",{name:"caption"},this.caption)),n("thead",null,n(nt,{rowRenderer:this.headRender},this.store.config.state.columns.map((t=>[n(U,{column:t,headRenderer:this.headRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})])))),this._loading&&!this.blocks.length&&n("tbody",{class:`${p}__active ${p}__loading`},[...Array(10).keys()].map((t=>n("tr",null,this.store.config.state.columns.map(((e,i)=>n(V,{rowIndex:t,colIndex:i,nestedContent:()=>n("nano-skeleton",null)}))))))),n("tr",{hidden:!!this._loading||!!this.blocks.length},n("th",{class:`${p}__th`,colSpan:this.store.config.state.columns.length},n("div",{class:"nano-tbl__cell-content nano-tbl__cell-content--no-result"},n("slot",{name:"no-results"},"No results found")))),this.blocks.map(((t,e)=>n("tbody",{key:t.__uuid,id:`tbody-${this.renderId}-${e}`,ref:t=>{this.blockElements.push(t)},class:{[`${p}__inactive`]:!this.activeBlocks.includes(e),[`${p}__active`]:this.activeBlocks.includes(e)}},this.activeBlocks.includes(e)?t.rows.map(((t,i)=>{const o=e>0?e*this.perBlock+i:i;return n(tt,{rowRenderer:this.rowRender,rowModel:t,rowIndex:o},this.store.config.state.columns.map(((t,e)=>n(V,{rowIndex:o,colIndex:e}))))})):n("tr",{class:`${p}__tr--placeholder`},n("td",{colSpan:this.store.config.state.columns.length,style:{height:this.getBlockHeight(e)+"px"}}))))),this.showFooter&&n("tfoot",null,n(nt,{rowRenderer:this.footRender},this.store.config.state.columns.map((t=>[n(U,{column:t,headRenderer:this.footRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})]))))),!!this.blocks.length&&n("nano-spinner",{type:"circle",class:{[`${p}__spinner`]:true,[`${p}__spinner--show`]:this._loading}})))}get host(){return i(this)}static get watchers(){return{rows:["handleRowsChange"],columns:["handleColsChange"],searchTerm:["handleSearchTermChange"],virtualTotalItems:["virtualTotalItemsChangeHandler"]}}};lt.style=ot;export{lt as T,v as c};
5
- //# sourceMappingURL=p-bdb5dfc3.js.map
4
+ import{j as t,h as n,F as e,g as i,e as o,w as s,d as r,r as a,c as l,a as d}from"./p-d6a04b3a.js";import{a as c}from"./p-ee045579.js";import{d as h}from"./p-7bff5224.js";import{c as b}from"./p-70747f20.js";const p="nano-tbl";const f=(t,n)=>{const e=globalThis[n];return e!=null&&t instanceof e};const u=t=>{if(t!=null){if(f(t,"ArrayBuffer")||f(t,"MessagePort")||f(t,"ImageBitmap")||f(t,"OffscreenCanvas")){return[t]}if(typeof t==="object"){if(t.constructor===Object){t=Object.values(t)}if(Array.isArray(t)){return t.flatMap(u)}return u(t.buffer)}}return[]};let _=0;let m=0;const g=new Map;const w=new Map;const v=(n,e,i)=>{const o=new Worker(n,{name:e});o.addEventListener("message",(({data:n})=>{if(n){const e=n[0];const o=n[1];const s=n[2];if(e===i){const e=n[3];const[i,r,a]=g.get(o);g.delete(o);if(e){const n=e.isError?Object.assign(new Error(e.value.message),e.value):e.value;t(n);r(n)}else{if(a){a.forEach((t=>w.delete(t)))}i(s)}}else if(e===i+".cb"){try{w.get(o)(...s)}catch(n){t(n)}}}}));return o};const y=(t,n,e)=>(...i)=>new Promise(((o,s)=>{let r=_++;let a=0;let l=i.length;let d=[o,s];g.set(r,d);for(;a<l;a++){if(typeof i[a]==="function"){const t=m++;w.set(t,i[a]);i[a]=[n+".cb",t];(d[2]=d[2]||[]).push(t)}}const c=t=>t.postMessage([n,r,e,i],u(i));if(t.then){t.then(c)}else{c(t)}}));const k=import("./p-f5698b41.js").then((t=>t.worker));const x=y(k,"stencil.table.worker","createWorkerStore");const $=y(k,"stencil.table.worker","syncConfigToWorker");const j=y(k,"stencil.table.worker","syncDataToWorker");const z=y(k,"stencil.table.worker","workerFilter");const O=y(k,"stencil.table.worker","workerSearch");const C=y(k,"stencil.table.worker","workerSort");function S(t){const n=JSON.parse(JSON.stringify(t));t.forEach((t=>{if(!!(t===null||t===void 0?void 0:t.sortCompareFn)){const e=n.find((n=>n.prop===t.prop));e.sortCompareFn=t.sortCompareFn.toString()}}));return n}const I=new WeakMap;async function R(t,n,e,i){const o={data:b({rows:[]}),config:b({columns:n}),general:b({workerId:null,scrollParent:e,host:t,isReady:i})};const s=await x(o.data.state.rows,S(o.config.state.columns));o.general.state.workerId=s;I.set(t,o);o.data.use({reset:()=>{if(o.general.state.workerId)j(o.general.state.workerId,null)},dispose:()=>{if(o.general.state.workerId)j(o.general.state.workerId,null)}});o.config.use({reset:()=>{if(o.general.state.workerId)$(o.general.state.workerId,null)},dispose:()=>{if(o.general.state.workerId)$(o.general.state.workerId,null)}});return o}function P(t){return I.get(t)}function T(t){if(t instanceof Date){return"date"}if(["number","string","boolean"].includes(typeof t)){return typeof t}return"unknown"}function A(t,n){const e=I.get(t);if(!e)return;const i=e.config.state.columns;const o=i.filter((t=>t.type==="date")).reduce(((t,n)=>[...t,n.prop]),[]);const s=i.filter((t=>!t.type));n=n.map(((t,n)=>{if(s.length&&n===0){e.config.state.columns=i.map((n=>{if(s.includes(n)&&t[n.prop]&&!n.type){n.type=T(t[n.prop]);if(n.type==="date")o.push(n.prop)}return n}))}o.forEach((n=>{var e;const i=(e=new Date(t[n]))!==null&&e!==void 0?e:null;if(!!i&&Number(i))t[n]=Number(i)}));t["__index"]=n;t["__uuid"]=c(i.map((n=>t[n.prop])).join());return t}));e.data.state.rows=n;if(e.general.state.workerId)return j(e.general.state.workerId,n)}function M(t,n){const e=I.get(t);if(!e)return;e.config.state.columns=n;if(e.general.state.workerId)return $(e.general.state.workerId,S(n))}async function B(t,n){const e=I.get(t);if(!e||!e.general.state.workerId)return;try{e.data.state.rows=await O(e.general.state.workerId,n)}catch(t){console.warn(t)}}async function F(t,n){const e=I.get(t);if(!e||!e.general.state.workerId)return;try{e.data.state.rows=await z(e.general.state.workerId,n)}catch(t){console.warn(t)}}async function N(t,n,e){const i=I.get(t);if(!i||!i.general.state.workerId)return;try{i.data.state.rows=await C(i.general.state.workerId,n,e)}catch(t){console.warn(t)}}function D(t,n){const e=H();const i=e.config.state.columns;const o=e.data.state.rows;const s=i[n];const r=s===null||s===void 0?void 0:s.prop;const a=o[t];const l=a?a[i[n].prop]:"";return{prop:r,cellModel:l,column:s,rowIndex:t,rowModel:a}}function E(t){const n=H();const e=n.data.state.rows;const i=e[t];return{rowModel:i,rowIndex:t}}function W(t,n){if(!n)return t;const e=Object.assign(Object.assign({},n),t);if(n.class){if(typeof n.class==="object"&&typeof e.class==="object"){e.class=Object.assign(Object.assign({},n.class),e.class)}else if(typeof n.class==="string"&&typeof e.class==="object"){e.class[n.class]=true}else if(typeof e.class==="string"){e.class+=" "+n.class}}if(n.style){e.style=Object.assign(Object.assign({},n.style),e.style)}return e}function H(){return P(i(o()))}function L(t,n,e){var i;const o=Object.assign({},e);const s=(i=H().config.state.columns[n])===null||i===void 0?void 0:i.cellProperties;if(!s)return o;const r=D(t,n);const a=s(r);if(!a)return o;return W(o,a)}function J(t){const i=t===null||t===void 0?void 0:t.columnTemplate;return i?i(n,t):n(e,null,t.title)}function Y(t,n,e=false){const i={[`${p}__${t}`]:true,[`${p}__pin`]:!!n,[`${p}__pin--top`]:n==="top",[`${p}__pin--bottom`]:n==="bottom"};if(e)return q(i);return i}function q(t){let n="";Object.entries(t).forEach((([t,e])=>{if(e)n+=t+" "}));return n}function K(t){let n=getComputedStyle(t);const e=n.position==="absolute";const i=/(auto|scroll)/;if(n.position==="fixed")return document.documentElement;for(let o=t;o=o.parentElement;){n=getComputedStyle(o);if(e&&n.position==="static"){continue}if(i.test(n.overflow+n.overflowY+n.overflowX))return o}return document.documentElement}function X(t,n=100){const e=t.getBoundingClientRect();const i=window.innerHeight||document.documentElement.clientHeight;if(!e.bottom&&!e.top&&!e.left&&!e.right&&!e.height&&!e.width&&!e.x&&!e.y)return false;return!(Math.floor(100-(e.top>=0?0:e.top)/+-e.height*100)<n||Math.floor(100-(e.bottom-i)/e.height*100)<n)}const U=({column:t,onColumnSortClick:i,defaults:o})=>{function s(n){let e;switch(t.order){case"asc":e="desc";break;case"desc":e=null;break;default:e="asc"}i(e,t.prop,n.target.closest("th"))}function r(){return!!o.sortable&&t.sortable!==false||!o.sortable&&t.sortable===true}let a={};if(t.columnProperties){a=t.columnProperties(t)||a}const l={class:Object.assign(Object.assign({},Y("th",t.pinned)),{[`${p}__pin--start`]:t.pinned==="start",[`${p}__pin--end`]:t.pinned==="end",[`${p}__ordered`]:!!t.order,[`${p}__filtered`]:t.filter!==undefined&&t.filter!==null})};let d=a?W(l,a):l;const c=J(t);if(!c)return n(e,null);d=Number(d.colSpan)>1?Object.assign(Object.assign({},d),{scope:"colgroup"}):Object.assign(Object.assign({},d),{scope:"col"});if(r()){const n=t.order?t.order==="asc"?"ascending":"descending":"none";d=Object.assign(Object.assign({},d),{"aria-sort":n})}return n("th",Object.assign({},d,{key:t.prop}),r()?n("button",{class:{[`${p}__order-btn`]:true,[`${p}__cell-content`]:true},onClick:s},J(t),t.filter!==undefined&&t.filter!==null&&n("nano-icon",{name:"light/filter"}),!!t.order&&(t.order==="desc"?n("nano-icon",{name:"solid/long-arrow-down"}):n("nano-icon",{name:"solid/long-arrow-up"})),n("div",{class:`${p}__status-icons`},n("nano-icon",{name:"light/chevron-down"}))):n("div",{class:`${p}__cell-content`},J(t),t.filter!==undefined&&t.filter!==null&&n("nano-icon",{name:"light/bars-filter"})))};function G(t,i){var s,r;const a=H();const l=a.config.state.columns;const d=(s=l[i])===null||s===void 0?void 0:s.cellTemplate;const c=D(t,i);const h=o();if(!!c.cellModel&&l[i].type==="date"){const t=new Date(c.cellModel);if(t instanceof Date&&!isNaN(t)){c.cellModel=!d?`${new Date(c.cellModel).toLocaleDateString()} ${new Date(c.cellModel).toLocaleTimeString()}`:t}}let b=false;const p=(...t)=>{b=true;return n(...t)};let f=d?d(p,c):undefined;if(f&&h.customRenderer&&f["t"]===undefined&&!(f instanceof Element)&&typeof f!=="string"&&!b){const t=document.createElement("template");h.customRenderer(f,t.content);f=t}return f?f:c.cellModel!==undefined&&c.cellModel!==null?n(e,null,(r=c.cellModel)===null||r===void 0?void 0:r.toString()):""}const Q=(t,n=false)=>{const e=H();const i=e.config.state.columns[t];const o={[`${p}__td`]:true,[`${p}__ordered`]:!!i.order,[`${p}__pin`]:!!i.pinned,[`${p}__pin--start`]:i.pinned==="start",[`${p}__pin--end`]:i.pinned==="end"};if(n)return q(o);return o};const V=({rowIndex:t,colIndex:e,nestedContent:i})=>{const s=()=>i?i():G(t,e)||n("span",{class:"placeholder"}," ");let r="td";const a=o();const l=H();const d=l.config.state.columns[e];let c=L(t,e,{class:Q(e)});if(d.rowHeader){c=Number(c.rowSpan)>1?Object.assign(Object.assign({},c),{scope:"rowgroup"}):Object.assign(Object.assign({},c),{scope:"row"});r="th"}const h=t=>{const e=s();return n("div",Object.assign({ref:t=>{if(t&&e instanceof Element){t.replaceChildren();t.append(e["content"]||e)}}},t,{class:{[`${p}__cell-content`]:true,[`${p}__cell-content--wrap`]:!!d.wrap},innerHTML:typeof e==="string"&&e.includes("<")?e:undefined}),(typeof e!=="string"||!e.includes("<"))&&!(e instanceof Element)&&e)};return n(r,Object.assign({role:a.type==="grid"?"gridcell":undefined},c),d.autoTooltip&&!d.wrap?n("nano-resize-observe",{notifyContentFit:"x",onNanoResizeContentFitChange:t=>t.target.firstElementChild.disabled=t.detail.x},n("nano-tooltip",{disabled:true,placement:"top",onNanoShow:t=>t.target.closest(r).style.zIndex="100",onNanoHide:t=>t.target.closest(r).style.zIndex=""},n(h,null),n("span",{slot:"content"},n(s,null)))):n(h,null))};const Z=(t,e,i)=>{const o=n("div",Object.assign({},t.wrapperProps,{class:{[`${p}__cell-content`]:true,[`${p}__cell-content--wrap`]:t.wrap}}),e);return t.header?n("th",Object.assign({scope:i},t.cellProps),o):n("td",Object.assign({},t.cellProps),o)};const tt=({rowRenderer:t,rowIndex:e,rowModel:i},o,s)=>{const r=({header:t,wrap:n,cellProps:e,wrapperProps:i},o)=>Z({header:t,wrap:n,cellProps:e,wrapperProps:i},o,"row");let a={};if(!i){const t=E(e);i=t.rowModel}if(t===null||t===void 0?void 0:t.rowProperties){a=t.rowProperties({rowModel:i,rowIndex:e})||a}let l;if((t===null||t===void 0?void 0:t.pinned)&&typeof t.pinned==="function"){l=t.pinned({rowModel:i,rowIndex:e})}const d=W({class:Y("tr",l,true)},a);const c=t===null||t===void 0?void 0:t.template;const h=t=>s.map(t,((t,n)=>{if(["td","th"].includes(t.vtag.toString())){t.vattrs=W({class:Q(n,true)},t.vattrs)}return t}));if(c){let t=c(n,{renderedRow:n("tr",Object.assign({},d,{key:i.__uuid}),o),rowModel:i,rowIndex:e},r);if(Array.isArray(t)){t=s.map(t,((t,n)=>{if(t.vtag==="tr"){if(!t.vkey)t.vkey=`${i.__uuid}_${n}`;t.vattrs=W({class:Y("tr",l,true)},t.vattrs);if(!!t.vchildren){t.vchildren=h(t.vchildren)}}return t}))}return t}return n("tr",Object.assign({},d,{key:i.__uuid}),h(o))};const nt=({rowRenderer:t},e,i)=>{let o={};if(t.rowProperties){o=t.rowProperties()||{}}const s=({header:t,wrap:n,cellProps:e,wrapperProps:i},o)=>Z({header:t,wrap:n,cellProps:e,wrapperProps:i},o,"col");const r=t.pinned||null;const a={class:Y("tr",r)};const l=o?W(a,o):a;const d=t===null||t===void 0?void 0:t.template;if(d){let t=d(n,{renderedRow:n("tr",Object.assign({},l),e)},s);if(Array.isArray(t)){t=i.map(t,(t=>{if(t.vtag==="tr"){t.vattrs=W({class:Y("tr",r,true)},t.vattrs);if(!!t.vchildren){t.vchildren=i.map(t.vchildren,(t=>{if(["td","th"].includes(t.vtag.toString())){t.vattrs=W({class:Y(t.vtag.toString(),r,true)},t.vattrs)}return t}))}}return t}))}return t}return n("tr",Object.assign({},l),e)};function et(t,n){const e=document.getElementById(t)||document.createElement("style");e.id=t;e.innerHTML=n;if(!e.isConnected)document.head.append(e)}class it{constructor(t,n){this.cachedColMeta=new WeakMap;this._pinnedStart=[];this._pinnedEnd=[];this._cssColDimensionCacheKey="";this.cacheX=0;this.cacheY=0;this.tableEle=t;this.tableId=this.tableEle.id;this.scrollElement=n;this.startColumns=t.querySelector("thead").getElementsByClassName(`${p}__pin--start`);this.endColumns=t.querySelector("thead").getElementsByClassName(`${p}__pin--end`);this.topRows=t.getElementsByClassName(`${p}__pin--top`);this.bottomRows=t.getElementsByClassName(`${p}__pin--bottom`);this.onResize()}get pinnedStart(){return this._pinnedStart}set pinnedStart(t){this._pinnedStart=t;this.handlePinnedStartChange()}handlePinnedStartChange(){s((()=>{if(this.pinnedStart.length){this.tableEle.classList.add(`${p}__pinned--start`);const t=this.cachedColMeta.get(this.pinnedStart[this.pinnedStart.length-1]);et(`${this.tableId}-col-start-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) {\n --pin-start-active: 1;\n }\n `)}else{this.tableEle.classList.remove(`${p}__pinned--start`);et(`${this.tableId}-col-start-active-style`,``)}}))}get pinnedEnd(){return this._pinnedEnd}set pinnedEnd(t){this._pinnedEnd=t;this.handlePinnedEndChange()}handlePinnedEndChange(){s((()=>{if(this.pinnedEnd.length){this.tableEle.classList.add(`${p}__pinned--end`);const t=this.cachedColMeta.get(this.pinnedEnd[0]);et(`${this.tableId}-col-end-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) { --pin-end-active: 1; }\n `)}else{this.tableEle.classList.remove(`${p}__pinned--end`);et(`${this.tableId}-col-end-active-style`,``)}}))}get cssColDimensionCacheKey(){return this._cssColDimensionCacheKey}set cssColDimensionCacheKey(t){if(t===this._cssColDimensionCacheKey)return;this._cssColDimensionCacheKey=t;this.createPinnedColDimensionStyles()}generateCssCacheKey(){let t="";for(const n of this.startColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}for(const n of this.endColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}this.cssColDimensionCacheKey=t}createPinnedColDimensionStyles(){let t=0;let n=0;const e=Array.from(this.startColumns);const i=Array.from(this.endColumns).reverse();const o=`\n ${e.map((n=>{const e=this.cachedColMeta.get(n);t+=e.width-1||-1;return`\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ td,\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ th {\n --pin-start: ${t-1}px;\n }\n `})).join("")}\n ${i.map((t=>{const e=this.cachedColMeta.get(t);n+=e.width-1||-1;return`\n #${this.tableId} tr > td:has(~ :nth-child(${e.idx+1})),\n #${this.tableId} tr > th:has(~ :nth-child(${e.idx+1})) {\n --pin-end: ${n-1}px;\n }\n `})).join("")}\n `;et(`${this.tableId}-dimension-style`,o)}getParentOffsets(){const{x:t,y:n}=this.scrollElement.getBoundingClientRect();let e=t;let i=n;if(this.scrollElement===document.documentElement){e=this.scrollElement.offsetLeft;i=this.scrollElement.offsetTop}return{offsetX:e,offsetY:i}}assessRows(){if(!this.topRows.length&&!this.bottomRows.length)return;if(this.topRows.length){r((async()=>{let t=0;let n;const{offsetY:e}=this.getParentOffsets();for(const i of this.topRows){const{y:o,height:r}=i.getBoundingClientRect();const a=i.parentElement;const l=getComputedStyle(i).getPropertyValue("--pin-top");const d=l!==""?parseFloat(l):t;await new Promise((l=>s((()=>{if(o-e<=d){i.classList.add(`${p}__pinned`,`${p}__pinned--top`)}else{i.classList.remove(`${p}__pinned`,`${p}__pinned--top`)}if(n!==a){a.style.setProperty("--pin-top",`${t-1}px`);t+=r-1;n=a}l()}))))}}))}if(this.bottomRows.length){const t=Array.from(this.bottomRows).reverse();r((async()=>{let n;let e=0;const{offsetY:i}=this.getParentOffsets();for(const o of t){if(!o.isConnected)continue;const{y:t,height:r}=o.getBoundingClientRect();const a=o.parentElement;const l=getComputedStyle(o).getPropertyValue("--pin-bottom");const d=l!==""?parseFloat(l):e;await new Promise((l=>s((()=>{if(this.tableDims.height+i-(t+r)<=d){o.classList.add(`${p}__pinned`,`${p}__pinned--bottom`)}else{o.classList.remove(`${p}__pinned`,`${p}__pinned--bottom`)}if(n!==a){a.style.setProperty("--pin-bottom",`${e-1}px`);e+=r-1;n=a}l()}))))}}))}}async assessCols(){if(!this.startColumns.length&&!this.endColumns.length)return;let t;let n;let e;const i=new Promise((i=>{if(this.startColumns.length){r((()=>{const{offsetX:o}=this.getParentOffsets();let s=o;e=Array.from(this.startColumns[0].parentElement.children);for(const i of this.startColumns){t=i.getBoundingClientRect();this.cachedColMeta.set(i,{width:t.width,idx:e.indexOf(i)});n=this.pinnedStart.find((t=>t===i));if(t.x<s){if(!n)this.pinnedStart=[...this.pinnedStart,i]}else if(n){this.pinnedStart=this.pinnedStart.filter((t=>t!==i))}s+=t.width}if(!this.endColumns.length)i()}))}if(this.endColumns.length){r((()=>{const o=Array.from(this.endColumns).reverse();e=Array.from(this.endColumns[0].parentElement.children);const{offsetX:s}=this.getParentOffsets();let r=0;for(const i of o){t=i.getBoundingClientRect();this.cachedColMeta.set(i,{width:t.width,idx:e.indexOf(i)});n=this.pinnedEnd.find((t=>t===i));if(this.tableDims.width+s-t.right<=r){if(!n)this.pinnedEnd=[i,...this.pinnedEnd]}else if(n){this.pinnedEnd=this.pinnedEnd.filter((t=>t!==i))}r+=t.width}i()}))}}));await i;this.generateCssCacheKey()}onScroll(t){if(this.cacheX!==t.x){this.cacheX=t.x;this.assessCols()}if(this.cacheY!==t.y){this.cacheY=t.y;this.assessRows()}}onResize(){const t=this.scrollElement.clientWidth;const n=this.scrollElement.clientHeight;this.tableDims={width:t,height:n};this.assessCols();this.assessRows()}}const ot=':host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}nano-table{display:block;width:100%;--max-col-width:clamp(200px, 500px, 50vw);--color:var(--nano-color-mediumgrey, #68767e);--font-size:0.87rem;--cell-line-height:1.5;--thead-font-size:0.95rem;--thead-color:#455560;--tfoot-color:#455560;--border-color:#dddbda;--border-style:thin solid var(--border-color);--border-tint-color:#0084a9;--border-tint-style:3px solid var(--border-tint-color);--cell-bg-rgb:var(--nano-color-white-rgb, 255 255 255);--head-bg-rgb:250 250 249;--foot-bg-rgb:var(--head-bg-rgb);--th-row-bg-rgb:var(--cell-bg-rgb);--ordered-bg-rgb:var(--nano-color-offwhite-rgb, 249 249 251);--td-padding-start:0.625rem;--td-padding-end:0.625rem;--td-padding-top:0.6rem;--td-padding-bottom:0.6125rem;--th-padding-start:0.725rem;--th-padding-end:0.625rem;--th-padding-top:0.875rem;--th-padding-bottom:0.6875rem;--td-padding-v:var(--td-padding-top) var(--td-padding-bottom);--td-padding-h:var(--td-padding-start) var(--td-padding-end);--th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--th-padding-h:var(--th-padding-start) var(--th-padding-end);--foot-th-padding-v:var(--td-padding-top) var(--td-padding-bottom);--foot-th-padding-h:var(--td-padding-start) var(--td-padding-end);--head-th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--head-th-padding-h:var(--th-padding-start) var(--th-padding-end);--bookend-col-padding:2rem}.nano-tbl{color:var(--color);text-align:start;width:100%;font-size:var(--font-size);border-spacing:0 0;border-collapse:separate;background:rgb(var(--cell-bg-rgb));-webkit-border-end:1px solid transparent;border-inline-end:1px solid transparent;-webkit-border-before:1px solid transparent;border-block-start:1px solid transparent;position:relative;z-index:1}.nano-tbl__wrap{display:table;min-width:100%}.nano-tbl__top-anchor{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;position:relative}.nano-tbl__ordered{background-color:var(--ordered-bg);-webkit-border-start:var(--border-style);border-inline-start:var(--border-style);-webkit-border-end:var(--border-style);border-inline-end:var(--border-style)}.nano-tbl__order-btn{padding:0;border:none;outline:none;font:inherit;background:none;-webkit-appearance:none;appearance:none;color:inherit;display:flex;gap:10px;align-items:center;width:100%}.nano-tbl__order-btn:focus-visible{outline:none;box-shadow:var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8))) inset}.nano-tbl__status-icons{margin-inline:auto 10px;display:flex;gap:10px}.nano-tbl__progress-bar{font-size:0.2rem;position:sticky;inset-block-start:0;inset-inline:0;z-index:10;transition:scale 0.25s;transform:scale(0);width:100%;height:0}.nano-tbl__progress-bar--show{transform:scale(1);height:auto}.nano-tbl__caption--hide{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.nano-tbl__td,.nano-tbl__th{line-height:var(--cell-line-height);text-align:start;-webkit-border-before:var(--border-style);border-block-start:var(--border-style);max-width:var(--max-col-width);background-color:rgb(var(--cell-bg-rgb))}tbody:first-of-type tr:first-child .nano-tbl__td,tbody:first-of-type tr:first-child .nano-tbl__th{-webkit-border-before:none;border-block-start:none}tbody:last-of-type tr:last-child .nano-tbl__td,tbody:last-of-type tr:last-child .nano-tbl__th{-webkit-border-after:var(--border-style);border-block-end:var(--border-style)}.md .nano-tbl__td:first-child .nano-tbl__cell-content,.md .nano-tbl__th:first-child .nano-tbl__cell-content{-webkit-padding-start:var(--bookend-col-padding);padding-inline-start:var(--bookend-col-padding)}.md .nano-tbl__td:last-child .nano-tbl__cell-content,.md .nano-tbl__th:last-child .nano-tbl__cell-content{-webkit-padding-end:var(--bookend-col-padding);padding-inline-end:var(--bookend-col-padding)}@media (max-width: 768px){.nano-tbl__td:first-child .nano-tbl__cell-content,.nano-tbl__th:first-child .nano-tbl__cell-content{-webkit-padding-start:var(--td-padding-start) !important;padding-inline-start:var(--td-padding-start) !important}.nano-tbl__td:last-child .nano-tbl__cell-content,.nano-tbl__th:last-child .nano-tbl__cell-content{-webkit-padding-end:var(--td-padding-end) !important;padding-inline-end:var(--td-padding-end) !important}}thead .nano-tbl__td,thead .nano-tbl__th{color:var(--thead-color);font-weight:800;background:rgb(var(--head-bg-rgb)/100%);font-size:var(--thead-font-size);-webkit-border-before:none !important;border-block-start:none !important}thead .nano-tbl__td .nano-tbl__cell-content,thead .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--head-th-padding-v);padding-inline:var(--head-th-padding-h)}thead .nano-tbl__td .nano-sortable__keyboard-handle,thead .nano-tbl__th .nano-sortable__keyboard-handle{position:absolute;inset-inline-end:5px;inset-block-start:50%;transform:translateY(-50%);background:white;z-index:10}tfoot .nano-tbl__td,tfoot .nano-tbl__th{color:var(--tfoot-color);font-weight:800;-webkit-border-before:none;border-block-start:none;background:rgb(var(--foot-bg-rgb)/100%);font-size:var(--thead-font-size)}tfoot .nano-tbl__td .nano-tbl__cell-content,tfoot .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--foot-th-padding-v);padding-inline:var(--foot-th-padding-h)}.nano-tbl__td.nano-tbl__ordered,.nano-tbl__th.nano-tbl__ordered{background-color:rgb(var(--ordered-bg-rgb)/80%) !important}.nano-tbl__cell-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:var(--td-padding-v);padding-inline:var(--td-padding-h)}.nano-tbl__cell-content--no-result{padding-block:2rem}.nano-tbl__cell-content--wrap{white-space:normal;overflow:visible}.nano-tbl tbody{will-change:scroll-position;opacity:1;transition:0.1s ease opacity}.nano-tbl tbody.nano-tbl__loading{z-index:-1;position:relative}.nano-tbl tbody.nano-tbl__inactive{opacity:0}.nano-tbl tbody .nano-tbl__tr:has(~.nano-tbl__tr--placeholder){display:none}.nano-tbl tbody .nano-tbl__tr--placeholder~.nano-tbl__tr{display:none}.nano-tbl th[scope=row]{font-weight:800;margin:0}.nano-tbl__tr{--base-z:0}.nano-tbl__pin{z-index:var(--z, var(--base-z, 0))}.nano-tbl__pin .nano-tbl__th,.nano-tbl__pin .nano-tbl__td{z-index:var(--z, var(--base-z, 0))}.nano-tbl__pin--start{position:sticky;inset-inline-start:var(--pin-start, -1px)}.nano-tbl__pin--start::after{content:"";position:absolute;inset:0;box-shadow:5px 0 4px -1px rgba(0, 0, 0, 0.2);opacity:var(--pin-start-active, 0);z-index:-1}.nano-tbl__pinned--start .nano-tbl__pin--start{--z:calc(var(--base-z) + 3) !important}.nano-tbl__pin--end{position:sticky}.nano-tbl__pin--start+.nano-tbl__pin--end{inset-inline-end:auto !important}.nano-tbl__pin--start+.nano-tbl__pin--end::after{display:none}.sm .nano-tbl__pin--end{inset-inline-end:var(--pin-end, -1px);max-width:min(50vw, 200px)}.sm .nano-tbl__pin--end::after{display:block !important;content:"";position:absolute;inset:0;box-shadow:-5px 1px 4px -1px rgba(0, 0, 0, 0.2);opacity:var(--pin-end-active, 0);z-index:-1}.sm .nano-tbl__pinned--end .nano-tbl__pin--end{--z:calc(var(--base-z) + 2) !important}.nano-tbl__pin--top .nano-tbl__th,.nano-tbl__pin--top .nano-tbl__td{position:sticky;inset-block-start:var(--pin-top, -1px)}.nano-tbl__pin--top .nano-tbl__pin--end,.nano-tbl__pin--top .nano-tbl__pin--start{--z:calc(var(--base-z) + 1)}.nano-tbl__pin--top.nano-tbl__pinned--top{--base-z:4}tbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__th,tbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__td{box-shadow:1px 3px 4px -1px rgba(0, 0, 0, 0.1)}.nano-tbl__pin--bottom .nano-tbl__th,.nano-tbl__pin--bottom .nano-tbl__td{position:sticky;inset-block-end:var(--pin-bottom, -1px)}.nano-tbl__pin--bottom .nano-tbl__pin--end,.nano-tbl__pin--bottom .nano-tbl__pin--start{--z:calc(var(--base-z) + 1)}.nano-tbl__pin--bottom.nano-tbl__pinned--bottom{--base-z:5}.nano-tbl__pin--bottom.nano-tbl__pinned--bottom:has(~.nano-tbl__pin--bottom.nano-tbl__pinned--bottom) .nano-tbl__pin{--base-z:6}tbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__th,tbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__td{box-shadow:1px -3px 4px -1px rgba(0, 0, 0, 0.07)}.nano-tbl thead tr:last-of-type td,.nano-tbl thead tr:last-of-type th{-webkit-border-after:var(--border-tint-style);border-block-end:var(--border-tint-style)}.nano-tbl tfoot tr:first-of-type td,.nano-tbl tfoot tr:first-of-type th{-webkit-border-before:none;border-block-start:none}.nano-tbl tfoot tr:last-of-type td,.nano-tbl tfoot tr:last-of-type th{-webkit-border-before:var(--border-style);border-block-start:var(--border-style);-webkit-border-after:var(--border-tint-style);border-block-end:var(--border-tint-style)}.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:first-of-type td,.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:first-of-type th{-webkit-border-before:var(--border-tint-style) !important;border-block-start:var(--border-tint-style) !important}.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:last-of-type td,.nano-tbl__pinned--bottom .nano-tbl tfoot tr.nano-tbl__pin--bottom:last-of-type th{-webkit-border-after:none !important;border-block-end:none !important}.nano-tbl .unlimited-width{max-width:none}.nano-tbl__spinner{font-size:1.5rem;transition:scale 0.25s;scale:0;padding:0.5rem;position:absolute;inset-block-end:0;inset-inline-start:calc(50% - 0.75rem);z-index:0}.nano-tbl__spinner--show{scale:1;position:sticky}.nano-tbl nano-skeleton{line-height:var(--cell-line-height)}';const st=false;function rt(t,n=false){if(!performance||!st)return;if(n){performance===null||performance===void 0?void 0:performance.mark("end"+t);performance===null||performance===void 0?void 0:performance.measure(t,"start"+t,"end"+t);const n=performance===null||performance===void 0?void 0:performance.getEntriesByName(t);console.log(n[n.length?n.length-1:0])}else{performance===null||performance===void 0?void 0:performance.mark("start"+t)}}let at=0;const lt=class{constructor(t){a(this,t);this.nanoTblReady=l(this,"nanoTblReady",7);this.nanoTblBlockRendered=l(this,"nanoTblBlockRendered",7);this.nanoTblBeforeSort=l(this,"nanoTblBeforeSort",7);this.nanoTblAfterSort=l(this,"nanoTblAfterSort",7);this.nanoTblBeforeFilter=l(this,"nanoTblBeforeFilter",7);this.nanoTblAfterFilter=l(this,"nanoTblAfterFilter",7);this.nanoTblBeforeSearch=l(this,"nanoTblBeforeSearch",7);this.nanoTblAfterSearch=l(this,"nanoTblAfterSearch",7);this.nanoTblBeforeEdit=l(this,"nanoTblBeforeEdit",7);this.renderId="tbl-"+at++;this.filters=[];this.currentFilters="[]";this.currentSort="";this.measureHeight=0;this.blockHeights=[];this.unitHeight=0;this._isReady=false;this.sortStart=async(t,n,e)=>{if(this.currentSort===t+":"+n)return;this._loading=true;const i=this.nanoTblBeforeSort.emit({column:n,order:t});if(i.defaultPrevented)return;rt("sort");this.currentSort=t+":"+n;this.scrollToTop(e);if(this.customSortFn){try{const e=await this.customSortFn(n,t);if(e===true){this.sortComplete(t,n);this._loading=false;return}}catch(t){console.warn("custom sort failed",t);this.currentSort="";this._loading=false;return}}try{await N(this.host,n,t);this.sortComplete(t,n)}catch(t){console.warn("sort failed",t);this.currentSort=""}finally{if(this.blocks.length)this._loading=false}};this.scrollHandler=()=>{var t;let n=0;rt("scrollHandler");if(!((t=this.store)===null||t===void 0?void 0:t.general.state.isActive)||!this.rows)return;if(this.primaryBlockIndex===undefined)this.primaryBlockIndex=0;r((()=>{n=typeof this.scrollParent.scrollTop!=="undefined"?this.scrollParent.scrollTop:window.scrollY;n+=this.host.offsetTop;if(this.tablePinnedService){this.tablePinnedService.onScroll({x:typeof this.scrollParent.scrollLeft!=="undefined"?this.scrollParent.scrollLeft:window.scrollX,y:n})}let t=this.host.offsetTop;let e=0;const i=this.blocks.length;while(e<i&&n>=t){t+=this.getBlockHeight(e);if(n<t){const t=[e,e+1];if(t.toString()!==this.activeBlocks.toString()){this.activeBlocks=t}this.primaryBlockIndex=e}e++}rt("scrollHandler",true)}))};this.handleResizeChange=t=>{var n;this.tableWrapperEle.className="";let e=[`${p}__wrap`];if((n=t.target)===null||n===void 0?void 0:n.className)e=[...t.target.className.split(" "),...e];this.tableWrapperEle.classList.add(...e.filter((t=>!!t)))};this.customRenderer=undefined;this.type="table";this.caption=undefined;this.showCaption=false;this.loading=undefined;this.internalLoading=true;this.placeholderSize=5;this.rows=undefined;this.columns=[];this.headRender={pinned:"top"};this.rowRender=undefined;this.footRender={pinned:"bottom"};this.showFooter=false;this.perBlock=50;this.searchTerm=undefined;this.customFilterFn=undefined;this.customSortFn=undefined;this.defaultSort=true;this.virtualTotalItems=0;this.blocks=[];this.activeBlocks=[0,1];this.debounceSetLoading=h(this.debounceSetLoading.bind(this),50)}get _loading(){return this.loading!==undefined?this.loading:this.internalLoading}set _loading(t){if(this.loading!==undefined)return;this.debounceSetLoading(t)}debounceSetLoading(t){this.internalLoading=t}handleRowsChange(){if(!this.rows){this._loading=true;return}this._loading=true;Promise.resolve(this.rows).then((async t=>{await A(this.host,t);this.currentFilters="";this.currentSort="";await this.columnInit();if(!this.isReady)requestAnimationFrame((()=>this.setInitialBlockDimension()));this._loading=false;if(this.tablePinnedService)this.tablePinnedService.assessRows()}))}async handleColsChange(){await M(this.host,this.columns);if(this.isReady)this.columnInit()}get blocksLength(){return this.blocks.length}handleSearchTermChange(){this.searchStart()}virtualTotalItemsChangeHandler(){this.setBlocks()}get appliedFilters(){return this.filters}async resetSorting(){const t=this.columns.find((t=>!!t.order));if(!t)return;return this.sortStart(null,t.prop)}async addSort(t,n){const e=this.columns.find((n=>n.prop===t));if(!e)throw"Cannot find column with "+t;return this.sortStart(n,e.prop)}async resetFilters(){this.filters=[];return this.filterStart()}async addFilters(t,n=true){if(!n)this.filters=[];return this.filterStart(t,n)}async removeFilters(t){this.filters=this.filters.filter((n=>!t.includes(n.prop)));return this.filterStart()}async updateRow(t,n){this.rows.splice(n,1,t);this.handleRowsChange()}set measureEle(t){var n;if(!t)return;const e=t.getBoundingClientRect().height;this.measureHeight=Math.abs(this.measureHeight-e)<5?this.measureHeight:e;this.unitHeight=((n=t.querySelector("tr"))===null||n===void 0?void 0:n.getBoundingClientRect().height)||this.unitHeight}get scrollParent(){return this._scrollParent}set scrollParent(t){if(t===this._scrollParent)return;if(this._scrollParent){(this._scrollParent===document.documentElement?document:this._scrollParent).removeEventListener("scroll",this.scrollHandler)}(t===document.documentElement?document:t).addEventListener("scroll",this.scrollHandler);this._scrollParent=t}get primaryBlockIndex(){return this._primaryBlockIndex}set primaryBlockIndex(t){if(this._primaryBlockIndex===t)return;this._primaryBlockIndex=t;this.nanoTblBlockRendered.emit({block:t,totalBlocks:this.blockElements.length})}get isReady(){return this._isReady}set isReady(t){if(t===this._isReady)return;this._isReady=t;if(this.isReady)requestAnimationFrame((()=>this.handleReady()))}handleReady(){const t=window.location.hash;if(t.length>1){try{const n=document.querySelector(t);if(n)n.scrollIntoView()}catch(t){}}this.nanoTblReady.emit()}sortComplete(t,n){this.columns=this.columns.map((e=>{if(e.prop===n)return Object.assign(Object.assign({},e),{order:t});return Object.assign(Object.assign({},e),{order:null})}));this.nanoTblAfterSort.emit({column:n,order:t});rt("sort",true)}async searchStart(){this._loading=true;const t=this.nanoTblBeforeSearch.emit({term:this.searchTerm});if(t.defaultPrevented)return;rt("search");this.scrollToTop();try{await B(this.host,this.searchTerm);this.nanoTblAfterSearch.emit({term:this.searchTerm});rt("search",true)}catch(t){console.warn("search failed",t)}finally{this._loading=false}}async filterStart(t,n=true){if(t){if(n){this.filters=[...this.filters.filter((n=>!t.find((t=>t.prop===n.prop)))),...t]}else{this.filters=t}}if(this.currentFilters===JSON.stringify(this.filters))return;this._loading=true;const e=this.nanoTblBeforeFilter.emit({filters:this.filters});if(e.defaultPrevented)return;rt("filter");this.currentFilters=JSON.stringify(this.filters);this.scrollToTop();if(this.customFilterFn){try{const t=await this.customFilterFn(this.filters);if(t===true){this.filterComplete();this._loading=false;return}}catch(t){console.warn("custom filter failed",t);this.currentFilters="";this._loading=false;return}}try{await F(this.host,this.filters);this.filterComplete()}catch(t){console.warn("filter failed",t)}finally{this._loading=false}}filterComplete(){this.columns=this.columns.map((t=>{const n=this.filters.find((n=>n.prop===t.prop));if(n&&(typeof n.filter!=="boolean"&&n.filter.length||typeof n.filter==="boolean"))t.filter=n.filter;else if(t.filter!==null&&t.filter!==undefined||!!t.filter&&typeof t.filter!=="boolean"&&!t.filter.length)t.filter=undefined;return t}));this.nanoTblAfterFilter.emit({filters:this.filters});rt("filter",true)}scrollToTop(t){var n;const e=(n=this.scrollParent.style)===null||n===void 0?void 0:n.scrollBehavior;const i=this.scrollParent.scrollLeft;this.scrollParent.style.scrollBehavior="auto";if(this.topAnchorEle&&!X(this.topAnchorEle,.1)){this.host.scrollIntoView()}if(t&&!X(t,1))setTimeout((()=>t.scrollIntoView({block:"start"})),500);if(i)this.scrollParent.scrollLeft=i;if(e)this.scrollParent.style.scrollBehavior=e;this.scrollHandler()}setMeasureElement(){return new Promise((t=>{r((()=>{this.measureEle=this.blockElements.find((t=>{var n;return!((n=t===null||t===void 0?void 0:t.classList)===null||n===void 0?void 0:n.contains(`${p}__inactive`))}));t()}))}))}setInitialBlockDimension(){var t;if(!((t=this.blockElements)===null||t===void 0?void 0:t.length))return;rt("blockDims");const n=async()=>{await this.setMeasureElement();if(this.unitHeight)return true;return false};const e=new Promise((async t=>{if(await n())t();else{const e=new IntersectionObserver((async()=>{if(await n()){t();e.disconnect()}}),{root:this.scrollParent});e.observe(this.tableEle)}}));e.then((()=>{rt("blockDims",true);rt("init",true);requestAnimationFrame((()=>this.isReady=true))}))}async columnInit(){this.filters=this.columns.filter((t=>t.filter!==undefined&&t.filter!==null)).map((t=>{const{filter:n,prop:e}=t;return{filter:n,prop:e}}));if(this.searchTerm){await this.searchStart()}if(this.filters.length){await this.filterStart()}const t=this.columns.find((t=>!!t.order));if(!!t){await this.sortStart(t.order,t.prop)}if(this.tablePinnedService)this.tablePinnedService.assessCols()}setBlocks(){const t=this.store.data.state.rows;if(!t.length){this.blocks=[];return}rt("setBlocks");let n=1;const e=this.virtualTotalItems>t.length?this.virtualTotalItems:t.length;let i=[];const o=[];for(n;n<=e;n++){i.push(this.store.data.state.rows[n-1]||{__uuid:""});if(n%this.perBlock===0){o.push({rows:i,__uuid:c(i.map((t=>t.__uuid)).join())});i=[]}}if(i.length){o.push({rows:i,__uuid:c(i.map((t=>t.__uuid)).join())})}this.blocks=o;rt("setBlocks",true)}getBlockHeight(t){if(this.blockHeights.length){const n=this.blockHeights.find((n=>n.blockIndex===t));if(n&&n.height)return n.height}const n=this.blocks[t].rows.length;if(n===this.perBlock&&this.measureHeight){return this.measureHeight}return this.unitHeight?this.unitHeight*n:100}setBlockHeight(){this.activeBlocks.forEach((t=>{const n=this.blockElements[t];if(!n)return;r((()=>{if(n.classList.contains(`${p}__inactive`))return;const e=n.getBoundingClientRect().height;const i=this.blockHeights.findIndex((n=>n.blockIndex===t));if(i>-1){this.blockHeights[i]={height:e,blockIndex:t}}else this.blockHeights.push({height:e,blockIndex:t})}))}))}processSlots(){if(!this.caption&&!this.host.querySelector('[slot="caption"]')){console.error("For accessibility you must set a `caption` prop or use the `caption` slot")}}setupActiveWatcher(){if(!this.host||!this.scrollParent||!this.store)return;if(this.activeWatcherIo){this.activeWatcherIo.disconnect();this.activeWatcherIo=undefined}const t=this.activeWatcherIo=new IntersectionObserver((async([t])=>{if(t.isIntersecting)this.store.general.state.isActive=true;else this.store.general.state.isActive=false}),{root:this.scrollParent,threshold:0});t.observe(this.host)}async componentWillLoad(){rt("init");this.store=await R(this.host,this.columns,this.scrollParent,this.isReady);await this.handleRowsChange();this.store.general.onChange("isActive",(()=>{this.scrollHandler()}));this.store.data.onChange("rows",(()=>this.setBlocks()));this.processSlots();this.setBlocks();this.scrollParent=K(this.host);this.setupActiveWatcher()}connectedCallback(){this.scrollParent=K(this.host);this.setupActiveWatcher()}componentDidLoad(){this.setInitialBlockDimension();if(!this.tablePinnedService){this.tablePinnedService=new it(this.tableEle,this.scrollParent)}}componentShouldUpdate(t,n,e){if(["rows","columns"].includes(e))return false}componentWillRender(){rt("render")}componentDidRender(){this.setMeasureElement().then((()=>this.setBlockHeight()));rt("render",true)}disconnectedCallback(){if(!this.activeWatcherIo)return;this.activeWatcherIo.disconnect();this.activeWatcherIo=undefined;(this.scrollParent===document.documentElement?document:this.scrollParent).removeEventListener("scroll",this.scrollHandler)}render(){this.blockElements=[];return n(d,null,n("div",{class:`${p}__top-anchor`,ref:t=>this.topAnchorEle=t}," "),n("nano-resize-observe",{states:"576w sm, 768w md",class:"sm md",onNanoResizeStateChange:this.handleResizeChange,onNanoResize:()=>{if(this.tablePinnedService)this.tablePinnedService.onResize()}}),n("div",{class:`${p}__wrap sm md`,ref:t=>this.tableWrapperEle=t,"aria-labelledby":"nano-table-caption-"+this.renderId,tabindex:this.type==="grid"?"0":undefined},n("nano-progress-bar",{indeterminate:true,class:{[`${p}__progress-bar`]:true,[`${p}__progress-bar--show`]:this._loading}}),n("table",{role:this.type==="grid"?"grid":undefined,"aria-rowcount":this.store.data.state.rows.length,"aria-colcount":this.store.config.state.columns.length,class:`${p}`,ref:t=>this.tableEle=t,id:"nano-table-"+this.renderId},n("caption",{class:{[`${p}__caption`]:true,[`${p}__caption--hide`]:!this.showCaption},id:"nano-table-caption-"+this.renderId},n("slot",{name:"caption"},this.caption)),n("thead",null,n(nt,{rowRenderer:this.headRender},this.store.config.state.columns.map((t=>[n(U,{column:t,headRenderer:this.headRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})])))),this._loading&&!this.blocks.length&&n("tbody",{class:`${p}__active ${p}__loading`},[...Array(10).keys()].map((t=>n("tr",null,this.store.config.state.columns.map(((e,i)=>n(V,{rowIndex:t,colIndex:i,nestedContent:()=>n("nano-skeleton",null)}))))))),n("tr",{hidden:!!this._loading||!!this.blocks.length},n("th",{class:`${p}__th`,colSpan:this.store.config.state.columns.length},n("div",{class:"nano-tbl__cell-content nano-tbl__cell-content--no-result"},n("slot",{name:"no-results"},"No results found")))),this.blocks.map(((t,e)=>n("tbody",{key:t.__uuid,id:`tbody-${this.renderId}-${e}`,ref:t=>{this.blockElements.push(t)},class:{[`${p}__inactive`]:!this.activeBlocks.includes(e),[`${p}__active`]:this.activeBlocks.includes(e)}},this.activeBlocks.includes(e)?t.rows.map(((t,i)=>{const o=e>0?e*this.perBlock+i:i;return n(tt,{rowRenderer:this.rowRender,rowModel:t,rowIndex:o},this.store.config.state.columns.map(((t,e)=>n(V,{rowIndex:o,colIndex:e}))))})):n("tr",{class:`${p}__tr--placeholder`},n("td",{colSpan:this.store.config.state.columns.length,style:{height:this.getBlockHeight(e)+"px"}}))))),this.showFooter&&n("tfoot",null,n(nt,{rowRenderer:this.footRender},this.store.config.state.columns.map((t=>[n(U,{column:t,headRenderer:this.footRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})]))))),!!this.blocks.length&&n("nano-spinner",{type:"circle",class:{[`${p}__spinner`]:true,[`${p}__spinner--show`]:this._loading}})))}get host(){return i(this)}static get watchers(){return{rows:["handleRowsChange"],columns:["handleColsChange"],searchTerm:["handleSearchTermChange"],virtualTotalItems:["virtualTotalItemsChangeHandler"]}}};lt.style=ot;export{lt as T,v as c};
5
+ //# sourceMappingURL=p-4ef3200a.js.map
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * Web Components for Nanopore digital Web Apps
3
+ */
4
+ import{r as t,c as i,h as s,a as n,g as h}from"./p-d6a04b3a.js";import{c as e,a as r}from"./p-8fe51abf.js";var a=e((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.EvEmitter=s()}})(typeof window!="undefined"?window:r,(function(){function t(){}var i=t.prototype;i.on=function(t,i){if(!t||!i){return}var s=this._events=this._events||{};var n=s[t]=s[t]||[];if(n.indexOf(i)==-1){n.push(i)}return this};i.once=function(t,i){if(!t||!i){return}this.on(t,i);var s=this._onceEvents=this._onceEvents||{};var n=s[t]=s[t]||{};n[i]=true;return this};i.off=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}var n=s.indexOf(i);if(n!=-1){s.splice(n,1)}return this};i.emitEvent=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}s=s.slice(0);i=i||[];var n=this._onceEvents&&this._onceEvents[t];for(var h=0;h<s.length;h++){var e=s[h];var r=n&&n[e];if(r){this.off(t,e);delete n[e]}e.apply(this,i)}return this};i.allOff=function(){delete this._events;delete this._onceEvents};return t}))}));var o=e((function(t){
5
+ /*!
6
+ * getSize v2.0.3
7
+ * measure size of elements
8
+ * MIT license
9
+ */
10
+ (function(i,s){if(t.exports){t.exports=s()}else{i.getSize=s()}})(window,(function t(){function i(t){var i=parseFloat(t);var s=t.indexOf("%")==-1&&!isNaN(i);return s&&i}function s(){}var n=typeof console=="undefined"?s:function(t){console.error(t)};var h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var e=h.length;function r(){var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<e;i++){var s=h[i];t[s]=0}return t}function a(t){var i=getComputedStyle(t);if(!i){n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1")}return i}var o=false;var c;function f(){if(o){return}o=true;var t=document.createElement("div");t.style.width="200px";t.style.padding="1px 2px 3px 4px";t.style.borderStyle="solid";t.style.borderWidth="1px 2px 3px 4px";t.style.boxSizing="border-box";var s=document.body||document.documentElement;s.appendChild(t);var n=a(t);c=Math.round(i(n.width))==200;u.isBoxSizeOuter=c;s.removeChild(t)}function u(t){f();if(typeof t=="string"){t=document.querySelector(t)}if(!t||typeof t!="object"||!t.nodeType){return}var s=a(t);if(s.display=="none"){return r()}var n={};n.width=t.offsetWidth;n.height=t.offsetHeight;var o=n.isBorderBox=s.boxSizing=="border-box";for(var u=0;u<e;u++){var l=h[u];var v=s[l];var d=parseFloat(v);n[l]=!isNaN(d)?d:0}var p=n.paddingLeft+n.paddingRight;var y=n.paddingTop+n.paddingBottom;var b=n.marginLeft+n.marginRight;var g=n.marginTop+n.marginBottom;var w=n.borderLeftWidth+n.borderRightWidth;var m=n.borderTopWidth+n.borderBottomWidth;var k=o&&c;var x=i(s.width);if(x!==false){n.width=x+(k?0:p+w)}var z=i(s.height);if(z!==false){n.height=z+(k?0:y+m)}n.innerWidth=n.width-(p+w);n.innerHeight=n.height-(y+m);n.outerWidth=n.width+b;n.outerHeight=n.height+g;return n}return u}))}));var c=e((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.matchesSelector=s()}})(window,(function t(){var i=function(){var t=window.Element.prototype;if(t.matches){return"matches"}if(t.matchesSelector){return"matchesSelector"}var i=["webkit","moz","ms","o"];for(var s=0;s<i.length;s++){var n=i[s];var h=n+"MatchesSelector";if(t[h]){return h}}}();return function t(s,n){return s[i](n)}}))}));var f=e((function(t){(function(i,s){if(t.exports){t.exports=s(i,c)}else{i.fizzyUIUtils=s(i,i.matchesSelector)}})(window,(function t(i,s){var n={};n.extend=function(t,i){for(var s in i){t[s]=i[s]}return t};n.modulo=function(t,i){return(t%i+i)%i};var h=Array.prototype.slice;n.makeArray=function(t){if(Array.isArray(t)){return t}if(t===null||t===undefined){return[]}var i=typeof t=="object"&&typeof t.length=="number";if(i){return h.call(t)}return[t]};n.removeFrom=function(t,i){var s=t.indexOf(i);if(s!=-1){t.splice(s,1)}};n.getParent=function(t,i){while(t.parentNode&&t!=document.body){t=t.parentNode;if(s(t,i)){return t}}};n.getQueryElement=function(t){if(typeof t=="string"){return document.querySelector(t)}return t};n.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};n.filterFindElements=function(t,i){t=n.makeArray(t);var h=[];t.forEach((function(t){if(!(t instanceof HTMLElement)){return}if(!i){h.push(t);return}if(s(t,i)){h.push(t)}var n=t.querySelectorAll(i);for(var e=0;e<n.length;e++){h.push(n[e])}}));return h};n.debounceMethod=function(t,i,s){s=s||100;var n=t.prototype[i];var h=i+"Timeout";t.prototype[i]=function(){var t=this[h];clearTimeout(t);var i=arguments;var e=this;this[h]=setTimeout((function(){n.apply(e,i);delete e[h]}),s)}};n.docReady=function(t){var i=document.readyState;if(i=="complete"||i=="interactive"){setTimeout(t)}else{document.addEventListener("DOMContentLoaded",t)}};n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()};var e=i.console;n.htmlInit=function(t,s){n.docReady((function(){var h=n.toDashed(s);var r="data-"+h;var a=document.querySelectorAll("["+r+"]");var o=document.querySelectorAll(".js-"+h);var c=n.makeArray(a).concat(n.makeArray(o));var f=r+"-options";var u=i.jQuery;c.forEach((function(i){var n=i.getAttribute(r)||i.getAttribute(f);var h;try{h=n&&JSON.parse(n)}catch(t){if(e){e.error("Error parsing "+r+" on "+i.className+": "+t)}return}var a=new t(i,h);if(u){u.data(i,s,a)}}))}))};return n}))}));function u(t,i){this.element=t;this.parent=i;this.create()}var l=u.prototype;l.create=function(){this.element.style.position="absolute";this.element.setAttribute("aria-hidden","true");this.x=0;this.shift=0;Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.destroy=function(){this.unselect();this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""};l.getSize=function(){this.size=o(this.element)};l.setPosition=function(t){this.x=t;this.updateTarget();this.renderPosition(t)};l.updateTarget=l.setDefaultTarget=function(){var t=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign};l.renderPosition=function(t){var i=this.parent.originSide;this.element.style[i]=this.parent.getPositionValue(t)};l.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))};l.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};l.wrapShift=function(t){this.shift=t;this.renderPosition(this.x+this.parent.slideableWidth*t)};l.remove=function(){this.element.parentNode.removeChild(this.element)};function v(t){this.parent=t;this.isOriginLeft=t.originSide=="left";this.cells=[];this.outerWidth=0;this.height=0}var d=v.prototype;d.addCell=function(t){this.cells.push(t);this.outerWidth+=t.size.outerWidth;this.height=Math.max(t.size.outerHeight,this.height);if(this.cells.length==1){this.x=t.x;var i=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[i]}};d.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft";var i=this.getLastCell();var s=i?i.size[t]:0;var n=this.outerWidth-(this.firstMargin+s);this.target=this.x+this.firstMargin+n*this.parent.cellAlign};d.getLastCell=function(){return this.cells[this.cells.length-1]};d.select=function(){this.cells.forEach((function(t){t.select()}))};d.unselect=function(){this.cells.forEach((function(t){t.unselect()}))};d.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const p={};p.startAnimation=function(){if(this.isAnimating){return}this.isAnimating=true;this.restingFrames=0;this.animate()};p.animate=function(){this.applyDragForce();this.applySelectedAttraction();var t=this.x;this.integratePhysics();this.positionSlider();this.settle(t);if(this.isAnimating){var i=this;requestAnimationFrame((function t(){i.animate()}))}};p.positionSlider=function(){var t=this.x;if(this.options.wrapAround&&this.cells.length>1){t=f.modulo(t,this.slideableWidth);t=t-this.slideableWidth;this.shiftWrapCells(t)}this.setTranslateX(t,this.isAnimating);this.dispatchScrollEvent()};p.setTranslateX=function(t,i){t+=this.cursorPosition;t=this.options.rightToLeft?-t:t;var s=this.getPositionValue(t);this.slider.style.transform="translate3d("+s+",0,0)"};p.dispatchScrollEvent=function(){var t=this.slides[0];if(!t){return}var i=-this.x-t.target;var s=i/this.slidesWidth;this.dispatchEvent("scroll",null,[s,i])};p.positionSliderAtSelected=function(){if(!this.cells.length){return}this.x=-this.selectedSlide.target;this.velocity=0;this.positionSlider()};p.getPositionValue=function(t){if(this.options.percentPosition){return Math.round(t/this.size.innerWidth*1e4)*.01+"%"}else{return Math.round(t)+"px"}};p.settle=function(t){if(!this.isPointerDown&&Math.round(this.x*100)==Math.round(t*100)){this.restingFrames++}if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;this.positionSlider();this.dispatchEvent("settle",null,[this.selectedIndex])}};p.shiftWrapCells=function(t){var i=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,i,-1);var s=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,s,1)};p._shiftCells=function(t,i,s){for(var n=0;n<t.length;n++){var h=t[n];var e=i>0?s:0;h.wrapShift(e);i-=h.size.outerWidth}};p._unshiftCells=function(t){if(!t||!t.length){return}for(var i=0;i<t.length;i++){t[i].wrapShift(0)}};p.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()};p.applyForce=function(t){this.velocity+=t};p.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]};p.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())};p.applyDragForce=function(){if(!this.isDraggable||!this.isPointerDown){return}var t=this.dragX-this.x;var i=t-this.velocity;this.applyForce(i)};p.applySelectedAttraction=function(){var t=this.isDraggable&&this.isPointerDown;if(t||this.isFreeScrolling||!this.slides.length){return}var i=this.selectedSlide.target*-1-this.x;var s=i*this.options.selectedAttraction;this.applyForce(s)};var y=window.getComputedStyle;var b=window.console;function g(t,i){t=f.makeArray(t);while(t.length){i.appendChild(t.shift())}}var w=0;var m={};function k(t,i){var s=f.getQueryElement(t);if(!s){if(b){b.error("Bad element for Flickity: "+(s||t))}return}this.element=s;if(this.element.flickityGUID){var n=m[this.element.flickityGUID];if(!m[this.element.flickityGUID])return;n.option(i);return n}this.options=f.extend({},this.constructor.defaults);this.option(i);this._create()}k.defaults={accessibility:true,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:true,percentPosition:true,resize:true,selectedAttraction:.025,setGallerySize:true};k.createMethods=[];var x=k.prototype;f.extend(x,a.prototype);x._create=function(){var t=this.guid=++w;this.element.flickityGUID=t;m[t]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.originSide=this.options.rightToLeft?"right":"left";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this.viewport.part.add("slide-viewport");this._createSlider();if(this.options.resize||this.options.watchCSS){window.addEventListener("resize",this)}for(var i in this.options.on){var s=this.options.on[i];this.on(i,s)}k.createMethods.forEach((function(t){this[t]()}),this);if(this.options.watchCSS){this.watchCSS()}else{this.activate()}};x.option=function(t){f.extend(this.options,t)};x.activate=function(){if(this.isActive){return}this.isActive=true;this.element.classList.add("flickity-enabled");if(this.options.rightToLeft){this.element.classList.add("flickity-rtl")}this.getSize();var t=this.element.children;g(t,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;this.element.addEventListener("keydown",this)}this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=true;this.dispatchEvent("ready")};x._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider";t.style[this.originSide]=0;this.slider=t};x._filterFindCellElements=function(t){return f.filterFindElements(t,this.options.cellSelector)};x.reloadCells=function(){this.cells=this._makeCells(this.slider.getRootNode().host?this.slider.getRootNode().host.children:this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize()};x._makeCells=function(t){var i=this._filterFindCellElements(t);var s=i.map((function(t){return new u(t,this)}),this);return s};x.getLastCell=function(){return this.cells[this.cells.length-1]};x.getLastSlide=function(){return this.slides[this.slides.length-1]};x.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)};x._positionCells=function(t){t=t||0;this.maxCellHeight=t?this.maxCellHeight||0:0;var i=0;if(t>0){var s=this.cells[t-1];i=s.x+s.size.outerWidth}var n=this.cells.length;for(var h=t;h<n;h++){var e=this.cells[h];e.setPosition(i);i+=e.size.outerWidth;this.maxCellHeight=Math.max(e.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i;this.updateSlides();this._containSlides();this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0};x._sizeCells=function(t){t.forEach((function(t){t.getSize()}))};x.updateSlides=function(){this.slides=[];if(!this.cells.length){return}var t=new v(this);this.slides.push(t);var i=this.originSide=="left";var s=i?"marginRight":"marginLeft";var n=this._getCanCellFit();this.cells.forEach((function(i,h){if(!t.cells.length){t.addCell(i);return}var e=t.outerWidth-t.firstMargin+(i.size.outerWidth-i.size[s]);if(n.call(this,h,e)){t.addCell(i)}else{t.updateTarget();t=new v(this);this.slides.push(t);t.addCell(i)}}),this);t.updateTarget();this.updateSelectedSlide()};x._getCanCellFit=function(){var t=this.options.groupCells;if(!t){return function(){return false}}else if(typeof t=="number"){var i=parseInt(t,10);return function(t){return t%i!==0}}var s=typeof t=="string"&&t.match(/^(\d+)%$/);var n=s?parseInt(s[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*n}};x._init=x.reposition=function(){this.positionCells();this.positionSliderAtSelected()};x.getSize=function(){this.size=o(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign};var z={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};x.setCellAlign=function(){var t=z[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign};x.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}};x._getWrapShiftCells=function(){if(!this.options.wrapAround){return}this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition;var i=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,i,-1);t=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(t,0,1)};x._getGapCells=function(t,i,s){var n=[];while(t>0){var h=this.cells[i];if(!h){break}n.push(h);i+=s;t-=h.size.outerWidth}return n};x._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length){return}var t=this.options.rightToLeft;var i=t?"marginRight":"marginLeft";var s=t?"marginLeft":"marginRight";var n=this.slideableWidth-this.getLastCell().size[s];var h=n<this.size.innerWidth;var e=this.cursorPosition+this.cells[0].size[i];var r=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){if(h){t.target=n*this.cellAlign}else{t.target=Math.max(t.target,e);t.target=Math.min(t.target,r)}}),this)};x.dispatchEvent=function(t,i,s){var n=i?[i].concat(s):s;this.emitEvent(t,n)};x.select=function(t,i,s){if(!this.isActive){return}t=parseInt(t,10);this._wrapSelect(t);if(this.options.wrapAround||i){t=f.modulo(t,this.slides.length)}if(!this.slides[t]){return}var n=this.selectedIndex;this.selectedIndex=t;this.updateSelectedSlide();if(s){this.positionSliderAtSelected()}else{this.startAnimation()}if(this.options.adaptiveHeight){this.setGallerySize()}this.dispatchEvent("select",null,[t]);if(t!=n){this.dispatchEvent("change",null,[t])}this.dispatchEvent("cellSelect")};x._wrapSelect=function(t){var i=this.slides.length;var s=this.options.wrapAround&&i>1;if(!s){return t}var n=f.modulo(t,i);var h=Math.abs(n-this.selectedIndex);var e=Math.abs(n+i-this.selectedIndex);var r=Math.abs(n-i-this.selectedIndex);if(!this.isDragSelect&&e<h){t+=i}else if(!this.isDragSelect&&r<h){t-=i}if(t<0){this.x-=this.slideableWidth}else if(t>=i){this.x+=this.slideableWidth}};x.previous=function(t,i){this.select(this.selectedIndex-1,t,i)};x.next=function(t,i){this.select(this.selectedIndex+1,t,i)};x.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];if(!t){return}this.unselectSelectedSlide();this.selectedSlide=t;t.select();this.selectedCells=t.cells;this.selectedElements=t.getCellElements();this.selectedCell=t.cells[0];this.selectedElement=this.selectedElements[0]};x.unselectSelectedSlide=function(){if(this.selectedSlide){this.selectedSlide.unselect()}};x.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,false,true);return}if(t&&typeof t=="string"){var i=this.queryCell(t);if(i){this.selectCell(t,false,true);return}}var s=0;if(t&&this.slides[t]){s=t}this.select(s,false,true)};x.selectCell=function(t,i,s){var n=this.queryCell(t);if(!n){return}var h=this.getCellSlideIndex(n);this.select(h,i,s)};x.getCellSlideIndex=function(t){for(var i=0;i<this.slides.length;i++){var s=this.slides[i];var n=s.cells.indexOf(t);if(n!=-1){return i}}};x.getCell=function(t){for(var i=0;i<this.cells.length;i++){var s=this.cells[i];if(s.element==t){return s}}};x.getCells=function(t){t=f.makeArray(t);var i=[];t.forEach((function(t){var s=this.getCell(t);if(s){i.push(s)}}),this);return i};x.getCellElements=function(){return this.cells.map((function(t){return t.element}))};x.getParentCell=function(t){var i=this.getCell(t);if(i){return i}t=f.getParent(t,".flickity-slider > *");return this.getCell(t)};x.getAdjacentCellElements=function(t,i){if(!t){return this.selectedSlide.getCellElements()}i=i===undefined?this.selectedIndex:i;var s=this.slides.length;if(1+t*2>=s){return this.getCellElements()}var n=[];for(var h=i-t;h<=i+t;h++){var e=this.options.wrapAround?f.modulo(h,s):h;var r=this.slides[e];if(r){n=n.concat(r.getCellElements())}}return n};x.queryCell=function(t){if(typeof t=="number"){return this.cells[t]}if(typeof t=="string"){if(t.match(/^[#\.]?[\d\/]/)){return}t=this.element.querySelector(t)}return this.getCell(t)};x.uiChange=function(){this.emitEvent("uiChange")};x.childUIPointerDown=function(t){if(t.type!="touchstart"){t.preventDefault()}this.focus()};x.onresize=function(){this.watchCSS();this.resize()};f.debounceMethod(k,"onresize",150);x.resize=function(){if(!this.isActive){return}this.getSize();if(this.options.wrapAround){this.x=f.modulo(this.x,this.slideableWidth)}this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,false,true)};x.watchCSS=function(){var t=this.options.watchCSS;if(!t){return}var i=y(this.element,":after").content;if(i.indexOf("flickity")!=-1){this.activate()}else{this.deactivate()}};x.onkeydown=function(t){var i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i){return}var s=k.keyboardHandlers[t.keyCode];if(s){s.call(this)}};k.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange();this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange();this[t]()}};x.focus=function(){var t=window.pageYOffset;this.element.focus({preventScroll:true});if(window.pageYOffset!=t){window.scrollTo(window.pageXOffset,t)}};x.deactivate=function(){if(!this.isActive){return}this.element.classList.remove("flickity-enabled");this.element.classList.remove("flickity-rtl");this.unselectSelectedSlide();this.cells.forEach((function(t){t.destroy()}));this.element.removeChild(this.viewport);g(this.slider.children,this.element);if(this.options.accessibility){this.element.removeAttribute("tabIndex");this.element.removeEventListener("keydown",this)}this.isActive=false;this.emitEvent("deactivate")};x.destroy=function(){this.deactivate();window.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");delete this.element.flickityGUID;delete m[this.guid]};f.extend(x,p);k.data=function(t){t=f.getQueryElement(t);var i=t&&t.flickityGUID;return i&&m[i]};f.htmlInit(k,"flickity");k.Cell=u;k.Slide=v;var M=e((function(t){
11
+ /*!
12
+ * Unipointer v2.4.0
13
+ * base class for doing one thing with pointer event
14
+ * MIT license
15
+ */
16
+ (function(i,s){if(t.exports){t.exports=s(i,a)}else{i.Unipointer=s(i,i.EvEmitter)}})(window,(function t(i,s){function n(){}function h(){}var e=h.prototype=Object.create(s.prototype);e.bindStartEvent=function(t){this._bindStartEvent(t,true)};e.unbindStartEvent=function(t){this._bindStartEvent(t,false)};e._bindStartEvent=function(t,s){s=s===undefined?true:s;var n=s?"addEventListener":"removeEventListener";var h="mousedown";if("ontouchstart"in i){h="touchstart"}else if(i.PointerEvent){h="pointerdown"}t[n](h,this)};e.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};e.getTouch=function(t){for(var i=0;i<t.length;i++){var s=t[i];if(s.identifier==this.pointerIdentifier){return s}}};e.onmousedown=function(t){var i=t.button;if(i&&(i!==0&&i!==1)){return}this._pointerDown(t,t)};e.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])};e.onpointerdown=function(t){this._pointerDown(t,t)};e._pointerDown=function(t,i){if(t.button||this.isPointerDown){return}this.isPointerDown=true;this.pointerIdentifier=i.pointerId!==undefined?i.pointerId:i.identifier;this.pointerDown(t,i)};e.pointerDown=function(t,i){this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var r={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};e._bindPostStartEvents=function(t){if(!t){return}var s=r[t.type];s.forEach((function(t){i.addEventListener(t,this)}),this);this._boundPointerEvents=s};e._unbindPostStartEvents=function(){if(!this._boundPointerEvents){return}this._boundPointerEvents.forEach((function(t){i.removeEventListener(t,this)}),this);delete this._boundPointerEvents};e.onmousemove=function(t){this._pointerMove(t,t)};e.onpointermove=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerMove(t,t)}};e.ontouchmove=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerMove(t,i)}};e._pointerMove=function(t,i){this.pointerMove(t,i)};e.pointerMove=function(t,i){this.emitEvent("pointerMove",[t,i])};e.onmouseup=function(t){this._pointerUp(t,t)};e.onpointerup=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerUp(t,t)}};e.ontouchend=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerUp(t,i)}};e._pointerUp=function(t,i){this._pointerDone();this.pointerUp(t,i)};e.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i])};e._pointerDone=function(){this._pointerReset();this._unbindPostStartEvents();this.pointerDone()};e._pointerReset=function(){this.isPointerDown=false;delete this.pointerIdentifier};e.pointerDone=n;e.onpointercancel=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerCancel(t,t)}};e.ontouchcancel=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerCancel(t,i)}};e._pointerCancel=function(t,i){this._pointerDone();this.pointerCancel(t,i)};e.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])};h.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};return h}))}));var C=e((function(t){
17
+ /*!
18
+ * Unidragger v2.4.0
19
+ * Draggable base class
20
+ * MIT license
21
+ */
22
+ (function(i,s){if(t.exports){t.exports=s(i,M)}else{i.Unidragger=s(i,i.Unipointer)}})(window,(function t(i,s){function n(){}var h=n.prototype=Object.create(s.prototype);h.bindHandles=function(){this._bindHandles(true)};h.unbindHandles=function(){this._bindHandles(false)};h._bindHandles=function(t){t=t===undefined?true:t;var s=t?"addEventListener":"removeEventListener";var n=t?this._touchActionValue:"";for(var h=0;h<this.handles.length;h++){var e=this.handles[h];this._bindStartEvent(e,t);e[s]("click",this);if(i.PointerEvent){e.style.touchAction=n}}};h._touchActionValue="none";h.pointerDown=function(t,i){var s=this.okayPointerDown(t);if(!s){return}this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};t.preventDefault();this.pointerDownBlur();this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var e={TEXTAREA:true,INPUT:true,SELECT:true,OPTION:true};var r={radio:true,checkbox:true,button:true,submit:true,image:true,file:true};h.okayPointerDown=function(t){var i=e[t.target.nodeName];var s=r[t.target.type];var n=!i||s;if(!n){this._pointerReset()}return n};h.pointerDownBlur=function(){var t=document.activeElement;var i=t&&t.blur&&t!=document.body;if(i){t.blur()}};h.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]);this._dragMove(t,i,s)};h._dragPointerMove=function(t,i){var s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};if(!this.isDragging&&this.hasDragStarted(s)){this._dragStart(t,i)}return s};h.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3};h.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]);this._dragPointerUp(t,i)};h._dragPointerUp=function(t,i){if(this.isDragging){this._dragEnd(t,i)}else{this._staticClick(t,i)}};h._dragStart=function(t,i){this.isDragging=true;this.isPreventingClicks=true;this.dragStart(t,i)};h.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])};h._dragMove=function(t,i,s){if(!this.isDragging){return}this.dragMove(t,i,s)};h.dragMove=function(t,i,s){t.preventDefault();this.emitEvent("dragMove",[t,i,s])};h._dragEnd=function(t,i){this.isDragging=false;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(t,i)};h.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])};h.onclick=function(t){if(this.isPreventingClicks){t.preventDefault()}};h._staticClick=function(t,i){if(this.isIgnoringMouseUp&&t.type=="mouseup"){return}this.staticClick(t,i);if(t.type!="mouseup"){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)}};h.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])};n.getPointerPoint=s.getPointerPoint;return n}))}));f.extend(k.defaults,{draggable:">1",dragThreshold:3});k.createMethods.push("_createDrag");var S=k.prototype;f.extend(S,C.prototype);S._touchActionValue="pan-y";var L="createTouch"in document;var T=false;S._createDrag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);if(L&&!T){window.addEventListener("touchmove",(function(){}));T=true}};S.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()};S.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")};S.updateDraggable=function(){if(this.options.draggable==">1"){this.isDraggable=this.slides.length>1}else{this.isDraggable=this.options.draggable}if(this.isDraggable){this.element.classList.add("is-draggable")}else{this.element.classList.remove("is-draggable")}};S.bindDrag=function(){this.options.draggable=true;this.updateDraggable()};S.unbindDrag=function(){this.options.draggable=false;this.updateDraggable()};S._uiChangeDrag=function(){delete this.isFreeScrolling};S.pointerDown=function(t,i){if(!this.isDraggable){this._pointerDownDefault(t,i);return}var s=this.okayPointerDown(t);if(!s){return}this._pointerDownPreventDefault(t);this.pointerDownFocus(t);if(document.activeElement!=this.element){this.pointerDownBlur()}this.dragX=this.x;this.viewport.classList.add("is-pointer-down");this.pointerDownScroll=E();window.addEventListener("scroll",this);this._pointerDownDefault(t,i)};S._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};this._bindPostStartEvents(t);this.dispatchEvent("pointerDown",t,[i])};var P={INPUT:true,TEXTAREA:true,SELECT:true};S.pointerDownFocus=function(t){var i=P[t.target.nodeName];if(!i){this.focus()}};S._pointerDownPreventDefault=function(t){var i=t.type=="touchstart";var s=t.pointerType=="touch";var n=P[t.target.nodeName];if(!i&&!s&&!n){t.preventDefault()}};S.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold};S.pointerUp=function(t,i){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",t,[i]);this._dragPointerUp(t,i)};S.pointerDone=function(){window.removeEventListener("scroll",this);delete this.pointerDownScroll};S.dragStart=function(t,i){if(!this.isDraggable){return}this.dragStartPosition=this.x;this.startAnimation();window.removeEventListener("scroll",this);this.dispatchEvent("dragStart",t,[i])};S.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]);this._dragMove(t,i,s)};S.dragMove=function(t,i,s){if(!this.isDraggable){return}t.preventDefault();this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;if(this.options.wrapAround){s.x=s.x%this.slideableWidth}var h=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){var e=Math.max(-this.slides[0].target,this.dragStartPosition);h=h>e?(h+e)*.5:h;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);h=h<r?(h+r)*.5:h}this.dragX=h;this.dragMoveTime=new Date;this.dispatchEvent("dragMove",t,[i,s])};S.dragEnd=function(t,i){if(!this.isDraggable){return}if(this.options.freeScroll){this.isFreeScrolling=true}var s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else if(!this.options.freeScroll&&s==this.selectedIndex){s+=this.dragEndBoostSelect()}delete this.previousDragX;this.isDragSelect=this.options.wrapAround;this.select(s);delete this.isDragSelect;this.dispatchEvent("dragEnd",t,[i])};S.dragEndRestingSelect=function(){var t=this.getRestingPosition();var i=Math.abs(this.getSlideDistance(-t,this.selectedIndex));var s=this._getClosestResting(t,i,1);var n=this._getClosestResting(t,i,-1);var h=s.distance<n.distance?s.index:n.index;return h};S._getClosestResting=function(t,i,s){var n=this.selectedIndex;var h=Infinity;var e=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};while(e(i,h)){n+=s;h=i;i=this.getSlideDistance(-t,n);if(i===null){break}i=Math.abs(i)}return{distance:h,index:n-s}};S.getSlideDistance=function(t,i){var s=this.slides.length;var n=this.options.wrapAround&&s>1;var h=n?f.modulo(i,s):i;var e=this.slides[h];if(!e){return null}var r=n?this.slideableWidth*Math.floor(i/s):0;return t-(e.target+r)};S.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date-this.dragMoveTime>100){return 0}var t=this.getSlideDistance(-this.dragX,this.selectedIndex);var i=this.previousDragX-this.dragX;if(t>0&&i>0){return 1}else if(t<0&&i<0){return-1}return 0};S.staticClick=function(t,i){var s=this.getParentCell(t.target);var n=s&&s.element;var h=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,h])};S.onscroll=function(){var t=E();var i=this.pointerDownScroll.x-t.x;var s=this.pointerDownScroll.y-t.y;if(Math.abs(i)>3||Math.abs(s)>3){this._pointerDone()}};function E(){return{x:window.pageXOffset,y:window.pageYOffset}}var A="http://www.w3.org/2000/svg";function O(t,i){this.direction=t;this.parent=i;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}O.prototype=Object.create(M.prototype);O.prototype._create=function(){this.isEnabled=true;this.isPrevious=this.direction==-1;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var i=this.element=document.createElement("button");i.className="flickity-button flickity-prev-next-button";i.part.add("navigation-button");if(this.isPrevious){i.classList.add("previous");i.part.add("navigation-button--previous")}else{i.classList.add("next");i.part.add("navigation-button--next")}i.setAttribute("type","button");this.disable();i.setAttribute("aria-label",this.isPrevious?"Previous":"Next");const s=document.createElement("slot");s.name=this.isPrevious?"previous-icon":"next-icon";i.appendChild(s);s.addEventListener("slotchange",(()=>{s.assignedElements({flatten:true}).forEach((t=>{t.removeAttribute("hidden")}))}));var n=this.createSVG();s.appendChild(n);this.parent.on("select",this.update.bind(this));this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};O.prototype.activate=function(){this.bindStartEvent(this.element);this.element.addEventListener("click",this);this.parentElement.appendChild(this.element)};O.prototype.deactivate=function(){this.parentElement.removeChild(this.element);this.unbindStartEvent(this.element);this.element.removeEventListener("click",this)};O.prototype.createSVG=function(){var t=document.createElementNS(A,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 100 100");t.part.add("navigation-icon");var i=document.createElementNS(A,"path");var s=D(this.parent.options.arrowShape);i.setAttribute("d",s);i.setAttribute("class","arrow");if(!this.isLeft){i.setAttribute("transform","translate(100, 100) rotate(180) ")}t.appendChild(i);return t};function D(t){if(typeof t=="string"){return t}return"M "+t.x0+",50"+" L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 "+" L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}O.prototype.handleEvent=f.handleEvent;O.prototype.onclick=function(){if(!this.isEnabled){return}this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()};O.prototype.enable=function(){if(this.isEnabled){return}this.element.disabled=false;this.isEnabled=true};O.prototype.disable=function(){if(!this.isEnabled){return}this.element.disabled=true;this.isEnabled=false};O.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1){this.enable();return}var i=t.length?t.length-1:0;var s=this.isPrevious?0:i;var n=this.parent.selectedIndex==s?"disable":"enable";this[n]()};O.prototype.destroy=function(){this.deactivate();this.allOff()};f.extend(k.defaults,{prevNextButtons:true,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});k.createMethods.push("_createPrevNextButtons");var j=k.prototype;j._createPrevNextButtons=function(){if(!this.options.prevNextButtons){return}this.prevButton=new O(-1,this);this.nextButton=new O(1,this);this.on("activate",this.activatePrevNextButtons)};j.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on("deactivate",this.deactivatePrevNextButtons)};j.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off("deactivate",this.deactivatePrevNextButtons)};k.PrevNextButton=O;function R(t){this.parent=t;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}R.prototype=Object.create(M.prototype);R.prototype._create=function(){this.holder=document.createElement("ol");this.holder.className="flickity-page-dots";this.holder.part.add("pagination");this.dots=[];this.handleClick=this.onClick.bind(this);this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};R.prototype.activate=function(){this.setDots();this.holder.addEventListener("click",this.handleClick);this.bindStartEvent(this.holder);this.parentElement.appendChild(this.holder)};R.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick);this.unbindStartEvent(this.holder);this.parentElement.removeChild(this.holder)};R.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;if(t>0){this.addDots(t)}else if(t<0){this.removeDots(-t)}};R.prototype.addDots=function(t){var i=document.createDocumentFragment();var s=[];var n=this.dots.length;var h=n+t;for(var e=n;e<h;e++){var r=document.createElement("li");r.classList.add("dot");r.part.add("pagination-item");r.setAttribute("aria-label","Page dot "+(e+1));i.appendChild(r);s.push(r)}this.holder.appendChild(i);this.dots=this.dots.concat(s)};R.prototype.removeDots=function(t){var i=this.dots.splice(this.dots.length-t,t);i.forEach((function(t){this.holder.removeChild(t)}),this)};R.prototype.updateSelected=function(){if(this.selectedDot){this.selectedDot.classList.remove("is-selected");this.selectedDot.part.remove("pagination-item--active");this.selectedDot.removeAttribute("aria-current")}if(!this.dots.length){return}this.selectedDot=this.dots[this.parent.selectedIndex];this.selectedDot.classList.add("is-selected");this.selectedDot.part.add("pagination-item--active");this.selectedDot.setAttribute("aria-current","step")};R.prototype.onTap=R.prototype.onClick=function(t){var i=t.target;if(i.nodeName!="LI"){return}this.parent.uiChange();var s=this.dots.indexOf(i);this.parent.select(s)};R.prototype.destroy=function(){this.deactivate();this.allOff()};k.PageDots=R;f.extend(k.defaults,{pageDots:true});k.createMethods.push("_createPageDots");var I=k.prototype;I._createPageDots=function(){if(!this.options.pageDots){return}this.pageDots=new R(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)};I.activatePageDots=function(){this.pageDots.activate()};I.updateSelectedPageDots=function(){this.pageDots.updateSelected()};I.updatePageDots=function(){this.pageDots.setDots()};I.deactivatePageDots=function(){this.pageDots.deactivate()};k.PageDots=R;function N(t){this.parent=t;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}N.prototype=Object.create(a.prototype);N.prototype.play=function(){if(this.state=="playing"){return}var t=document.hidden;if(t){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()};N.prototype.tick=function(){if(this.state!="playing"){return}var t=this.parent.options.autoPlay;t=typeof t=="number"?t:3e3;var i=this;this.clear();this.timeout=setTimeout((function(){i.parent.next(true);i.tick()}),t)};N.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};N.prototype.clear=function(){clearTimeout(this.timeout)};N.prototype.pause=function(){if(this.state=="playing"){this.state="paused";this.clear()}};N.prototype.unpause=function(){if(this.state=="paused"){this.play()}};N.prototype.visibilityChange=function(){var t=document.hidden;this[t?"pause":"unpause"]()};N.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};f.extend(k.defaults,{pauseAutoPlayOnHover:true});k.createMethods.push("_createPlayer");var B=k.prototype;B._createPlayer=function(){this.player=new N(this);this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)};B.activatePlayer=function(){if(!this.options.autoPlay){return}this.player.play();this.element.addEventListener("mouseenter",this)};B.playPlayer=function(){this.player.play()};B.stopPlayer=function(){this.player.stop()};B.pausePlayer=function(){this.player.pause()};B.unpausePlayer=function(){this.player.unpause()};B.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)};B.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover){return}this.player.pause();this.element.addEventListener("mouseleave",this)};B.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)};k.Player=N;function F(t){var i=document.createDocumentFragment();t.forEach((function(t){i.appendChild(t.element)}));return i}var H=k.prototype;H.insert=function(t,i){var s=this._makeCells(t);if(!s||!s.length){return}var n=this.cells.length;i=i===undefined?n:i;var h=F(s);var e=i==n;if(e){this.slider.appendChild(h)}else{var r=this.cells[i].element;this.slider.insertBefore(h,r)}if(i===0){this.cells=s.concat(this.cells)}else if(e){this.cells=this.cells.concat(s)}else{var a=this.cells.splice(i,n-i);this.cells=this.cells.concat(s).concat(a)}this._sizeCells(s);this.cellChange(i,true)};H.append=function(t){this.insert(t,this.cells.length)};H.prepend=function(t){this.insert(t,0)};H.remove=function(t){var i=this.getCells(t);if(!i||!i.length){return}var s=this.cells.length-1;i.forEach((function(t){t.remove();var i=this.cells.indexOf(t);s=Math.min(i,s);f.removeFrom(this.cells,t)}),this);this.cellChange(s,true)};H.cellSizeChange=function(t){var i=this.getCell(t);if(!i){return}i.getSize();var s=this.cells.indexOf(i);this.cellChange(s)};H.cellChange=function(t,i){var s=this.selectedElement;this._positionCells(t);this._getWrapShiftCells();this.setGallerySize();var n=this.getCell(s);if(n){this.selectedIndex=this.getCellSlideIndex(n)}this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[t]);this.select(this.selectedIndex);if(i){this.positionSliderAtSelected()}};k.createMethods.push("_createLazyload");var _=k.prototype;_._createLazyload=function(){this.on("select",this.lazyLoad)};_.lazyLoad=function(){var t=this.options.lazyLoad;if(!t){return}var i=typeof t=="number"?t:0;var s=this.getAdjacentCellElements(i);var n=[];s.forEach((function(t){var i=W(t);n=n.concat(i)}));n.forEach((function(t){new V(t,this)}),this)};function W(t){if(t.nodeName=="IMG"){var i=t.getAttribute("data-flickity-lazyload");var s=t.getAttribute("data-flickity-lazyload-src");var n=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||n){return[t]}}var h="img[data-flickity-lazyload], "+"img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]";var e=t.querySelectorAll(h);return f.makeArray(e)}function V(t,i){this.img=t;this.flickity=i;this.load()}V.prototype.handleEvent=f.handleEvent;V.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src");var i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t;if(i){this.img.setAttribute("srcset",i)}this.img.removeAttribute("data-flickity-lazyload");this.img.removeAttribute("data-flickity-lazyload-src");this.img.removeAttribute("data-flickity-lazyload-srcset")};V.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")};V.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")};V.prototype.complete=function(t,i){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);var s=this.flickity.getParentCell(this.img);var n=s&&s.element;this.flickity.cellSizeChange(n);this.img.classList.add(i);this.flickity.dispatchEvent("lazyLoad",t,n)};k.LazyLoader=V;k.createMethods.push("_createFullscreen");var Z=k.prototype;Z._createFullscreen=function(){this.isFullscreen=false;if(!this.options.fullscreen){return}this.viewFullscreenButton=new X("view",this);this.exitFullscreenButton=new X("exit",this);this.on("activate",this._changeFullscreenActive);this.on("deactivate",this._changeFullscreenActive)};Z._changeFullscreenActive=function(){var t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element);this.element[t](this.exitFullscreenButton.element);var i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i]();this.exitFullscreenButton[i]()};Z.viewFullscreen=function(){this._changeFullscreen(true);this.focus()};Z.exitFullscreen=function(){this._changeFullscreen(false)};Z._changeFullscreen=function(t){if(this.isFullscreen==t){return}this.isFullscreen=t;var i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen");this.element.classList[i]("is-fullscreen");this.resize();if(this.isFullscreen){this.reposition()}this.dispatchEvent("fullscreenChange",null,[t])};Z.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};var U=Z.setGallerySize;Z.setGallerySize=function(){if(!this.options.setGallerySize){return}if(this.isFullscreen){this.viewport.style.height=""}else{U.call(this)}};k.keyboardHandlers[27]=function(){this.exitFullscreen()};function X(t,i){this.name=t;this.createButton();this.createIcon();this.onClick=function(){i[t+"Fullscreen"]()};this.clickHandler=this.onClick.bind(this)}X.prototype.createButton=function(){var t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button "+"flickity-fullscreen-button-"+this.name;t.setAttribute("type","button");var i=Y(this.name+" full-screen");t.setAttribute("aria-label",i);t.title=i};function Y(t){return t[0].toUpperCase()+t.slice(1)}var G="http://www.w3.org/2000/svg";var J={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};X.prototype.createIcon=function(){var t=document.createElementNS(G,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 32 32");var i=document.createElementNS(G,"path");var s=J[this.name];i.setAttribute("d",s);t.appendChild(i);this.element.appendChild(t)};X.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)};X.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)};k.FullscreenButton=X;var q=k.Slide;var Q=q.prototype.updateTarget;q.prototype.updateTarget=function(){Q.apply(this,arguments);if(!this.parent.options.fade){return}var t=this.target-this.x;var i=this.cells[0].x;this.cells.forEach((function(s){var n=s.x-i-t;s.renderPosition(n)}))};q.prototype.setOpacity=function(t){this.cells.forEach((function(i){i.element.style.opacity=t}))};var $=k.prototype;k.createMethods.push("_createFade");$._createFade=function(){this.fadeIndex=this.selectedIndex;this.prevSelectedIndex=this.selectedIndex;this.on("select",this.onSelectFade);this.on("dragEnd",this.onDragEndFade);this.on("settle",this.onSettleFade);this.on("activate",this.onActivateFade);this.on("deactivate",this.onDeactivateFade)};var K=$.updateSlides;$.updateSlides=function(){K.apply(this,arguments);if(!this.options.fade){return}this.slides.forEach((function(t,i){var s=i==this.selectedIndex?1:0;t.setOpacity(s)}),this)};$.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1);this.prevSelectedIndex=this.selectedIndex};$.onSettleFade=function(){delete this.didDragEnd;if(!this.options.fade){return}this.selectedSlide.setOpacity(1);var t=this.slides[this.fadeIndex];if(t&&this.fadeIndex!=this.selectedIndex){this.slides[this.fadeIndex].setOpacity(0)}};$.onDragEndFade=function(){this.didDragEnd=true};$.onActivateFade=function(){if(this.options.fade){this.element.classList.add("is-fade")}};$.onDeactivateFade=function(){if(!this.options.fade){return}this.element.classList.remove("is-fade");this.slides.forEach((function(t){t.setOpacity("")}))};var tt=$.positionSlider;$.positionSlider=function(){if(!this.options.fade){tt.apply(this,arguments);return}this.fadeSlides();this.dispatchScrollEvent()};var it=$.positionSliderAtSelected;$.positionSliderAtSelected=function(){if(this.options.fade){this.setTranslateX(0)}it.apply(this,arguments)};$.fadeSlides=function(){if(this.slides.length<2){return}var t=this.getFadeIndexes();var i=this.slides[t.a];var s=this.slides[t.b];var n=this.wrapDifference(i.target,s.target);var h=this.wrapDifference(i.target,-this.x);h=h/n;i.setOpacity(1-h);s.setOpacity(h);var e=t.a;if(this.isDragging){e=h>.5?t.a:t.b}var r=this.fadeHideIndex!=undefined&&this.fadeHideIndex!=e&&this.fadeHideIndex!=t.a&&this.fadeHideIndex!=t.b;if(r){this.slides[this.fadeHideIndex].setOpacity(0)}this.fadeHideIndex=e};$.getFadeIndexes=function(){if(!this.isDragging&&!this.didDragEnd){return{a:this.fadeIndex,b:this.selectedIndex}}if(this.options.wrapAround){return this.getFadeDragWrapIndexes()}else{return this.getFadeDragLimitIndexes()}};$.getFadeDragWrapIndexes=function(){var t=this.slides.map((function(t,i){return this.getSlideDistance(-this.x,i)}),this);var i=t.map((function(t){return Math.abs(t)}));var s=Math.min.apply(Math,i);var n=i.indexOf(s);var h=t[n];var e=this.slides.length;var r=h>=0?1:-1;return{a:n,b:f.modulo(n+r,e)}};$.getFadeDragLimitIndexes=function(){var t=0;for(var i=0;i<this.slides.length-1;i++){var s=this.slides[i];if(-this.x<s.target){break}t=i}return{a:t,b:t+1}};$.wrapDifference=function(t,i){var s=i-t;if(!this.options.wrapAround){return s}var n=s+this.slideableWidth;var h=s-this.slideableWidth;if(Math.abs(n)<Math.abs(s)){s=n}if(Math.abs(h)<Math.abs(s)){s=h}return s};var st=$._getWrapShiftCells;$._getWrapShiftCells=function(){if(!this.options.fade){st.apply(this,arguments)}};var nt=$.shiftWrapCells;$.shiftWrapCells=function(){if(!this.options.fade){nt.apply(this,arguments)}};const ht=k;const et=":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-width:100vw}:host([ready]){opacity:1}.slideshow{max-height:100%;min-height:inherit;height:inherit;position:relative}.slideshow.not-ready{max-width:98vw}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.not-ready .flickity-container{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.flickity-container.slides-ready{min-height:inherit;max-height:inherit;height:inherit;width:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:rgba(0, 0, 0, 0.9);-webkit-padding-after:35px;padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";const rt=(t,i)=>(t%i+i)%i;const at=class{constructor(s){t(this,s);this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7);this.nanoSlidesReady=i(this,"nanoSlidesReady",7);this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7);this.nanoSlidesChange=i(this,"nanoSlidesChange",7);this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7);this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7);this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7);this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7);this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7);this.nanoSlidesTap=i(this,"nanoSlidesTap",7);this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7);this.flickityReady=false;this.flickity=new Promise((t=>{this.readyflickity=t}));this.parallax=async()=>{const t=await this.flickity;t.cells.forEach(((i,s)=>{const n=i;let h=t.x;const e=n.x+t.slideableWidth*n.shift;const r=this.childrenEles[s];if(t.options.wrapAround&&t.cells.length>1){h=rt(h,t.slideableWidth);h=h-t.slideableWidth}let a=(n.target+h)*-1/3;if(n.shift<0){a=a+Math.abs(e)*1.3333}else if(n.shift>0){a=(n.target+(h+e))*-1/3}r.style.transform="translate3d("+a+"px, 0, 0)"}))};this.handleFullscreen=t=>{this.fullscreen=t;this.nanoSlidesFullscreenChange.emit(t)};this.handleSlideSelect=t=>{this.iCurrentSlide=t;this.nanoSlidesSelect.emit(t)};this.iCurrentSlide=undefined;this.slidesReady=undefined;this.didInit=false;this.options={};this.navbtns=false;this.pager=false;this.fullscreenbtn=false;this.fullscreen=false;this.animation="scroll";this.currentSlide=0;this.autoplay=false;this.ready=false}async optionsChanged(){if(this.flickityReady){const t=await this.getflickity();Object.assign(t.options,this.options);await this.update()}}async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t.hidden=!this.pager}async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t.hidden=!this.fullscreenbtn}async fullscreenChanged(t,i){const s=await this.getflickity();if(this.fullscreen)s.viewFullscreen();else if(typeof i!=="undefined")s.exitFullscreen()}async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),ot(this.host)]);n.forEach((t=>{t.style["left"]=undefined}));if(i==="parallax"){s.off("scroll",this.parallax);n.forEach(((t,i)=>{if(this.childrenEles&&this.childrenEles[i])this.childrenEles[i].style["transform"]=undefined}));this.update()}switch(this.animation){case"fade":this.options={fade:true,percentPosition:true};break;case"parallax":this.options={fade:false,percentPosition:false};s.on("scroll",this.parallax);break;default:this.options={fade:false,percentPosition:true};break}}currentSlideChange(){if(this.currentSlide!==this.iCurrentSlide)this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}async autoPlayChange(){await this.stopAutoplay();if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)this.startAutoplay(this.autoplay)}}async update(){const[t]=await Promise.all([this.getflickity(),ot(this.host)]);this.childrenEles=this.host.querySelectorAll("nano-slide > *");t.reloadCells();t.resize();t.reposition()}async updateAutoHeight(t){const i=document.querySelector(".flickity-viewport");if(i)i.style.transition=t+"ms"}async slideTo(t,i){const s=await this.getflickity();s.select(t,i)}async slideNext(t,i){const s=await this.getflickity();s.next(i,t)}async slidePrev(t,i){const s=await this.getflickity();s.previous(t,i)}async getActiveIndex(){const t=await this.getflickity();return t.selectedIndex}async length(){const t=await this.getflickity();return t.slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){const t=await this.getflickity();return t.selectedIndex===0}async startAutoplay(t){const i=await this.getflickity();if(t)this.options={autoPlay:t};setTimeout((()=>i.playPlayer()))}async stopAutoplay(){const t=await this.getflickity();t.stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t;i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity();setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}destroyflickity(){const t=this.syncflickity;if(t!==undefined){t.destroy();this.flickity=new Promise((t=>{this.readyflickity=t}));this.flickityReady=false;this.syncflickity=undefined;this.ready=false}this.didInit=false}async initflickity(){const t=this.normalizeOptions();await ot(this.host);this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px";this.slidesReady=true;this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container");if(this.flickityEl&&this.flickityEl.classList.contains("flickity-enabled"))this.destroyflickity();setTimeout((()=>{this.flickityEl.style.height="";const i=new ht(this.flickityEl,t);this.flickityReady=true;this.syncflickity=i;this.animationChange();this.navbtnsChanged();this.pagerChanged();this.fullscreenChanged();this.fullscreenBtnChanged();this.readyflickity(i);this.ready=true;if(!window["ResizeObserver"])return;const s=this.resizeO=new ResizeObserver((()=>{i.resize()}));s.observe(this.host)}),100)}normalizeOptions(){const t={cellSelector:"nano-slide",contain:true,prevNextButtons:true,fullscreen:true,accessibility:true,imagesLoaded:true,pageDots:true};if(this.animation==="fade"){t.fade=true}if(this.currentSlide>0){t.initialIndex=this.currentSlide}if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)t.autoPlay=this.autoplay}const i={ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:this.nanoSlidesTransitionEnd.emit,dragStart:this.nanoSlidesDragStart.emit,dragMove:this.nanoSlidesDragMove.emit,dragEnd:this.nanoSlidesDragEnd.emit,staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen};const s=!!this.options&&!!this.options.on?this.options.on:{};const n={on:Object.assign(Object.assign({},s),i)};return Object.assign(Object.assign(Object.assign({},t),n),this.options)}componentDidLoad(){if(typeof window!=="undefined"&&window.MutationObserver){const t=this.mutationO=new MutationObserver((t=>{if(t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()==="nano-slide"&&this.flickityReady){this.update()}}));t.observe(this.host,{childList:true,subtree:true})}}componentWillLoad(){this.nanoSlidesDidLoad.emit();if(!this.didInit){this.didInit=true;this.initflickity()}}disconnectedCallback(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.resizeO)this.resizeO.disconnect();this.destroyflickity()}render(){return s(n,null,s("div",{class:{slideshow:true,ready:this.ready,"not-ready":!this.ready},part:"base"},s("div",{ref:t=>this.flickityEl=t,class:{"flickity-container":true,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady},part:"slide-container"},s("slot",null)),s("div",{class:"ui-extras"},s("slot",{name:"ui"}))))}get host(){return h(this)}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};const ot=t=>{const i=Array.from(t.querySelectorAll("nano-slide"));let s=i.filter((t=>!t.ready));if(!s.length)return Promise.resolve(i);return new Promise((n=>{const h=e=>{s=s.filter((t=>t!==e.target));if(!s.length){n(i);t.removeEventListener("nanoSlideReady",h)}};t.addEventListener("nanoSlideReady",h);t.addEventListener("nano-slide-ready",h)}))};at.style=et;export{at as nano_slides};
23
+ //# sourceMappingURL=p-7c4ac519.entry.js.map