@nanoporetech-digital/components 8.12.1 → 8.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{fade-B_RYQMUR.js → fade-CaQNh008.js} +1 -1
- package/dist/cjs/{fullscreen-DRJ-K03z.js → fullscreen-CYmWUVa6.js} +1 -1
- package/dist/cjs/{lazyload-CQY_vK8q.js → lazyload-CDp0tl8u.js} +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +1 -1
- package/dist/cjs/{nano-slides-CXg2hNth.js → nano-slides-lMA8e6L6.js} +4 -4
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/global-nav/global-nav.css +1 -1
- package/dist/collection/components/slides/slides.css +0 -1
- package/dist/components/nano-global-nav.js +1 -1
- package/dist/components/slides.js +1 -1
- package/dist/esm/{fade-B-zhtzv8.js → fade-Brdw1NLw.js} +1 -1
- package/dist/esm/{fullscreen-DXVJLaN3.js → fullscreen-DeZTkFNA.js} +1 -1
- package/dist/esm/{lazyload-DUQP_u2u.js → lazyload-D68gi5uV.js} +1 -1
- package/dist/esm/nano-global-nav.entry.js +1 -1
- package/dist/esm/{nano-slides-BygteMbF.js → nano-slides-DKkSSmWQ.js} +4 -4
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/nano-components/{fade-B-zhtzv8.js → fade-Brdw1NLw.js} +1 -1
- package/dist/nano-components/{fullscreen-DXVJLaN3.js → fullscreen-DeZTkFNA.js} +1 -1
- package/dist/nano-components/{lazyload-DUQP_u2u.js → lazyload-D68gi5uV.js} +1 -1
- package/dist/nano-components/nano-components.css +4 -4
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/{nano-slides-BygteMbF.js → nano-slides-DKkSSmWQ.js} +3 -3
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/core.css +1 -1
- package/dist/style/core.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/docs-json.json +2 -2
- package/hydrate/index.js +2 -2
- package/hydrate/index.mjs +2 -2
- package/package.json +2 -2
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{6SyqsxUA → 8qhywLzS}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{g as n,r as e,c as a,a as o,k as t}from"./index-BM3Om9WE.js";import{a as i}from"./algoliasearch-lite.esm.browser-BTIloVU8.js";import{h as r}from"./renderer-DpNDfhNy.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-Ds52s5za.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-BuucpKxf.js"):this.myAccountData=await import("./local-logged-in-B3A7tw10.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}async triggerResize(){this.shouldResize=!0,this.breakpoint=0}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=i(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults?.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){if(this.searchResults=null,!this.algoliaClient)return;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e?.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch())?.results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&this.searchInput&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&requestAnimationFrame((()=>this.searchBarShown=!1))};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return r("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},r("div",{class:"gn__user-panel-head",slot:"label"},r("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&r("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),r("div",null,this.myAccountUser.name,r("br",null),this.myAccountUser.job_title,", ",this.myAccountUser.company)),r("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>r("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),r("div",{class:"gn__user-panel-foot"},r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>r("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>r("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(r("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults?.results.forEach((e=>{e.hits.length&&n.push(r("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',r("strong",null,this._searchValue),'" in ',r("strong",null,e.indexName)))})),n.unshift(r("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" in'," ",r("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return r(o,{key:"3964e8a3aab86d4252876816ca934c69e75da22b",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},r("div",{key:"fc2f728b3c4412913ffc2d18c07d057bf6e0bf87",class:{gn:!0,"gn__search-open":this.searchBarShown}},r("nano-drawer",{key:"9a2c9109327ff9cd4eb2553df7e93571a29aa237",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},r("div",{key:"649c672f237ce2145eda6c8988744f6709835615",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),r("nav",{key:"d002c07a9eb1cdcc4e188e5b146ce8a11257ab98",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",r("slot",{key:"b6bf65e8ed92636f1eba4b376ecb2fd617bcd67f",name:"overflow"}))),r("div",{key:"b7a5e9d074b63f1841d3946d0166389c73161f25",class:"gn__menu-bar-wrapper"},r("div",{key:"6b4d27a83ed4cbf3a62c0b924b08c887e415904a",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},r("nav",{key:"64acb1e7f44c8931bd928e0c6be01eaf83cf47ff",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&r("nano-icon-button",{key:"49dc9cf7e3d75dee49d7a50defde7a260c33f867",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),r("slot",{key:"ffb1b38b1e7682ab2fe26d44a0c9686306634197",name:"logo"},r("a",{key:"a8427d3042b4871027a08b5ea993c57659ab12c0",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},r("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&r("div",{key:"51d372b7aaa316b4d1ddc945bf0b3c5cdba579af",class:"gn__main-menu-links"},n.mainMenu.tpl()),r("div",{key:"7af369c343889985cfda4d596576e6ad0913f34c",class:"gn__main-menu-actions"},!this.myAccountData||!!this.searchIndices.length&&r("nano-dropdown",{key:"f122c285ba5966efe5fdb5698ab759fa89eb9282",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},r("nano-icon-button",{key:"8fe139d799eeb34b1ff129808338ce8d6304d262",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),r("form",{key:"95d27edc95e00c96ce9751e9501429e0062bcab6",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&r("nano-select",{key:"109461b01a0cbd6ee5c0d0120d93802f8b4a2642",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>r("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),r("nano-input",{key:"81d5c3531557500daebe167defe8b068909ffe9f",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,showInlineError:!1,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},r("nano-icon",{key:"4c3dc50a07877f4c10bbebe2b91d5cc2a6924aee",slot:"end",name:"light/magnifying-glass"}),r("nano-datalist",{key:"ab9037d4d2c5dc5bca7cdb21ced7a50a5ea181b1",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&r("div",{key:"794cbd8cc6fd876e931457c93caad690be445400",slot:"no-result",class:"gn__search-loading"},r("nano-spinner",{key:"de620a03a8bba906542c10e46d1529f1b6a63327"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>r("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},r("span",{innerHTML:this.autocompleteSnippet(n)})))),r("nano-option",{key:"35962d666c2f47c4952f1a06324db3db186a21e1",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),r("div",{key:"930f8a1adb7566478ec7e9e96b08ecdefecfd4b8",class:"gn__cart"},r("nano-icon-button",{key:"76f447b14988391240284c66d1e6e347c8873067",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&r("nano-badge",{key:"389552b85553b498ce5b799dc182f73933dadc59",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?r("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},r("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},r("nano-icon",{name:"light/user"}),r("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),r("nano-global-search-results",{key:"38b900fdb5dbcd1d24642c8862c320c473de6dc3",part:"site-search-results"},r("div",{key:"b5b824f4a54aa2989ca0a359f7c7b74ae5e6d777",class:"gn__site",part:"site-wrapper"},r("slot",{key:"02dd2c08252ba31c972fffe9c956e7ead76f61ef"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent;--font-size:var(--nano-font-size-2xs);--padding-v:0.5em}.gn__menu-bar-wrapper{z-index:var(--nano-z-index-menubar);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip;background-color:var(--main-menu-bar-bg-color)}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
|
4
|
+
import{g as n,r as e,c as a,a as o,k as t}from"./index-BM3Om9WE.js";import{a as i}from"./algoliasearch-lite.esm.browser-BTIloVU8.js";import{h as r}from"./renderer-DpNDfhNy.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-Ds52s5za.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-BuucpKxf.js"):this.myAccountData=await import("./local-logged-in-B3A7tw10.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}async triggerResize(){this.shouldResize=!0,this.breakpoint=0}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=i(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults?.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){if(this.searchResults=null,!this.algoliaClient)return;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e?.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch())?.results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&this.searchInput&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&requestAnimationFrame((()=>this.searchBarShown=!1))};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return r("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},r("div",{class:"gn__user-panel-head",slot:"label"},r("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&r("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),r("div",null,this.myAccountUser.name,r("br",null),this.myAccountUser.job_title,", ",this.myAccountUser.company)),r("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>r("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),r("div",{class:"gn__user-panel-foot"},r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>r("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>r("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(r("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults?.results.forEach((e=>{e.hits.length&&n.push(r("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',r("strong",null,this._searchValue),'" in ',r("strong",null,e.indexName)))})),n.unshift(r("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" in'," ",r("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return r(o,{key:"3964e8a3aab86d4252876816ca934c69e75da22b",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},r("div",{key:"fc2f728b3c4412913ffc2d18c07d057bf6e0bf87",class:{gn:!0,"gn__search-open":this.searchBarShown}},r("nano-drawer",{key:"9a2c9109327ff9cd4eb2553df7e93571a29aa237",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},r("div",{key:"649c672f237ce2145eda6c8988744f6709835615",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),r("nav",{key:"d002c07a9eb1cdcc4e188e5b146ce8a11257ab98",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",r("slot",{key:"b6bf65e8ed92636f1eba4b376ecb2fd617bcd67f",name:"overflow"}))),r("div",{key:"b7a5e9d074b63f1841d3946d0166389c73161f25",class:"gn__menu-bar-wrapper"},r("div",{key:"6b4d27a83ed4cbf3a62c0b924b08c887e415904a",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},r("nav",{key:"64acb1e7f44c8931bd928e0c6be01eaf83cf47ff",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&r("nano-icon-button",{key:"49dc9cf7e3d75dee49d7a50defde7a260c33f867",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),r("slot",{key:"ffb1b38b1e7682ab2fe26d44a0c9686306634197",name:"logo"},r("a",{key:"a8427d3042b4871027a08b5ea993c57659ab12c0",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},r("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&r("div",{key:"51d372b7aaa316b4d1ddc945bf0b3c5cdba579af",class:"gn__main-menu-links"},n.mainMenu.tpl()),r("div",{key:"7af369c343889985cfda4d596576e6ad0913f34c",class:"gn__main-menu-actions"},!this.myAccountData||!!this.searchIndices.length&&r("nano-dropdown",{key:"f122c285ba5966efe5fdb5698ab759fa89eb9282",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},r("nano-icon-button",{key:"8fe139d799eeb34b1ff129808338ce8d6304d262",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),r("form",{key:"95d27edc95e00c96ce9751e9501429e0062bcab6",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&r("nano-select",{key:"109461b01a0cbd6ee5c0d0120d93802f8b4a2642",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>r("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),r("nano-input",{key:"81d5c3531557500daebe167defe8b068909ffe9f",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,showInlineError:!1,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},r("nano-icon",{key:"4c3dc50a07877f4c10bbebe2b91d5cc2a6924aee",slot:"end",name:"light/magnifying-glass"}),r("nano-datalist",{key:"ab9037d4d2c5dc5bca7cdb21ced7a50a5ea181b1",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&r("div",{key:"794cbd8cc6fd876e931457c93caad690be445400",slot:"no-result",class:"gn__search-loading"},r("nano-spinner",{key:"de620a03a8bba906542c10e46d1529f1b6a63327"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>r("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},r("span",{innerHTML:this.autocompleteSnippet(n)})))),r("nano-option",{key:"35962d666c2f47c4952f1a06324db3db186a21e1",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),r("div",{key:"930f8a1adb7566478ec7e9e96b08ecdefecfd4b8",class:"gn__cart"},r("nano-icon-button",{key:"76f447b14988391240284c66d1e6e347c8873067",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&r("nano-badge",{key:"389552b85553b498ce5b799dc182f73933dadc59",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?r("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},r("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},r("nano-icon",{name:"light/user"}),r("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),r("nano-global-search-results",{key:"38b900fdb5dbcd1d24642c8862c320c473de6dc3",part:"site-search-results"},r("div",{key:"b5b824f4a54aa2989ca0a359f7c7b74ae5e6d777",class:"gn__site",part:"site-wrapper"},r("slot",{key:"02dd2c08252ba31c972fffe9c956e7ead76f61ef"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent;--font-size:var(--nano-font-size-2xs);--padding-v:0.5em}.gn__menu-bar-wrapper{z-index:calc(var(--nano-z-index-menubar) + 1);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip;background-color:var(--main-menu-bar-bg-color)}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
|
@@ -7,16 +7,16 @@ import{r as t,c as i,g as s,e as n,d as e,a as o}from"./index-BM3Om9WE.js";impor
|
|
7
7
|
* measure size of elements
|
8
8
|
* MIT license
|
9
9
|
*/
|
10
|
-
function l(t){const i=parseFloat(t);return-1==t?.indexOf("%")&&!isNaN(i)&&i}a.on=function(t,i){if(!t||!i)return;const s=this._events=this._events||{},n=s[t]=s[t]||[];return-1==n.indexOf(i)&&n.push(i),this},a.once=function(t,i){if(!t||!i)return;this.on(t,i);const s=this._onceEvents=this._onceEvents||{};return(s[t]=s[t]||{})[i]=!0,this},a.off=function(t,i){const s=this._events&&this._events[t];if(!s||!s.length)return;const n=s.indexOf(i);return-1!=n&&s.splice(n,1),this},a.emitEvent=function(t,i){let s=this._events&&this._events[t];if(!s||!s.length)return;s=s.slice(0),i=i||[];const n=this._onceEvents&&this._onceEvents[t];for(let e=0;e<s.length;e++){const o=s[e];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i)}return this},a.allOff=function(){delete this._events,delete this._onceEvents};const u="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=f.length;function p(t){const i=getComputedStyle(t);return i||u("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}let y,b=!1;function g(t){if(function(){if(b)return;b=!0;const 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";const i=document.body||document.documentElement;i.appendChild(t);const s=p(t);y=200==Math.round(l(s.width)),g.isBoxSizeOuter=y,i.removeChild(t)}(),"string"==typeof t&&(t=document.querySelector(t)),!t||"object"!=typeof t||!t.nodeType)return;const i=p(t);if("none"==i.display)return function(){const t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(let i=0;i<d;i++)t[f[i]]=0;return t}();const s={};s.width=t.offsetWidth,s.height=t.offsetHeight;const n=s.isBorderBox="border-box"==i.boxSizing;for(let t=0;t<d;t++){const n=f[t],e=parseFloat(i[n]);s[n]=isNaN(e)?0:e}const e=s.paddingLeft+s.paddingRight,o=s.paddingTop+s.paddingBottom,h=s.marginLeft+s.marginRight,c=s.marginTop+s.marginBottom,r=s.borderLeftWidth+s.borderRightWidth,a=s.borderTopWidth+s.borderBottomWidth,u=n&&y,m=l(i.width);!1!==m&&(s.width=m+(u?0:e+r));const v=l(i.height);return!1!==v&&(s.height=v+(u?0:o+a)),s.innerWidth=s.width-(e+r),s.innerHeight=s.height-(o+a),s.outerWidth=s.width+h,s.outerHeight=s.height+c,s}const m={extend:function(t,i){for(const s in i)t[s]=i[s];return t},docReady:function(t){const i=document.readyState;"complete"==i||"interactive"==i?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()},modulo:function(t,i){return(t%i+i)%i}},v=Array.prototype.slice;m.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?v.call(t):[t]},m.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if((t=t.parentElement).matches(i))return t},m.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},m.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},m.filterFindElements=function(t,i){t=m.makeArray(t);const s=[];return t.forEach((function(t){if(!(t instanceof HTMLElement))return;if(!i)return void s.push(t);t.matches(i)&&s.push(t);const n=t.querySelectorAll(i);for(let t=0;t<n.length;t++)s.push(n[t])})),s},m.debounceMethod=function(t,i,s){s=s||100;const n=t.prototype[i],e=i+"Timeout";t.prototype[i]=function(...t){clearTimeout(this[e]);const i=this;this[e]=setTimeout((function(){n.apply(i,t),delete i[e]}),s)}};const k=window.console;function w(t,i){this.element=t,this.parent=i,this.create()}m.htmlInit=function(t,i){m.docReady((function(){const s=m.toDashed(i),n="data-"+s,e=document.querySelectorAll("["+n+"]"),o=document.querySelectorAll(".js-"+s),h=m.makeArray(e).concat(m.makeArray(o)),c=n+"-options";h.forEach((function(i){const s=i.getAttribute(n)||i.getAttribute(c);let e;try{e=s&&JSON.parse(s)}catch(t){return void(k&&k.error("Error parsing "+n+" on "+i.className+": "+t))}new t(i,e)}))}))};const x=w.prototype;function S(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}x.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")}))},x.destroy=function(){this.unselect(),this.element.style.position="",this.element.style[this.parent.originSide]=""},x.getSize=function(){this.size=g(this.element)},x.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},x.updateTarget=x.setDefaultTarget=function(){this.target=this.x+this.size["left"==this.parent.originSide?"marginLeft":"marginRight"]+this.size.width*this.parent.cellAlign},x.renderPosition=function(t){this.element.style[this.parent.originSide]=this.parent.getPositionValue(t)},x.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))},x.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")}))},x.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},x.remove=function(){this.element.parentNode.removeChild(this.element)};const z=S.prototype;z.addCell=function(t){this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length&&(this.x=t.x,this.firstMargin=t.size[this.isOriginLeft?"marginLeft":"marginRight"])},z.updateTarget=function(){const t=this.isOriginLeft?"marginRight":"marginLeft",i=this.getLastCell();this.target=this.x+this.firstMargin+(this.outerWidth-(this.firstMargin+(i?i.size[t]:0)))*this.parent.cellAlign},z.getLastCell=function(){return this.cells[this.cells.length-1]},z.select=function(){this.cells.forEach((function(t){t.select()}))},z.unselect=function(){this.cells.forEach((function(t){t.unselect()}))},z.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const C={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();const t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){const t=this;requestAnimationFrame((function(){t.animate()}))}},positionSlider:function(){let t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=m.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t){t+=this.cursorPosition;const i=this.getPositionValue(t=this.options.rightToLeft?-t:t);this.slider.style.transform="translate3d("+i+",0,0)"},dispatchScrollEvent:function(){const t=this.slides[0];if(!t)return;const i=-this.x-t.target;this.dispatchEvent("scroll",null,[i/this.slidesWidth,i])},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){this._shiftCells(this.beforeShiftCells,this.cursorPosition+t,-1),this._shiftCells(this.afterShiftCells,this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition),1)},_shiftCells:function(t,i,s){for(let n=0;n<t.length;n++){const e=t[n];e.wrapShift(i>0?s:0),i-=e.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(let i=0;i<t.length;i++)t[i].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){this.isDraggable&&this.isPointerDown&&this.applyForce(this.dragX-this.x-this.velocity)},applySelectedAttraction:function(){this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length||this.applyForce((-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction)}},M=window.getComputedStyle,T=window.console;function A(t,i){for(t=m.makeArray(t);t.length;)i.appendChild(t.shift())}let E=0;const P={};function D(t,i){const s=m.getQueryElement(t);if(s){if(this.element=s,this.element.flickityGUID){const t=P[this.element.flickityGUID];if(!P[this.element.flickityGUID])return;return t.option(i),t}this.options=m.extend({},this.constructor.defaults),this.option(i),this._create()}else T&&T.error("Bad element for Flickity: "+(s||t))}D.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},D.createMethods=[];const F=D.prototype;m.extend(F,r.prototype),F._create=function(){const t=this.guid=++E;this.element.flickityGUID=t,P[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.setAttribute("part","slide-viewport"),this._createSlider(),(this.options.resize||this.options.watchCSS)&&window.addEventListener("resize",this);for(const t in this.options.on)this.on(t,this.options.on[t]);D.createMethods.forEach((function(t){this[t]()}),this),this.options.watchCSS?this.watchCSS():this.activate()},F.option=function(t){m.extend(this.options,t)},F.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),A(this.element.children,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},F._createSlider=function(){const t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},F._filterFindCellElements=function(t){return m.filterFindElements(t,this.options.cellSelector)},F.reloadCells=function(){let t=this.slider.children;if(this.slider.getRootNode().host){t=[];for(const i of this.slider.getRootNode().host.children)"assignedElements"in i?t=[...t,...i.assignedElements()]:t.push(i)}this.cells=this._makeCells(t),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},F._makeCells=function(t){return this._filterFindCellElements(t).map((function(t){return new w(t,this)}),this)},F.getLastCell=function(){return this.cells[this.cells.length-1]},F.getLastSlide=function(){return this.slides[this.slides.length-1]},F.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},F._positionCells=function(t){this.maxCellHeight=(t=t||0)&&this.maxCellHeight||0;let i=0;if(t>0){const s=this.cells[t-1];i=s.x+s.size.outerWidth}const s=this.cells.length;for(let n=t;n<s;n++){const t=this.cells[n];t.setPosition(i),i+=t.size.outerWidth,this.maxCellHeight=Math.max(t.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i,this.updateSlides(),this._containSlides(),this.slidesWidth=s?this.getLastSlide().target-this.slides[0].target:0},F._sizeCells=function(t){t.forEach((function(t){t.getSize()}))},F.updateSlides=function(){if(this.slides=[],!this.cells.length)return;let t=new S(this);this.slides.push(t);const i="left"==this.originSide?"marginRight":"marginLeft",s=this._getCanCellFit();this.cells.forEach((function(n,e){t.cells.length?(s.call(this,e,t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[i]))||(t.updateTarget(),t=new S(this),this.slides.push(t)),t.addCell(n)):t.addCell(n)}),this),t.updateTarget(),this.updateSelectedSlide()},F._getCanCellFit=function(){const t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){const i=parseInt(t,10);return function(t){return t%i!=0}}const i="string"==typeof t&&t.match(/^(\d+)%$/),s=i?parseInt(i[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*s}},F._init=F.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},F.getSize=function(){this.size=g(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};const L={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};function R(){}F.setCellAlign=function(){const t=L[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},F.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=(this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight)+"px")},F._getWrapShiftCells=function(){if(!this.options.wrapAround)return;this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);let t=this.cursorPosition;this.beforeShiftCells=this._getGapCells(t,this.cells.length-1,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)},F._getGapCells=function(t,i,s){const n=[];for(;t>0;){const e=this.cells[i];if(!e)break;n.push(e),i+=s,t-=e.size.outerWidth}return n},F._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length)return;const t=this.options.rightToLeft,i=t?"marginRight":"marginLeft",s=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[s],e=n<this.size.innerWidth,o=this.cursorPosition+this.cells[0].size[i],h=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){e?t.target=n*this.cellAlign:(t.target=Math.max(t.target,o),t.target=Math.min(t.target,h))}),this)},F.dispatchEvent=function(t,i,s){const n=i?[i].concat(s):s;this.emitEvent(t,n)},F.select=function(t,i,s){if(!this.isActive)return;if(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||i)&&(t=m.modulo(t,this.slides.length)),!this.slides[t])return;const n=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),s?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=n&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")},F._wrapSelect=function(t){const i=this.slides.length;if(!(this.options.wrapAround&&i>1))return t;const s=m.modulo(t,i),n=Math.abs(s-this.selectedIndex),e=Math.abs(s+i-this.selectedIndex),o=Math.abs(s-i-this.selectedIndex);!this.isDragSelect&&e<n?t+=i:!this.isDragSelect&&o<n&&(t-=i),t<0?this.x-=this.slideableWidth:t>=i&&(this.x+=this.slideableWidth)},F.previous=function(t,i){this.select(this.selectedIndex-1,t,i)},F.next=function(t,i){this.select(this.selectedIndex+1,t,i)},F.updateSelectedSlide=function(){const t=this.slides[this.selectedIndex];t&&(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])},F.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},F.selectInitialIndex=function(){const t=this.options.initialIndex;if(this.isInitActivated)return void this.select(this.selectedIndex,!1,!0);if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);let i=0;t&&this.slides[t]&&(i=t),this.select(i,!1,!0)},F.selectCell=function(t,i,s){const n=this.queryCell(t);if(!n)return;const e=this.getCellSlideIndex(n);this.select(e,i,s)},F.getCellSlideIndex=function(t){for(let i=0;i<this.slides.length;i++)if(-1!=this.slides[i].cells.indexOf(t))return i},F.getCell=function(t){for(let i=0;i<this.cells.length;i++){const s=this.cells[i];if(s.element==t)return s}},F.getCells=function(t){t=m.makeArray(t);const i=[];return t.forEach((function(t){const s=this.getCell(t);s&&i.push(s)}),this),i},F.getCellElements=function(){return this.cells.map((function(t){return t.element}))},F.getParentCell=function(t){return this.getCell(t)||(t=m.getParent(t,".flickity-slider > *"),this.getCell(t))},F.getAdjacentCellElements=function(t,i){if(!t)return this.selectedSlide.getCellElements();i=void 0===i?this.selectedIndex:i;const s=this.slides.length;if(1+2*t>=s)return this.getCellElements();let n=[];for(let e=i-t;e<=i+t;e++){const t=this.options.wrapAround?m.modulo(e,s):e,i=this.slides[t];i&&(n=n.concat(i.getCellElements()))}return n},F.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},F.uiChange=function(){this.emitEvent("uiChange")},F.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},F.onresize=function(){this.watchCSS(),this.resize()},m.debounceMethod(D,"onresize",150),F.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=m.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize"),this.selectCell(this.selectedElements&&this.selectedElements[0],!1,!0))},F.watchCSS=function(){this.options.watchCSS&&(-1!=M(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},F.onkeydown=function(t){const i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i)return;const s=D.keyboardHandlers[t.keyCode];s&&s.call(this)},D.keyboardHandlers={37:function(){const t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){const t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},F.focus=function(){const t=window.pageYOffset;this.element.focus({preventScroll:!0}),window.pageYOffset!=t&&window.scrollTo(window.pageXOffset,t)},F.deactivate=function(){this.isActive&&(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),A(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},F.destroy=function(){this.deactivate(),window.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),delete this.element.flickityGUID,delete P[this.guid]},m.extend(F,C),D.data=function(t){const i=(t=m.getQueryElement(t))&&t.flickityGUID;return i&&P[i]},m.htmlInit(D,"flickity"),D.Cell=w,D.Slide=S;const O=R.prototype=Object.create(r.prototype);O.bindStartEvent=function(t){this._bindStartEvent(t,!0)},O.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},O._bindStartEvent=function(t,i){i=void 0===i||i;let s="mousedown";"ontouchstart"in window?s="touchstart":window.PointerEvent&&(s="pointerdown"),t[i?"addEventListener":"removeEventListener"](s,this)},O.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},O.getTouch=function(t){for(let i=0;i<t.length;i++){const s=t[i];if(s.identifier==this.pointerIdentifier)return s}},O.onmousedown=function(t){const i=t.button;i&&0!==i&&1!==i||this._pointerDown(t,t)},O.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},O.onpointerdown=function(t){this._pointerDown(t,t)},O._pointerDown=function(t,i){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i))},O.pointerDown=function(t,i){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i])};const N={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};
|
10
|
+
function l(t){const i=parseFloat(t);return-1==t?.indexOf("%")&&!isNaN(i)&&i}a.on=function(t,i){if(!t||!i)return;const s=this._events=this._events||{},n=s[t]=s[t]||[];return-1==n.indexOf(i)&&n.push(i),this},a.once=function(t,i){if(!t||!i)return;this.on(t,i);const s=this._onceEvents=this._onceEvents||{};return(s[t]=s[t]||{})[i]=!0,this},a.off=function(t,i){const s=this._events&&this._events[t];if(!s||!s.length)return;const n=s.indexOf(i);return-1!=n&&s.splice(n,1),this},a.emitEvent=function(t,i){let s=this._events&&this._events[t];if(!s||!s.length)return;s=s.slice(0),i=i||[];const n=this._onceEvents&&this._onceEvents[t];for(let e=0;e<s.length;e++){const o=s[e];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i)}return this},a.allOff=function(){delete this._events,delete this._onceEvents};const u="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=f.length;function p(t){const i=getComputedStyle(t);return i||u("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}let y,b=!1;function g(t){if(function(){if(b)return;b=!0;const 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";const i=document.body||document.documentElement;i.appendChild(t);const s=p(t);y=200==Math.round(l(s.width)),g.isBoxSizeOuter=y,i.removeChild(t)}(),"string"==typeof t&&(t=document.querySelector(t)),!t||"object"!=typeof t||!t.nodeType)return;const i=p(t);if("none"==i.display)return function(){const t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(let i=0;i<d;i++)t[f[i]]=0;return t}();const s={};s.width=t.offsetWidth,s.height=t.offsetHeight;const n=s.isBorderBox="border-box"==i.boxSizing;for(let t=0;t<d;t++){const n=f[t],e=parseFloat(i[n]);s[n]=isNaN(e)?0:e}const e=s.paddingLeft+s.paddingRight,o=s.paddingTop+s.paddingBottom,h=s.marginLeft+s.marginRight,c=s.marginTop+s.marginBottom,r=s.borderLeftWidth+s.borderRightWidth,a=s.borderTopWidth+s.borderBottomWidth,u=n&&y,m=l(i.width);!1!==m&&(s.width=m+(u?0:e+r));const v=l(i.height);return!1!==v&&(s.height=v+(u?0:o+a)),s.innerWidth=s.width-(e+r),s.innerHeight=s.height-(o+a),s.outerWidth=s.width+h,s.outerHeight=s.height+c,s}const m={extend:function(t,i){for(const s in i)t[s]=i[s];return t},docReady:function(t){const i=document.readyState;"complete"==i||"interactive"==i?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()},modulo:function(t,i){return(t%i+i)%i}},v=Array.prototype.slice;m.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?v.call(t):[t]},m.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if((t=t.parentElement).matches(i))return t},m.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},m.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},m.filterFindElements=function(t,i){t=m.makeArray(t);const s=[];return t.forEach((function(t){if(!(t instanceof HTMLElement))return;if(!i)return void s.push(t);t.matches(i)&&s.push(t);const n=t.querySelectorAll(i);for(let t=0;t<n.length;t++)s.push(n[t])})),s},m.debounceMethod=function(t,i,s){s=s||100;const n=t.prototype[i],e=i+"Timeout";t.prototype[i]=function(...t){clearTimeout(this[e]);const i=this;this[e]=setTimeout((function(){n.apply(i,t),delete i[e]}),s)}};const k=window.console;function w(t,i){this.element=t,this.parent=i,this.create()}m.htmlInit=function(t,i){m.docReady((function(){const s=m.toDashed(i),n="data-"+s,e=document.querySelectorAll("["+n+"]"),o=document.querySelectorAll(".js-"+s),h=m.makeArray(e).concat(m.makeArray(o)),c=n+"-options";h.forEach((function(i){const s=i.getAttribute(n)||i.getAttribute(c);let e;try{e=s&&JSON.parse(s)}catch(t){return void(k&&k.error("Error parsing "+n+" on "+i.className+": "+t))}new t(i,e)}))}))};const x=w.prototype;function S(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}x.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")}))},x.destroy=function(){this.unselect(),this.element.style.position="",this.element.style[this.parent.originSide]=""},x.getSize=function(){this.size=g(this.element)},x.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},x.updateTarget=x.setDefaultTarget=function(){this.target=this.x+this.size["left"==this.parent.originSide?"marginLeft":"marginRight"]+this.size.width*this.parent.cellAlign},x.renderPosition=function(t){this.element.style[this.parent.originSide]=this.parent.getPositionValue(t)},x.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))},x.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")}))},x.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},x.remove=function(){this.element.parentNode.removeChild(this.element)};const z=S.prototype;z.addCell=function(t){this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length&&(this.x=t.x,this.firstMargin=t.size[this.isOriginLeft?"marginLeft":"marginRight"])},z.updateTarget=function(){const t=this.isOriginLeft?"marginRight":"marginLeft",i=this.getLastCell();this.target=this.x+this.firstMargin+(this.outerWidth-(this.firstMargin+(i?i.size[t]:0)))*this.parent.cellAlign},z.getLastCell=function(){return this.cells[this.cells.length-1]},z.select=function(){this.cells.forEach((function(t){t.select()}))},z.unselect=function(){this.cells.forEach((function(t){t.unselect()}))},z.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const C={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();const t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){const t=this;requestAnimationFrame((function(){t.animate()}))}},positionSlider:function(){let t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=m.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t){t+=this.cursorPosition;const i=this.getPositionValue(t=this.options.rightToLeft?-t:t);this.slider.style.transform="translate3d("+i+",0,0)"},dispatchScrollEvent:function(){const t=this.slides[0];if(!t)return;const i=-this.x-t.target;this.dispatchEvent("scroll",null,[i/this.slidesWidth,i])},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){this._shiftCells(this.beforeShiftCells,this.cursorPosition+t,-1),this._shiftCells(this.afterShiftCells,this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition),1)},_shiftCells:function(t,i,s){for(let n=0;n<t.length;n++){const e=t[n];e.wrapShift(i>0?s:0),i-=e.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(let i=0;i<t.length;i++)t[i].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){this.isDraggable&&this.isPointerDown&&this.applyForce(this.dragX-this.x-this.velocity)},applySelectedAttraction:function(){this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length||this.applyForce((-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction)}},M=window.getComputedStyle,T=window.console;function A(t,i){for(t=m.makeArray(t);t.length;)i.appendChild(t.shift())}let E=0;const P={};function D(t,i){const s=m.getQueryElement(t);if(s){if(this.element=s,this.element.flickityGUID){const t=P[this.element.flickityGUID];if(!P[this.element.flickityGUID])return;return t.option(i),t}this.options=m.extend({},this.constructor.defaults),this.option(i),this._create()}else T&&T.error("Bad element for Flickity: "+(s||t))}D.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},D.createMethods=[];const F=D.prototype;m.extend(F,r.prototype),F._create=function(){const t=this.guid=++E;this.element.flickityGUID=t,P[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.setAttribute("part","slide-viewport"),this._createSlider(),(this.options.resize||this.options.watchCSS)&&window.addEventListener("resize",this);for(const t in this.options.on)this.on(t,this.options.on[t]);D.createMethods.forEach((function(t){this[t]()}),this),this.options.watchCSS?this.watchCSS():this.activate()},F.option=function(t){m.extend(this.options,t)},F.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),A(this.element.children,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},F._createSlider=function(){const t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},F._filterFindCellElements=function(t){return m.filterFindElements(t,this.options.cellSelector)},F.reloadCells=function(){let t=this.slider.children;if(this.slider.getRootNode().host){t=[];for(const i of this.slider.getRootNode().host.children)"assignedElements"in i?t=[...t,...i.assignedElements()]:t.push(i)}this.cells=this._makeCells(t),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},F._makeCells=function(t){return this._filterFindCellElements(t).map((function(t){return new w(t,this)}),this)},F.getLastCell=function(){return this.cells[this.cells.length-1]},F.getLastSlide=function(){return this.slides[this.slides.length-1]},F.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},F._positionCells=function(t){this.maxCellHeight=(t=t||0)&&this.maxCellHeight||0;let i=0;if(t>0){const s=this.cells[t-1];i=s.x+s.size.outerWidth}const s=this.cells.length;for(let n=t;n<s;n++){const t=this.cells[n];t.setPosition(i),i+=t.size.outerWidth,this.maxCellHeight=Math.max(t.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i,this.updateSlides(),this._containSlides(),this.slidesWidth=s?this.getLastSlide().target-this.slides[0].target:0},F._sizeCells=function(t){t.forEach((function(t){t.getSize()}))},F.updateSlides=function(){if(this.slides=[],!this.cells.length)return;let t=new S(this);this.slides.push(t);const i="left"==this.originSide?"marginRight":"marginLeft",s=this._getCanCellFit();this.cells.forEach((function(n,e){t.cells.length?(s.call(this,e,t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[i]))||(t.updateTarget(),t=new S(this),this.slides.push(t)),t.addCell(n)):t.addCell(n)}),this),t.updateTarget(),this.updateSelectedSlide()},F._getCanCellFit=function(){const t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){const i=parseInt(t,10);return function(t){return t%i!=0}}const i="string"==typeof t&&t.match(/^(\d+)%$/),s=i?parseInt(i[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*s}},F._init=F.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},F.getSize=function(){this.size=g(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};const L={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};function R(){}F.setCellAlign=function(){const t=L[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},F.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=(this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight)+"px")},F._getWrapShiftCells=function(){if(!this.options.wrapAround)return;this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);let t=this.cursorPosition;this.beforeShiftCells=this._getGapCells(t,this.cells.length-1,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)},F._getGapCells=function(t,i,s){const n=[];for(;t>0;){const e=this.cells[i];if(!e)break;n.push(e),i+=s,t-=e.size.outerWidth}return n},F._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length)return;const t=this.options.rightToLeft,i=t?"marginRight":"marginLeft",s=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[s],e=n<this.size.innerWidth,o=this.cursorPosition+this.cells[0].size[i],h=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){e?t.target=n*this.cellAlign:(t.target=Math.max(t.target,o),t.target=Math.min(t.target,h))}),this)},F.dispatchEvent=function(t,i,s){const n=i?[i].concat(s):s;this.emitEvent(t,n)},F.select=function(t,i,s){if(!this.isActive)return;if(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||i)&&(t=m.modulo(t,this.slides.length)),!this.slides[t])return;const n=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),s?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=n&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")},F._wrapSelect=function(t){const i=this.slides.length;if(!(this.options.wrapAround&&i>1))return t;const s=m.modulo(t,i),n=Math.abs(s-this.selectedIndex),e=Math.abs(s+i-this.selectedIndex),o=Math.abs(s-i-this.selectedIndex);!this.isDragSelect&&e<n?t+=i:!this.isDragSelect&&o<n&&(t-=i),t<0?this.x-=this.slideableWidth:t>=i&&(this.x+=this.slideableWidth)},F.previous=function(t,i){this.select(this.selectedIndex-1,t,i)},F.next=function(t,i){this.select(this.selectedIndex+1,t,i)},F.updateSelectedSlide=function(){const t=this.slides[this.selectedIndex];t&&(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])},F.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},F.selectInitialIndex=function(){const t=this.options.initialIndex;if(this.isInitActivated)return void this.select(this.selectedIndex,!1,!0);if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);let i=0;t&&this.slides[t]&&(i=t),this.select(i,!1,!0)},F.selectCell=function(t,i,s){const n=this.queryCell(t);if(!n)return;const e=this.getCellSlideIndex(n);this.select(e,i,s)},F.getCellSlideIndex=function(t){for(let i=0;i<this.slides.length;i++)if(-1!=this.slides[i].cells.indexOf(t))return i},F.getCell=function(t){for(let i=0;i<this.cells.length;i++){const s=this.cells[i];if(s.element==t)return s}},F.getCells=function(t){t=m.makeArray(t);const i=[];return t.forEach((function(t){const s=this.getCell(t);s&&i.push(s)}),this),i},F.getCellElements=function(){return this.cells.map((function(t){return t.element}))},F.getParentCell=function(t){return this.getCell(t)||(t=m.getParent(t,".flickity-slider > *"),this.getCell(t))},F.getAdjacentCellElements=function(t,i){if(!t)return this.selectedSlide.getCellElements();i=void 0===i?this.selectedIndex:i;const s=this.slides.length;if(1+2*t>=s)return this.getCellElements();let n=[];for(let e=i-t;e<=i+t;e++){const t=this.options.wrapAround?m.modulo(e,s):e,i=this.slides[t];i&&(n=n.concat(i.getCellElements()))}return n},F.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},F.uiChange=function(){this.emitEvent("uiChange")},F.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},F.onresize=function(){this.watchCSS(),this.resize()},m.debounceMethod(D,"onresize",150),F.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=m.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize"),this.selectCell(this.selectedElements&&this.selectedElements[0],!1,!0))},F.watchCSS=function(){this.options.watchCSS&&(-1!=M(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},F.onkeydown=function(t){const i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i)return;const s=D.keyboardHandlers[t.keyCode];s&&s.call(this)},D.keyboardHandlers={37:function(){const t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){const t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},F.focus=function(){const t=window.pageYOffset;this.element.focus({preventScroll:!0}),window.pageYOffset!=t&&window.scrollTo(window.pageXOffset,t)},F.deactivate=function(){this.isActive&&(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),A(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},F.destroy=function(){this.deactivate(),window.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),delete this.element.flickityGUID,delete P[this.guid]},m.extend(F,C),D.data=function(t){const i=(t=m.getQueryElement(t))&&t.flickityGUID;return i&&P[i]},m.htmlInit(D,"flickity"),D.Cell=w,D.Slide=S;const N=R.prototype=Object.create(r.prototype);N.bindStartEvent=function(t){this._bindStartEvent(t,!0)},N.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},N._bindStartEvent=function(t,i){i=void 0===i||i;let s="mousedown";"ontouchstart"in window?s="touchstart":window.PointerEvent&&(s="pointerdown"),t[i?"addEventListener":"removeEventListener"](s,this)},N.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},N.getTouch=function(t){for(let i=0;i<t.length;i++){const s=t[i];if(s.identifier==this.pointerIdentifier)return s}},N.onmousedown=function(t){const i=t.button;i&&0!==i&&1!==i||this._pointerDown(t,t)},N.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},N.onpointerdown=function(t){this._pointerDown(t,t)},N._pointerDown=function(t,i){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i))},N.pointerDown=function(t,i){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i])};const O={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};
|
11
11
|
/*!
|
12
12
|
* Unidragger v2.4.0
|
13
13
|
* Draggable base class
|
14
14
|
* MIT license
|
15
15
|
*/
|
16
|
-
function j(){}
|
16
|
+
function j(){}N._bindPostStartEvents=function(t){if(!t)return;const i=O[t.type];i.forEach((function(t){window.addEventListener(t,this)}),this),this._boundPointerEvents=i},N._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach((function(t){window.removeEventListener(t,this)}),this),delete this._boundPointerEvents)},N.onmousemove=function(t){this._pointerMove(t,t)},N.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},N.ontouchmove=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerMove(t,i)},N._pointerMove=function(t,i){this.pointerMove(t,i)},N.pointerMove=function(t,i){this.emitEvent("pointerMove",[t,i])},N.onmouseup=function(t){this._pointerUp(t,t)},N.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},N.ontouchend=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerUp(t,i)},N._pointerUp=function(t,i){this._pointerDone(),this.pointerUp(t,i)},N.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i])},N._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},N._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},N.pointerDone=
|
17
17
|
/*!
|
18
18
|
* Unipointer v2.4.0
|
19
19
|
* base class for doing one thing with pointer event
|
20
20
|
* MIT license
|
21
21
|
*/
|
22
|
-
function(){},O.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},O.ontouchcancel=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerCancel(t,i)},O._pointerCancel=function(t,i){this._pointerDone(),this.pointerCancel(t,i)},O.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])},R.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};const B=j.prototype=Object.create(R.prototype);B.bindHandles=function(){this._bindHandles(!0)},B.unbindHandles=function(){this._bindHandles(!1)},B._bindHandles=function(t){const i=(t=void 0===t||t)?"addEventListener":"removeEventListener",s=t?this._touchActionValue:"";for(let n=0;n<this.handles.length;n++){const e=this.handles[n];this._bindStartEvent(e,t),e[i]("click",this),window.PointerEvent&&(e.style.touchAction=s)}},B._touchActionValue="none",B.pointerDown=function(t,i){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i]))};const I={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},_={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};B.okayPointerDown=function(t){const i=!I[t.target.nodeName]||_[t.target.type];return i||this._pointerReset(),i},B.pointerDownBlur=function(){const t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},B.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]),this._dragMove(t,i,s)},B._dragPointerMove=function(t,i){const s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(s)&&this._dragStart(t,i),s},B.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},B.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]),this._dragPointerUp(t,i)},B._dragPointerUp=function(t,i){this.isDragging?this._dragEnd(t,i):this._staticClick(t,i)},B._dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,i)},B.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])},B._dragMove=function(t,i,s){this.isDragging&&this.dragMove(t,i,s)},B.dragMove=function(t,i,s){t.preventDefault(),this.emitEvent("dragMove",[t,i,s])},B._dragEnd=function(t,i){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,i)},B.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])},B.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},B._staticClick=function(t,i){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,i),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},B.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])},j.getPointerPoint=R.getPointerPoint;const W=D;(()=>{m.extend(D.defaults,{draggable:">1",dragThreshold:3}),D.createMethods.push("_createDrag");const t=D.prototype;m.extend(t,j.prototype),t._touchActionValue="pan-y";const i="createTouch"in document;let s=!1;t._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),i&&!s&&(window.addEventListener("touchmove",(function(){})),s=!0)},t.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},t.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},t.updateDraggable=function(){this.isDraggable=">1"==this.options.draggable?this.slides.length>1:this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},t.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},t.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},t._uiChangeDrag=function(){delete this.isFreeScrolling},t.pointerDown=function(t,i){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),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)):this._pointerDownDefault(t,i)},t._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[i])};const n={INPUT:!0,TEXTAREA:!0,SELECT:!0};function e(){return{x:window.scrollX,y:window.scrollY}}t.pointerDownFocus=function(t){n[t.target.nodeName]||this.focus()},t._pointerDownPreventDefault=function(t){"touchstart"==t.type||"touch"==t.pointerType||n[t.target.nodeName]||t.preventDefault()},t.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},t.pointerUp=function(t,i){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[i]),this._dragPointerUp(t,i)},t.pointerDone=function(){window.removeEventListener("scroll",this),delete this.pointerDownScroll},t.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},t.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]),this._dragMove(t,i,s)},t.dragMove=function(t,i,s){if(!this.isDraggable)return;t.preventDefault(),this.previousDragX=this.dragX;const n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(s.x=s.x%this.slideableWidth);let e=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){const t=Math.max(-this.slides[0].target,this.dragStartPosition);e=e>t?.5*(e+t):e;const i=Math.min(-this.getLastSlide().target,this.dragStartPosition);e=e<i?.5*(e+i):e}this.dragX=e,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[i,s])},t.dragEnd=function(t,i){if(!this.isDraggable)return;this.options.freeScroll&&(this.isFreeScrolling=!0);let s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){const t=this.getRestingPosition();this.isFreeScrolling=-t>this.slides[0].target&&-t<this.getLastSlide().target}else 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])},t.dragEndRestingSelect=function(){const t=this.getRestingPosition(),i=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),s=this._getClosestResting(t,i,1),n=this._getClosestResting(t,i,-1);return s.distance<n.distance?s.index:n.index},t._getClosestResting=function(t,i,s){let n=this.selectedIndex,e=1/0;const o=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};for(;o(i,e)&&(n+=s,e=i,null!==(i=this.getSlideDistance(-t,n)));)i=Math.abs(i);return{distance:e,index:n-s}},t.getSlideDistance=function(t,i){const s=this.slides.length,n=this.options.wrapAround&&s>1,e=n?m.modulo(i,s):i,o=this.slides[e];if(!o)return null;const h=n?this.slideableWidth*Math.floor(i/s):0;return t-(o.target+h)},t.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;const t=this.getSlideDistance(-this.dragX,this.selectedIndex),i=this.previousDragX-this.dragX;return t>0&&i>0?1:t<0&&i<0?-1:0},t.staticClick=function(t,i){const s=this.getParentCell(t.target),n=s&&s.element,e=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,e])},t.onscroll=function(){const t=e(),i=this.pointerDownScroll.y-t.y;(Math.abs(this.pointerDownScroll.x-t.x)>3||Math.abs(i)>3)&&this._pointerDone()}})(),(()=>{function t(t,i){this.direction=t,this.parent=i,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(t.prototype=Object.create(R.prototype))._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction,this.isLeft=this.direction==(this.parent.options.rightToLeft?1:-1);const t=this.element=document.createElement("button");t.className="flickity-button flickity-prev-next-button",this.isPrevious?(t.classList.add("previous"),t.setAttribute("part","navigation-button navigation-button--previous")):(t.classList.add("next"),t.setAttribute("part","navigation-button navigation-button--next")),t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next");const i=document.createElement("slot");i.name=this.isPrevious?"previous-icon":"next-icon",t.appendChild(i),i.addEventListener("slotchange",(()=>{i.assignedElements({flatten:!0}).forEach((t=>{t.removeAttribute("hidden")}))}));const s=document.createElement("span");s.className="button-icon "+(this.isPrevious?"button-icon--previous":"button-icon--next"),s.setAttribute("part","navigation-icon"),i.appendChild(s),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},t.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parentElement.appendChild(this.element)},t.prototype.deactivate=function(){this.parentElement.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},t.prototype.handleEvent=m.handleEvent,t.prototype.onclick=function(){this.isEnabled&&(this.parent.uiChange(),this.parent[this.isPrevious?"previous":"next"]())},t.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},t.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},t.prototype.update=function(){const t=this.parent.slides;this.parent.options.wrapAround&&t.length>1?this.enable():this[this.parent.selectedIndex==(this.isPrevious?0:t.length?t.length-1:0)?"disable":"enable"]()},t.prototype.destroy=function(){this.deactivate(),this.allOff()},m.extend(D.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),D.createMethods.push("_createPrevNextButtons");const i=D.prototype;i._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new t(-1,this),this.nextButton=new t(1,this),this.on("activate",this.activatePrevNextButtons))},i.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},D.PrevNextButton=t})(),(()=>{function t(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}(t.prototype=Object.create(r.prototype)).play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},t.prototype.tick=function(){if("playing"!=this.state)return;let t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;const i=this;this.clear(),this.timeout=setTimeout((function(){i.parent.next(!0),i.tick()}),t)},t.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},t.prototype.clear=function(){clearTimeout(this.timeout)},t.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},t.prototype.unpause=function(){"paused"==this.state&&this.play()},t.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},t.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},m.extend(D.defaults,{pauseAutoPlayOnHover:!0}),D.createMethods.push("_createPlayer");const i=D.prototype;i._createPlayer=function(){this.player=new t(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},i.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},i.playPlayer=function(){this.player.play()},i.stopPlayer=function(){this.player.stop()},i.pausePlayer=function(){this.player.pause()},i.unpausePlayer=function(){this.player.unpause()},i.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},i.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},i.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},D.Player=t})();const U=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)}flickityEl;flickityReady=!1;mutationO;resizeO;readyflickity;flickity=new Promise((t=>{this.readyflickity=t}));syncflickity;childrenEles;hasFullScreenModule=!1;hasLazyLoadModule=!1;hasFadeModule=!1;iCurrentSlide;slidesReady;didInit=!1;slideCount=0;get host(){return s(this)}options={};async optionsChanged(){if(this.flickityReady){const t=await this.getflickity(),i=Object.assign(t.options,this.options);await this.loadFlickityModules(i),await this.update()}}navbtns=!1;async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}pager=!1;async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t&&(t.hidden=!this.pager)}fullscreenbtn=!1;async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t&&(t.hidden=!this.fullscreenbtn)}fullscreen=!1;async fullscreenChanged(t,i){const s=await this.getflickity();this.fullscreen?s.viewFullscreen():void 0!==i&&s.exitFullscreen()}animation="scroll";async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),this.waitForSlides(this.host)]);if(n.forEach((t=>{t.style.left=void 0})),"parallax"===i&&(s.off("scroll",this.parallax),n.forEach(((t,i)=>{this.childrenEles&&this.childrenEles[i]&&(this.childrenEles[i].style.transform=void 0)})),this.update()),"function"==typeof i&&s.off("scroll",i),"function"==typeof this.animation)return this.updateOptions({fade:!1,percentPosition:!0}),void s.on("scroll",this.animation);switch(this.animation){case"fade":this.updateOptions({fade:!0,percentPosition:!0});break;case"parallax":this.updateOptions({fade:!1,percentPosition:!0}),s.on("scroll",this.parallax);break;default:this.updateOptions({fade:!1,percentPosition:!0})}}updateOptions(t){this.options={...this.options,...t}}currentSlide=0;currentSlideChange(){this.currentSlide!==this.iCurrentSlide&&this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}autoplay=!1;async autoPlayChange(){await this.stopAutoplay(),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&this.startAutoplay(this.autoplay))}ready=!1;nanoSlidesDidLoad;nanoSlidesReady;nanoSlidesSelect;nanoSlidesChange;nanoSlidesScroll;nanoSlidesTransitionEnd;nanoSlidesDragStart;nanoSlidesDragMove;nanoSlidesDragEnd;nanoSlidesTap;nanoSlidesFullscreenChange;async update(){const[t]=await Promise.all([this.getflickity(),this.waitForSlides(this.host)]);this.childrenEles=this.host.querySelectorAll(`${h("nano-slide")} > *`),t.reloadCells(),t.resize(),t.reposition()}async slideTo(t,i){(await this.getflickity()).select(t,i)}async slideNext(t,i){(await this.getflickity()).next(i,t)}async slidePrev(t,i){(await this.getflickity()).previous(t,i)}async getActiveIndex(){return(await this.getflickity()).selectedIndex}async length(){return(await this.getflickity()).slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){return 0===(await this.getflickity()).selectedIndex}async startAutoplay(t){const i=await this.getflickity();t&&(this.options={autoPlay:t}),setTimeout((()=>i.playPlayer()))}async stopAutoplay(){(await this.getflickity()).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}parallax=async()=>{const t=await this.flickity;t.cells.forEach((i=>{let s=t.x;var n;t.options.wrapAround&&t.cells.length>1&&(s=(s%(n=t.slideableWidth)+n)%n,s-=t.slideableWidth);let e=-1*(i.target+s)/3;i.shift<0?e=-1*(i.target-t.slideableWidth+s)/3:i.shift>0&&(e=-1*(i.target+(s+t.slideableWidth))/3),i.element.children[0].style.transform="translate3d("+e+"px, 0, 0)",i.element.style.setProperty("--animation-amount",(3*e/i.size.width*100).toString())}))};isActive(t){return t===this.currentSlide}handleFullscreen=t=>{this.fullscreen=t,this.nanoSlidesFullscreenChange.emit(t)};handleSlideSelect=t=>{this.iCurrentSlide=t,this.nanoSlidesSelect.emit(t)};destroyflickity(){const t=this.syncflickity;void 0!==t&&(t.destroy(),this.flickity=new Promise((t=>{this.readyflickity=t})),this.flickityReady=!1,this.syncflickity=void 0,this.ready=!1),this.didInit=!1}async loadFlickityModules(t){!this.hasFullScreenModule&&t.fullscreen&&(await import("./fullscreen-DXVJLaN3.js"),this.hasFullScreenModule=!0),!this.hasLazyLoadModule&&t.lazyLoad&&(await import("./lazyload-DUQP_u2u.js"),this.hasLazyLoadModule=!0),!this.hasFadeModule&&t.fade&&(await import("./fade-B-zhtzv8.js"),this.hasFadeModule=!0)}async initflickity(){const t=this.normalizeOptions();await this.loadFlickityModules(t),await this.waitForSlides(this.host),this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container"),this.flickityEl&&(this.slidesReady=!0,this.flickityEl.classList.contains("flickity-enabled")&&this.destroyflickity(),this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px",setTimeout((()=>{this.flickityEl.style.height="";const i=new W(this.flickityEl,t);this.flickityReady=!0,this.syncflickity=i,this.animationChange(),this.navbtnsChanged(),this.pagerChanged(),this.fullscreenChanged(),this.fullscreenBtnChanged(),this.readyflickity(i),this.ready=!0,window.ResizeObserver&&(this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),(this.resizeO=new ResizeObserver((()=>{n((()=>{const t=this.host.shadowRoot.querySelector(".flickity-viewport");e((()=>{t&&(t.style.height=""),i.resize()}))}))}))).observe(this.host))}),100))}normalizeOptions(){const t={cellSelector:h("nano-slide"),contain:!0,prevNextButtons:!0,fullscreen:this.fullscreen,accessibility:!0,imagesLoaded:!0};"fade"===this.animation&&(t.fade=!0),this.currentSlide>0&&(t.initialIndex=this.currentSlide),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&(t.autoPlay=this.autoplay));const i={on:{...this.options&&this.options.on?this.options.on:{},ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:()=>requestAnimationFrame((()=>this.nanoSlidesTransitionEnd.emit())),dragStart:()=>requestAnimationFrame((()=>this.nanoSlidesDragStart.emit())),dragMove:()=>requestAnimationFrame((()=>this.nanoSlidesDragMove.emit())),dragEnd:()=>requestAnimationFrame((()=>this.nanoSlidesDragEnd.emit())),staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen}};return{...t,...i,...this.options}}waitForSlides=t=>{const i=Array.from(t.querySelectorAll(h("nano-slide")));this.slideCount=i.length;let s=i.filter((t=>!t.ready));return s.length?new Promise((n=>{const e=o=>{s=s.filter((t=>t!==o.target)),s.length||(n(i),t.removeEventListener("nanoSlideReady",e),t.removeEventListener("nano-slide-ready",e))};t.addEventListener("nanoSlideReady",e),t.addEventListener("nano-slide-ready",e)})):Promise.resolve(i)};componentDidLoad(){this.nanoSlidesDidLoad.emit(),this.didInit||(this.didInit=!0,this.initflickity()),"undefined"!=typeof window&&window.MutationObserver&&(this.mutationO=new MutationObserver((t=>{t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()===h("nano-slide")&&this.flickityReady&&this.update()}))).observe(this.host,{childList:!0,subtree:!0})}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),this.destroyflickity()}render(){return c(o,{key:"6dedc1589f5ae629975f38303f658de914c8f506",class:"nano-slides"},c("div",{key:"528c7b10972b258ef0345525a9fa82c289ecc083",class:{slideshow:!0,ready:this.ready,"not-ready":!this.ready},part:"base"},c("div",{key:"4d16a4da0692f53500c755600a539edf5dc2d606",ref:t=>this.flickityEl=t,class:{"flickity-container":!0,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady},part:"slide-container"},c("slot",{key:"ddcdf042f8d25069c08578e7417e3f5571386b76"})),c("div",{key:"5a456eee7631c979fef473352d2c4beec7a5cf2e",class:"ui-extras"},c("slot",{key:"3994bac2fd8111223df9e3886481edf72b0f2d54",name:"ui"})),this.slideCount>1&&this.pager&&c("div",{key:"2966cef941d7232110ba4dbba0aefdb33e757216",class:"pagination flickity-page-dots",part:"pagination"},Array.from({length:this.slideCount}).map(((t,i)=>c("button",{part:"pagination-item--active",key:i,class:{"pagination-btn":!0,"pagination-btn--active":this.isActive(i),"is-selected":this.isActive(i),dot:!0},"aria-current":this.isActive(i)?"step":void 0,onClick:()=>{this.isActive(i)||this.slideTo(i)}},c("span",{class:"pagination-btn__label"},"Go to slide ",i+1)))))))}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};U.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--dot-color:var(--nano-color-neutral-400);--dot-color-active:var(--nano-color-primary-1000);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:transparent;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:transparent;--navbtns-width:1.875rem;--navbtns-height:2.75rem;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:transparent;--flip-icon-ltr:0;--flip-icon-rtl:1;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-inline-size:100vw}:host:dir(rtl){--flip-icon-ltr:1;--flip-icon-rtl:0}:host([ready]){opacity:1}.slideshow{max-block-size:100%;min-block-size:inherit;block-size:inherit;position:relative}.slideshow.not-ready{inline-size:100%;overflow:hidden}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;block-size:fit-content}.not-ready .flickity-container{inline-size:fit-content;block-size:fit-content}.flickity-container.slides-ready{min-block-size:inherit;max-block-size:inherit;block-size:inherit;inline-size: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:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.button-icon{display:block}.button-icon::after{content:"";display:block;background-size:cover;inline-size:var(--navbtns-width);block-size:var(--navbtns-height);background-color:var(--navbtns-icon-color);-webkit-mask-image:var(--nano-component-icon-chevron);mask-image:var(--nano-component-icon-chevron);transition:color var(--nano-transition-fast) ease;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;transform-origin:center;margin-inline-start:auto;rotate:calc(180deg * var(--flip-icon-ltr));-webkit-mask-size:cover;mask-size:cover}.button-icon--previous::after{rotate:calc(180deg * var(--flip-icon-rtl))}.flickity-button:disabled .button-icon::after{background-color:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start: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{inline-size:100%;padding:0;margin:0;text-align:center;line-height:1;z-index:4;display:inline-flex;justify-content:center;inset-block-end:0}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{all:unset;text-indent:200%;white-space:nowrap;overflow:hidden;display:inline-block;display:inline-block;position:relative;inline-size:1.25rem;block-size:0.375rem;margin-block:0;cursor:pointer;padding:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot::after{content:"";position:absolute;inset:0;background:currentcolor;background:var(--dot-color);margin:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset);z-index:1}.flickity-page-dots .dot.is-selected::after{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:hsla(0, 0%, 0%, 0.9);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}';export{D as F,U as S,m as u}
|
22
|
+
function(){},N.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},N.ontouchcancel=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerCancel(t,i)},N._pointerCancel=function(t,i){this._pointerDone(),this.pointerCancel(t,i)},N.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])},R.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};const B=j.prototype=Object.create(R.prototype);B.bindHandles=function(){this._bindHandles(!0)},B.unbindHandles=function(){this._bindHandles(!1)},B._bindHandles=function(t){const i=(t=void 0===t||t)?"addEventListener":"removeEventListener",s=t?this._touchActionValue:"";for(let n=0;n<this.handles.length;n++){const e=this.handles[n];this._bindStartEvent(e,t),e[i]("click",this),window.PointerEvent&&(e.style.touchAction=s)}},B._touchActionValue="none",B.pointerDown=function(t,i){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i]))};const I={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},W={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};B.okayPointerDown=function(t){const i=!I[t.target.nodeName]||W[t.target.type];return i||this._pointerReset(),i},B.pointerDownBlur=function(){const t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},B.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]),this._dragMove(t,i,s)},B._dragPointerMove=function(t,i){const s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(s)&&this._dragStart(t,i),s},B.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},B.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]),this._dragPointerUp(t,i)},B._dragPointerUp=function(t,i){this.isDragging?this._dragEnd(t,i):this._staticClick(t,i)},B._dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,i)},B.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])},B._dragMove=function(t,i,s){this.isDragging&&this.dragMove(t,i,s)},B.dragMove=function(t,i,s){t.preventDefault(),this.emitEvent("dragMove",[t,i,s])},B._dragEnd=function(t,i){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,i)},B.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])},B.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},B._staticClick=function(t,i){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,i),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},B.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])},j.getPointerPoint=R.getPointerPoint;const _=D;(()=>{m.extend(D.defaults,{draggable:">1",dragThreshold:3}),D.createMethods.push("_createDrag");const t=D.prototype;m.extend(t,j.prototype),t._touchActionValue="pan-y";const i="createTouch"in document;let s=!1;t._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),i&&!s&&(window.addEventListener("touchmove",(function(){})),s=!0)},t.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},t.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},t.updateDraggable=function(){this.isDraggable=">1"==this.options.draggable?this.slides.length>1:this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},t.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},t.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},t._uiChangeDrag=function(){delete this.isFreeScrolling},t.pointerDown=function(t,i){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),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)):this._pointerDownDefault(t,i)},t._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[i])};const n={INPUT:!0,TEXTAREA:!0,SELECT:!0};function e(){return{x:window.scrollX,y:window.scrollY}}t.pointerDownFocus=function(t){n[t.target.nodeName]||this.focus()},t._pointerDownPreventDefault=function(t){"touchstart"==t.type||"touch"==t.pointerType||n[t.target.nodeName]||t.preventDefault()},t.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},t.pointerUp=function(t,i){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[i]),this._dragPointerUp(t,i)},t.pointerDone=function(){window.removeEventListener("scroll",this),delete this.pointerDownScroll},t.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},t.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]),this._dragMove(t,i,s)},t.dragMove=function(t,i,s){if(!this.isDraggable)return;t.preventDefault(),this.previousDragX=this.dragX;const n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(s.x=s.x%this.slideableWidth);let e=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){const t=Math.max(-this.slides[0].target,this.dragStartPosition);e=e>t?.5*(e+t):e;const i=Math.min(-this.getLastSlide().target,this.dragStartPosition);e=e<i?.5*(e+i):e}this.dragX=e,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[i,s])},t.dragEnd=function(t,i){if(!this.isDraggable)return;this.options.freeScroll&&(this.isFreeScrolling=!0);let s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){const t=this.getRestingPosition();this.isFreeScrolling=-t>this.slides[0].target&&-t<this.getLastSlide().target}else 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])},t.dragEndRestingSelect=function(){const t=this.getRestingPosition(),i=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),s=this._getClosestResting(t,i,1),n=this._getClosestResting(t,i,-1);return s.distance<n.distance?s.index:n.index},t._getClosestResting=function(t,i,s){let n=this.selectedIndex,e=1/0;const o=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};for(;o(i,e)&&(n+=s,e=i,null!==(i=this.getSlideDistance(-t,n)));)i=Math.abs(i);return{distance:e,index:n-s}},t.getSlideDistance=function(t,i){const s=this.slides.length,n=this.options.wrapAround&&s>1,e=n?m.modulo(i,s):i,o=this.slides[e];if(!o)return null;const h=n?this.slideableWidth*Math.floor(i/s):0;return t-(o.target+h)},t.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;const t=this.getSlideDistance(-this.dragX,this.selectedIndex),i=this.previousDragX-this.dragX;return t>0&&i>0?1:t<0&&i<0?-1:0},t.staticClick=function(t,i){const s=this.getParentCell(t.target),n=s&&s.element,e=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,e])},t.onscroll=function(){const t=e(),i=this.pointerDownScroll.y-t.y;(Math.abs(this.pointerDownScroll.x-t.x)>3||Math.abs(i)>3)&&this._pointerDone()}})(),(()=>{function t(t,i){this.direction=t,this.parent=i,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(t.prototype=Object.create(R.prototype))._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction,this.isLeft=this.direction==(this.parent.options.rightToLeft?1:-1);const t=this.element=document.createElement("button");t.className="flickity-button flickity-prev-next-button",this.isPrevious?(t.classList.add("previous"),t.setAttribute("part","navigation-button navigation-button--previous")):(t.classList.add("next"),t.setAttribute("part","navigation-button navigation-button--next")),t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next");const i=document.createElement("slot");i.name=this.isPrevious?"previous-icon":"next-icon",t.appendChild(i),i.addEventListener("slotchange",(()=>{i.assignedElements({flatten:!0}).forEach((t=>{t.removeAttribute("hidden")}))}));const s=document.createElement("span");s.className="button-icon "+(this.isPrevious?"button-icon--previous":"button-icon--next"),s.setAttribute("part","navigation-icon"),i.appendChild(s),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},t.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parentElement.appendChild(this.element)},t.prototype.deactivate=function(){this.parentElement.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},t.prototype.handleEvent=m.handleEvent,t.prototype.onclick=function(){this.isEnabled&&(this.parent.uiChange(),this.parent[this.isPrevious?"previous":"next"]())},t.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},t.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},t.prototype.update=function(){const t=this.parent.slides;this.parent.options.wrapAround&&t.length>1?this.enable():this[this.parent.selectedIndex==(this.isPrevious?0:t.length?t.length-1:0)?"disable":"enable"]()},t.prototype.destroy=function(){this.deactivate(),this.allOff()},m.extend(D.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),D.createMethods.push("_createPrevNextButtons");const i=D.prototype;i._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new t(-1,this),this.nextButton=new t(1,this),this.on("activate",this.activatePrevNextButtons))},i.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},D.PrevNextButton=t})(),(()=>{function t(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}(t.prototype=Object.create(r.prototype)).play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},t.prototype.tick=function(){if("playing"!=this.state)return;let t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;const i=this;this.clear(),this.timeout=setTimeout((function(){i.parent.next(!0),i.tick()}),t)},t.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},t.prototype.clear=function(){clearTimeout(this.timeout)},t.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},t.prototype.unpause=function(){"paused"==this.state&&this.play()},t.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},t.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},m.extend(D.defaults,{pauseAutoPlayOnHover:!0}),D.createMethods.push("_createPlayer");const i=D.prototype;i._createPlayer=function(){this.player=new t(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},i.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},i.playPlayer=function(){this.player.play()},i.stopPlayer=function(){this.player.stop()},i.pausePlayer=function(){this.player.pause()},i.unpausePlayer=function(){this.player.unpause()},i.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},i.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},i.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},D.Player=t})();const q=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)}flickityEl;flickityReady=!1;mutationO;resizeO;readyflickity;flickity=new Promise((t=>{this.readyflickity=t}));syncflickity;childrenEles;hasFullScreenModule=!1;hasLazyLoadModule=!1;hasFadeModule=!1;iCurrentSlide;slidesReady;didInit=!1;slideCount=0;get host(){return s(this)}options={};async optionsChanged(){if(this.flickityReady){const t=await this.getflickity(),i=Object.assign(t.options,this.options);await this.loadFlickityModules(i),await this.update()}}navbtns=!1;async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}pager=!1;async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t&&(t.hidden=!this.pager)}fullscreenbtn=!1;async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t&&(t.hidden=!this.fullscreenbtn)}fullscreen=!1;async fullscreenChanged(t,i){const s=await this.getflickity();this.fullscreen?s.viewFullscreen():void 0!==i&&s.exitFullscreen()}animation="scroll";async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),this.waitForSlides(this.host)]);if(n.forEach((t=>{t.style.left=void 0})),"parallax"===i&&(s.off("scroll",this.parallax),n.forEach(((t,i)=>{this.childrenEles&&this.childrenEles[i]&&(this.childrenEles[i].style.transform=void 0)})),this.update()),"function"==typeof i&&s.off("scroll",i),"function"==typeof this.animation)return this.updateOptions({fade:!1,percentPosition:!0}),void s.on("scroll",this.animation);switch(this.animation){case"fade":this.updateOptions({fade:!0,percentPosition:!0});break;case"parallax":this.updateOptions({fade:!1,percentPosition:!0}),s.on("scroll",this.parallax);break;default:this.updateOptions({fade:!1,percentPosition:!0})}}updateOptions(t){this.options={...this.options,...t}}currentSlide=0;currentSlideChange(){this.currentSlide!==this.iCurrentSlide&&this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}autoplay=!1;async autoPlayChange(){await this.stopAutoplay(),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&this.startAutoplay(this.autoplay))}ready=!1;nanoSlidesDidLoad;nanoSlidesReady;nanoSlidesSelect;nanoSlidesChange;nanoSlidesScroll;nanoSlidesTransitionEnd;nanoSlidesDragStart;nanoSlidesDragMove;nanoSlidesDragEnd;nanoSlidesTap;nanoSlidesFullscreenChange;async update(){const[t]=await Promise.all([this.getflickity(),this.waitForSlides(this.host)]);this.childrenEles=this.host.querySelectorAll(`${h("nano-slide")} > *`),t.reloadCells(),t.resize(),t.reposition()}async slideTo(t,i){(await this.getflickity()).select(t,i)}async slideNext(t,i){(await this.getflickity()).next(i,t)}async slidePrev(t,i){(await this.getflickity()).previous(t,i)}async getActiveIndex(){return(await this.getflickity()).selectedIndex}async length(){return(await this.getflickity()).slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){return 0===(await this.getflickity()).selectedIndex}async startAutoplay(t){const i=await this.getflickity();t&&(this.options={autoPlay:t}),setTimeout((()=>i.playPlayer()))}async stopAutoplay(){(await this.getflickity()).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}parallax=async()=>{const t=await this.flickity;t.cells.forEach((i=>{let s=t.x;var n;t.options.wrapAround&&t.cells.length>1&&(s=(s%(n=t.slideableWidth)+n)%n,s-=t.slideableWidth);let e=-1*(i.target+s)/3;i.shift<0?e=-1*(i.target-t.slideableWidth+s)/3:i.shift>0&&(e=-1*(i.target+(s+t.slideableWidth))/3),i.element.children[0].style.transform="translate3d("+e+"px, 0, 0)",i.element.style.setProperty("--animation-amount",(3*e/i.size.width*100).toString())}))};isActive(t){return t===this.currentSlide}handleFullscreen=t=>{this.fullscreen=t,this.nanoSlidesFullscreenChange.emit(t)};handleSlideSelect=t=>{this.iCurrentSlide=t,this.nanoSlidesSelect.emit(t)};destroyflickity(){const t=this.syncflickity;void 0!==t&&(t.destroy(),this.flickity=new Promise((t=>{this.readyflickity=t})),this.flickityReady=!1,this.syncflickity=void 0,this.ready=!1),this.didInit=!1}async loadFlickityModules(t){!this.hasFullScreenModule&&t.fullscreen&&(await import("./fullscreen-DeZTkFNA.js"),this.hasFullScreenModule=!0),!this.hasLazyLoadModule&&t.lazyLoad&&(await import("./lazyload-D68gi5uV.js"),this.hasLazyLoadModule=!0),!this.hasFadeModule&&t.fade&&(await import("./fade-Brdw1NLw.js"),this.hasFadeModule=!0)}async initflickity(){const t=this.normalizeOptions();await this.loadFlickityModules(t),await this.waitForSlides(this.host),this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container"),this.flickityEl&&(this.slidesReady=!0,this.flickityEl.classList.contains("flickity-enabled")&&this.destroyflickity(),this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px",setTimeout((()=>{this.flickityEl.style.height="";const i=new _(this.flickityEl,t);this.flickityReady=!0,this.syncflickity=i,this.animationChange(),this.navbtnsChanged(),this.pagerChanged(),this.fullscreenChanged(),this.fullscreenBtnChanged(),this.readyflickity(i),this.ready=!0,window.ResizeObserver&&(this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),(this.resizeO=new ResizeObserver((()=>{n((()=>{const t=this.host.shadowRoot.querySelector(".flickity-viewport");e((()=>{t&&(t.style.height=""),i.resize()}))}))}))).observe(this.host))}),100))}normalizeOptions(){const t={cellSelector:h("nano-slide"),contain:!0,prevNextButtons:!0,fullscreen:this.fullscreen,accessibility:!0,imagesLoaded:!0};"fade"===this.animation&&(t.fade=!0),this.currentSlide>0&&(t.initialIndex=this.currentSlide),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&(t.autoPlay=this.autoplay));const i={on:{...this.options&&this.options.on?this.options.on:{},ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:()=>requestAnimationFrame((()=>this.nanoSlidesTransitionEnd.emit())),dragStart:()=>requestAnimationFrame((()=>this.nanoSlidesDragStart.emit())),dragMove:()=>requestAnimationFrame((()=>this.nanoSlidesDragMove.emit())),dragEnd:()=>requestAnimationFrame((()=>this.nanoSlidesDragEnd.emit())),staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen}};return{...t,...i,...this.options}}waitForSlides=t=>{const i=Array.from(t.querySelectorAll(h("nano-slide")));this.slideCount=i.length;let s=i.filter((t=>!t.ready));return s.length?new Promise((n=>{const e=o=>{s=s.filter((t=>t!==o.target)),s.length||(n(i),t.removeEventListener("nanoSlideReady",e),t.removeEventListener("nano-slide-ready",e))};t.addEventListener("nanoSlideReady",e),t.addEventListener("nano-slide-ready",e)})):Promise.resolve(i)};componentDidLoad(){this.nanoSlidesDidLoad.emit(),this.didInit||(this.didInit=!0,this.initflickity()),"undefined"!=typeof window&&window.MutationObserver&&(this.mutationO=new MutationObserver((t=>{t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()===h("nano-slide")&&this.flickityReady&&this.update()}))).observe(this.host,{childList:!0,subtree:!0})}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),this.destroyflickity()}render(){return c(o,{key:"6dedc1589f5ae629975f38303f658de914c8f506",class:"nano-slides"},c("div",{key:"528c7b10972b258ef0345525a9fa82c289ecc083",class:{slideshow:!0,ready:this.ready,"not-ready":!this.ready},part:"base"},c("div",{key:"4d16a4da0692f53500c755600a539edf5dc2d606",ref:t=>this.flickityEl=t,class:{"flickity-container":!0,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady},part:"slide-container"},c("slot",{key:"ddcdf042f8d25069c08578e7417e3f5571386b76"})),c("div",{key:"5a456eee7631c979fef473352d2c4beec7a5cf2e",class:"ui-extras"},c("slot",{key:"3994bac2fd8111223df9e3886481edf72b0f2d54",name:"ui"})),this.slideCount>1&&this.pager&&c("div",{key:"2966cef941d7232110ba4dbba0aefdb33e757216",class:"pagination flickity-page-dots",part:"pagination"},Array.from({length:this.slideCount}).map(((t,i)=>c("button",{part:"pagination-item--active",key:i,class:{"pagination-btn":!0,"pagination-btn--active":this.isActive(i),"is-selected":this.isActive(i),dot:!0},"aria-current":this.isActive(i)?"step":void 0,onClick:()=>{this.isActive(i)||this.slideTo(i)}},c("span",{class:"pagination-btn__label"},"Go to slide ",i+1)))))))}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};q.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--dot-color:var(--nano-color-neutral-400);--dot-color-active:var(--nano-color-primary-1000);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:transparent;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:transparent;--navbtns-width:1.875rem;--navbtns-height:2.75rem;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:transparent;--flip-icon-ltr:0;--flip-icon-rtl:1;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-inline-size:100vw}:host:dir(rtl){--flip-icon-ltr:1;--flip-icon-rtl:0}:host([ready]){opacity:1}.slideshow{max-block-size:100%;min-block-size:inherit;block-size:inherit;position:relative}.slideshow.not-ready{inline-size:100%;overflow:hidden}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;block-size:fit-content}.not-ready .flickity-container{block-size:fit-content}.flickity-container.slides-ready{min-block-size:inherit;max-block-size:inherit;block-size:inherit;inline-size: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:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.button-icon{display:block}.button-icon::after{content:"";display:block;background-size:cover;inline-size:var(--navbtns-width);block-size:var(--navbtns-height);background-color:var(--navbtns-icon-color);-webkit-mask-image:var(--nano-component-icon-chevron);mask-image:var(--nano-component-icon-chevron);transition:color var(--nano-transition-fast) ease;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;transform-origin:center;margin-inline-start:auto;rotate:calc(180deg * var(--flip-icon-ltr));-webkit-mask-size:cover;mask-size:cover}.button-icon--previous::after{rotate:calc(180deg * var(--flip-icon-rtl))}.flickity-button:disabled .button-icon::after{background-color:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start: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{inline-size:100%;padding:0;margin:0;text-align:center;line-height:1;z-index:4;display:inline-flex;justify-content:center;inset-block-end:0}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{all:unset;text-indent:200%;white-space:nowrap;overflow:hidden;display:inline-block;display:inline-block;position:relative;inline-size:1.25rem;block-size:0.375rem;margin-block:0;cursor:pointer;padding:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot::after{content:"";position:absolute;inset:0;background:currentcolor;background:var(--dot-color);margin:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset);z-index:1}.flickity-page-dots .dot.is-selected::after{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:hsla(0, 0%, 0%, 0.9);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}';export{D as F,q as S,m as u}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
export{S as nano_slides}from"./nano-slides-
|
4
|
+
export{S as nano_slides}from"./nano-slides-DKkSSmWQ.js";import"./index-BM3Om9WE.js";import"./renderer-DpNDfhNy.js";
|