PageSourceSearch

https://images.rxlist.com/oocommon/js/oo-ui.js

js rxlist.com collected 2026-09-24 08:42:07 UTC 54,508 bytes, 181 lines download raw bytes

1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();class ye extends Map{set(e,r){return super.set(e,r),r}}class J extends WeakMap{set(e,r){return super.set(e,r),r}}/*! (c) Andrea Giammarchi - ISC */const be=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,xe=/<([a-z]+[a-z0-9:._-]*)([^>]*?)(\/?)>/g,Ce=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,ke=/[\x01\x02]/g,Le=(t,e,r)=>{let n=0;return t.join("�").trim().replace(xe,(i,s,c,a)=>{let u=s+c.replace(Ce,"�=$2$1").trimEnd();return a.length&&(u+=r||be.test(s)?" /":"></"+s),"<"+u+">"}).replace(ke,i=>i==="�"?"<!--"+e+n+++"-->":e+n++)},Se=1,ae=111,$e=({firstChild:t,lastChild:e})=>{const r=document.createRange();return r.setStartAfter(t),r.setEndAfter(e),r.deleteContents(),t},_e=(t,e)=>t.nodeType===ae?1/e<0?e?$e(t):t.lastChild:e?t.valueOf():t.firstChild:t,Ee=t=>{const{firstChild:e,lastChild:r}=t;if(e===r)return r||t;const{childNodes:n}=t,i=[...n];return{ELEMENT_NODE:Se,nodeType:ae,firstChild:e,lastChild:r,valueOf(){return n.length!==i.length&&t.append(...i),t}}},{isArray:Be}=Array,Me=t=>e=>{for(const r in e){const n=r==="role"?r:`aria-${r}`,i=e[r];i==null?t.removeAttribute(n):t.setAttribute(n,i)}},Q=t=>t==null?t:t.valueOf(),Ae=(t,e)=>{let r,n=!0;const i=document.createAttributeNS(null,e);return s=>{const c=Q(s);r!==c&&((r=c)==null?n||(t.removeAttributeNode(i),n=!0):(i.value=c,n&&(t.setAttributeNodeNS(i),n=!1)))}},He=(t,e,r)=>n=>{const i=!!Q(n);r!==i&&((r=i)?t.setAttribute(e,""):t.removeAttribute(e))},Te=({dataset:t})=>e=>{for(const r in e){const n=e[r];n==null?delete t[r]:t[r]=n}},X=(t,e)=>{let r,n,i=e.slice(2);return!(e in t)&&(n=e.toLowerCase())in t&&(i=n.slice(2)),s=>{const c=Be(s)?s:[s,!1];r!==c[0]&&(r&&t.removeEventListener(i,r,c[1]),(r=c[0])&&t.addEventListener(i,r,c[1]))}},qe=t=>{let e;return r=>{e!==r&&(e=r,typeof r=="function"?r(t):r.current=t)}},Ue=(t,e)=>e==="dataset"?Te(t):r=>{t[e]=r},ze=t=>{let e;return r=>{const n=Q(r);e!=n&&(e=n,t.textContent=n??"")}},De=(t,e,r,n,i)=>{const s=r.length;let c=e.length,a=s,u=0,o=0,l=null;for(;u<c||o<a;)if(c===u){const h=a<s?o?n(r[o-1],-0).nextSibling:n(r[a-o],0):i;for(;o<a;)t.insertBefore(n(r[o++],1),h)}else if(a===o)for(;u<c;)(!l||!l.has(e[u]))&&t.removeChild(n(e[u],-1)),u++;else if(e[u]===r[o])u++,o++;else if(e[c-1]===r[a-1])c--,a--;else if(e[u]===r[a-1]&&r[o]===e[c-1]){const h=n(e[--c],-1).nextSibling;t.insertBefore(n(r[o++],1),n(e[u++],-1).nextSibling),t.insertBefore(n(r[--a],1),h),e[c]=r[a]}else{if(!l){l=new Map;let h=o;for(;h<a;)l.set(r[h],h++)}if(l.has(e[u])){const h=l.get(e[u]);if(o<h&&h<a){let w=u,v=1;for(;++w<c&&w<a&&l.get(e[w])===h+v;)v++;if(v>h-o){const C=n(e[u],0);for(;o<h;)t.insertBefore(n(r[o++],1),C)}else t.replaceChild(n(r[o++],1),n(e[u++],-1))}else u++}else t.removeChild(n(e[u++],-1))}return r},{isArray:le,prototype:Oe}=Array,{indexOf:Ie}=Oe,{createDocumentFragment:Pe,createElement:Re,createElementNS:Ne,createTextNode:Fe,createTreeWalker:je,importNode:We}=new Proxy({},{get:(t,e)=>document[e].bind(document)}),Ke=t=>{const e=Re("template");return e.innerHTML=t,e.content};let P;const Ve=t=>{P||(P=Ne("http://www.w3.org/2000/svg","svg")),P.innerHTML=t;const e=Pe();return e.append(...P.childNodes),e},Ze=(t,e)=>e?Ve(t):Ke(t),Je=({childNodes:t},e)=>t[e],U=(t,e,r)=>De(t.parentNode,e,r,_e,t),Qe=t=>{let e,r,n=[];const i=s=>{switch(typeof s){case"string":case"number":case"boolean":e!==s&&(e=s,r||(r=Fe("")),r.data=s,n=U(t,n,[r]));break;case"object":case"undefined":if(s==null){e!=s&&(e=s,n=U(t,n,[]));break}if(le(s)){e=s,s.length===0?n=U(t,n,[]):typeof s[0]=="object"?n=U(t,n,s):i(String(s));break}if(e!==s)if("ELEMENT_NODE"in s)e=s,n=U(t,n,s.nodeType===11?[...s.childNodes]:[s]);else{const c=s.valueOf();c!==s&&i(c)}break;case"function":i(s(t));break}};return i},Ge=(t,e)=>{switch(e[0]){case"?":return He(t,e.slice(1),!1);case".":return Ue(t,e.slice(1));case"@":return X(t,"on"+e.slice(1));case"o":if(e[1]==="n")return X(t,e)}switch(e){case"ref":return qe(t);case"aria":return Me(t)}return Ae(t,e)};function Ye(t){const{type:e,path:r}=t,n=r.reduceRight(Je,this);return e==="node"?Qe(n):e==="attr"?Ge(n,t.name):ze(n)}const j=t=>{const e=[];let{parentNode:r}=t;for(;r;)e.push(Ie.call(r.childNodes,t)),t=r,{parentNode:r}=t;return e}
1,z="isµ",ee=new J,Xe=/^(?:textarea|script|style|title|plaintext|xmp)$/,D=()=>({stack:[],entry:null,wire:null}),et=(t,e)=>{const{content:r,updates:n}=rt(t,e);return{type:t,template:e,content:r,updates:n,wire:null}},tt=(t,e)=>{const r=t==="svg",n=Le(e,z,r),i=Ze(n,r),s=je(i,129),c=[],a=e.length-1;let u=0,o=`${z}${u}`;for(;u<a;){const l=s.nextNode();if(!l)throw`bad template: ${n}`;if(l.nodeType===8)l.data===o&&(c.push({type:"node",path:j(l)}),o=`${z}${++u}`);else{for(;l.hasAttribute(o);)c.push({type:"attr",path:j(l),name:l.getAttribute(o)}),l.removeAttribute(o),o=`${z}${++u}`;Xe.test(l.localName)&&l.textContent.trim()===`<!--${o}-->`&&(l.textContent="",c.push({type:"text",path:j(l)}),o=`${z}${++u}`)}}return{content:i,nodes:c}},rt=(t,e)=>{const{content:r,nodes:n}=ee.get(e)||ee.set(e,tt(t,e)),i=We(r,!0),s=n.map(Ye,i);return{content:i,updates:s}},R=(t,{type:e,template:r,values:n})=>{const i=ce(t,n);let{entry:s}=t;(!s||s.template!==r||s.type!==e)&&(t.entry=s=et(e,r));const{content:c,updates:a,wire:u}=s;for(let o=0;o<i;o++)a[o](n[o]);return u||(s.wire=Ee(c))},ce=({stack:t},e)=>{const{length:r}=e;for(let n=0;n<r;n++){const i=e[n];i instanceof N?e[n]=R(t[n]||(t[n]=D()),i):le(i)?ce(t[n]||(t[n]=D()),i):t[n]=null}return r<t.length&&t.splice(r),r};class N{constructor(e,r,n){this.type=e,this.template=r,this.values=n}}const de=t=>{const e=new J,r=n=>(i,...s)=>R(n,{type:t,template:i,values:s});return Object.assign((n,...i)=>new N(t,n,i),{for(n,i){const s=e.get(n)||e.set(n,new ye);return s.get(i)||s.set(i,r(D()))},node:(n,...i)=>R(D(),new N(t,n,i)).valueOf()})},te=new J,nt=(t,e)=>{const r=typeof e=="function"?e():e,n=te.get(t)||te.set(t,D()),i=r instanceof N?R(n,r):r;return i!==n.wire&&(n.wire=i,t.replaceChildren(i.valueOf())),t},it=de("html"),st=de("svg");function A(t,e=window.location.pathname,r=t.Routes||[],n=[],i=[]){t.LocalStorageKey&&localStorage.getItem(t.LocalStorageKey)&&(t={...t,...JSON.parse(localStorage.getItem(t.LocalStorageKey))}),t.Evaluate=o=>o===void 0?{...t}:{...t}[o],t.JSON=()=>JSON.stringify(t),t.HTML=it,t.SVG=st,t.Link=o=>l=>{l.preventDefault(),e=o||l.target.attributes.href.value,window.history.pushState({Path:e},e,`${e}`),u()},window.addEventListener("popstate",o=>{e=window.location.pathname,u()}),t.Every=(o,...l)=>setInterval(h=>t.Update(...l),o),t.Delay=(o,...l)=>setTimeout(h=>t.Update(...l),o),t.Effect=(o,l)=>{n.some(h=>h[0].toString()===o.toString()&&h[1]===l)||n.push([o,l])},t.Calculate=(o,l)=>{i.some(h=>h[0].toString()===o.toString()&&h[1]===l)||i.push([o,l])},t.Update=(...o)=>{if(t.Before&&c(t.Before),c(...o),t.After&&c(t.After),t.LocalStorageKey){const l={...t};t.LocalStorageBlackList&&t.LocalStorageBlackList.split(",").forEach(h=>delete l[h]),localStorage.setItem(t.LocalStorageKey,JSON.stringify(l))}t.Debug&&console.log(t.JSON()),u()},t.Initiate&&c(t.Initiate),t.View(t),c(t),t.Debug&&console.log(t.JSON()),u();function s(o,l){Object.entries(l).forEach(([h,w])=>o[h]=w)}function c(...o){t=o.reduce((l,h)=>{const{Update:w,HTML:v,SVG:C,Evaluate:f,JSON:b,Link:y,Every:d,Delay:p,Content:g,Effect:m,Calculate:k,...L}=typeof h=="function"?h(l):h;return s(l,L),n.filter(x=>!x[1]||x[1].split(",").some(S=>L.hasOwnProperty(S))).forEach(x=>x[0](l)),i.filter(x=>!x[1]||x[1].split(",").some(S=>L.hasOwnProperty(S))).forEach(x=>s(l,x[0](l))),l},t)}const a=o=>(o==="/"?["/"]:o.split("/").filter(l=>l!=="")).reduce((l,h)=>{const w=l.routes.find(v=>v.path[0]===":");return l.routes.find(v=>v.path===h)?{...l.routes.find(v=>v.path===h),params:l.params}:{...w,params:{...l.params,[w.path.slice(1)]:h}}},{routes:r});function u(){if(r.length){const o=a(e);document.title=o.title||document.title,o.update&&c(o.params?o.update(o.params):o.update),o.view&&(t.Content=o.view(t))}nt(t.Element||document.body,t.View(t))}return t.Update}const ot=/[\/]/g,at=/[A-Za-z0-9-,\/\s]/g;class lt extends HTMLElement{constructor(){super(),this.initialized=!1}connectedCallback(){this.initialized||this.init()}
1async init(){this.setupView(),this.setupListener(),this.initialized=!0}setupView(){const e=(i,s,c)=>{let a=i.data.selectedIndex==c?"bg-sky-400":"";return i.HTML`<li role="option" tabindex="${c}" class=${`px-4 py-1 hover:bg-sky-400 cursor-pointer ${a}`} @click=${this.onSelect.bind(this)}>${s.Name}</li>`},r=(i,s)=>i.HTML`
2      <div class="relative flex w-full">
3      <input class="w-full h-9 overflow-visible box-border border-2 border-sky-400 rounded-l-md placeholder:italic placeholder:text-slate-400 text-sm pl-2 py-4 bg-transparent focus:outline-none focus:ring-0"
4              name="searchText"
5              oninput=${this.changeQuery.bind(this)}
6              value=${`${i.data.searchString}`}
7              type="search"
8              autocomplete="off"
9              placeholder="${this.getAttribute("placeholder")}"
10              disabled="${this.getAttribute("disabled")}"
11              @focus=${this.onFocus.bind(this)}
12              @blur=${this.onBlur.bind(this)}
13              
14              onkeyup=${this.onkeyup.bind(this)}
15            >
16            <button class=${`${i.data.searchString?"":"hidden"} absolute w-6 h-full right-2 items-center text-black hover:text-sky-400 dark:placeholder:text-neutral-200`} onclick=${this.clearSearch.bind(this)}>
17            <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
18                  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
19                </svg>
20            </button>
21          </div>
22      `,n=i=>i.HTML`
23      <div class="p-1">
24        <div class="flex flex-col gap-y-1" @submit=${this.onFormSubmit.bind(this)}>
25          <div class="flex">
26            ${r(i)}
27            <button class=${`${i.props.showSearchButton?"":"hidden"} px-4 border border-sky-400 rounded-r-md bg-sky-400 text-white`} type="submit">${i.props.searchButtonText}</button>
28          </div>
29          </div>
30          ${i.data.listItems.length?i.HTML`<div class="py-2 bg-neutral-200 rounded-md">
31              <ul name="searchResult" class="py-1">
32                ${i.data.listItems.length?i.HTML`${i.data.listItems.map((s,c)=>e(i,s,c))}`:""}
33              </ul>
34            </div>`:""}
35      </div>
36    `;this.State={View:n,Element:this,props:{hostname:window.location.hostname.replace("comments","www"),showSearchButton:/true/i.test(this.getAttribute("show-search-button")),searchButtonText:this.getAttribute("search-button-text"),searchApi:this.getAttribute("search-api"),submitApi:this.getAttribute("submit-api")},ui:{},data:{searchString:"",listItems:[],selectedIndex:-1}},this.Update=A(this.State)}async updateData(e){this.Update(r=>(r.data=e,r))}setupListener(){document.addEventListener("click",r=>{this.onClick(),this.contains(r.target)||this.clearSearch()});const e=this.querySelector('[name="searchText');this.addEventListener("focus",r=>{e.focus()}),this.addEventListener("keyup",r=>{if(r.key==="ArrowDown")this.moveDown();else if(r.key=="ArrowUp")this.moveUp();else if(r.key=="Enter")if(this.State.data.selectedIndex!=-1){let n=this.State.data.listItems[this.State.data.selectedIndex];this.Update(i=>(i.data.searchString=n,i)),this.forwardSearch(n.Name)}else this.State.data.searchString&&this.forwardSearch(this.State.data.searchString);else{let n=event.target.value;this.doSearch(n)}})}onClick(){}clearSearch(){this.querySelector("input").value="",this.updateData({searchString:"",listItems:[],selectedIndex:-1})}onFocus(e){const r=e.target.value;r&&this.doSearch(r)}onBlur(){}async moveDown(){if(this.State.data.listItems.length>0){let e=this.State.data.selectedIndex;e<this.State.data.listItems.length-1&&this.Update(r=>(r.data={...r.data,selectedIndex:e+1},r))}}async moveUp(){if(this.State.data.listItems.length>0){let e=this.State.data.selectedIndex;e>0&&this.Update(r=>(r.data={...r.data,selectedIndex:e-1},r))}}async onkeyup(e){e.target.value}async onSearch(e){this.updateData({searchString:"",listItems:[],selectedIndex:-1})}async doSearch(e){let r=new URL(`https://${this.State.props.hostname+"/"+this.State.props.searchApi+"/"+e}`);const i=await(await fetch(r)).json();i.map(s=>`<div class="item">${s}</div`),this.Update(s=>(s.data={...s.data,searchString:e,listItems:e?i:[],selectedIndex:-1},s))}async onEnter(e){}
36async onFormSubmit(e){e.preventDefault()}async onSelect(e){let r=e.target.textContent;r&&this.forwardSearch(r)}async changeQuery(e){}forwardSearch(e){let r=e.match(at).join("").replace(ot," ");r=r.replace(/ +(?= )/g,"").trim().toLowerCase();let n=`https://${this.State.props.hostname}${this.State.props.submitApi}${r}`;window.location=n}}class ct extends HTMLElement{constructor(){super(),this.initialized=!1}connectedCallback(){this.initialized||this.init()}async init(){this.hostname=window.location.hostname,this.setupView(),this.setupListener()}setupView(){const e=this.getAttribute("icon-only");console.log("icon only: "+e);const r=(s,c)=>s.HTML`
37    <!-- Modal toggle -->
38    <button onclick=${this.openDialog.bind(this)} class="subscribe-icon flex items-center px-1.5 py-1 lg:border rounded-md box-border border-sky-400 text-sky-400 hover:bg-sky-400 hover:text-white cursor-pointer lg:group-[.open-search]:hidden">
39          <svg class="icon w-5 h-5 fill-current" viewBox="0 0 1691 1407" width="30" height="30"><use xlink:href="#envelop-icon"/></svg>
40          <span class="pl-2">Subscribe</span>
41        </button>`,n=(s,c)=>s.HTML`
42      <div onclick=${this.openDialog.bind(this)} class="hover:text-sky-400 cursor-pointer">
43        <svg class="icon w-5 h-5 fill-current" viewBox="0 0 1691 1407" width="30" height="30"><use xlink:href="#envelop-icon"/></svg>
44      </div>`,i=s=>s.HTML`
45    <svg hidden><symbol id="envelop-icon" viewBox="0 0 1691 1407" height="1407px" width="1691px"><g id="packet"><path d="M1691,165.177C1691,73.952,1617.048,0,1525.823,0H165.177C73.952,0,0,73.952,0,165.177v1076.646   C0,1333.048,73.952,1407,165.177,1407h1360.646c91.225,0,165.177-73.952,165.177-165.177V165.177z M166.062,132h1361.057   c18.216,0,32.881,14.528,32.881,32.746v1.433L869.916,856.337c-8.417,8.417-18.208,9.675-23.318,9.675   c-5.11,0-14.934-1.258-23.353-9.675L133,166.085v-1.339C133,146.528,147.846,132,166.062,132z M1527.119,1275H166.062   c-18.216,0-33.062-15.084-33.062-33.301V352.961l596.826,596.816c31.198,31.197,72.684,48.376,116.803,48.376   c44.125-0.003,85.528-17.186,116.724-48.382L1560,353.054v888.645C1560,1259.916,1545.335,1275,1527.119,1275z"/></g></symbol></svg>
46      ${e!==null?n(s):r(s)}
47      <!-- Main modal -->
48      <div tabindex="-1" onclick=${this.clickMask.bind(this)} aria-hidden="true" class=${`${s.ui.close?"hidden":""} flex fixed z-10 top-0 left-0 right-0 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full bg-opacity-70 bg-black box-border`}>
49          <div class="relative self-center h-full w-full max-w-2xl max-h-full mx-auto py-16 box-border">
50              <!-- Modal content -->
51              <div class="dialog relative bg-white rounded-lg shadow h-full box-border flex flex-col">
52                  <!-- Modal header -->
53                  <div class="flex items-start justify-between p-4rounded-t">
54                      <button type="button" onclick=${this.closeDialog.bind(this)} class="text-gray-400 bg-transparent hover:text-sky-400 text-sm w-5 h-5 box-content p-4 ml-auto inline-flex justify-center items-center" data-modal-hide="defaultModal">
55                          <svg class="w-5 h-5" aria-hidden="true" fill="none" viewBox="0 0 14 14">
56                              <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
57                          </svg>
58                          <span class="sr-only">Close modal</span>
59                      </button>
60                  </div>
61                  <!-- Modal body -->
62                  <iframe src=${s.data.iframeUrl} class="h-full w-full mx-auto p-4 box-border"></iframe>
63              </div>
64          </div>
65      </div>
66    `;this.State={View:i,Element:this,ui:{close:"hidden"},data:{iframeUrl:""}},this.Update=A(this.State)}setupListener(){}openDialog(){this.Update(e=>(e.ui.close="",e.data.iframeUrl=`https://${this.hostname}/script/main/newsletter-signupmodal_v2.asp`,e))}closeDialog(){this.Update(e=>(e.ui.close="close",e))}clickMask(e){this.querySelector(".dialog").contains(e.target)||this.closeDialog()}}class dt extends HTMLElement{constructor(){super(),this.initialized=!1}connectedCallback(){this.initialized||this.init()}
66async init(){console.log("social button"),this.hostname=window.location.hostname,this.setupView()}setupView(){this.innerHTML;const e=(n,i)=>{switch(this.getAttribute("platform")){case"fb":return n.HTML`<svg width="22" height="23" viewBox="0 0 22 23" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M22 11.9453C22 5.87018 17.0751 0.945312 11 0.945312C4.92486 0.945312 0 5.87018 0 11.9453C0 17.4356 4.02252 21.9865 9.28125 22.8117V15.125H6.48828V11.9453H9.28125V9.52188C9.28125 6.765 10.9235 5.24219 13.4361 5.24219C14.6397 5.24219 15.8984 5.45703 15.8984 5.45703V8.16406H14.5114C13.145 8.16406 12.7188 9.01205 12.7188 9.88195V11.9453H15.7695L15.2818 15.125H12.7188V22.8117C17.9775 21.9865 22 17.4359 22 11.9453Z"></path></svg>`;case"tw":return n.HTML`<svg width="21" height="21" viewBox="0 0 1200 1227" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"></path></svg>`;default:return""}},r=n=>n.HTML`
67      <div class="hover:text-sky-400 hover:cursor-pointer" onclick=${this.openDialog.bind(this)}>${e(n)}</div>
68      <!-- Main modal -->
69      <div tabindex="-1" onclick=${this.clickMask.bind(this)} aria-hidden="true" class=${`${n.ui.close?"hidden":""} flex fixed z-10 top-0 left-0 right-0 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full bg-opacity-70 bg-black box-border`}>
70          <div class="relative self-center h-auto w-full max-w-2xl mx-auto p-4 bg-white">
71              <!-- Modal content -->
72              <div class="dialog relative bg-white rounded-lg h-full box-border flex flex-col">
73                  <!-- Modal header -->
74                  <div class="flex items-start justify-between p-4rounded-t">
75                      <button type="button" onclick=${this.closeDialog.bind(this)} class="text-black bg-transparent border border-solid border-black hover:cursor-pointer hover:text-white hover:bg-black text-sm w-4 h-4 box-content p-2 ml-auto inline-flex justify-center items-center" data-modal-hide="defaultModal">
76                          <svg class="w-5 h-5" aria-hidden="true" fill="none" viewBox="0 0 14 14">
77                              <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
78                          </svg>
79                          <span class="sr-only">Close modal</span>
80                      </button>
81                  </div>
82                  <!-- Modal body -->
83                  <div class="flex flex-col">
84                    <span class="p-4">You are about to visit a website outside of medicinenet. Please familiarize yourself with this other website's Privacy Policy as it differs from ours.</span>
85                    <div class="flex p-2"><button onclick=${this.openUrl.bind(this)} class="m-auto px-14 py-4 border-0 uppercase bg-sky-400 text-white hover:bg-black hover:text-white hover:cursor-pointer">continue</button></div>
86                  </div>
87              </div>
88          </div>
89      </div>
90    `;this.State={View:r,Element:this,ui:{close:"hidden"},data:{}},this.Update=A(this.State)}openDialog(){this.Update(e=>(e.ui.close="",e))}closeDialog(){this.Update(e=>(e.ui.close="close",e))}openUrl(){this.closeDialog();let e=this.getAttribute("url");window.open(e,"_blank")}clickMask(e){this.querySelector(".dialog").contains(e.target)||this.closeDialog()}}class ut extends HTMLElement{constructor(){super(),this.initialized=!1}connectedCallback(){this.initialized||this.init()}
90async init(){this.hostname=window.location.hostname,this.setupView(),this.setupListener()}setupView(){let e=this.querySelector("a"),r=document.createElement("div");this.appendChild(r);const n=i=>i.HTML`
91      <!-- Main modal -->
92      <div tabindex="-1" onclick=${this.clickMask.bind(this)} aria-hidden="true" class=${`${i.ui.close?"hidden":""} flex fixed z-10 top-0 left-0 right-0 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full bg-opacity-70 bg-black box-border`}>
93          <div class="relative self-center h-auto w-full max-w-2xl mx-auto p-4 bg-white">
94              <!-- Modal content -->
95              <div class="dialog relative bg-white rounded-lg h-full box-border flex flex-col">
96                  <!-- Modal header -->
97                  <div class="flex items-start justify-between p-4rounded-t">
98                      <button type="button" onclick=${this.closeDialog.bind(this)} class="text-black bg-transparent border border-solid border-black hover:cursor-pointer hover:text-white hover:bg-black text-sm w-4 h-4 box-content p-2 ml-auto inline-flex justify-center items-center" data-modal-hide="defaultModal">
99                          <svg class="w-5 h-5" aria-hidden="true" fill="none" viewBox="0 0 14 14">
100                              <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
101                          </svg>
102                          <span class="sr-only">Close modal</span>
103                      </button>
104                  </div>
105                  <!-- Modal body -->
106                  <div class="flex flex-col">
107                    <span class="p-4">You are about to visit a website outside of medicinenet. Please familiarize yourself with this other website's Privacy Policy as it differs from ours.</span>
108                    <div class="flex p-2"><button onclick=${this.openUrl.bind(this)} class="m-auto px-14 py-4 border-0 uppercase bg-sky-400 text-white hover:bg-black hover:text-white hover:cursor-pointer">continue</button></div>
109                  </div>
110              </div>
111          </div>
112      </div>
113    `;this.State={View:n,Element:r,ui:{close:"hidden"},data:{url:e.href}},this.Update=A(this.State)}setupListener(){this.querySelector("a").addEventListener("click",r=>{r.preventDefault(),this.openDialog()})}openDialog(){this.Update(e=>(e.ui.close="",e))}closeDialog(){this.Update(e=>(e.ui.close="close",e))}openUrl(){this.closeDialog();let e=this.State.data.url;window.open(e,"_blank")}clickMask(e){this.querySelector(".dialog").contains(e.target)||this.closeDialog()}}/*!
114 * mustache.js - Logic-less {{mustache}} templates with JavaScript
115 * http://github.com/janl/mustache.js
116 */var ht=Object.prototype.toString,T=Array.isArray||function(e){return ht.call(e)==="[object Array]"};function G(t){return typeof t=="function"}function ft(t){return T(t)?"array":typeof t}function W(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function re(t,e){return t!=null&&typeof t=="object"&&e in t}function pt(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var vt=RegExp.prototype.test;function gt(t,e){return vt.call(t,e)}var wt=/\S/;function mt(t){return!gt(wt,t)}var yt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function bt(t){return String(t).replace(/[&<>"'`=\/]/g,function(r){return yt[r]})}var xt=/\s*/,Ct=/\s+/,ne=/\s*=/,kt=/\s*\}/,Lt=/#|\^|\/|>|\{|&|=|!/;function St(t,e){if(!t)return[];var r=!1,n=[],i=[],s=[],c=!1,a=!1,u="",o=0;function l(){if(c&&!a)for(;s.length;)delete i[s.pop()];else s=[];c=!1,a=!1}var h,w,v;function C(x){if(typeof x=="string"&&(x=x.split(Ct,2)),!T(x)||x.length!==2)throw new Error("Invalid tags: "+x);h=new RegExp(W(x[0])+"\\s*"),w=new RegExp("\\s*"+W(x[1])),v=new RegExp("\\s*"+W("}"+x[1]))}C(e||_.tags);for(var f=new I(t),b,y,d,p,g,m;!f.eos();){if(b=f.pos,d=f.scanUntil(h),d)for(var k=0,L=d.length;k<L;++k)p=d.charAt(k),mt(p)?(s.push(i.length),u+=p):(a=!0,r=!0,u+=" "),i.push(["text",p,b,b+1]),b+=1,p===`
117`&&(l(),u="",o=0,r=!1);if(!f.scan(h))break;if(c=!0,y=f.scan(Lt)||"name",f.scan(xt),y==="="?(d=f.scanUntil(ne),f.scan(ne),f.scanUntil(w)):y==="{"?(
117d=f.scanUntil(v),f.scan(kt),f.scanUntil(w),y="&"):d=f.scanUntil(w),!f.scan(w))throw new Error("Unclosed tag at "+f.pos);if(y==">"?g=[y,d,b,f.pos,u,o,r]:g=[y,d,b,f.pos],o++,i.push(g),y==="#"||y==="^")n.push(g);else if(y==="/"){if(m=n.pop(),!m)throw new Error('Unopened section "'+d+'" at '+b);if(m[1]!==d)throw new Error('Unclosed section "'+m[1]+'" at '+b)}else y==="name"||y==="{"||y==="&"?a=!0:y==="="&&C(d)}if(l(),m=n.pop(),m)throw new Error('Unclosed section "'+m[1]+'" at '+f.pos);return _t($t(i))}function $t(t){for(var e=[],r,n,i=0,s=t.length;i<s;++i)r=t[i],r&&(r[0]==="text"&&n&&n[0]==="text"?(n[1]+=r[1],n[3]=r[3]):(e.push(r),n=r));return e}function _t(t){for(var e=[],r=e,n=[],i,s,c=0,a=t.length;c<a;++c)switch(i=t[c],i[0]){case"#":case"^":r.push(i),n.push(i),r=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],r=n.length>0?n[n.length-1][4]:e;break;default:r.push(i)}return e}function I(t){this.string=t,this.tail=t,this.pos=0}I.prototype.eos=function(){return this.tail===""};I.prototype.scan=function(e){var r=this.tail.match(e);if(!r||r.index!==0)return"";var n=r[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};I.prototype.scanUntil=function(e){var r=this.tail.search(e),n;switch(r){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=n.length,n};function H(t,e){this.view=t,this.cache={".":this.view},this.parent=e}H.prototype.push=function(e){return new H(e,this)};H.prototype.lookup=function(e){var r=this.cache,n;if(r.hasOwnProperty(e))n=r[e];else{for(var i=this,s,c,a,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,c=e.split("."),a=0;s!=null&&a<c.length;)a===c.length-1&&(u=re(s,c[a])||pt(s,c[a])),s=s[c[a++]];else s=i.view[e],u=re(i.view,e);if(u){n=s;break}i=i.parent}r[e]=n}return G(n)&&(n=n.call(this.view)),n};function $(){this.templateCache={_cache:{},set:function(e,r){this._cache[e]=r},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}$.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};$.prototype.parse=function(e,r){var n=this.templateCache,i=e+":"+(r||_.tags).join(":"),s=typeof n<"u",c=s?n.get(i):void 0;return c==null&&(c=St(e,r),s&&n.set(i,c)),c};$.prototype.render=function(e,r,n,i){var s=this.getConfigTags(i),c=this.parse(e,s),a=r instanceof H?r:new H(r,void 0);return this.renderTokens(c,a,n,e,i)};$.prototype.renderTokens=function(e,r,n,i,s){for(var c="",a,u,o,l=0,h=e.length;l<h;++l)o=void 0,a=e[l],u=a[0],u==="#"?o=this.renderSection(a,r,n,i,s):u==="^"?o=this.renderInverted(a,r,n,i,s):u===">"?o=this.renderPartial(a,r,n,s):u==="&"?o=this.unescapedValue(a,r):u==="name"?o=this.escapedValue(a,r,s):u==="text"&&(o=this.rawValue(a)),o!==void 0&&(c+=o);return c};$.prototype.renderSection=function(e,r,n,i,s){var c=this,a="",u=r.lookup(e[1]);function o(w){return c.render(w,r,n,s)}if(u){if(T(u))for(var l=0,h=u.length;l<h;++l)a+=this.renderTokens(e[4],r.push(u[l]),n,i,s);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")a+=this.renderTokens(e[4],r.push(u),n,i,s);else if(G(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(r.view,i.slice(e[3],e[5]),o),u!=null&&(a+=u)}else a+=this.renderTokens(e[4],r,n,i,s);return a}};$.prototype.renderInverted=function(e,r,n,i,s){var c=r.lookup(e[1]);if(!c||T(c)&&c.length===0)return this.renderTokens(e[4],r,n,i,s)};$.prototype.indentPartial=function(e,r,n){for(var i=r.replace(/[^ \t]/g,""),s=e.split(`
118`),c=0;c<s.length;c++)s[c].length&&(c>0||!n)&&(s[c]=i+s[c]);return s.join(`
119`)};$.prototype.renderPartial=function(e,r,n,i){if(n){var s=this.getConfigTags(i),c=G(n)?n(e[1]):n[e[1]];if(c!=null){var a=e[6],u=e[5],o=e[4],l=c;u==0&&o&&(l=this.indentPartial(c,o,a));var h=this.parse(l,s);return this.renderTokens(h,r,n,l,i)}}};$.prototype.unescapedValue=function(e,r){var n=r.lookup(e[1]);if(n!=null)return n};$.prototype.escapedValue=function(e,r,n){var i=this.getConfigEscape(n)||_.escape,s=r.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===_.escape?String(s):i(s)};$.prototype.rawValue=function(e){return e[1]};$.prototype.getConfigTags=function(e){return T(e)?e:e&&typeof e=="object"?e.tags:void 0};$.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!T(e))return e.escape};var _={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){O.templateCache=t},get templateCache(){return O.templateCache}},O=new $;_.clearCache=function(){return O.clearCache()};_.parse=function(e,r){return O.parse(e,r)};_.render=function(e,r,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+ft(e)+'" was given as the first argument for mustache#render(template, view, partials)');return O.render(e,r,n,i)};_.escape=bt;_.Scanner=I;_.Context=H;_.Writer=$;class Et extends HTMLElement{constructor(){super(),this.initialized=!1}connectedCallback(){this.initialized||this.init()}
119async init(){console.log("module loader init");let r=await(await fetch(this.getAttribute("url"),{method:this.getAttribute("method"),headers:{"Content-Type":"application/json"},body:JSON.stringify({name:this.getAttribute("module")})})).json();var n=await _.render(this.querySelector("script").innerHTML,{data:r.Data,FormatDate:function(){return(i,s)=>new Date(htmlDecode(s(i)).trim()).toDateString()}});this.innerHTML=n}}var B=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ue(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bt(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var he={exports:{}};function Mt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var K={exports:{}};const At={},Ht=Object.freeze(Object.defineProperty({__proto__:null,default:At},Symbol.toStringTag,{value:"Module"})),Tt=Bt(Ht);var ie;function F(){return ie||(ie=1,function(t,e){(function(r,n){t.exports=n()})(B,function(){var r=r||function(n,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof B<"u"&&B.crypto&&(s=B.crypto),!s&&typeof Mt=="function")try{s=Tt}catch{}var c=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function d(){}return function(p){var g;return d.prototype=p,g=new d,d.prototype=null,g}}(),u={},o=u.lib={},l=o.Base=function(){return{extend:function(d){var p=a(this);return d&&p.mixIn(d),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var p in d)d.hasOwnProperty(p)&&(this[p]=d[p]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=o.WordArray=l.extend({init:function(d,p){d=this.words=d||[],p!=i?this.sigBytes=p:this.sigBytes=d.length*4},toString:function(d){return(d||v).stringify(this)},concat:function(d){var p=this.words,g=d.words,m=this.sigBytes,k=d.sigBytes;if(this.clamp(),m%4)for(var L=0;L<k;L++){var x=g[L>>>2]>>>24-L%4*8&255;p[m+L>>>2]|=x<<24-(m+L)%4*8}else for(var S=0;S<k;S+=4)p[m+S>>>2]=g[S>>>2];return this.sigBytes+=k,this},clamp:function(){var d=this.words,p=this.sigBytes;d[p>>>2]&=4294967295<<32-p%4*8,d.length=n.ceil(p/4)},clone:function(){var d=l.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var p=[],g=0;g<d;g+=4)p.push(c());return new h.init(p,d)}}),w=u.enc={},v=w.Hex={stringify:function(d){for(var p=d.words,g=d.sigBytes,m=[],k=0;k<g;k++){var L=p[k>>>2]>>>24-k%4*8&255;m.push((L>>>4).toString(16)),m.push((L&15).toString(16))}return m.join("")},parse:function(d){for(var p=d.length,g=[],m=0;m<p;m+=2)g[m>>>3]|=parseInt(d.substr(m,2),16)<<24-m%8*4;return new h.init(g,p/2)}},C=w.Latin1={stringify:function(d){for(var p=d.words,g=d.sigBytes,m=[],k=0;k<g;k++){var L=p[k>>>2]>>>24-k%4*8&255;m.push(String.fromCharCode(L))}return m.join("")},parse:function(d){for(var p=d.length,g=[],m=0;m<p;m++)g[m>>>2]|=(d.charCodeAt(m)&255)<<24-m%4*8;return new h.init(g,p)}},f=w.Utf8={stringify:function(d){try{return decodeURIComponent(escape(C.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return C.parse(unescape(encodeURIComponent(d)))}},b=o.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new h.init,this._nDataBytes=0}
119,_append:function(d){typeof d=="string"&&(d=f.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var p,g=this._data,m=g.words,k=g.sigBytes,L=this.blockSize,x=L*4,S=k/x;d?S=n.ceil(S):S=n.max((S|0)-this._minBufferSize,0);var M=S*L,E=n.min(M*4,k);if(M){for(var q=0;q<M;q+=L)this._doProcessBlock(m,q);p=m.splice(0,M),g.sigBytes-=E}return new h.init(p,E)},clone:function(){var d=l.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0});o.Hasher=b.extend({cfg:l.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var p=this._doFinalize();return p},blockSize:16,_createHelper:function(d){return function(p,g){return new d.init(g).finalize(p)}},_createHmacHelper:function(d){return function(p,g){return new y.HMAC.init(d,g).finalize(p)}}});var y=u.algo={};return u}(Math);return r})}(K)),K.exports}var V={exports:{}},se;function qt(){return se||(se=1,function(t,e){(function(r,n){t.exports=n(F())})(B,function(r){return function(n){var i=r,s=i.lib,c=s.WordArray,a=s.Hasher,u=i.algo,o=[],l=[];(function(){function v(y){for(var d=n.sqrt(y),p=2;p<=d;p++)if(!(y%p))return!1;return!0}function C(y){return(y-(y|0))*4294967296|0}for(var f=2,b=0;b<64;)v(f)&&(b<8&&(o[b]=C(n.pow(f,1/2))),l[b]=C(n.pow(f,1/3)),b++),f++})();var h=[],w=u.SHA256=a.extend({_doReset:function(){this._hash=new c.init(o.slice(0))},_doProcessBlock:function(v,C){for(var f=this._hash.words,b=f[0],y=f[1],d=f[2],p=f[3],g=f[4],m=f[5],k=f[6],L=f[7],x=0;x<64;x++){if(x<16)h[x]=v[C+x]|0;else{var S=h[x-15],M=(S<<25|S>>>7)^(S<<14|S>>>18)^S>>>3,E=h[x-2],q=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;h[x]=M+h[x-7]+q+h[x-16]}var pe=g&m^~g&k,ve=b&y^b&d^y&d,ge=(b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22),we=(g<<26|g>>>6)^(g<<21|g>>>11)^(g<<7|g>>>25),Y=L+we+pe+l[x]+h[x],me=ge+ve;L=k,k=m,m=g,g=p+Y|0,p=d,d=y,y=b,b=Y+me|0}f[0]=f[0]+b|0,f[1]=f[1]+y|0,f[2]=f[2]+d|0,f[3]=f[3]+p|0,f[4]=f[4]+g|0,f[5]=f[5]+m|0,f[6]=f[6]+k|0,f[7]=f[7]+L|0},_doFinalize:function(){var v=this._data,C=v.words,f=this._nDataBytes*8,b=v.sigBytes*8;return C[b>>>5]|=128<<24-b%32,C[(b+64>>>9<<4)+14]=n.floor(f/4294967296),C[(b+64>>>9<<4)+15]=f,v.sigBytes=C.length*4,this._process(),this._hash},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});i.SHA256=a._createHelper(w),i.HmacSHA256=a._createHmacHelper(w)}(Math),r.SHA256})}(V)),V.exports}var Z={exports:{}},oe;function Ut(){return oe||(oe=1,function(t,e){(function(r,n){t.exports=n(F())})(B,function(r){(function(){var n=r,i=n.lib,s=i.Base,c=n.enc,a=c.Utf8,u=n.algo;u.HMAC=s.extend({init:function(o,l){o=this._hasher=new o.init,typeof l=="string"&&(l=a.parse(l));var h=o.blockSize,w=h*4;l.sigBytes>w&&(l=o.finalize(l)),l.clamp();for(var v=this._oKey=l.clone(),C=this._iKey=l.clone(),f=v.words,b=C.words,y=0;y<h;y++)f[y]^=1549556828,b[y]^=909522486;v.sigBytes=C.sigBytes=w,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var l=this._hasher,h=l.finalize(o);l.reset();var w=l.finalize(this._oKey.clone().concat(h));return w}})})()})}(Z)),Z.exports}(function(t,e){(function(r,n,i){t.exports=n(F(),qt(),Ut())})(B,function(r){return r.HmacSHA256})})(he);var zt=he.exports;const Dt=ue(zt);var fe={exports:{}};(function(t,e){(function(r,n){t.exports=n(F())})(B,function(r){return function(){var n=r,i=n.lib,s=i.WordArray,c=n.enc;c.Base64={stringify:function(u){var o=u.words,l=u.sigBytes,h=this._map;u.clamp();for(var w=[],v=0;v<l;v+=3)for(var C=o[v>>>2]>>>24-v%4*8&255,f=o[v+1>>>2]>>>24-(v+1)%4*8&255,b=o[v+2>>>2]>>>24-(v+2)%4*8&255,y=C<<16|f<<8|b,d=0;d<4&&v+d*.75<l;d++)w.push(h.charAt(y>>>6*(3-d)&63));var p=h.charAt(64);if(p)for(;w.length%4;)w.push(p);return w.join("")},parse:function(u){var o=u.length,l=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var w=0;w<l.length;w++)h[l.charCodeAt(w)]=w}var v=l.charAt(64);if(v){var C=u.indexOf(v);C!==-1&&(o=C)}return a(u,o,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
119+/="};function a(u,o,l){for(var h=[],w=0,v=0;v<o;v++)if(v%4){var C=l[u.charCodeAt(v-1)]<<v%4*2,f=l[u.charCodeAt(v)]>>>6-v%4*2,b=C|f;h[w>>>2]|=b<<24-w%4*8,w++}return s.create(h,w)}}(),r.enc.Base64})})(fe);var Ot=fe.exports;const It=ue(Ot);class Pt extends HTMLElement{constructor(){super(),this.initialized=!1,this.url=this.getAttribute("url");let e=this.url;Promise.all([this.getData(e)]).then(r=>{var c,a,u,o,l,h;const n=(u=(a=(c=r[0])==null?void 0:c.data[0])==null?void 0:a.metadata_section)==null?void 0:u.wbmd_c_frnd_nm,i="wgt-rmq-",s=n==null?void 0:n.replace("rm-quiz-","").replace(/-/g,"");this.module=i+(s.length<=13?s:s.substr(0,9)+s.substr(s.length-4)),this.setupUI((h=(l=(o=r[0])==null?void 0:o.data[0])==null?void 0:l.content_section)==null?void 0:h.quiz)})}setupUI(e){if(e){const r=a=>{var u=new DOMParser,o=u.parseFromString(a,"text/html");return o.documentElement.textContent},n=(a,u,o,l)=>{let h=a.data.answers[o]===l,w=a.data.result[o],v=w===void 0||!h?"inline-block":"hidden",C=h&&w===!1?"inline-block":"hidden",f=h&&w===!0?"inline-block":"hidden",b=a.data.answers[o]!==void 0?"pointer-events-none":"pointer-events-auto",y=h?"bg-[#EDF0FF]":"bg-white";const d=p=>g=>a.Update(m=>{m.data.answers[o]=l,m.data.result[o]=u.aweight==1;var k="";return m.data.currentSlide===m.data.quiz.questions.question.length-1&&(k="-complete"),window.s_md&&(s_md.prop17=this.module,s_md.prop18=o*2+1+"-q"+(o+1)+k),window.wmdPageview&&wmdPageview(),window.s_md&&(s_md.prop17="",s_md.prop18=""),m});return a.HTML`
120        <div onclick=${d()} class=${`${b} ${y} flex mb-3 p-5 hover:bg-[#EDF0FF] hover:cursor-pointer`}>
121          <svg class=${`${v} self-center`} xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect x="1" y="1" width="18" height="18" rx="9" stroke="#00157C" stroke-width="2"></rect></svg>
122          <svg class=${`${C} self-center`} xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#D04040"></rect><path d="M9.99545 11.123L6.33682 14.7816C6.18517 14.9333 6.00192 15.0059 5.78708 14.9996C5.57224 14.9933 5.38899 14.9143 5.23734 14.7627C5.08568 14.611 5.00986 14.4246 5.00986 14.2034C5.00986 13.9823 5.08568 13.7959 5.23734 13.6442L8.87701 10.0045L5.21838 6.34592C5.06673 6.19427 4.99406 6.00786 5.00038 5.7867C5.0067 5.56554 5.08568 5.37913 5.23734 5.22748C5.38899 5.07583 5.5754 5 5.79656 5C6.01772 5 6.20412 5.07583 6.35578 5.22748L9.99545 8.88611L13.6541 5.22748C13.8057 5.07583 13.9921 5 14.2133 5C14.4345 5 14.6209 5.07583 14.7725 5.22748C14.9242 5.37913 15 5.56554 15 5.7867C15 6.00786 14.9242 6.19427 14.7725 6.34592L11.1139 10.0045L14.7725 13.6632C14.9242 13.8148 15 13.9981 15 14.2129C15 14.4278 14.9242 14.611 14.7725 14.7627C14.6209 14.9143 14.4345 14.9901 14.2133 14.9901C13.9921 14.9901 13.8057 14.9143 13.6541 14.7627L9.99545 11.123Z" fill="white"></path></svg>
123          <svg class=${`${f} self-center`} xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#47DCAF"></rect><path d="M8.58745 13.8002C8.72078 13.8002 8.84578 13.7794 8.96245 13.7377C9.07912 13.696 9.18745 13.6252 9.28745 13.5252L14.9625 7.8502C15.1458 7.66686 15.2375 7.44186 15.2375 7.1752C15.2375 6.90853 15.1375 6.6752 14.9375 6.4752C14.7541 6.29186 14.5208 6.2002 14.2375 6.2002C13.9541 6.2002 13.7208 6.29186 13.5375 6.4752L8.58745 11.4252L6.41245 9.2502C6.22912 9.06686 6.00412 8.9752 5.73745 8.9752C5.47078 8.9752 5.23745 9.0752 5.03745 9.2752C4.85412 9.45853 4.76245 9.69186 4.76245 9.97519C4.76245 10.2585 4.85412 10.4919 5.03745 10.6752L7.88745 13.5252C7.98745 13.6252 8.09578 13.696 8.21245 13.7377C8.32912 13.7794 8.45412 13.8002 8.58745 13.8002Z" fill="white"></path></svg>
124          <span class="pl-2 text-lg">${r(u.atext["#cdata-section"])}</span>
125        </div>`},i=(a,u,o)=>{const l=d=>p=>a.Update(g=>{g.data.currentSlide=g.data.currentSlide+1;let m="-next";return window.s_md&&(s_md.prop17=this.module),(!Array.isArray(g.data.quiz.questions.question)||g.data.currentSlide===g.data.quiz.questions.question.length)&&(g.data.showResult=!0,m="-end"),window.s_md&&(s_md.prop18=(o+1)*2+m),window.wmdPageview&&wmdPageview(),window.s_md&&(s_md.prop17="",s_md.prop18=""),g});
125let h=a.data.result[o]?"block":"hidden",w=a.data.result[o]===!1?"block":"hidden",v=o==a.data.currentSlide?"block":"hidden",C=a.data.result[o]!==void 0?"block":"hidden";Array.isArray(a.data.quiz.questions.question)&&a.data.result[o];let f=u.qmedia.loc,b=`https://img.lb.wbmdstatic.com/vim/live${u.qmedia.loc}`,y=a.data.quiz.questions.question.length;return a.HTML`<div class=${`${v} animate-fade-in`}>
126          <div class="grid sm:grid-cols-2 gap-x-5 gap-y-4 mb-5">
127            <div class="sm:col-span-2 order-2 flex flex-col sm:flex-row gap-y-3">
128              <span class="text-lg sm:text-xl font-semibold text-gray-900 mr-auto order-3 sm:order-1">${r(u.qtext["#cdata-section"])}</span>
129              <span class="rounded-lg bg-[#E6F6FF] p-2 mt-auto ml-0 mr-auto sm:ml-auto sm:mr-0 mb-auto text-[--fed-theme-color] whitespace-nowrap order-2">${o||1} / ${y?a.data.quiz.questions.question.length:1}</span>
130            </div>
131            <div class="sm:col-span-2 flex-auto box-border inline-flex flex-col order-4 sm:order-3">${u.answers.answer.map((d,p)=>n(a,d,o,p))}</div>
132            ${f?a.HTML`<div class="flex-auto order-1 sm:order-4"><img class="w-full" src=${b}></div>`:""}
133          </div>
134          <div class="">${u.answers}</div>
135          <div class="py-4">
136            <div class=${`${h} text-[#39B08C]`}><svg class="align-middle" width=20 height=20><use xlink:href="#correct-icon" xmlns:xlink="http://www.w3.org/1999/xlink"></use></svg>
137              <span class="pl-2 font-bold">Correct</span>
138            </div>
139            <div class=${`${w} text-[#F88484]`}><svg class="align-middle" width=20 height=20><use xlink:href="#incorrect-icon" xmlns:xlink="http://www.w3.org/1999/xlink"></use></svg>
140              <span class="pl-2 font-bold">Incorrect</span>
141            </div>
142          </div>
143          <div class=${`${C} pb-4 leading-7 text-gray-900`}>${r(u.defexp["#cdata-section"])}</div>
144          <div class=${`${C} bg-blue-600 text-white px-4 py-4 rounded-md cursor-pointer grid grid-cols-2 gap-x-2 w-fit`} onclick=${l()}><span>${y?"Next":"Results"}</span>
145          <svg class="fill-current h-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 330 330"><path id="XMLID_27_" d="M15,180h263.787l-49.394,49.394c-5.858,5.857-5.858,15.355,0,21.213C232.322,253.535,236.161,255,240,255 s7.678-1.465,10.606-4.394l75-75c5.858-5.857,5.858-15.355,0-21.213l-75-75c-5.857-5.857-15.355-5.857-21.213,0 c-5.858,5.857-5.858,15.355,0,21.213L278.787,150H15c-8.284,0-15,6.716-15,15S6.716,180,15,180z"/></svg>
146          </div>
147          </div>
148        `},s=a=>{let u=a.data.showResult?"flex sm:grid auto-cols-max":"hidden",o=Array.isArray(a.data.quiz.questions.question)?a.data.quiz.questions.question.length:1,l=Math.round(a.data.result.filter(f=>f).length/o*100),h=2*40*Math.PI*l/100,w=l<=33?2:l<=67?1:0,v=a.data.quiz.results?a.data.quiz.results.result[w].restext["#cdata-section"]:"";const C=f=>b=>a.Update(y=>(y.data.showResult=!1,y.data.currentSlide=0,y.data.answers=[],y.data.result=[],window.s_md&&(s_md.prop17=this.module,s_md.prop18="rmq-retake"),window.wmdPageview&&wmdPageview(),window.s_md&&(s_md.prop17="",s_md.prop18=""),y));return a.HTML`
149                <div class=${`${u} animate-fade-in bg-white flex-col sm:grid-flow-col sm:auto-cols-auto sm:gap-4 p-4`}>
150            <div class="relative self-center w-32 h-32 p-4 row-span-4">
151                <svg class="absolute top-0 left-0 -rotate-90 translate-x-0 translate-y-0 scale-x-100 scale-y-100 skew-x-0 skew-y-0 fill-none stroke-red stroke-12 stroke-current [stroke-linecap:round] transition-all" viewbox="0 0 100 100" width="125" height="125" data-percent="89">
152                  <circle class="" cx="50" cy="50" r="40" stroke="gainsboro" stroke-dasharray="999"/>  
153                  <circle class="" cx="50" cy="50" r="40" stroke="darkblue" stroke-dasharray=${`${h}, 999`}/>
154                </svg>
155                <div class="absolute top-2/4 left-0 inline-block text-center margin-0 w-full -translate-y-2/4 translate-x-0 scale-x-100 scale-y-100 skew-x-0 skew-y-0 rotate-0 text-3xl">${l} %</div>
156            </div>
157            <div class="py-2 font-semibold text-xl text-center sm:text-left">Your score:</div>
158            <div class="flex text-center sm:text-left p-4">
159              <svg class="mt-auto mb-auto" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#39B08C"></rect><path d="M8.58745 13.8002C8.72078 13.8002 8.84578 13.7794 8.96245 13.7377C9.07912 13.696 9.18745 13.6252 9.28745 13.5252L14.9625 7.8502C15.1458 7.66686 15.2375 7.44186 15.2375 7.1752C15.2375 6.90853 15.1375 6.6752 14.9375 6.4752C14.7541 6.29186 14.5208 6.2002 14.2375 6.2002C13.9541 6.2002 13.7208 6.29186 13.5375 6.4752L8.58745 11.4252L6.41245 9.2502C6.22912 9.06686 6.00412 8.9752 5.73745 8.9752C5.47078 8.9752 5.23745 9.0752 5.03745 9.2752C4.85412 9.45853 4.76245 9.69186 4.76245 9.97519C4.76245 10.2585 4.85412 10.4919 5.03745 10.6752L7.88745 13.5252C7.98745 13.6252 8.09578 13.696 8.21245 13.7377C8.32912 13.7794 8.45412 13.8002 8.58745 13.8002Z" fill="white"></path></svg>
160              <span class="text-lg px-4 whitespace-nowrap">${a.data.result.filter(f=>f).length} Correct</span>
161              <svg class="mt-auto mb-auto" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#F88484"></rect><path d="M9.99545 11.123L6.33682 14.7816C6.18517 14.9333 6.00192 15.0059 5.78708 14.9996C5.57224 14.9933 5.38899 14.9143 5.23734 14.7627C5.08568 14.611 5.00986 14.4246 5.00986 14.2034C5.00986 13.9823 5.08568 13.7959 5.23734 13.6442L8.87701 10.0045L5.21838 6.34592C5.06673 6.19427 4.99406 6.00786 5.00038 5.7867C5.0067 5.56554 5.08568 5.37913 5.23734 5.22748C5.38899 5.07583 5.5754 5 5.79656 5C6.01772 5 6.20412 5.07583 6.35578 5.22748L9.99545 8.88611L13.6541 5.22748C13.8057 5.07583 13.9921 5 14.2133 5C14.4345 5 14.6209 5.07583 14.7725 5.22748C14.9242 5.37913 15 5.56554 15 5.7867C15 6.00786 14.9242 6.19427 14.7725 6.34592L11.1139 10.0045L14.7725 13.6632C14.9242 13.8148 15 13.9981 15 14.2129C15 14.4278 14.9242 14.611 14.7725 14.7627C14.6209 14.9143 14.4345 14.9901 14.2133 14.9901C13.9921 14.9901 13.8057 14.9143 13.6541 14.7627L9.99545 11.123Z" fill="white"></path></svg>
162              <span class="text-lg px-4 whitespace-nowrap">${a.data.result.filter(f=>!f).length} Incorrect</span>
163            </div>
164            <div class="py-2"><span class="font-semibold text-xl">${v!==""?"Results:":""}</span> ${r(v)}</div>
165            <div class="w-fit bg-blue-600 text-white px-8 py-3 rounded-md inline-block cursor-pointer self-center sm:self-left" onclick=${C()}>Retake Quiz</div>
166          </div>
167        `},c=a=>a.HTML`
168      <svg hidden><symbol id="correct-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#39B08C"></rect><path d="M8.58745 13.8002C8.72078 13.8002 8.84578 13.7794 8.96245 13.7377C9.07912 13.696 9.18745 13.6252 9.28745 13.5252L14.9625 7.8502C15.1458 7.66686 15.2375 7.44186 15.2375 7.1752C15.2375 6.90853 15.1375 6.6752 14.9375 6.4752C14.7541 6.29186 14.5208 6.2002 14.2375 6.2002C13.9541 6.2002 13.7208 6.29186 13.5375 6.4752L8.58745 11.4252L6.41245 9.2502C6.22912 9.06686 6.00412 8.9752 5.73745 8.9752C5.47078 8.9752 5.23745 9.0752 5.03745 9.2752C4.85412 9.45853 4.76245 9.69186 4.76245 9.97519C4.76245 10.2585 4.85412 10.4919 5.03745 10.6752L7.88745 13.5252C7.98745 13.6252 8.09578 13.696 8.21245 13.7377C8.32912 13.7794 8.45412 13.8002 8.58745 13.8002Z" fill="white"></path></symbol></svg>
169      <svg hidden><symbol id="incorrect-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><rect width="20" height="20" rx="10" fill="#F88484"></rect><path d="M9.99545 11.123L6.33682 14.7816C6.18517 14.9333 6.00192 15.0059 5.78708 14.9996C5.57224 14.9933 5.38899 14.9143 5.23734 14.7627C5.08568 14.611 5.00986 14.4246 5.00986 14.2034C5.00986 13.9823 5.08568 13.7959 5.23734 13.6442L8.87701 10.0045L5.21838 6.34592C5.06673 6.19427 4.99406 6.00786 5.00038 5.7867C5.0067 5.56554 5.08568 5.37913 5.23734 5.22748C5.38899 5.07583 5.5754 5 5.79656 5C6.01772 5 6.20412 5.07583 6.35578 5.22748L9.99545 8.88611L13.6541 5.22748C13.8057 5.07583 13.9921 5 14.2133 5C14.4345 5 14.6209 5.07583 14.7725 5.22748C14.9242 5.37913 15 5.56554 15 5.7867C15 6.00786 14.9242 6.19427 14.7725 6.34592L11.1139 10.0045L14.7725 13.6632C14.9242 13.8148 15 13.9981 15 14.2129C15 14.4278 14.9242 14.611 14.7725 14.7627C14.6209 14.9143 14.4345 14.9901 14.2133 14.9901C13.9921 14.9901 13.8057 14.9143 13.6541 14.7627L9.99545 11.123Z" fill="white"></path></symbol></svg>
170
171      <div class="bg-[#EDF4F6] font-sans-pro p-6">
172      <h2 class="text-xl sm:text-3xl font-bold text-[--fed-theme-color]">${a.data.quiz.quiztitle}</h2>
173      <div>${Array.isArray(a.data.quiz.questions.question)?a.data.quiz.questions.question.map((u,o)=>i(a,u,o)):i(a,a.data.quiz.questions.question,0)}</div>
174      ${s(a)}
175      </div>
176      `;this.State={View:c,Element:this,data:{title:"title",quiz:e,currentSlide:0,showResult:!1,answers:[],result:[]},ui:{showExpanded:""}},this.Update=A(this.State)}}async getData(e){let r="e4e3f73a-0ceb-4d37-939e-90ddb1238360",n="8720f366-3769-47e9-8156-187b9c6583b5",i=new Date().toGMTString(),s=It.stringify(Dt(`{{timestamp:${i},client_id:${r}}}`,n));return await(await fetch(e,{headers:{client_id:r,enc_data:s,timestamp:i,Accept:"application/json"}})).json()}connectedCallback(){this.initialized||this.init()}
176async init(){const e=this.getAttribute("title"),r=n=>n.HTML`
177      <div>
178      ${n.data.title}
179      </div>
180    `;this.State={View:r,Element:this,ui:{},data:{title:e}},this.Update=A(this.State),this.initialized=!0}}customElements.define("ce-search-box",lt);customElements.define("ce-newsletter-button",ct);customElements.define("ce-module-loader",Et);customElements.define("ce-quiz-module",Pt);customElements.define("ce-social-button",dt);customElements.define("ce-external-link",ut);let Rt=document.querySelector("body");Rt.addEventListener("click",t=>{let e=event.target;if(e.closest("nav .hamburger-icon")){let r=document.querySelector("body");document.querySelector("nav").classList.toggle("open-hamburger"),r.classList.toggle("overflow-hidden")}else if(e.closest("nav .search-icon")){let r=document.querySelector("body"),n=document.querySelector("nav"),i=document.querySelector("nav ce-search-box"),s=n.classList.contains("open-search");if(n.classList.toggle("open-search"),n.classList.toggle("open-hamburger"),r.classList.toggle("overflow-hidden"),!s){let c=new Event("focus");i.dispatchEvent(c)}}else e.closest("nav .menu-item")&&e.closest(".menu-item").classList.toggle("show")});window.onload=()=>{let t=document.querySelectorAll("a");for(let e=0;e<t.length;e++){let r=t[e],n=r.href,i=document.createElement("a");i.href=n;let s=i.hostname,c=r.cloneNode(!0);if(s&&!/(webmd.com|medicinenet.com|rxlist.com|emedicinehealth.com|truste.com|internetbrands.com?)$/.test(s)){let a=document.createElement("ce-external-link");a.classList.add("inline-block"),a.appendChild(c),r.replaceWith(a)}}};
181//# sourceMappingURL=oo-ui.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.