var D=Object.defineProperty;var G=(e,t,n)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>(G(e,typeof t!="symbol"?t+"":t,n),n);import{l as h,d as M,c as F,e as j,k as Q,s as W,f as C,S as y,o as U}from"./vendor-e5de9311.js";import{P as m,T as K}from"./index-576fb797.js";import{r as X,s as Y}from"./secure-cookie-7547f91c.js";const N=()=>new DOMException("The request is not allowed","NotAllowedError"),J=async e=>{if(!navigator.clipboard)throw N();return navigator.clipboard.writeText(e)},Z=async e=>{const t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",t.style.userSelect="all",document.body.appendChild(t);const n=window.getSelection(),i=window.document.createRange();n.removeAllRanges(),i.selectNode(t),n.addRange(i);let a=!1;try{a=window.document.execCommand("copy")}finally{n.removeAllRanges(),window.document.body.removeChild(t)}if(!a)throw N()},z=async e=>{try{await J(e),h.debug("Async: Copying to clipboard was successful!")}catch(t){try{await Z(e),h.debug("Fallback: Copying to clipboard was successful!")}catch(n){throw h.debug("Fallback: Unable to copy to clipboard."),t||n||N()}}};class tt{constructor(t,n){E(this,"overflowSlotTmpl",` ... `);E(this,"getNumSlotTmpl",(t,n,i)=>` ${n} `);var i,a,o,c,l,r,s;this.nav=document.querySelector(t),this.section=(i=this.nav)==null?void 0:i.closest("section"),this.pages=(a=this.section)==null?void 0:a.querySelectorAll(n),this.slots=(o=this.nav)==null?void 0:o.querySelectorAll("li.usa-pagination__item:not(.usa-pagination__arrow)"),this.prevItemLink=(c=this.nav)==null?void 0:c.querySelector("a.usa-pagination__previous-page"),this.nextItemLink=(l=this.nav)==null?void 0:l.querySelector("a.usa-pagination__next-page"),this.prevItem=(r=this.prevItemLink)==null?void 0:r.parentNode,this.nextItem=(s=this.nextItemLink)==null?void 0:s.parentNode,this.fisrtSlot=[],this.lastSlot=[]}getLabel(t){var n,i,a;return((a=(i=(n=this.pages)==null?void 0:n[t-1])==null?void 0:i.querySelector("img"))==null?void 0:a.getAttribute("alt"))||`${t}`}init(){var i,a,o,c;if(h.debug("pagination init"),!((i=this.pages)!=null&&i.length)||!((a=this.slots)!=null&&a.length))return;h.debug(`pagination init with ${this.pages.length} pages`),h.debug(`pagination init with ${this.slots.length} slots`);const t=(o=this.pages)==null?void 0:o.length,n=(c=this.slots)==null?void 0:c.length;this.fisrtSlot=[1,this.getLabel(1)],this.lastSlot=[t,this.getLabel(t)],this.nav.querySelectorAll("li.usa-pagination__item").forEach(l=>{l.addEventListener("click",r=>{if(r.preventDefault(),!("page"in l.dataset))return;const s=parseInt(this.nav.dataset.currentPage,10)||1,u=parseInt(l.dataset.page,10);u===s||u<1||u>t||this.updateNav(u,s,t,n)})})}updateSearchParam(t){const n=new URL(window.location.href);n.searchParams.set("page",t),window.history.replaceState({path:n.href},"",n.href)}updateNav(t,n,i,a){this.nav.dataset.currentPage=`${t}`,this.updateSearchParam(t),this.pages[t-1].hidden=!1,this.pages[n-1].hidden=!0,this.prevItem.dataset.page=`${t-1}`,this.prevItemLink.hidden=t-1<1,this.nextItem.dataset.page=`${t+1}`,this.nextItemLink.hidden=t+1>i;const o=Array(a).fill([]),c=Math.floor(a/2),l=a-c-1;let r=t-c;r<1||i<=a?r=1:t+l>i&&(r=i-a+1);for(let s=0;s=7&&(o[0]=this.fisrtSlot,o[a-1]=this.lastSlot,o[1]=o[1][0]>2?[]:o[1],o[a-2]=o[a-2][0]{const[d,f]=o[u];if(!d){s.innerHTML=this.overflowSlotTmpl,s.setAttribute("aria-label","ellipsis indicating non-visible pages"),s.classList.add("usa-pagination__overflow"),s.classList.remove("usa-pagination__page-no"),delete s.dataset.page;return}const p=d===t;s.innerHTML=this.getNumSlotTmpl(d,f.trim(),p),s.dataset.page=`${d}`,s.classList.remove("usa-pagination__overflow"),s.classList.add("usa-pagination__page-no"),s.setAttribute("aria-label","")})}}class et{constructor(){this.switcher=document.querySelector("div.lang-switcher"),this.languageNames=new Intl.DisplayNames(["en"],{type:"language"})}handelClick(t){var c,l;t.preventDefault();const n=t.target,i=(l=(c=this.switcher.querySelector('button[aria-expanded="true"]'))==null?void 0:c.dataset)==null?void 0:l.lang,a=n.dataset.lang;h.debug(`switching to ${a}`);const o=this.switcher.querySelector('button[aria-expanded="true"]');o==null||o.setAttribute("aria-expanded","false"),o.disabled=!1,n.setAttribute("aria-expanded","true"),n.disabled=!0,document.querySelectorAll(`.trans[lang="${i}"]`).forEach(r=>{r.hidden=!0}),document.querySelectorAll(`.trans[lang="${a}"]`).forEach(r=>{r.hidden=!1})}init(){this.switcher&&this.switcher.querySelectorAll("button").forEach(t=>{const n=t.dataset.lang;t.innerText=this.languageNames.of(n),t.addEventListener("click",this.handelClick.bind(this))})}}class nt{constructor(){this.buttons=null}init(){this.buttons=document.querySelectorAll(".d-button[aria-expanded][aria-controls]").forEach(t=>{new it(t)})}}class it{constructor(t){this.$button=t,this.expanded=t.getAttribute("aria-expanded"),this.controls=t.getAttribute("aria-controls"),this.$controlled=document.getElementById(this.controls),this.expanded!=="true"&&this.expanded!=="false"&&(this.expanded="false",t.setAttribute("aria-expanded",this.expanded)),this.displayPanel(),this.$button.addEventListener("click",this.onClick.bind(this))}displayPanel(){this.$controlled&&(this.$controlled.style.display=this.expanded==="true"?"revert":"none")}togglePanel(){this.expanded=this.expanded==="true"?"false":"true",this.$button.setAttribute("aria-expanded",this.expanded),this.displayPanel()}onClick(t){t.preventDefault(),this.togglePanel()}}const _="pmc-resources",at=`
`;var P,q,H;const ot=`
Something Went Wrong.
Please Try Again:
`;class S{constructor(){this.resourceSection=document.querySelector(`.${_}`),this.pagePath=""}getResource(t,n){t.innerHTML=at,S.dataController.getResource(n).then(i=>(t.innerHTML=i,t.querySelectorAll(`.${_}__see_all a`).forEach(a=>{a.dataset.gaLabel=this.pagePath}),null)).catch(()=>{var i;t.innerHTML=ot,(i=t.querySelector("button"))==null||i.addEventListener("click",()=>{this.getResource(t,n)})})}init(){if(!this.resourceSection){h.debug("No resource section found.");return}this.pagePath=this.resourceSection.dataset.pagePath;const t="hidden",n=this.resourceSection.querySelectorAll("div[data-source-url]"),i=new MutationObserver(a=>{a.forEach(o=>{if(o.type!=="attributes"||o.attributeName!==t)return;const c=o.target,l=c.getAttribute(t)==="true",r=c.dataset.sourceUrl,s=c.innerHTML.trim()==="";l||!s||!r||this.getResource(c,r)})});n.forEach(a=>i.observe(a,{attributes:!0,attributeOldValue:!0,attributeFilter:[t]}))}}function st(){let e,t;return{promise:new Promise((i,a)=>{[e,t]=[i,a]}),reject:t,resolve:e}}S.dataController={resourcesLoaded:{},resources:{},async getResource(e){const t=st();if(this.resourcesLoaded[e])return t.resolve(this.resources[e]),t.promise;try{const n=await fetch(e);if(!n.ok)throw new Error("Loading of citation failed.");const i=await n.text();this.resources[e]=i,this.resourcesLoaded[e]=!0,t.resolve(i)}catch{t.reject("Loading of citation failed.")}return t.promise}};class rt{constructor(t){this.articleResources=new S,this.citeBox=null,this.collectionButton=null,this.toast=t}init(){h.debug("ArticleNavAdvanced: init"),this.articleResources.init(),this.activateOverlay(),this.initCiteButton(),this.initFavoritesButton()}activateOverlay(){document.querySelectorAll('.overlay[role="dialog"]').forEach(n=>{n.hidden=!1})}initCiteButton(){if(!window.ctxp){h.debug("ArticleNavAdvanced: ctxp not found");return}if(!window.jQuery){h.debug("ArticleNavAdvanced: jQuery not found");return}const t=window.ctxp.CiteBox,n=window.jQuery,i=window.ncbi.pmc.options.citeCookieName,a=n(".citation-dialog"),o=n(".citation-dialog-trigger"),c=X(i)||o.data("citation-style");o.data("citation-style",c),this.citeBox=new t(a,o),a.on("copy-event",(l,r,s,u)=>{var d;n(l.target).is(":visible")&&((d=this.toast)==null||d.info(u))}),a.on("change-event",(l,r,s,u)=>{Y(i,u,{expires:365*5})})}initFavoritesButton(){if(!window.jQuery){h.debug("ArticleNavAdvanced: jQuery not found");return}const t=window.jQuery,n=document.querySelector("[data-article-id]");this.collectionButton=new window.exports.CollectionsButton(t(n))}}const T="pmc-permalink",R=`${T}__dropdown`,ct=`${R}__copy__btn`;class lt{constructor(t,n){this.container=document.querySelector(`.${T}`),this.popover=t,this.toast=n}createListener(){const t=this.toast;return function(){var o;const i=(o=this.parentNode)==null?void 0:o.querySelector("input"),a=i==null?void 0:i.value;z(a).then(()=>(t.info("Permalink successfully copied."),null)).catch(()=>{t==null||t.error("Can't copy permalink. Please select text and press Ctrl+C.")})}}init(){var n;if(!this.container){h.debug("Permalink: no resource found");return}(n=this.popover)==null||n.add(document==null?void 0:document.querySelectorAll(`.${T} button`),i=>{var a,o;return(o=(a=i.parentNode)==null?void 0:a.querySelector(`.${R}`))==null?void 0:o.innerHTML},{appendTo:"parent",trigger:"click",placement:"bottom-end",aria:null,maxWidth:"none",theme:"dropdown",plugins:[m.hideOnEsc,m.hideOnPopperBlur,m.menuBehavior],onShown(i){var o;const a=(o=i==null?void 0:i.popper)==null?void 0:o.querySelector("input");a==null||a.focus(),a==null||a.select()}});const t=this.createListener();document.body.addEventListener("click",M(`.${ct}`,t))}}const k=`${C.prefix}-current`,dt="On this page",ut="h4",ht=.1,pt="0px 0px 0px 0px",gt="1",b=`${C.prefix}-in-page-nav`,mt=`${b}__nav`,B=`${b}__list`,O=`${b}__item`,L=`${b}__link`,bt=`${b}__heading`,ft=`${O}--sub-item`,vt=`${C.prefix}-anchor`,wt="main",yt=e=>{const t=document.querySelectorAll(`.${L}`);e.map(n=>{var i;return n.isIntersecting===!0&&n.intersectionRatio>=1?(t.forEach(a=>a.classList.remove(k)),(i=document.querySelector(`.${B} a[href="#${n.target.dataset.anchorId}"]`))==null||i.classList.add(k),!0):!1})},At=e=>{const t=document.querySelectorAll(`${e} .main-article-body h2:not(.obj_head), ${e} article.sub-article h1`);return Array.from(t).filter(a=>{const o=window.getComputedStyle(a);return o.getPropertyValue("display")!=="none"&&o.getPropertyValue("visibility")!=="hidden"})},_t=e=>{let t;return e&&e.nodeType===1?t=e.getAttribute("href").replace("#",""):t=e.target.hash.replace("#",""),t},$=e=>{const t=Math.floor(window.innerHeight*ht);window.scroll({behavior:"smooth",top:e.getBoundingClientRect().top+window.scrollY-t,block:"start"}),window.location.hash.slice(1)!==e.id&&window.history.pushState(null,"",`#${e.id}`)},Lt=()=>{const e=window.location.hash.slice(1);if(e){const t=document.getElementById(e);t&&$(t)}},St=e=>{const t=y.escapeHTML`${e.dataset.titleText||dt}`,n=y.escapeHTML`${e.dataset.titleHeadingLevel||ut}`,i=y.escapeHTML`${e.dataset.rootMargin||pt}`,a=y.escapeHTML`${e.dataset.threshold||gt}`,o=y.escapeHTML`${e.dataset.mainContentSelector||wt}`,c={root:null,rootMargin:i,threshold:[a]},l=At(o);if(!l.length){e.hidden=!0;return}e.hidden=!1;const r=document.createElement("nav");r.setAttribute("aria-label",t),r.classList.add(mt);const s=document.createElement(n);s.classList.add(bt),s.setAttribute("tabindex","0"),s.textContent=t,r.appendChild(s);const u=document.createElement("ul");u.classList.add(B),r.appendChild(u);const d=[];l.forEach(p=>{const x=p.closest("section[id], article.sub-article[id]");if(!x)return;const v=x.getAttribute("id"),A=document.createElement("li"),g=document.createElement("a"),w=document.createElement("a"),I=p.textContent,V=p.tagName.toLowerCase();A.classList.add(O),V==="h3"&&A.classList.add(ft),g.dataset.anchorId=v,g.setAttribute("href",`#${v}`),g.setAttribute("class",L),g.dataset.gaCategory="article_side_nav",g.dataset.gaAction="click",g.dataset.gaLabel=I,g.textContent=I,w.setAttribute("id",`${v}-anchor`),w.dataset.anchorId=v,w.setAttribute("class",vt),p.insertAdjacentElement("afterbegin",w),d.push(w),p.dataset.anchorId=v,u.appendChild(A),A.appendChild(g)}),e.appendChild(r);const f=new window.IntersectionObserver(yt,c);d.forEach(p=>{f.observe(p)})},Et=e=>{const t=document.getElementById(e.hash.slice(1));$(t)},Tt=e=>{const t=_t(e),n=document.getElementById(t),i=n.parentElement;i&&(i.setAttribute("tabindex",0),i.focus(),i.addEventListener("blur",U(()=>{i.setAttribute("tabindex",-1)}))),$(n)},Ct=F({[j.CLICK]:{[`.${L}`](e){e.preventDefault(),!this.disabled&&Et(this)}},keydown:{[`.${L}`]:Q({Enter:Tt})}},{init(e){W(`.${b}`,e).forEach(t=>{St(t),Lt()})}}),Nt={name:"addToSearch",defaultValue:!0,fn(e){const t=document.querySelector("#pmc-search"),i=M('a[data-add-to-search="true"]',a=>{a.preventDefault();const c=a.target.getAttribute("href");t.value=decodeURI(c.split("=").slice(-1).pop()),e.hide()});return{onShow(){document.body.addEventListener("click",i)},onHide(){document.body.removeEventListener("click",i)}}}};window.ncbi=window.ncbi||{};window.ncbi.pmc=window.ncbi.pmc||{};window.ncbi.pmc.articlePage={init(){var r;h.debug("articlePage.init");const e=new m,t=new K;t.init();const n=new et,i=new nt,a=new tt(".pmc-pagination__scanned",".fig-scanned"),o=new rt(t),c=new lt(e,t);n.init(),i.init(),a.init(),o.init(),c.init(),Ct.on();const l=document.querySelector(".pmc-prose");e.add('a[aria-describedby]:not([aria-describedby=""])',s=>{const u=s.getAttribute("aria-describedby"),d=document.getElementById(u),f=d==null?void 0:d.innerHTML,p=!(d!=null&&d.hidden)&&`[Ref list]`||"";return`${f}${p}`},{appendTo:()=>l,touch:!1,placement:"bottom",maxWidth:"none",inlinePositioning:!0,plugins:[m.inlinePositioning],theme:"dropdown"}),e==null||e.add((r=document==null?void 0:document.querySelector(".pmc-layout__citation"))==null?void 0:r.querySelectorAll(' button:not([aria-controls=""])'),s=>{var d;const u=s.getAttribute("aria-controls");return(d=document==null?void 0:document.querySelector(`#${u}`))==null?void 0:d.innerHTML},{appendTo:"parent",arrow:!1,theme:"menu",trigger:"click",placement:"bottom-start",aria:null,plugins:[m.hideOnEsc,m.hideOnPopperBlur,m.menuBehavior,Nt]})}};window.ncbi.pmc.articlePage.init();