quran-madina-html 0.9.7 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -135,7 +135,10 @@ In your Html header, add this script:
135
135
 
136
136
  * Supported ``data-name`` parameters are: Madina05 (default), others are under development (Shemerly, Qaloon, Newer Madina)
137
137
  * Supported ``data-font`` parameters are: Hafs (default), Uthman, Amiri Quran, Amiri Quran Colored
138
- * Other options include: ``data-font-size`` which defaults to 16 (px)
138
+ * Other options include: ``data-font-size`` which defaults to 16 (px). Any size from 6 to 100 works:
139
+ 16 and 24 have pre-built databases, and every other size is fitted at load time by linear
140
+ interpolation between those two anchors (page/line width interpolated, letter stretching
141
+ re-scaled accordingly)
139
142
 
140
143
  Then in your body, just add the tag.
141
144
 
@@ -1,2 +1,2 @@
1
- /*! quran-madina-html 09-07-2026 */
2
- !function(){var C="quran-madina-html",r=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${C}/`,L={content:"Loading .."},a=/[\u0621-\u064A\u0671-\u06D3]/,M="﷽";function S(e,t){return 1===t&&0!==e}var s={};var c={};function u(i,e,t,n){var a,r=!n&&function(e){if(s[e])return s[e];try{var t=sessionStorage.getItem("quran-madina-html:"+e);if(t)return s[e]=JSON.parse(t)}catch(e){}return null}(i);r?e&&setTimeout(function(){e(r)},0):c[i]?c[i].push({success:e,error:t}):(c[i]=[{success:e,error:t}],(a=new XMLHttpRequest).onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var e=c[i];if(delete c[i],200===a.status){var t=JSON.parse(a.responseText),n=i,r=t,o=a.responseText;s[n]=r;try{sessionStorage.setItem("quran-madina-html:"+n,o)}catch(e){}e.forEach(function(e){e.success&&e.success(t)})}else e.forEach(function(e){e.error&&e.error(a)})}},a.open("GET",i,!0),a.send())}function O(e){console.log(C+"> "+e)}function N(e){return null!=e&&(""===(e=String(e).trim().toLowerCase())||"true"===e||"1"===e||"yes"===e)}function P(e){return Array(2).fill(e.split("-")[0]-1)}function I(e){return 2==e.split("-").length?e.split("-").map(e=>parseInt(e)+1):Array(2).fill(parseInt(e.split("-")[0])+1)}function k(e,t){if(null!=e&&"auto"!==e){if("no"===e)return!0;O("yes"===e?'inline="yes" is not implemented yet; falling back to "auto"':"Bad inline parameter: "+e)}return t}function p(e){return a.test(e)}function _(e){var t=0;return e.t.split(/\s+/).forEach(function(e){p(e)&&(t+=1)}),t}function x(e,t="class",n="lightgrey",r="transparent"){var o="tag"===t.toLowerCase()?document.getElementsByTagName(e):document.getElementsByClassName(e);Array.from(o).forEach(function(e){e.onmouseover=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=n})},e.onmouseout=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=r})}})}function D(e,t){var n=(e,t)=>String(e).padStart(t,"0"),n=[C+"-part",`${C}-${n(e,3)}-`+n(t,3)];return(-1==t||1==e&&0==t)&&n.push("quran-madina-html-sura-start"),n}function h(){var e=document.createElement("div");return e.innerHTML='<svg viewBox="0 0 24 24" class="quran-madina-html-icon" width="20px"><path d="M16.02 20.96H3.78c-.41 0-.75-.34-.75-.75V7.74c0-.41.34-.75.75-.75h7.87c.21 0 .39.08.53.22l4.37 4.37c.14.14.22.32.22.53v8.11c0 .4-.34.74-.75.74ZM4.53 19.47h10.75v-6.61h-3.62c-.41 0-.75-.34-.75-.75V8.48H4.53v10.99Z"></path><path d="m20.74 7.63-4.37-4.37c-.14-.14-.36-.2-.53-.22H8.01c-.41 0-.75.34-.75.75V5.5h1.49v-.97h6.34v3.62c0 .41.34.75.75.75h3.62v8.19h-1.2v1.49h1.95c.41 0 .75-.34.75-.75V8.16c0-.21-.08-.4-.22-.53Z"></path></svg>'.trim(),e.firstChild}function f(){var e=document.createElement("div");return e.innerHTML='<svg class="quran-madina-html-icon" viewBox="0 0 820 615" style="height:20px"><path d="M70 1.9C37.6 8.8 12.6 33.4 3.4 67.5c-1.8 6.6-1.9 11.9-1.9 98v91l2.3 8c5.1 17.8 17 36.4 29.9 46.7 10.8 8.6 25.4 15.4 38.1 17.8 3.1.6 15.2 1 26.8 1 17.7 0 21.3.2 21.7 1.4.4.9.6 17.1.7 36.1 0 32.4.2 34.9 2 38.5 6.4 12.5 21.4 17.4 33.3 10.8 2.3-1.3 7.5-6.4 12.1-11.9l63-74.1c.6-.4 16.3-.8 34.9-.8H300l-.2-18.3-.3-18.2-42.8.1-43.1.5c-.2.2-12.7 15.1-27.9 33.1-15.1 18-27.8 32.4-28.1 32.1-.3-.4-.6-15.3-.6-33.2v-32.6l-38.8-.1c-42.1-.2-43.9-.4-54.3-6-6.5-3.6-16.9-14.6-20.2-21.5-5.8-11.9-5.7-10-5.7-100.7 0-92-.2-89.4 6.3-101.7 3.9-7.3 13.5-17.1 20.3-20.7C76 36.7 66.1 37 244.5 37L412 38.1c18 4.1 33.5 20.5 37.5 39.6 2.2 10.2 2.1 164.6 0 174.8-3.9 18.3-16.4 32.7-33.5 38.5-3.2 1.1-7.8 2-10 2-3.1 0-4 .4-4 1.7 0 1-.2 8.8-.3 17.3-.2 8.5-.2 16.2 0 17 .9 3.3 21.7-.5 34.1-6 13.7-6.3 27.5-17.9 36.2-30.5 5-7.2 10.8-20.4 13.2-30.1l2.3-8.9V165 76.5l-2.3-9c-8.1-31.4-30.5-54.9-61.7-64.8l-7-2.2-169-.2C87.7.1 78 .2 70 1.9zm277.294 102.559q19.5-.5 28.25 24.5 2.5 7.25-3.75 19.75-5.75 11.75-9.75 16-19.5 21.5-67 25.25-27.75 2.25-50.25-2.25-5.25 38.25-16.5 50-26 26.75-66 29.5-27.75 2-42.5-11-20.25-17.75-16.5-48.5 3-23.75 14.25-42.5 2.75-4.5 4.75-7.5 2-3 3-4.25 2.25-2.75 4.75-1.25 2.75 1.5 0 6.25-12.75 24.5-10 45 4 30.5 44.5 30.5 30.25 0 53.25-15.5 12.5-8.25 14.75-14.25-2.25-20.75-13.75-35.75-3.5-4.25-1.75-8l9.5-23.5q3-7.5 8.25 1.25l8.75 14.75q7.75 4.25 28.25 5 16.75-19.25 39.25-36.25 22.5-16.75 36.25-17.25zm11.5 40.5q-12.5-9.5-31.75-5.75-19 3.75-41.25 19.5 50.75.5 73-13.75zm-71.5-89.75q1.5-2 4.25-1.25 5 1.75 9.5 4.5 4.75 2.75 8.75 6.25 2 2 .75 4.5l-12 19q-1.75 2.5-4.5.5-2.5-2-18-11.25-2.75-1.75-1-4.25zm278.784 232.623c-4.7.4-4.7.4-6.7 6.1-1.2 3.1-9.3 25.9-18 50.7l-36.6 102.7-3.5 9.8h17.9 17.8l5.7-17 5.7-17h31.7 31.8l5.6 17.2 5.6 17.3 17.9-.3 18-.3-6-17.2-15-43.2-13.3-38.5-14.1-41-9.9-28.7c-.3-.6-30.2-1.1-34.6-.6zm35.7 106c-.2.2-10 .2-21.9.1l-21.5-.3 9.8-29.5 11-32.5c1.2-2.9 1.8-1.4 12.1 29.4l10.5 32.8zm148.8 139.609c32.4-6.9 57.4-31.5 66.6-65.6 1.8-6.6 1.9-11.9 1.9-98v-91l-2.3-8c-5.1-17.8-17-36.4-29.9-46.7-10.8-8.6-25.4-15.4-38.1-17.8-3.1-.6-15.2-1-26.8-1-17.7 0-21.3-.2-21.7-1.4-.4-.9-.6-17.1-.7-36.1 0-32.4-.2-34.9-2-38.5-6.4-12.5-21.4-17.4-33.3-10.8-2.3 1.3-7.5 6.4-12.1 11.9l-63 74.1c-.6.4-16.3.8-34.9.8h-33.7l.2 18.3.3 18.2 42.8-.1 43.1-.5c.2-.2 12.7-15.1 27.9-33.1 15.1-18 27.8-32.4 28.1-32.1.3.4.6 15.3.6 33.2v32.6l38.8.1c42.1.2 43.9.4 54.3 6 6.5 3.6 16.9 14.6 20.2 21.5 5.8 11.9 5.7 10 5.7 100.7 0 92 .2 89.4-6.3 101.7-3.9 7.3-13.5 17.1-20.3 20.7-11.4 6.1-1.5 5.8-179.9 5.8-108.2 0-164.5-.4-167.5-1.1-18-4.1-33.5-20.5-37.5-39.6-2.2-10.2-2.1-164.6 0-174.8 3.9-18.3 16.4-32.7 33.5-38.5 3.2-1.1 7.8-2 10-2 3.1 0 4-.4 4-1.7 0-1 .2-8.8.3-17.3.2-8.5.2-16.2 0-17-.9-3.3-21.7.5-34.1 6-13.7 6.3-27.5 17.9-36.2 30.5-5 7.2-10.8 20.4-13.2 30.1l-2.3 8.9v88.5 88.5l2.3 9c8.1 31.4 30.5 54.9 61.7 64.8l7 2.2 169 .2 177.5-1.6z"/></svg>'.trim(),e.firstChild}function A(e){var t=document.createElement("quran-madina-html-header"),e=(t.innerHTML=e,h()),n=(e.addEventListener("click",w),f());return n.addEventListener("click",E),t.appendChild(e),t.appendChild(n),t}var m=null;function R(){m&&(m.popup.classList.remove(C+"-open"),document.removeEventListener("click",m.outsideClick),document.removeEventListener("keydown",m.onEscape),m=null)}function y(t,e,n,r,o){R();function i(e){u.contains(e.target)||R()}function a(e){"Escape"===e.key&&R()}s=t,(c=document.querySelector(`body > ${C}-aya-popup`))||((c=document.createElement(C+"-aya-popup")).appendChild(h()),c.appendChild(f()),document.body.appendChild(c)),["--qmh-header","--qmh-background"].forEach(function(e){c.style.setProperty(e,getComputedStyle(s).getPropertyValue(e))});var s,c,u=c,l=u.children[0],d=u.children[1];l.onclick=function(e){e.stopPropagation();e="“"+Array.from(t.getElementsByClassName(n)).map(function(e){return e.textContent}).join(" ").replace(/\s+/g," ").trim()+"”\n\n"+L.suras[r-1].name;navigator.clipboard.writeText(e),alert("⎘ تم نسخ:\n\n"+e),R()},d.onclick=function(e){e.stopPropagation(),window.open(`https://quran.com/${r}/`+o,"_blank"),R()},l=u,d=(d=e).getBoundingClientRect(),l.style.left=Math.max(4,d.left)+"px",l.style.top=(0<d.top-34-6?d.top-34-6:d.bottom+6)+"px",u.classList.add(C+"-open");document.addEventListener("click",i),document.addEventListener("keydown",a),m={popup:u,outsideClick:i,onEscape:a}}function H(n,r,o,i){i<1||Array.from(n.getElementsByClassName(r)).forEach(function(t){t.style.cursor="pointer",t.onclick=function(e){e.stopPropagation(),y(n,t,r,o,i)}})}function q(e,t){e.style="display:block;",e.style.setProperty("font-family",L.font_family,""),e.style.setProperty("font-size",L.font_size+"px",""),"me_quran"===L.font_family&&e.style.setProperty("line-height",2*L.font_size+"px",""),e.style.width=L.line_width+10+"px",e.style.setProperty("box-shadow","inset "+(t%2==1?"":"-")+"8px 0 7px -7px #333","")}function j(e,t){0<=t?e.style.setProperty("transform",`scaleX(${t})`,""):e.style.setProperty("text-align","center","")}function l(e,t){for(var n=0;n<e.r.length;n++)if(e.r[n].l===t)return e.r[n];return null}function b(e,t,n){var r,e=L.suras[e].ayas;return t<=0||void 0===(r=e[t-1])||r.p!==e[t].p||null===l(r,n)}function F(e,t,n,r,o){for(var i=L.suras[e].ayas,a=[],s=r+o;0<=s&&s<i.length&&void 0!==i[s]&&i[s].p==t;s+=o){var c=l(i[s],n);if(null===c)break;if(o<0){if(a.unshift(c),b(e,s,n))break}else a.push(c)}return a}function z(e,t){for(var n=0;n<t.length;n++){var r=document.createElement("div");r.textContent=t[n].t,r.style.cssText="display:inline;visibility:hidden",e.appendChild(r)}}function w(){var e=this.parentElement.parentElement,t=e.querySelector("quran-madina-html-header"),n=(t=t?t.textContent.replace(/\s+/g," ").trim():null!=(t=e.getAttribute("sura"))?L.suras[t-1].name:"",(n=(e=(e=e).cloneNode(!0)).querySelector("quran-madina-html-header"))&&n.parentNode.removeChild(n),Array.from(e.querySelectorAll(`.${C}-word-hidden`)).forEach(function(e){e.parentNode.removeChild(e)}),Array.from(e.querySelectorAll("div,span")).forEach(function(e){/visibility:\s*hidden/.test(e.getAttribute("style")||"")&&e.parentNode.removeChild(e)}),e),e=n.querySelectorAll("quran-madina-html-line"),e=e.length?Array.from(e).map(function(e){return e.textContent.replace(/\s+/g," ").trim()}).filter(function(e){return""!==e}).join(" "):n.textContent.replace(/\s+/g," ").trim(),n="“"+e+"”\n\n"+t;navigator.clipboard.writeText(n),alert("⎘ تم نسخ:\n\n"+n)}function E(){var e=this.parentElement.parentElement;let t;t=null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")?`https://quran.com/${e.getAttribute("sura")}/`+e.getAttribute("aya"):"https://quran.com/page/"+e.getAttribute("page"),window.open(t,"_blank")}function T(e,t,n){for(var r=[],o=null,i=0,a=L.suras.length,s=2===t&&0<e?1:t,c=0;c<a;c++){for(var u=(e+c)%a,l=L.suras[u].ayas,d=!1,h=0===c?s:0;h<l.length;h++){var p=(0==u?2:1)<=h,f=l[h];if(void 0===f)break;for(var m=0;m<f.r.length;m++){var v,g=f.r[m];""!==g.t&&(v=f.p+":"+g.l,o&&o.key===v||(o={key:v,stretch:g.s,parts:[]},r.push(o)),o.parts.push({sura:u,ayaIdx:h,part:g,countable:p}))}if(p&&(i+=function(e){var t=0;return e.r.forEach(function(e){t+=_(e)}),t}(f))>=n[1]){d=!0;break}}if(d)break}for(var y=0,b=(r.forEach(function(e){e.parts.forEach(function(e){e.countable&&(y+=_(e.part))}),e.lastWord=y}),0);b<r.length-1&&r[b].lastWord<n[0];)b+=1;for(var w=b;w<r.length-1&&r[w].lastWord<n[1];)w+=1;return{groups:r.slice(b,w+1),counterStart:0<b?r[b-1].lastWord:0}}function U(u,e,t,l,n,r,o,d){var e=T(e,t,l),i=e.groups,a=k(o,1<i.length),h=e.counterStart;R(),u.innerHTML="",u.removeAttribute("style"),u.classList.toggle(C+"-inline",!a&&!r),a&&(t=parseInt(i[0].key.split(":")[0],10),q(u,t),n||u.appendChild(A(L.suras[i[0].parts[0].sura].name))),i.forEach(function(e,t){var n,c=document.createElement("quran-madina-html-line");a?(c.style.setProperty("display","block",""),j(c,e.stretch),b((n=e.parts[0]).sura,n.ayaIdx,n.part.l)||z(c,F(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,-1))):(c.style.setProperty("font-family",L.font_family,""),c.style.setProperty("font-size",L.font_size+"px","")),u.appendChild(c),e.parts.forEach(function(e){var t,n,r,o,i,a=document.createElement("div"),s=D(e.sura+1,e.ayaIdx-1);DOMTokenList.prototype.add.apply(a.classList,s),e.countable?0<(t=S(e.sura,e.ayaIdx)?_(e.part):0)&&h+1>=l[0]&&h+t<=l[1]?((r=document.createElement("span")).classList.add(C+"-word",C+"-basmala"),r.textContent=M,a.appendChild(r),h+=t):(n=a,r=e.part.t,o=l,i=h,r.split(/(\s+)/).forEach(function(e){var t;""!==e&&(/^\s+$/.test(e)?n.appendChild(document.createTextNode(e)):((t=document.createElement("span")).textContent=e,t.classList.add(C+"-word"),p(e)?((i+=1)<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"):(i<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"),n.appendChild(t)))}),h=i):d&&(0===e.ayaIdx||0===e.sura&&1===e.ayaIdx)?((t=document.createElement("span")).textContent=e.part.t,t.style.visibility="hidden",a.appendChild(t)):a.textContent=e.part.t,a.style.cssText="display:inline",c.appendChild(a),x(s.slice(-1)[0]),H(u,s.slice(-1)[0],e.sura+1,e.ayaIdx-1)}),a&&t===i.length-1&&(n=e.parts[e.parts.length-1],z(c,F(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,1)))})}var Y,e,X,d,t=16,n=document.currentScript||document.querySelector(`script[src*="${C}"]`),B=n.getAttribute("data-name")||"Madina05",o=(n.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),i=parseInt(n.getAttribute("data-font-size"),10)||t,n=n.getAttribute("data-cdn"),n=(n&&(r=n.replace(/\/?$/,"/")),O(B+` with font: ${o} size: `+i),r+"dist/"+C+".min.css?v=1.1");function $(e){d=r+`assets/db/${X=B+`-${o}-${i=e}px`}/`}document.getElementById(C)||(Y=document.getElementsByTagName("head")[0],(e=document.createElement("link")).id=C,e.rel="stylesheet",e.type="text/css",e.href=n,e.media="all",Y.appendChild(e)),$(i);var v={};function g(e,t){if(!L.juz)return-1;for(var n=Math.max(t,2),r=0,o=L.juz,i=0;i<o.length&&(o[i][0]<e||o[i][0]===e&&o[i][1]<=n);i++)r=i;return r}function V(e,i){if(L.juz){for(var a,t=[],n=0;n<e.length;n++){var r=e[n];0<=r&&r<L.juz.length&&!v[r]&&t.indexOf(r)<0&&t.push(r)}0===t.length?i():(a=t.length,t.forEach(function(o){var e;u(d+"juz-"+((e=o+1)<10?"0":"")+e+".json",function(e){for(var t=e,n=0;n<t.d.length;n++){var r=t.d[n];L.suras[r[0]].ayas[r[1]]={p:r[2],r:r[3]}}v[o]=!0,0==--a&&i()},function(e){console.error(C+"> failed to load juz "+(o+1),e),v[o]=!0,0==--a&&i()})}))}else i()}function W(){const e=new FontFace(L.font_family,"url("+encodeURI(null==(t=L.font_url)||/^(https?:)?\/\//.test(t)?t:r+String(t).replace(/^\//,""))+")");e.load().then(()=>{document.fonts.add(e)});var t,n={};["page","page_param","aya","sura","words","headless","quotes","inline","notitle"].forEach(function(e){var t;n[e]=(t=e,{attribute:{},set:function(e){this.xtag.data[t]=e},get:function(){return this.getAttribute(t)}})}),xtag.register(C,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:n,methods:{render:function(e){var t;this.xtag.data.rendering||V(function(e){if(!L.juz)return[];var t,n=[];if(null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")){var r,o=P(e.getAttribute("sura"))[0],i=I(e.getAttribute("aya"));if(null!=e.getAttribute("words"))return[r=g(o,i[0]),(r+1)%L.juz.length];for(t=g(o,i[0]);t<=g(o,i[1]);t++)n.push(t)}else{if(null==e.getAttribute("page"))return[];var a=L.pages[parseInt(e.getAttribute("page"),10)-1];if(!a)return[];for(t=g(a[0],a[1]);t<=g(a[2],a[3]);t++)n.push(t)}return n}(t=this),function(){if(!t.xtag.data.rendering){t.xtag.data.rendering=!0;try{t.doRender(e)}finally{t.xtag.data.rendering=!1}}})},doRender:function(t){var n,r,o,e=null,i=this.page,a=N(this.headless),s=N(this.notitle),c=null!=this.quotes&&!N(this.quotes),u=this.inline,l=null!=this.sura&&null!=this.aya;if(l)f=h=P(this.sura)[0],o=!1,[p,m]=I(this.aya),null!=this.page&&O("Ignoring page parameter!"),i=L.suras[h].ayas[p].p;else{if(null==this.page)return console.error(C+"> Bad arguments: Not rendering!"),1;if(L.pages)var d=L.pages[i-1],h=d[0],p=d[1],f=d[2],m=d[3];else{for(m=p=f=h=0;L.suras[h].ayas.slice(-1)[0].p<i;)h+=1;for(f=h;f<114&&L.suras[f].ayas[0].p<=i;)f+=1;for(f-=1;L.suras[h].ayas[p].p<i;)p+=1;for(m=L.suras[f].ayas.length-1;L.suras[f].ayas[m].p>i;)m-=1}o=!0,null!=this.inline&&O("Ignoring inline parameter with page!")}if(null!=this.words)if(l){if(null!=(e=null==(d=this.words)||2!=(d=1==(d=d.split(/[-:]/).map(e=>parseInt(e,10))).length?[d[0],d[0]]:d).length||isNaN(d[0])||isNaN(d[1])||d[0]<1||d[1]<d[0]?null:d))return m!==p&&O("Ignoring aya range end with words parameter!"),500<e[1]-e[0]+1&&(O("words selection capped at 500 words"),e[1]=e[0]+499),void U(t,h,p,e,a,c,u,s);O("Bad words parameter: "+this.words)}else O("Ignoring words parameter with page!");R(),t.innerHTML="",t.removeAttribute("style"),o=k(u,o=(n=L.suras[h].ayas[p].r[0].l)!=(r=L.suras[f].ayas[m].r.slice(-1)[0].l)?!0:o),t.classList.toggle(C+"-inline",!o&&!c),o&&(q(t,i),a||t.appendChild(A(L.suras[h].name)));var v=p,g=h;for(let e=n;e<=r;e++){const T=e;var y=document.createElement("quran-madina-html-line"),b=(t.appendChild(y),o?y.style.setProperty("display","block",""):(y.style.setProperty("font-family",L.font_family,""),y.style.setProperty("font-size",L.font_size+"px","")),o&&l&&e===n&&z(y,F(h,i,n,p,-1)),h==f?m:L.suras[g].ayas.length-1);for(let e=v;e<=Math.min(v+5,b);e++){var w,_,E=L.suras[g].ayas[e];void 0!==E&&E.p==i&&(E=E.r.filter(e=>e.l==T)).length&&(o&&j(y,E[0].s),w=document.createElement("div"),_=D(g+1,e-1),DOMTokenList.prototype.add.apply(w.classList,_),w.textContent=S(g,e)&&""!==E[0].t?M:E[0].t,w.style.cssText="display:inline",y.appendChild(w),x(_.slice(-1)[0]),H(t,_.slice(-1)[0],g+1,e-1),v=e,E=g<113?L.suras[g+1].ayas[0]:void 0,b<=v)&&void 0!==E&&E.p==i&&E.r[0].l==T+1&&(g+=1,v=0)}o&&l&&e===r&&z(y,F(f,i,r,m,1))}}}})}function G(){u(d+"manifest.json",function(e){if(e.content_hash){var t="quran-madina-html:hash:"+d,n=null;try{n=sessionStorage.getItem(t)}catch(e){}if(null!==n&&n!==e.content_hash){var r=d;try{for(var o=sessionStorage.length-1;0<=o;o--){var i=sessionStorage.key(o);i&&0===i.indexOf("quran-madina-html:"+r)&&sessionStorage.removeItem(i)}}catch(e){}Object.keys(s).forEach(function(e){0===e.indexOf(r)&&delete s[e]})}try{sessionStorage.setItem(t,e.content_hash)}catch(e){}}L={title:e.title,published:e.published,font_family:e.font_family,font_url:e.font_url,font_size:e.font_size,line_width:e.line_width,suras:e.suras.map(function(e){return{name:e[0],ayas:new Array(e[1])}}),juz:e.juz,pages:e.pages},W()},K,!0)}function K(){u(r+`assets/db/${X}.json`,function(e){L=e,W()},function(e){i!=t?(O(`no DB for font: ${o} size: ${i}, falling back to size: `+t),$(t),G()):console.error(C+"> no manifest and no monolithic DB",e)})}G()}(),function(){function e(e){if((this._element=e).className!=this._classCache&&(this._classCache=e.className,this._classCache))for(var t=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;t.length>n;n++)o.call(this,t[n])}function t(e,t){e.className=t.join(" ")}var n,r,o,i,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,o=s.push,i=s.splice,a=s.join,e.prototype={add:function(e){this.contains(e)||(o.call(this,e),t(this._element,r.call(this,0)))},contains:function(e){return-1!==n.call(this,e)},item:function(e){return this[e]||null},remove:function(e){e=n.call(this,e);-1!==e&&(i.call(this,e,1),t(this._element,r.call(this,0)))},toString:function(){return a.call(this," ")},toggle:function(e){-1===n.call(this,e)?this.add(e):this.remove(e)}},window.DOMTokenList=e,s=Element.prototype,c="classList",u=function(){return new e(this)},Object.defineProperty?Object.defineProperty(s,c,{get:u}):s.__defineGetter__(c,u))}(),function(){window.WebComponents=window.WebComponents||{flags:{}};var e,t=document.querySelector('script[src*="webcomponents-lite.js"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,e=e.split("=");e[0]&&(t=e[0].match(/wc-(.+)/))&&(n[t[1]]=e[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(e=n.log.split(","),n.log={},e.forEach(function(e){n.log[e]=!0})):n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function g(e){return void 0!==_[e]}function y(){r.call(this),this._isInvalid=!0}function b(e){return""==e&&y.call(this),e.toLowerCase()}function w(e){var t=e.charCodeAt(0);return 32<t&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function n(e,t,n){function r(e){d.push(e)}var o,i,a=t||"scheme start",s=0,c="",u=!1,l=!1,d=[];e:for(;(e[s-1]!=T||0==s)&&!this._isInvalid;){var h=e[s];switch(a){case"scheme start":if(!h||!C.test(h)){if(t){r("Invalid scheme.");break e}c="",a="no scheme";continue}c+=h.toLowerCase(),a="scheme";break;case"scheme":if(h&&L.test(h))c+=h.toLowerCase();else{if(":"!=h){if(t){if(T==h)break e;r("Code point not allowed in scheme: "+h);break e}c="",s=0,a="no scheme";continue}if(this._scheme=c,c="",t)break e;g(this._scheme)&&(this._isRelative=!0),a="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==h?(this._query="?",a="query"):"#"==h?(this._fragment="#",a="fragment"):T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._schemeData+=w(h));break;case"no scheme":if(n&&g(n._scheme)){a="relative";continue}r("Missing scheme."),y.call(this);break;case"relative or authority":if("/"!=h||"/"!=e[s+1]){r("Expected /, got: "+h),a="relative";continue}a="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),T==h){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==h||"\\"==h)"\\"==h&&r("\\ is an invalid code point."),a="relative slash";else if("?"==h)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,a="query";else{if("#"!=h){var p=e[s+1],f=e[s+2];("file"!=this._scheme||!C.test(h)||":"!=p&&"|"!=p||T!=f&&"/"!=f&&"\\"!=f&&"?"!=f&&"#"!=f)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),a="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,a="fragment"}break;case"relative slash":if("/"!=h&&"\\"!=h){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),a="relative path";continue}"\\"==h&&r("\\ is an invalid code point."),a="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=h){r("Expected '/', got: "+h),a="authority ignore slashes";continue}a="authority second slash";break;case"authority second slash":if(a="authority ignore slashes","/"==h)break;r("Expected '/', got: "+h);continue;case"authority ignore slashes":if("/"!=h&&"\\"!=h){a="authority";continue}r("Expected authority, got: "+h);break;case"authority":if("@"==h){u&&(r("@ already seen."),c+="%40");for(var u=!0,m=0;c.length>m;m++){var v=c[m];"\t"!=v&&"\n"!=v&&"\r"!=v?":"!=v||null!==this._password?(v=w(v),null!==this._password?this._password+=v:this._username+=v):this._password="":r("Invalid whitespace in authority.")}c=""}else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){s-=c.length,c="",a="host";continue}c+=h}break;case"file host":if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){a=2!=c.length||!C.test(c[0])||":"!=c[1]&&"|"!=c[1]?(0==c.length||(this._host=b.call(this,c),c=""),"relative path start"):"relative path";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid whitespace in file host."):c+=h;break;case"host":case"hostname":if(":"!=h||l){if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){if(this._host=b.call(this,c),c="",a="relative path start",t)break e;continue}"\t"!=h&&"\n"!=h&&"\r"!=h?("["==h?l=!0:"]"==h&&(l=!1),c+=h):r("Invalid code point in host/hostname: "+h)}else if(this._host=b.call(this,c),c="",a="port","hostname"==t)break e;break;case"port":if(/[0-9]/.test(h))c+=h;else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h||t){if(""!=c&&((p=parseInt(c,10))!=_[this._scheme]&&(this._port=p+""),c=""),t)break e;a="relative path start";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid code point in port: "+h):y.call(this)}break;case"relative path start":if("\\"==h&&r("'\\' not allowed in path."),a="relative path","/"!=h&&"\\"!=h)continue;break;case"relative path":T!=h&&"/"!=h&&"\\"!=h&&(t||"?"!=h&&"#"!=h)?"\t"!=h&&"\n"!=h&&"\r"!=h&&(c+=w(h)):("\\"==h&&r("\\ not allowed in relative path."),".."==(c=(f=E[c.toLowerCase()])?f:c)?(this._path.pop(),"/"!=h&&"\\"!=h&&this._path.push("")):"."==c&&"/"!=h&&"\\"!=h?this._path.push(""):"."!=c&&("file"==this._scheme&&0==this._path.length&&2==c.length&&C.test(c[0])&&"|"==c[1]&&(c=c[0]+":"),this._path.push(c)),c="","?"==h?(this._query="?",a="query"):"#"==h&&(this._fragment="#",a="fragment"));break;case"query":t||"#"!=h?T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._query+=(i=void 0,32<(i=(o=h).charCodeAt(0))&&i<127&&-1==[34,35,60,62,96].indexOf(i)?o:encodeURIComponent(o))):(this._fragment="#",a="fragment");break;case"fragment":T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._fragment+=h)}s++}}function r(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function o(e,t){void 0===t||t instanceof o||(t=new o(t+"")),this._url=e,r.call(this);e=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");n.call(this,e,null,t)}var _,E,T,C,L,t,i=!1;if(!e.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}catch(e){}i||((_=Object.create(null)).ftp=21,_.file=0,_.gopher=70,_.http=80,_.https=443,_.ws=80,_.wss=443,(E=Object.create(null))["%2e"]=".",E[".%2e"]="..",E["%2e."]="..",T=void(E["%2e%2e"]=".."),C=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,o.prototype={toString:function(){return this.href},get href(){var e;return this._isInvalid?this._url:((e="")==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment)},set href(e){r.call(this),n.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||n.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],n.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&((this._query="?")==e[0]&&(e=e.slice(1)),n.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||((this._fragment="#")==e[0]&&(e=e.slice(1)),n.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}},(t=e.URL)&&(o.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)},o.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=o)}(self),"undefined"==typeof WeakMap&&function(){function e(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"}var r=Object.defineProperty,t=Date.now()%1e9;e.prototype={set:function(e,t){var n=e[this.name];return n&&n[0]===e?n[1]=t:r(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];return!(!t||t[0]!==e||(t[0]=t[1]=void 0))},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=e}(),function(e){function o(){p=!1;var e=f,r=(f=[],e.sort(function(e,t){return e.uid_-t.uid_}),!1);e.forEach(function(e){var t,n=e.takeRecords();(t=e).nodes_.forEach(function(e){e=s.get(e);e&&e.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(e.callback_(n,e),r=!0)}),r&&o()}function u(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var o=0;r.length>o;o++){var i=r[o],a=i.options;(n===e||a.subtree)&&(a=t(a))&&i.enqueue(a)}}}function t(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++m}function r(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function l(e,t){return v=new r(e,t)}function d(e){return g||((n=new r((t=v).type,t.target)).addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,(g=n).oldValue=e,g);var t,n}function i(e,t){return e===t?e:g&&((t=e)===g||t===v)?g:null}function a(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var s,n,c,h,p,f,m,v,g;e.JsMutationObserver||(s=new WeakMap,h=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(n=[],c=Math.random()+"",window.addEventListener("message",function(e){e.data===c&&(e=n,n=[],e.forEach(function(e){e()}))}),function(e){n.push(e),window.postMessage(c,"*")}),p=!1,f=[],m=0,t.prototype={observe:function(e,t){if(n=e,e=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n,r=s.get(e);r||s.set(e,r=[]);for(var o,i=0;r.length>i;i++)if(r[i].observer===this){(o=r[i]).removeListeners(),o.options=t;break}o||(o=new a(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=s.get(e),n=0;t.length>n;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},a.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(0<t.length){var r=i(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,f.push(r),p||(p=!0,h(o));t[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){var t;e!==this.target&&(this.addListeners_(e),this.transientObservedNodes.push(e),(t=s.get(e))||s.set(e,t=[]),t.push(this))},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=s.get(e),n=0;t.length>n;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=((i=new l("attributes",r)).attributeName=t,i.attributeNamespace=n,e.attrChange===MutationEvent.ADDITION?null:e.prevValue);u(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?d(o):i});break;case"DOMCharacterDataModified":var i=l("characterData",r=e.target),o=e.prevValue;u(r,function(e){return e.characterData?e.characterDataOldValue?d(o):i:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var a,r=e.target,s="DOMNodeInserted"===e.type?(a=[r],[]):(a=[],[r]),c=r.previousSibling,r=r.nextSibling;(i=l("childList",e.target.parentNode)).addedNodes=a,i.removedNodes=s,i.previousSibling=c,i.nextSibling=r,u(e.relatedNode,function(e){return e.childList?i:void 0})}v=g=void 0}},e.JsMutationObserver=t,e.MutationObserver)||((e.MutationObserver=t)._isPolyfilled=!0)}(self),"undefined"==typeof HTMLTemplateElement&&function(){function n(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}var r=document.implementation.createHTMLDocument("template"),o=!0,t=((HTMLTemplateElement=function(){}).prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=r.createDocumentFragment();for(var t;t=e.firstChild;)e.content.appendChild(t);if(o)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(i,n);return e},set:function(e){for(r.body.innerHTML=e,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(e){o=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,o=n.length;r<o&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),i=(document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e},/[&\u00A0<>]/g)}(),function(){"use strict";var e,t;window.performance||(e=Date.now(),window.performance={now:function(){return Date.now()-e}}),window.requestAnimationFrame||(window.requestAnimationFrame=(t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(e){return t(function(){e(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}),(r=document.createEvent("Event")).initEvent("foo",!0,!0),r.preventDefault();r.defaultPrevented||(n=Event.prototype.preventDefault,Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))});var n,r=/Trident/.test(navigator.userAgent);(!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),(!window.Event||r&&"function"!=typeof window.Event)&&(r=window.Event,window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=r.prototype)}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){(function e(t,n){{var r;o(n)?t&&t():(r=function(){"complete"!==n.readyState&&n.readyState!==s||(n.removeEventListener(c,r),e(t,n))},n.addEventListener(c,r))}})(function(){!function(e,t){function n(){a==s&&e&&e({allImports:i,loadedImports:c,errorImports:u})}function r(e){h(e),c.push(this),a++,n()}function o(){u.push(this),a++,n()}var i=t.querySelectorAll("link[rel=import]"),a=0,s=i.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=i[d]);d++)!function(e){return p?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",o)):(c.push(this),a++,n());else n()}(e,t)},t=t||i)}function o(e){return"complete"===e.readyState||e.readyState===s}function h(e){e.target.__loaded=!0}function u(e){e.import?h({target:e}):(e.addEventListener("load",h),e.addEventListener("error",h))}function n(e){return r?window.ShadowDOMPolyfill.wrapIfNeeded(e):e}var p=Boolean("import"in document.createElement("link")),r=Boolean(window.ShadowDOMPolyfill),i=n(document),a={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(e)},configurable:!0},a=(Object.defineProperty(document,"_currentScript",a),Object.defineProperty(i,"_currentScript",a),/Trident/.test(navigator.userAgent)),s=a?"complete":"interactive",c="readystatechange";if(p&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)if(t.addedNodes){o=void 0;i=void 0;s=void 0;c=void 0;a=void 0;var o=t.addedNodes;for(var i,a,s=0,c=o.length;s<c&&(i=o[s]);s++)"link"===(a=i).localName&&"import"===a.rel&&u(i)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),f=0,m=d.length;f<m&&(l=d[f]);f++)u(l);t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=i.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),i.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=p,e.rootDocument=i,e.whenReady=t,e.isIE=a}(window.HTMLImports),function(t){var n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})}}(window.HTMLImports),window.HTMLImports.addModule(function(e){var r=/(url\()([^)]*)(\))/g,o=/(@import[\s]+(?!url\())([^;]*)(;)/g;e.path={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,t,n){e=this.replaceUrls(e,n,t,r);return this.replaceUrls(e,n,t,o)},replaceUrls:function(e,o,i,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return i&&(n=new URL(n,i).href),o.href=n,t+"'"+(n=o.href)+"'"+r})}}}),window.HTMLImports.addModule(function(t){var a={async:!0,ok:function(e){return 200<=e.status&&e.status<300||304===e.status||0===e.status},load:function(e,r,o){var i=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),i.open("GET",e,a.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var t=null;try{var n=i.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(o,!a.ok(i)&&i,i.response||i.responseText,t)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};t.xhr=a}),window.HTMLImports.addModule(function(e){function t(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}}var i=e.xhr,a=e.flags;t.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){return this.pending[e]?(this.pending[e].push(t),!0):this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):!(this.pending[e]=[t])},fetch:function(r,o){var e,t,n;a.load&&console.log("fetch",r,o),r?r.match(/^data:/)?(e=(n=r.split(","))[0],t=n[1],t=(-1<e.indexOf(";base64")?atob:decodeURIComponent)(t),setTimeout(function(){this.receive(r,o,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,o,e,t,n)}.bind(this),i.load(r,n)):setTimeout(function(){this.receive(r,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=t}),window.HTMLImports.addModule(function(e){function t(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))}t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(n){function a(e){return"link"===e.localName&&e.rel===s}function r(e){e=e.textContent+function(e){var t=e.ownerDocument,e=(t.__importedScripts=t.__importedScripts||0,e.ownerDocument.baseURI),n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+e+n+".js\n"}(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(e)}var o=n.path,t=n.rootDocument,i=n.flags,u=n.isIE,s=n.IMPORT_LINK_TYPE,e="link[rel="+s+"]",c={documentSelectors:e,importsSelectors:[e,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){var t;this.isParsed(e)?i.parse&&console.log("[%s] is already parsed",e.localName):(t=this[this.map[e.localName]])&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){i.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){e=this.dynamicElements.indexOf(e);0<=e&&this.dynamicElements.splice(e,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){a(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t,n,r=e;(n=(t=e).ownerDocument.createElement("style")).textContent=t.textContent,o.resolveUrlsInStyle(n),e=n,(r.__appliedElement=e).__importElement=r,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(t,n){function r(e){t.removeEventListener("load",r),t.removeEventListener("error",r),n&&n(e),o.markParsingComplete(t),o.parseNext()}var o=this;if(t.addEventListener("load",r),t.addEventListener("error",r),u&&"style"===t.localName){var e=!1;if(-1==t.textContent.indexOf("@import"))e=!0;else if(t.sheet)for(var i,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(i.styleSheet));e&&setTimeout(function(){t.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(e){var t=document.createElement("script");t.__importElement=e,t.src=e.src||r(e),n.currentScript=e,this.trackElement(t,function(){t.parentNode&&t.parentNode.removeChild(t),n.currentScript=null}),this.addElementToDocument(t)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(t)||this.nextToParseDynamic())},nextToParseInDoc:function(e,t){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,r=e.querySelectorAll(this.parseSelectorsForNode(e)),o=0,i=r.length;o<i&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?a(n)?this.nextToParseInDoc(n.__doc,n):n:void 0}return t},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){return(e.ownerDocument||e)===t?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return 0<=this.dynamicElements.indexOf(e)},hasResource:function(e){return!a(e)||void 0!==e.__doc}};n.parser=c,n.IMPORT_SELECTOR=e}),window.HTMLImports.addModule(function(e){function s(e,t){var n=document.implementation.createHTMLDocument(u),r=(n._URL=t,n.createElement("base")),t=(r.setAttribute("href",t),n.baseURI||Object.getOwnPropertyDescriptor(n,"baseURI")||Object.defineProperty(n,"baseURI",{value:t}),n.createElement("meta"));return t.setAttribute("charset","utf-8"),n.head.appendChild(t),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var c=e.flags,u=e.IMPORT_LINK_TYPE,t=e.IMPORT_SELECTOR,n=e.rootDocument,r=e.Loader,o=e.Observer,l=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){i.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);i.addNodes(e)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===n?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,t,n,r,o){var i,a;c.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,a=u,"link"===(i=i=t).localName&&i.getAttribute("rel")===a&&(void 0===(i=this.documents[e])&&((i=r?null:s(n,o||e))&&(i.__importLink=t,this.bootDocument(i)),this.documents[e]=i),t.__doc=i),l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},i=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new o,document.baseURI||(r={get:function(){var e=document.querySelector("base");return(e||window.location).href},configurable:!0},Object.defineProperty(document,"baseURI",r),Object.defineProperty(n,"baseURI",r)),e.importer=t,e.importLoader=i}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,o,i=0,a=e.length;i<a&&(o=e[i]);i++)t||(t=o.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(o))&&c.loadNode(o),this.shouldParseNode(o)&&n&&s.parseDynamic(o,r)},shouldLoadNode:function(e){return 1===e.nodeType&&t.call(e,c.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&t.call(e,s.parseSelectorsForNode(e))}},t=(c.observer.addCallback=e.added.bind(e),HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector)}),function(e){function t(){window.HTMLImports.importer.bootDocument(n)}var n,r=e.initializeModules;e.isIE,e.useNative||(r(),n=e.rootDocument,"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t))}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})},t.hasNative=Boolean(document.registerElement),t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function r(e,t){(function e(t,n,r){var o=t.firstElementChild;if(!o)for(o=t.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==n(o,r)&&e(o,n,r),o=o.nextElementSibling;return null})(e,function(e){return!!t(e)||void n(e,t)}),n(e,t)}function n(e,t){for(var n=e.shadowRoot;n;)r(n,t),n=n.olderShadowRoot}var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=function(e,t){!function e(t,n,r){if(t=window.wrap(t),!(0<=r.indexOf(t))){r.push(t);for(var o,i=t.querySelectorAll("link[rel="+c+"]"),a=0,s=i.length;a<s&&(o=i[a]);a++)o.import&&e(o.import,n,r);n(t)}}(e,t,[])},e.forSubtree=r}),window.CustomElements.addModule(function(n){function a(e,t){return r(e,t)||o(e,t)}function r(e,t){return!!n.upgrade(e,t)||void(t&&s(e))}function o(e,t){m(e,function(e){return!!r(e,t)||void 0})}function t(e){b.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=b,n=0,r=t.length;n<r&&(e=t[n]);n++)e();b=[]}function s(e){g?t(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback)&&e.attachedCallback()}function u(e){g?t(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback)&&e.detachedCallback()}function d(e,t){if(f.dom){var n=t[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=(o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,o||"")}var i=function(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);t.forEach(function(e){"childList"===e.type&&(w(e.addedNodes,function(e){e.localName&&a(e,i)}),w(e.removedNodes,function(e){e.localName&&(u(e=e),m(e,function(e){u(e)}))}))}),f.dom&&console.groupEnd()}function h(e){var t;e.__observer||((t=new MutationObserver(d.bind(this,e))).observe(e,{childList:!0,subtree:!0}),e.__observer=t)}function p(e){e=window.wrap(e),f.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),a(e,e===window.wrap(document)),h(e),f.dom&&console.groupEnd()}var f=n.flags,m=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&f["throttle-attached"],y=(n.hasPolyfillMutations=g,n.hasThrottledAttached=g,!1),b=[],w=Array.prototype.forEach.call.bind(Array.prototype.forEach),_=Element.prototype.createShadowRoot;_&&(Element.prototype.createShadowRoot=function(){var e=_.call(this);return window.CustomElements.watchShadow(this),e}),n.watchShadow=function(e){if(e.shadowRoot&&!e.shadowRoot.__watched){f.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)h(t),t=t.olderShadowRoot}},n.upgradeDocumentTree=function(e){v(e,p)},n.upgradeDocument=p,n.upgradeSubtree=o,n.upgradeAll=a,n.attached=s,n.takeRecords=function(e){for(e=(e=window.wrap(e))||window.wrap(document);e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(d(e,t.takeRecords()),i())}}),window.CustomElements.addModule(function(o){function i(e,t,n){return a.upgrade&&console.group("upgrade:",e.localName),t.is&&e.setAttribute("is",t.is),r(e,t),e.__upgraded__=!0,(t=e).createdCallback&&t.createdCallback(),n&&o.attached(e),o.upgradeSubtree(e,n),a.upgrade&&console.groupEnd(),e}function r(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,o=t.native,i={},a=r;a!==o&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)i[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),i[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}var a=o.flags;o.upgrade=function(e,t){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var n=e.getAttribute("is"),r=o.getRegisteredDefinition(e.localName)||o.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return i(e,r,t)}},o.upgradeWithDefinition=i,o.implementPrototype=r}),window.CustomElements.addModule(function(f){function m(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),o=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function v(e){return e?w[e.toLowerCase()]:void 0}function o(e,t){e=e&&e.toLowerCase();var n,r=v((t=t&&t.toLowerCase())||e);if(r){if(e==r.tag&&t==r.is)return new r.ctor;if(!t&&!r.is)return new r.ctor}return t?(n=o(e)).setAttribute("is",t):(n=_(e),0<=e.indexOf("-")&&i(n,HTMLElement)),n}function e(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return r(e),e}}var n,t=f.isIE,g=f.upgradeDocumentTree,r=f.upgradeAll,y=f.upgradeWithDefinition,i=f.implementPrototype,a=f.useNative,b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],w={},_=document.createElement.bind(document),s=document.createElementNS.bind(document),a=Object.__proto__||a?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1};e(Node.prototype,"cloneNode"),e(document,"importNode"),t&&(n=document.importNode,document.importNode=function(){var e,t=n.apply(document,arguments);return t.nodeType==t.DOCUMENT_FRAGMENT_NODE?((e=document.createDocumentFragment()).appendChild(t),e):t}),document.registerElement=function(e,t){var n,r,o,t=t||{};if(!e)throw Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+e+"'.");if(function(e){for(var t=0;b.length>t;t++)if(e===b[t])return 1}(e))throw Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+e+"'. The type name is invalid.");if(v(e))throw Error("DuplicateDefinitionError: a type with name '"+e+"' is already registered");t.prototype||(t.prototype=Object.create(HTMLElement.prototype)),t.__name=e.toLowerCase(),t.lifecycle=t.lifecycle||{},t.ancestry=function e(t){t=v(t);return t?e(t.extends).concat([t]):[]}(t.extends);for(var i,a=t,s=a.extends,c=0;i=a.ancestry[c];c++)s=i.is&&i.tag;a.tag=s||a.__name,s&&(a.is=a.__name);var e=t;if(!Object.__proto__){var u=HTMLElement.prototype;e.is&&(p=document.createElement(e.tag),u=Object.getPrototypeOf(p));for(var l,d=e.prototype,h=!1;d;)d==u&&(h=!0),(l=Object.getPrototypeOf(d))&&(d.__proto__=l),d=l;h||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=u}var p=t.prototype;return p.setAttribute._polyfilled||(n=p.setAttribute,p.setAttribute=function(e,t){m.call(this,e,t,n)},r=p.removeAttribute,p.removeAttribute=function(e){m.call(this,e,null,r)},p.setAttribute._polyfilled=!0),e=t.__name,(w[e]=t).ctor=(o=t,function(){return y(_((e=o).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,f.ready&&g(document),t.ctor},document.createElement=o,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?o(t,n):s(e,t)},f.registry=w,f.instanceof=a,f.reservedTagList=b,f.getRegisteredDefinition=v,document.register=document.registerElement}),function(e){function t(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(e){setTimeout(e,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules,o=(e.isIE,n?(e.watchShadow=n=function(){},e.upgrade=n,e.upgradeAll=n,e.upgradeDocumentTree=n,e.upgradeSubtree=n,e.takeRecords=n,e.instanceof=function(e,t){return e instanceof t}):r(),e.upgradeDocumentTree),i=e.upgradeDocument;window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e.import&&i(wrap(e.import))}),"complete"!==document.readyState&&!e.flags.eager&&("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready)?(n=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(n,t)):t()}(window.CustomElements),function(){var e=document.createElement("style"),t=(e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n",document.querySelector("head"));t.insertBefore(e,t.firstChild)}(window.WebComponents),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.PointerEventsPolyfill=t()}(this,function(){"use strict";function e(){this.array=[],this.size=0}function t(e,t,n,r){this.addCallback=e.bind(r),this.removeCallback=t.bind(r),this.changedCallback=n.bind(r),_&&(this.observer=new _(this.mutationWatcher.bind(this)))}function n(e){return"body /shadow-deep/ "+r(e)}function r(e){return'[touch-action="'+e+'"]'}function o(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}function i(e){if(!m.pointermap.has(e))throw Error("InvalidPointerId")}var a=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],s=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],c=function(e,t){t=t||Object.create(null);var n=document.createEvent("Event");n.initEvent(e,t.bubbles||!1,t.cancelable||!1);for(var r,o=2;o<a.length;o++)n[r=a[o]]=t[r]||s[o];return n.buttons=t.buttons||0,e=t.pressure||(n.buttons?.5:0),n.x=n.clientX,n.y=n.clientY,n.pointerId=t.pointerId||0,n.width=t.width||0,n.height=t.height||0,n.pressure=e,n.tiltX=t.tiltX||0,n.tiltY=t.tiltY||0,n.pointerType=t.pointerType||"",n.hwTimestamp=t.hwTimestamp||0,n.isPrimary=t.isPrimary||!1,n},u=window.Map&&window.Map.prototype.forEach?Map:e,l=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp"],d=[!(e.prototype={set:function(e,t){return void 0===t?this.delete(e):(this.has(e)||this.size++,void(this.array[e]=t))},has:function(e){return void 0!==this.array[e]},delete:function(e){this.has(e)&&(delete this.array[e],this.size--)},get:function(e){return this.array[e]},clear:function(){this.array.length=0,this.size=0},forEach:function(n,r){return this.array.forEach(function(e,t){n.call(r,e,t,this)},this)}}),!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],h={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},p="undefined"!=typeof SVGElementInstance,f={pointermap:new u,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(e,t){var n=t,t=n.events;t&&(t.forEach(function(e){n[e]&&(this.eventMap[e]=n[e].bind(n))},this),this.eventSources[e]=n,this.eventSourceList.push(n))},register:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.register.call(t,e)},unregister:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.unregister.call(t,e)},contains:function(e,t){try{return e.contains(t)}catch(e){return!1}},down:function(e){e.bubbles=!0,this.fireEvent("pointerdown",e)},move:function(e){e.bubbles=!0,this.fireEvent("pointermove",e)},up:function(e){e.bubbles=!0,this.fireEvent("pointerup",e)},enter:function(e){e.bubbles=!1,this.fireEvent("pointerenter",e)},leave:function(e){e.bubbles=!1,this.fireEvent("pointerleave",e)},over:function(e){e.bubbles=!0,this.fireEvent("pointerover",e)},out:function(e){e.bubbles=!0,this.fireEvent("pointerout",e)},cancel:function(e){e.bubbles=!0,this.fireEvent("pointercancel",e)},leaveOut:function(e){this.out(e),this.contains(e.target,e.relatedTarget)||this.leave(e)},enterOver:function(e){this.over(e),this.contains(e.target,e.relatedTarget)||this.enter(e)},eventHandler:function(e){var t;e._handledByPE||(t=e.type,(t=this.eventMap&&this.eventMap[t])&&t(e),e._handledByPE=!0)},listen:function(t,e){e.forEach(function(e){this.addEvent(t,e)},this)},unlisten:function(t,e){e.forEach(function(e){this.removeEvent(t,e)},this)},addEvent:function(e,t){e.addEventListener(t,this.boundHandler)},removeEvent:function(e,t){e.removeEventListener(t,this.boundHandler)},makeEvent:function(e,t){this.captureInfo[t.pointerId]&&(t.relatedTarget=null);e=new c(e,t);return t.preventDefault&&(e.preventDefault=t.preventDefault),e._target=e._target||t.target,e},fireEvent:function(e,t){e=this.makeEvent(e,t);return this.dispatchEvent(e)},cloneEvent:function(e){for(var t,n=Object.create(null),r=0;r<l.length;r++)n[t=l[r]]=e[t]||d[r],!p||"target"!==t&&"relatedTarget"!==t||n[t]instanceof SVGElementInstance&&(n[t]=n[t].correspondingUseElement);return e.preventDefault&&(n.preventDefault=function(){e.preventDefault()}),n},getTarget:function(e){var t=this.captureInfo[e.pointerId];return t?e._target!==t&&e.type in h?void 0:t:e._target},setCapture:function(e,t){this.captureInfo[e]&&this.releaseCapture(e),this.captureInfo[e]=t;var n=document.createEvent("Event");n.initEvent("gotpointercapture",!0,!1),n.pointerId=e,this.implicitRelease=this.releaseCapture.bind(this,e),document.addEventListener("pointerup",this.implicitRelease),document.addEventListener("pointercancel",this.implicitRelease),n._target=t,this.asyncDispatchEvent(n)},releaseCapture:function(e){var t,n=this.captureInfo[e];n&&((t=document.createEvent("Event")).initEvent("lostpointercapture",!0,!1),t.pointerId=e,this.captureInfo[e]=void 0,document.removeEventListener("pointerup",this.implicitRelease),document.removeEventListener("pointercancel",this.implicitRelease),t._target=n,this.asyncDispatchEvent(t))},dispatchEvent:function(e){var t=this.getTarget(e);return t?t.dispatchEvent(e):void 0},asyncDispatchEvent:function(e){requestAnimationFrame(this.dispatchEvent.bind(this,e))}},m=(f.boundHandler=f.eventHandler.bind(f),f),v={shadow:function(e){return e?e.shadowRoot||e.webkitShadowRoot:void 0},canTarget:function(e){return e&&Boolean(e.elementFromPoint)},targetingShadow:function(e){e=this.shadow(e);return this.canTarget(e)?e:void 0},olderShadow:function(e){var t=e.olderShadowRoot;return t||(e=e.querySelector("shadow"))&&(t=e.olderShadowRoot),t},allShadows:function(e){for(var t=[],n=this.shadow(e);n;)t.push(n),n=this.olderShadow(n);return t},searchRoot:function(e,t,n){if(e){for(var r,o,e=e.elementFromPoint(t,n),i=this.targetingShadow(e);i;){if(r=i.elementFromPoint(t,n))return o=this.targetingShadow(r),this.searchRoot(o,t,n)||r;i=this.olderShadow(i)}return e}},owner:function(e){for(var t=e;t.parentNode;)t=t.parentNode;return t=t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?document:t},findTarget:function(e){var t=e.clientX,n=e.clientY,e=this.owner(e.target);return e.elementFromPoint(t,n)||(e=document),this.searchRoot(e,t,n)}},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),y=Array.prototype.map.call.bind(Array.prototype.map),b=Array.prototype.slice.call.bind(Array.prototype.slice),w=Array.prototype.filter.call.bind(Array.prototype.filter),_=window.MutationObserver||window.WebKitMutationObserver,R={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},f=(t.prototype={watchSubtree:function(e){this.observer&&v.canTarget(e)&&this.observer.observe(e,R)},enableOnSubtree:function(e){this.watchSubtree(e),e===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(e)},installNewSubtree:function(e){g(this.findElements(e),this.addElement,this)},findElements:function(e){return e.querySelectorAll?e.querySelectorAll("[touch-action]"):[]},removeElement:function(e){this.removeCallback(e)},addElement:function(e){this.addCallback(e)},elementChanged:function(e,t){this.changedCallback(e,t)},concatLists:function(e,t){return e.concat(b(t))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(e){return e.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(e){var t=y(e,this.findElements,this);return t.push(w(e,this.isElement)),t.reduce(this.concatLists,[])},mutationWatcher:function(e){e.forEach(this.mutationHandler,this)},mutationHandler:function(e){"childList"===e.type?(this.flattenMutationTree(e.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(e.removedNodes).forEach(this.removeElement,this)):"attributes"===e.type&&this.elementChanged(e.target,e.oldValue)}},t),E=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],T="",C=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,M=m.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var N,P={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,o=e.clientY,i=0,a=n.length;i<a&&(t=n[i]);i++){var s=Math.abs(r-t.x),c=Math.abs(o-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=m.cloneEvent(e),n=t.preventDefault;return t.preventDefault=function(){e.preventDefault(),n()},t.pointerId=this.POINTER_ID,t.isPrimary=!0,t.pointerType=this.POINTER_TYPE,t},prepareButtonsForMove:function(e,t){var n=M.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(n.buttons=S[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),M.set(this.POINTER_ID,e),t?m.move(n):m.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(r=S[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),M.set(this.POINTER_ID,e),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),m.up(n)):m.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);m.cancel(e),this.cleanupMouse()},cleanupMouse:function(){M.delete(this.POINTER_ID)}},H=m.captureInfo,q=v.findTarget.bind(v),I=v.allShadows.bind(v),k=m.pointermap,x="touch-action",D={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){j.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(x),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,m.listen(e,this.events),I(e).forEach(function(e){e._scrollType=n,m.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,m.unlisten(e,this.events),I(e).forEach(function(e){e._scrollType=void 0,m.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(x),r=this.touchActionToScrollType(n),n=this.touchActionToScrollType(t);r&&n?(e._scrollType=r,I(e).forEach(function(e){e._scrollType=r},this)):n?this.elementRemoved(e):r&&this.elementAdded(e)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},touchActionToScrollType:function(e){var t=this.scrollTypes;return"none"===e?"none":e===t.XSCROLLER?"X":e===t.YSCROLLER?"Y":t.SCROLLER.exec(e)?"XY":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(e){return this.firstTouch===e.identifier},setPrimaryTouch:function(e){(0===k.size||1===k.size&&k.has(1))&&(this.firstTouch=e.identifier,this.firstXY={X:e.clientX,Y:e.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryPointer:function(e){e.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var e=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(e,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(e){return"touchstart"!==e&&"touchmove"!==e?0:1},touchToPointer:function(e){var t=this.currentTouchEvent,n=m.cloneEvent(e),r=n.pointerId=e.identifier+2,o=(n.target=H[r]||q(n),n.bubbles=!0,n.cancelable=!0,n.detail=this.clickCount,n.button=0,n.buttons=this.typeToButtons(t.type),n.width=e.radiusX||e.webkitRadiusX||0,n.height=e.radiusY||e.webkitRadiusY||0,n.pressure=e.force||e.webkitForce||.5,n.isPrimary=this.isPrimaryTouch(e),n.pointerType=this.POINTER_TYPE,this);return n.preventDefault=function(){o.scrolling=!1,o.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,o=0;n.length>o;o++)r=n[o],t.call(this,this.touchToPointer(r))},shouldScroll:function(e){var t,n;if(this.firstXY)return e="none"!==(n=e.currentTarget._scrollType)&&("XY"===n||(e=e.changedTouches[0],t="Y"===n?"X":"Y",n=Math.abs(e["client"+n]-this.firstXY[n]),Math.abs(e["client"+t]-this.firstXY[t])<=n)),this.firstXY=null,e},findTouch:function(e,t){for(var n,r=0,o=e.length;r<o&&(n=e[r]);r++)if(n.identifier===t)return!0},vacuumTouches:function(e){var n,r=e.touches;k.size>=r.length&&(n=[],k.forEach(function(e,t){1===t||this.findTouch(r,t-2)||(t=e.out,n.push(t))},this),n.forEach(this.cancelOut,this))},touchstart:function(e){this.vacuumTouches(e),this.setPrimaryTouch(e.changedTouches[0]),this.dedupSynthMouse(e),this.scrolling||(this.clickCount++,this.processTouches(e,this.overDown))},overDown:function(e){k.set(e.pointerId,{target:e.target,out:e,outTarget:e.target}),m.over(e),m.enter(e),m.down(e)},touchmove:function(e){this.scrolling||(this.shouldScroll(e)?(this.scrolling=!0,this.touchcancel(e)):(e.preventDefault(),this.processTouches(e,this.moveOverOut)))},moveOverOut:function(e){var t,n,r=k.get(e.pointerId);r&&(t=r.out,n=r.outTarget,m.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(m.leaveOut(t),m.enterOver(e)):(e.target=n,e.relatedTarget=null,this.cancelOut(e))),r.out=e,r.outTarget=e.target)},touchend:function(e){this.dedupSynthMouse(e),this.processTouches(e,this.upOut)},upOut:function(e){this.scrolling||(m.up(e),m.out(e),m.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){m.cancel(e),m.out(e),m.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){k.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=P.lastTouches,e=e.changedTouches[0];this.isPrimaryTouch(e)&&(e={x:e.clientX,y:e.clientY},t.push(e),t=function(e,t){t=e.indexOf(t);-1<t&&e.splice(t,1)}.bind(null,t,e),setTimeout(t,2500))}},j=new f(D.elementAdded,D.elementRemoved,D.elementChanged,D),A=m.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,z={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return F&&((t=m.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){A.delete(e)},MSPointerDown:function(e){A.set(e.pointerId,e);e=this.prepareEvent(e);m.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);m.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);m.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);m.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);m.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);m.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=m.makeEvent("lostpointercapture",e);m.dispatchEvent(e)},MSGotPointerCapture:function(e){e=m.makeEvent("gotpointercapture",e);m.dispatchEvent(e)}},U=window.navigator.msPointerEnabled?(N=function(e){i(e),this.msSetPointerCapture(e)},function(e){i(e),this.msReleasePointerCapture(e)}):(N=function(e){i(e),m.setCapture(e,this)},function(e){i(e),m.releaseCapture(e,this)});return C&&(E.forEach(function(e){e+""===e?(T+=r(e)+o(e)+"\n",L&&(T+=n(e)+o(e)+"\n")):(T+=e.selectors.map(r)+o(e.rule)+"\n",L&&(T+=e.selectors.map(n)+o(e.rule)+"\n"))}),(C=document.createElement("style")).textContent=T,document.head.appendChild(C)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),m.registerSource("ms",z)):(m.registerSource("mouse",P),void 0!==window.ontouchstart&&m.registerSource("touch",D)),m.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:N},releasePointerCapture:{value:U}}),{dispatcher:m,Installer:f,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(e){e=P.call(e);return N[e]||(N[e]=e.match(I)[1].toLowerCase())}function o(e,t){t=o[t||s(e)];return t?t(e):e}function p(e){return R[s(e)]?[e]:Array.prototype.slice.call(e,0)}function c(e,t,n){var r=s(n);return"object"==r&&"object"==s(e[t])?A.merge(e[t],n):e[t]=o(n,r),e}function d(e,t,n){var r,o,i={};for(o in t)i[o.split(":")[0]]=o;for(o in n)r=i[o.split(":")[0]],"function"==typeof t[r]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=A.applyPseudos(o+(o.match(":mixins")?"":":mixins"),n[o],e.pseudos,t[r].__mixin__)):(t[o]=n[o],delete t[r])}function f(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),A.mixins[t[r]].mixins&&e(A.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=A.mixins[e];for(t in n){var r=n[t],o=l[t];if(o)switch(t){case"mixins":break;case"events":i=c=s=a=void 0;var i,a=l,s=o,c=r;for(i in c)s[i+":__mixin__("+H+++")"]=A.applyPseudos(i,c[i],a.pseudos);break;case"accessors":case"prototype":for(var u in r)o[u]?d(l,o[u],r[u]):o[u]=r[u];break;default:d(l,o,r)}else l[t]=r}}),l}function e(e){return 0===e.button}function i(e,t){var n,r,o,i,a,s=Object.getOwnPropertyDescriptor(e,"target");for(n in t)k[n]||(r=n,o=e,i=t,a=s,a?o[r]=i[r]:Object.defineProperty(o,r,{writable:!0,enumerable:!0,value:i[r]}));e.baseEvent=t}function m(e,t,n,r,o){a[o].call(e,n,t&&t.boolean?"":r)}function v(e,t,n,r,o){if(t&&(t.property||t.selector))for(var i=t.property?[e.xtag[t.property]]:t.selector?A.query(e,t.selector):[],a=i.length;a--;)i[a][o](n,r)}function g(e,t){e.prototype[t]={};var n,r,o,i=e.accessors[t],a=i.attribute;for(r in a&&(n=a.name=(a?a.name||t.replace(T,"$1-$2"):t).toLowerCase(),a.key=t,e.attributes[n]=a),i)!function(e,t,r,o,i,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=A.applyPseudos(n.join(":"),o[r],e.pseudos,o[r])):"set"==s?(n[0]=t,e.prototype[t].set=A.applyPseudos(n.join(":"),i?function(e){var t,n="setAttribute";i.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=i.validate?i.validate.call(this,e):e,t=this.getAttribute(a)),m(this,i,a,e,n),o[r].call(this,e,t),v(this,i,a,e,n)}:o[r]?function(e){o[r].call(this,e)}:null,e.pseudos,o[r]),i&&(i.setter=o[r])):e.prototype[t][r]=o[r]}(e,t,r,i,a,n);a&&(e.prototype[t].get||(o=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[o](n)}),e.prototype[t].set||(e.prototype[t].set=function(e){e=a.boolean?!!e:a.validate?a.validate.call(this,e):e;var t=!a.boolean||e?"setAttribute":"removeAttribute";m(this,a,n,e,t),v(this,a,n,e,t)}))}function y(e){return"function"==typeof e?q.exec(""+e)[1]:e}function h(){}function b(){return!0}var t,n,w=window,_=document,a={setAttribute:Element.prototype.setAttribute,removeAttribute:Element.prototype.removeAttribute},E=Element.prototype.createShadowRoot,u=_.createElement("div"),l=/,/g,T=/([a-z])([A-Z])/g,r=/\(|\)/g,C=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,M={action:function(e,t){return-1<e.value.match(L).indexOf(t.keyCode+"")==("keypass"==e.name)||null}},S={dom:"ms"==(t=((t=Object.keys(window).join()).match(/,(ms)/)||t.match(/,(moz)/)||t.match(/,(O)/)||[null,"webkit"])[1].toLowerCase())?"MS":t,lowercase:t,css:"-"+t+"-",js:"ms"==t?t:t.charAt(0).toUpperCase()+t.substring(1)},O=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype[S.lowercase+"MatchesSelector"],N={},P=N.toString,I=/\s([a-zA-Z]+)/,R=(o.object=function(e){var t,n={};for(t in e)n[t]=o(e[t]);return n},o.array=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=o(e[t]);return n},{undefined:1,null:1,number:1,boolean:1,string:1,function:1}),H=0,k={};for(n in _.createEvent("CustomEvent"))k[n]=1;var x,D,q=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,A={tags:{},defaultOptions:{pseudos:[],mixins:[],events:{},methods:{},accessors:{},lifecycle:{},attributes:{},prototype:{xtag:{get:function(){return this.__xtag__||(this.__xtag__={data:{}})}}}},register:function(e,t){if("string"!=typeof e)throw"First argument must be a Custom Element string name";e=e.toLowerCase(),A.tags[e]=t||{};var n,o=t.prototype,a=(delete t.prototype,A.tags[e].compiled=f(A.merge({},A.defaultOptions,t))),i=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=A.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=A.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)i[n.split(":")[0]]={value:A.applyPseudos(n,a.methods[n],a.pseudos,a.methods[n]),enumerable:!0};for(n in a.accessors)g(a,n);a.shadow&&(a.shadow=a.shadow.nodeName?a.shadow:A.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(i.createdCallback={enumerable:!0,value:function(){var e,t=this,n=(a.shadow&&E&&this.createShadowRoot().appendChild(a.shadow.cloneNode(!0)),a.content&&(this.appendChild(document.createElement("div")).outerHTML=a.content),s?s.apply(this,arguments):null);for(e in A.addEvents(this,a.events),a.attributes){var r=a.attributes[e],o=this.hasAttribute(e),i=void 0!==r.def;(o||r.boolean||i)&&(this[r.key]=r.boolean?o:!o&&i?r.def:this.getAttribute(e))}return a.pseudos.forEach(function(e){e.onAdd.call(t,e)}),this.xtagComponentReady=!0,c&&c.apply(this,arguments),n}},r.inserted),l=r.removed,t=((u||l)&&(i.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(i.detachedCallback={value:function(){var e=p(arguments),e=(e.unshift(this.xtag.__parentNode__),l.apply(this,e));return delete this.xtag.__parentNode__,e},enumerable:!0}),r.attributeChanged&&(i.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),i.setAttribute={writable:!0,enumerable:!0,value:function(e,t){var n,e=e.toLowerCase(),r=a.attributes[e];r&&(n=this.getAttribute(e),t=r.boolean?"":r.validate?r.validate.call(this,t):t),m(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),v(this,r,e,t,"setAttribute"))}},i.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);m(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),v(this,t,e,"","removeAttribute"))}},{}),d=o instanceof w.HTMLElement,h=a.extends&&(t.extends=a.extends);return o&&Object.getOwnPropertyNames(o).forEach(function(e){var t=i[e],n=d?Object.getOwnPropertyDescriptor(o,e):o[e];if(t)for(var r in n)t[r]="function"==typeof n[r]&&t[r]?A.wrap(n[r],t[r]):n[r];i[e]=t||n}),t.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,i),_.registerElement(e,t)},mixins:{},prefix:S,captureEvents:{focus:1,blur:1,scroll:1,DOMMouseScroll:1},customEvents:{animationstart:{attach:[S.dom+"AnimationStart"]},animationend:{attach:[S.dom+"AnimationEnd"]},transitionend:{attach:[S.dom+"TransitionEnd"]},move:{attach:["pointermove"]},enter:{attach:["pointerenter"]},leave:{attach:["pointerleave"]},scrollwheel:{attach:["DOMMouseScroll","mousewheel"],condition:function(e){return e.delta=e.wheelDelta?e.wheelDelta/40:Math.round(e.detail/3.5*-1),!0}},tap:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)t.startX=e.clientX,t.startY=e.clientY;else if(0===e.button&&Math.abs(t.startX-e.clientX)<10&&Math.abs(t.startY-e.clientY)<10)return!0}},tapstart:{attach:["pointerdown"],condition:e},tapend:{attach:["pointerup"],condition:e},tapmove:{attach:["pointerdown"],condition:function(e,t){var n;return"pointerdown"==e.type?(n=t.listener.bind(this),t.tapmoveListeners||(t.tapmoveListeners=A.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=e.type&&"pointercancel"!=e.type||(A.removeEvents(document,t.tapmoveListeners),t.tapmoveListeners=null),!0}},taphold:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)(t.pointers=t.pointers||{})[e.pointerId]=setTimeout(A.fireEvent.bind(null,this,"taphold"),t.duration||1e3);else{if("pointerup"!=e.type)return!0;t.pointers&&(clearTimeout(t.pointers[e.pointerId]),delete t.pointers[e.pointerId])}}}},pseudos:{__mixin__:{},mixins:{onCompiled:function(t,e){var n=e.source&&e.source.__mixin__||e.source;if(!n)return t;switch(e.value){case null:case"":case"before":return function(){return n.apply(this,arguments),t.apply(this,arguments)};case"after":return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e};case"none":return t}}},keypass:M,keyfail:M,delegate:{action:function(e,t){for(var n,r=t.target,o=t.currentTarget;!n&&r&&r!=o;)r.tagName&&O.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&o.tagName&&O.call(o,e.value)?o:n)?e.listener=e.listener.bind(n):null}},preventable:{action:function(e,t){return!t.defaultPrevented}},duration:{onAdd:function(e){e.source.duration=Number(e.value)}},capture:{onCompiled:function(e,t){t.source&&(t.source.capture=!0)}}},clone:o,typeOf:s,toArray:p,wrap:function(t,n){return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e}},merge:function(e,t,n){if("string"==s(t))return c(e,t,n);for(var r=1,o=arguments.length;r<o;r++){var i,a=arguments[r];for(i in a)c(e,i,a[i])}return e},uid:function(){return Math.random().toString(36).substr(2,10)},query:function(e,t){return(t||"").length?p(e.querySelectorAll(t)):[]},skipTransition:function(e,t,n){var r=S.js+"TransitionProperty",o=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return A.skipFrame(function(){e.style[r]=e.style.transitionProperty="",o&&o.call(n||e)})},requestFrame:(D=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(e){return w.setTimeout(e,20)},function(e){return D(e)}),cancelFrame:(x=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(e){return x(e)}),skipFrame:function(e){var t=A.requestFrame(function(){t=A.requestFrame(e)});return t},matchSelector:function(e,t){return O.call(e,t)},set:function(e,t,n){e[t]=n,window.CustomElements&&CustomElements.upgradeAll(e)},innerHTML:function(e,t){A.set(e,"innerHTML",t)},hasClass:function(e,t){return-1<e.className.split(" ").indexOf(t.trim())},addClass:function(e,t){var n=e.className.trim().split(" ");return t.trim().split(" ").forEach(function(e){~n.indexOf(e)||n.push(e)}),e.className=n.join(" ").trim(),e},removeClass:function(e,t){var n=t.trim().split(" ");return e.className=e.className.trim().split(" ").filter(function(e){return e&&!~n.indexOf(e)}).join(" "),e},toggleClass:function(e,t){return A[A.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+A.uid())+" > ",o=e.parentNode||!u.appendChild(e),r=(t=r+(t+"").replace(l,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),o||u.removeChild(e),p(r)},createFragment:function(e){var t=document.createElement("template");return e&&(e.nodeName?p(arguments).forEach(function(e){t.content.appendChild(e)}):t.innerHTML=y(e)),document.importNode(t.content,!0)},manipulate:function(e,t){var n=e.nextSibling,r=e.parentNode,t=t.call(e)||e;n?r.insertBefore(t,n):r.appendChild(t)},applyPseudos:function(o,i,a,s){var e,c=i,u={};if(o.match(":")){var l=[],t=0;o.replace(r,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(C,function(e,t,n,r){l.push([t||r,n])});for(var d=l.length;d--;)!function(){var e=l[d][0],t=l[d][1];if(!A.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(A.pseudos[e]),r=(n.key=o,n.name=e,n.value=t,n.arguments=(t||"").split(","),n.action=n.action||b,n.source=s,n.onAdd=n.onAdd||h,n.onRemove=n.onRemove||h,n.listener=c);c=function(){var e=n.action.apply(this,[n].concat(p(arguments)));return null===e||!1===e||(e=n.listener.apply(this,arguments),n.listener=r),e},a?a.push(n):n.onAdd.call(i,n)}()}for(e in u)u[e].onCompiled&&(c=u[e].onCompiled(c,u[e])||c);return c},removePseudos:function(t,e){e.forEach(function(e){e.onRemove.call(t,e)})},parseEvent:function(e,t){var e=e.split(":"),r=e.shift(),n=A.customEvents[r],o=A.merge({type:r,stack:h,condition:b,capture:A.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),i=(o.attach=p(o.base||o.attach),o.chain=r+(o.pseudos.length?":"+o.pseudos:"")+(e.length?":"+e.join(":"):""),A.applyPseudos(o.chain,t,o._pseudos,o));return o.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==i?(e.stopPropagation(),e.cancelBubble=!0,i.apply(this,arguments)):void 0:i.apply(this,arguments)},o.listener=function(e){var t=p(arguments),n=o.condition.apply(this,t.concat([o]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void A.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=i)?n:{__stack__:i}}):o.stack.apply(this,t))},o.attach.forEach(function(e){o._attach.push(A.parseEvent(e,o.listener))}),o},addEvent:function(t,e,n,r){e="function"==typeof n?A.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){A.addEvent(t,e.type,e)}),e.onAdd.call(t,e,e.listener),t.addEventListener(e.type,e.stack,r||e.capture),e},addEvents:function(e,t){var n,r={};for(n in t)r[n]=A.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),A.removePseudos(t,n._pseudos),n._attach.forEach(function(e){A.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)A.removeEvent(e,t[n])},fireEvent:function(e,t,n){var r=_.createEvent("CustomEvent");r.initCustomEvent(t,!1!==(n=n||{}).bubbles,!1!==n.cancelable,n.detail),n.baseEvent&&i(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(A):"undefined"!=typeof module&&module.exports?module.exports=A:w.xtag=A,_.addEventListener("WebComponentsReady",function(){A.fireEvent(_.body,"DOMComponentsLoaded")})}();
1
+ /*! quran-madina-html 10-07-2026 */
2
+ !function(){var C="quran-madina-html",d=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${C}/`,L={content:"Loading .."},i=/[\u0621-\u064A\u0671-\u06D3]/,M="﷽";function S(e,t){return 1===t&&0!==e}var s={};var c={};function h(i,e,t,n){var a,r=!n&&function(e){if(s[e])return s[e];try{var t=sessionStorage.getItem("quran-madina-html:"+e);if(t)return s[e]=JSON.parse(t)}catch(e){}return null}(i);r?e&&setTimeout(function(){e(r)},0):c[i]?c[i].push({success:e,error:t}):(c[i]=[{success:e,error:t}],(a=new XMLHttpRequest).onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var e=c[i];if(delete c[i],200===a.status){var t=JSON.parse(a.responseText),n=i,r=t,o=a.responseText;s[n]=r;try{sessionStorage.setItem("quran-madina-html:"+n,o)}catch(e){}e.forEach(function(e){e.success&&e.success(t)})}else e.forEach(function(e){e.error&&e.error(a)})}},a.open("GET",i,!0),a.send())}function O(e){console.log(C+"> "+e)}function N(e){return null!=e&&(""===(e=String(e).trim().toLowerCase())||"true"===e||"1"===e||"yes"===e)}function P(e){return Array(2).fill(e.split("-")[0]-1)}function I(e){return 2==e.split("-").length?e.split("-").map(e=>parseInt(e)+1):Array(2).fill(parseInt(e.split("-")[0])+1)}function x(e,t){if(null!=e&&"auto"!==e){if("no"===e)return!0;O("yes"===e?'inline="yes" is not implemented yet; falling back to "auto"':"Bad inline parameter: "+e)}return t}function p(e){return i.test(e)}function _(e){var t=0;return e.t.split(/\s+/).forEach(function(e){p(e)&&(t+=1)}),t}function k(e,t="class",n="lightgrey",r="transparent"){var o="tag"===t.toLowerCase()?document.getElementsByTagName(e):document.getElementsByClassName(e);Array.from(o).forEach(function(e){e.onmouseover=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=n})},e.onmouseout=function(){Array.from(o).forEach(function(e){e.style.backgroundColor=r})}})}function D(e,t){var n=(e,t)=>String(e).padStart(t,"0"),n=[C+"-part",`${C}-${n(e,3)}-`+n(t,3)];return(-1==t||1==e&&0==t)&&n.push("quran-madina-html-sura-start"),n}function f(){var e=document.createElement("div");return e.innerHTML='<svg viewBox="0 0 24 24" class="quran-madina-html-icon" width="20px"><path d="M16.02 20.96H3.78c-.41 0-.75-.34-.75-.75V7.74c0-.41.34-.75.75-.75h7.87c.21 0 .39.08.53.22l4.37 4.37c.14.14.22.32.22.53v8.11c0 .4-.34.74-.75.74ZM4.53 19.47h10.75v-6.61h-3.62c-.41 0-.75-.34-.75-.75V8.48H4.53v10.99Z"></path><path d="m20.74 7.63-4.37-4.37c-.14-.14-.36-.2-.53-.22H8.01c-.41 0-.75.34-.75.75V5.5h1.49v-.97h6.34v3.62c0 .41.34.75.75.75h3.62v8.19h-1.2v1.49h1.95c.41 0 .75-.34.75-.75V8.16c0-.21-.08-.4-.22-.53Z"></path></svg>'.trim(),e.firstChild}function q(){var e=document.createElement("div");return e.innerHTML='<svg class="quran-madina-html-icon" viewBox="0 0 820 615" style="height:20px"><path d="M70 1.9C37.6 8.8 12.6 33.4 3.4 67.5c-1.8 6.6-1.9 11.9-1.9 98v91l2.3 8c5.1 17.8 17 36.4 29.9 46.7 10.8 8.6 25.4 15.4 38.1 17.8 3.1.6 15.2 1 26.8 1 17.7 0 21.3.2 21.7 1.4.4.9.6 17.1.7 36.1 0 32.4.2 34.9 2 38.5 6.4 12.5 21.4 17.4 33.3 10.8 2.3-1.3 7.5-6.4 12.1-11.9l63-74.1c.6-.4 16.3-.8 34.9-.8H300l-.2-18.3-.3-18.2-42.8.1-43.1.5c-.2.2-12.7 15.1-27.9 33.1-15.1 18-27.8 32.4-28.1 32.1-.3-.4-.6-15.3-.6-33.2v-32.6l-38.8-.1c-42.1-.2-43.9-.4-54.3-6-6.5-3.6-16.9-14.6-20.2-21.5-5.8-11.9-5.7-10-5.7-100.7 0-92-.2-89.4 6.3-101.7 3.9-7.3 13.5-17.1 20.3-20.7C76 36.7 66.1 37 244.5 37L412 38.1c18 4.1 33.5 20.5 37.5 39.6 2.2 10.2 2.1 164.6 0 174.8-3.9 18.3-16.4 32.7-33.5 38.5-3.2 1.1-7.8 2-10 2-3.1 0-4 .4-4 1.7 0 1-.2 8.8-.3 17.3-.2 8.5-.2 16.2 0 17 .9 3.3 21.7-.5 34.1-6 13.7-6.3 27.5-17.9 36.2-30.5 5-7.2 10.8-20.4 13.2-30.1l2.3-8.9V165 76.5l-2.3-9c-8.1-31.4-30.5-54.9-61.7-64.8l-7-2.2-169-.2C87.7.1 78 .2 70 1.9zm277.294 102.559q19.5-.5 28.25 24.5 2.5 7.25-3.75 19.75-5.75 11.75-9.75 16-19.5 21.5-67 25.25-27.75 2.25-50.25-2.25-5.25 38.25-16.5 50-26 26.75-66 29.5-27.75 2-42.5-11-20.25-17.75-16.5-48.5 3-23.75 14.25-42.5 2.75-4.5 4.75-7.5 2-3 3-4.25 2.25-2.75 4.75-1.25 2.75 1.5 0 6.25-12.75 24.5-10 45 4 30.5 44.5 30.5 30.25 0 53.25-15.5 12.5-8.25 14.75-14.25-2.25-20.75-13.75-35.75-3.5-4.25-1.75-8l9.5-23.5q3-7.5 8.25 1.25l8.75 14.75q7.75 4.25 28.25 5 16.75-19.25 39.25-36.25 22.5-16.75 36.25-17.25zm11.5 40.5q-12.5-9.5-31.75-5.75-19 3.75-41.25 19.5 50.75.5 73-13.75zm-71.5-89.75q1.5-2 4.25-1.25 5 1.75 9.5 4.5 4.75 2.75 8.75 6.25 2 2 .75 4.5l-12 19q-1.75 2.5-4.5.5-2.5-2-18-11.25-2.75-1.75-1-4.25zm278.784 232.623c-4.7.4-4.7.4-6.7 6.1-1.2 3.1-9.3 25.9-18 50.7l-36.6 102.7-3.5 9.8h17.9 17.8l5.7-17 5.7-17h31.7 31.8l5.6 17.2 5.6 17.3 17.9-.3 18-.3-6-17.2-15-43.2-13.3-38.5-14.1-41-9.9-28.7c-.3-.6-30.2-1.1-34.6-.6zm35.7 106c-.2.2-10 .2-21.9.1l-21.5-.3 9.8-29.5 11-32.5c1.2-2.9 1.8-1.4 12.1 29.4l10.5 32.8zm148.8 139.609c32.4-6.9 57.4-31.5 66.6-65.6 1.8-6.6 1.9-11.9 1.9-98v-91l-2.3-8c-5.1-17.8-17-36.4-29.9-46.7-10.8-8.6-25.4-15.4-38.1-17.8-3.1-.6-15.2-1-26.8-1-17.7 0-21.3-.2-21.7-1.4-.4-.9-.6-17.1-.7-36.1 0-32.4-.2-34.9-2-38.5-6.4-12.5-21.4-17.4-33.3-10.8-2.3 1.3-7.5 6.4-12.1 11.9l-63 74.1c-.6.4-16.3.8-34.9.8h-33.7l.2 18.3.3 18.2 42.8-.1 43.1-.5c.2-.2 12.7-15.1 27.9-33.1 15.1-18 27.8-32.4 28.1-32.1.3.4.6 15.3.6 33.2v32.6l38.8.1c42.1.2 43.9.4 54.3 6 6.5 3.6 16.9 14.6 20.2 21.5 5.8 11.9 5.7 10 5.7 100.7 0 92 .2 89.4-6.3 101.7-3.9 7.3-13.5 17.1-20.3 20.7-11.4 6.1-1.5 5.8-179.9 5.8-108.2 0-164.5-.4-167.5-1.1-18-4.1-33.5-20.5-37.5-39.6-2.2-10.2-2.1-164.6 0-174.8 3.9-18.3 16.4-32.7 33.5-38.5 3.2-1.1 7.8-2 10-2 3.1 0 4-.4 4-1.7 0-1 .2-8.8.3-17.3.2-8.5.2-16.2 0-17-.9-3.3-21.7.5-34.1 6-13.7 6.3-27.5 17.9-36.2 30.5-5 7.2-10.8 20.4-13.2 30.1l-2.3 8.9v88.5 88.5l2.3 9c8.1 31.4 30.5 54.9 61.7 64.8l7 2.2 169 .2 177.5-1.6z"/></svg>'.trim(),e.firstChild}function j(e){var t=document.createElement("quran-madina-html-header"),e=(t.innerHTML=e,f()),n=(e.addEventListener("click",B),q());return n.addEventListener("click",$),t.appendChild(e),t.appendChild(n),t}var m=null;function A(){m&&(m.popup.classList.remove(C+"-open"),document.removeEventListener("click",m.outsideClick),document.removeEventListener("keydown",m.onEscape),m=null)}function a(t,e,n,r,o){A();function i(e){u.contains(e.target)||A()}function a(e){"Escape"===e.key&&A()}s=t,(c=document.querySelector(`body > ${C}-aya-popup`))||((c=document.createElement(C+"-aya-popup")).appendChild(f()),c.appendChild(q()),document.body.appendChild(c)),["--qmh-header","--qmh-background"].forEach(function(e){c.style.setProperty(e,getComputedStyle(s).getPropertyValue(e))});var s,c,u=c,l=u.children[0],d=u.children[1];l.onclick=function(e){e.stopPropagation();e="“"+Array.from(t.getElementsByClassName(n)).map(function(e){return e.textContent}).join(" ").replace(/\s+/g," ").trim()+"”\n\n"+L.suras[r-1].name;navigator.clipboard.writeText(e),alert("⎘ تم نسخ:\n\n"+e),A()},d.onclick=function(e){e.stopPropagation(),window.open(`https://quran.com/${r}/`+o,"_blank"),A()},l=u,d=(d=e).getBoundingClientRect(),l.style.left=Math.max(4,d.left)+"px",l.style.top=(0<d.top-34-6?d.top-34-6:d.bottom+6)+"px",u.classList.add(C+"-open");document.addEventListener("click",i),document.addEventListener("keydown",a),m={popup:u,outsideClick:i,onEscape:a}}function F(n,r,o,i){i<1||Array.from(n.getElementsByClassName(r)).forEach(function(t){t.style.cursor="pointer",t.onclick=function(e){e.stopPropagation(),a(n,t,r,o,i)}})}function z(e,t){e.style="display:block;",e.style.setProperty("font-family",L.font_family,""),e.style.setProperty("font-size",L.font_size+"px",""),"me_quran"===L.font_family&&e.style.setProperty("line-height",2*L.font_size+"px",""),e.style.width=L.line_width+10+"px",e.style.setProperty("box-shadow","inset "+(t%2==1?"":"-")+"8px 0 7px -7px #333","")}function U(e,t){0<=t?e.style.setProperty("transform",`scaleX(${t*(L.stretch_scale||1)})`,""):e.style.setProperty("text-align","center","")}function Y(e,t){for(var n=0;n<e.r.length;n++)if(e.r[n].l===t)return e.r[n];return null}function X(e,t,n){var r,e=L.suras[e].ayas;return t<=0||void 0===(r=e[t-1])||r.p!==e[t].p||null===Y(r,n)}function R(e,t,n,r,o){for(var i=L.suras[e].ayas,a=[],s=r+o;0<=s&&s<i.length&&void 0!==i[s]&&i[s].p==t;s+=o){var c=Y(i[s],n);if(null===c)break;if(o<0){if(a.unshift(c),X(e,s,n))break}else a.push(c)}return a}function H(e,t){for(var n=0;n<t.length;n++){var r=document.createElement("div");r.textContent=t[n].t,r.style.cssText="display:inline;visibility:hidden",e.appendChild(r)}}function B(){var e=this.parentElement.parentElement,t=e.querySelector("quran-madina-html-header"),n=(t=t?t.textContent.replace(/\s+/g," ").trim():null!=(t=e.getAttribute("sura"))?L.suras[t-1].name:"",(n=(e=(e=e).cloneNode(!0)).querySelector("quran-madina-html-header"))&&n.parentNode.removeChild(n),Array.from(e.querySelectorAll(`.${C}-word-hidden`)).forEach(function(e){e.parentNode.removeChild(e)}),Array.from(e.querySelectorAll("div,span")).forEach(function(e){/visibility:\s*hidden/.test(e.getAttribute("style")||"")&&e.parentNode.removeChild(e)}),e),e=n.querySelectorAll("quran-madina-html-line"),e=e.length?Array.from(e).map(function(e){return e.textContent.replace(/\s+/g," ").trim()}).filter(function(e){return""!==e}).join(" "):n.textContent.replace(/\s+/g," ").trim(),n="“"+e+"”\n\n"+t;navigator.clipboard.writeText(n),alert("⎘ تم نسخ:\n\n"+n)}function $(){var e=this.parentElement.parentElement;let t;t=null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")?`https://quran.com/${e.getAttribute("sura")}/`+e.getAttribute("aya"):"https://quran.com/page/"+e.getAttribute("page"),window.open(t,"_blank")}function V(e,t,n){for(var r=[],o=null,i=0,a=L.suras.length,s=2===t&&0<e?1:t,c=0;c<a;c++){for(var u=(e+c)%a,l=L.suras[u].ayas,d=!1,h=0===c?s:0;h<l.length;h++){var p=(0==u?2:1)<=h,f=l[h];if(void 0===f)break;for(var m=0;m<f.r.length;m++){var v,g=f.r[m];""!==g.t&&(v=f.p+":"+g.l,o&&o.key===v||(o={key:v,stretch:g.s,parts:[]},r.push(o)),o.parts.push({sura:u,ayaIdx:h,part:g,countable:p}))}if(p&&(i+=function(e){var t=0;return e.r.forEach(function(e){t+=_(e)}),t}(f))>=n[1]){d=!0;break}}if(d)break}for(var y=0,b=(r.forEach(function(e){e.parts.forEach(function(e){e.countable&&(y+=_(e.part))}),e.lastWord=y}),0);b<r.length-1&&r[b].lastWord<n[0];)b+=1;for(var w=b;w<r.length-1&&r[w].lastWord<n[1];)w+=1;return{groups:r.slice(b,w+1),counterStart:0<b?r[b-1].lastWord:0}}function W(u,e,t,l,n,r,o,d){var e=V(e,t,l),i=e.groups,a=x(o,1<i.length),h=e.counterStart;A(),u.innerHTML="",u.removeAttribute("style"),u.classList.toggle(C+"-inline",!a&&!r),a&&(t=parseInt(i[0].key.split(":")[0],10),z(u,t),n||u.appendChild(j(L.suras[i[0].parts[0].sura].name))),i.forEach(function(e,t){var n,c=document.createElement("quran-madina-html-line");a?(c.style.setProperty("display","block",""),U(c,e.stretch),X((n=e.parts[0]).sura,n.ayaIdx,n.part.l)||H(c,R(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,-1))):(c.style.setProperty("font-family",L.font_family,""),c.style.setProperty("font-size",L.font_size+"px","")),u.appendChild(c),e.parts.forEach(function(e){var t,n,r,o,i,a=document.createElement("div"),s=D(e.sura+1,e.ayaIdx-1);DOMTokenList.prototype.add.apply(a.classList,s),e.countable?0<(t=S(e.sura,e.ayaIdx)?_(e.part):0)&&h+1>=l[0]&&h+t<=l[1]?((r=document.createElement("span")).classList.add(C+"-word",C+"-basmala"),r.textContent=M,a.appendChild(r),h+=t):(n=a,r=e.part.t,o=l,i=h,r.split(/(\s+)/).forEach(function(e){var t;""!==e&&(/^\s+$/.test(e)?n.appendChild(document.createTextNode(e)):((t=document.createElement("span")).textContent=e,t.classList.add(C+"-word"),p(e)?((i+=1)<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"):(i<o[0]||i>o[1])&&t.classList.add(C+"-word-hidden"),n.appendChild(t)))}),h=i):d&&(0===e.ayaIdx||0===e.sura&&1===e.ayaIdx)?((t=document.createElement("span")).textContent=e.part.t,t.style.visibility="hidden",a.appendChild(t)):a.textContent=e.part.t,a.style.cssText="display:inline",c.appendChild(a),k(s.slice(-1)[0]),F(u,s.slice(-1)[0],e.sura+1,e.ayaIdx-1)}),a&&t===i.length-1&&(n=e.parts[e.parts.length-1],H(c,R(n.sura,L.suras[n.sura].ayas[n.ayaIdx].p,n.part.l,n.ayaIdx,1)))})}var e,G,u,t=16,n=[16,24],r=[6,100],o=document.currentScript||document.querySelector(`script[src*="${C}"]`),v=o.getAttribute("data-name")||"Madina05",g=(o.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),y=parseFloat(o.getAttribute("data-font-size"))||t,r=((y<r[0]||r[1]<y)&&(O(`font-size ${y} outside ${r[0]}..${r[1]}, using `+t),y=t),o.getAttribute("data-cdn")),o=(r&&(d=r.replace(/\/?$/,"/")),O(v+` with font: ${g} size: `+y),d+"dist/"+C+".min.css?v=1.1");function b(e){u=d+`assets/db/${G=v+`-${g}-${y=e}px`}/`}document.getElementById(C)||(r=document.getElementsByTagName("head")[0],(e=document.createElement("link")).id=C,e.rel="stylesheet",e.type="text/css",e.href=o,e.media="all",r.appendChild(e)),b(y);var w=null;function K(){w&&(L.font_size=w.font_size,L.line_width=w.line_width,L.stretch_scale=w.stretch_scale)}var l={};function E(e,t){if(!L.juz)return-1;for(var n=Math.max(t,2),r=0,o=L.juz,i=0;i<o.length&&(o[i][0]<e||o[i][0]===e&&o[i][1]<=n);i++)r=i;return r}function Z(e,i){if(L.juz){for(var a,t=[],n=0;n<e.length;n++){var r=e[n];0<=r&&r<L.juz.length&&!l[r]&&t.indexOf(r)<0&&t.push(r)}0===t.length?i():(a=t.length,t.forEach(function(o){var e;h(u+"juz-"+((e=o+1)<10?"0":"")+e+".json",function(e){for(var t=e,n=0;n<t.d.length;n++){var r=t.d[n];L.suras[r[0]].ayas[r[1]]={p:r[2],r:r[3]}}l[o]=!0,0==--a&&i()},function(e){console.error(C+"> failed to load juz "+(o+1),e),l[o]=!0,0==--a&&i()})}))}else i()}function J(){const e=new FontFace(L.font_family,"url("+encodeURI(null==(t=L.font_url)||/^(https?:)?\/\//.test(t)?t:d+String(t).replace(/^\//,""))+")");e.load().then(()=>{document.fonts.add(e)});var t,n={};["page","page_param","aya","sura","words","headless","quotes","inline","notitle"].forEach(function(e){var t;n[e]=(t=e,{attribute:{},set:function(e){this.xtag.data[t]=e},get:function(){return this.getAttribute(t)}})}),xtag.register(C,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:n,methods:{render:function(e){var t;this.xtag.data.rendering||Z(function(e){if(!L.juz)return[];var t,n=[];if(null!=e.getAttribute("sura")&&null!=e.getAttribute("aya")){var r,o=P(e.getAttribute("sura"))[0],i=I(e.getAttribute("aya"));if(null!=e.getAttribute("words"))return[r=E(o,i[0]),(r+1)%L.juz.length];for(t=E(o,i[0]);t<=E(o,i[1]);t++)n.push(t)}else{if(null==e.getAttribute("page"))return[];var a=L.pages[parseInt(e.getAttribute("page"),10)-1];if(!a)return[];for(t=E(a[0],a[1]);t<=E(a[2],a[3]);t++)n.push(t)}return n}(t=this),function(){if(!t.xtag.data.rendering){t.xtag.data.rendering=!0;try{t.doRender(e)}finally{t.xtag.data.rendering=!1}}})},doRender:function(t){var n,r,o,e=null,i=this.page,a=N(this.headless),s=N(this.notitle),c=null!=this.quotes&&!N(this.quotes),u=this.inline,l=null!=this.sura&&null!=this.aya;if(l)f=h=P(this.sura)[0],o=!1,[p,m]=I(this.aya),null!=this.page&&O("Ignoring page parameter!"),i=L.suras[h].ayas[p].p;else{if(null==this.page)return console.error(C+"> Bad arguments: Not rendering!"),1;if(L.pages)var d=L.pages[i-1],h=d[0],p=d[1],f=d[2],m=d[3];else{for(m=p=f=h=0;L.suras[h].ayas.slice(-1)[0].p<i;)h+=1;for(f=h;f<114&&L.suras[f].ayas[0].p<=i;)f+=1;for(f-=1;L.suras[h].ayas[p].p<i;)p+=1;for(m=L.suras[f].ayas.length-1;L.suras[f].ayas[m].p>i;)m-=1}o=!0,null!=this.inline&&O("Ignoring inline parameter with page!")}if(null!=this.words)if(l){if(null!=(e=null==(d=this.words)||2!=(d=1==(d=d.split(/[-:]/).map(e=>parseInt(e,10))).length?[d[0],d[0]]:d).length||isNaN(d[0])||isNaN(d[1])||d[0]<1||d[1]<d[0]?null:d))return m!==p&&O("Ignoring aya range end with words parameter!"),500<e[1]-e[0]+1&&(O("words selection capped at 500 words"),e[1]=e[0]+499),void W(t,h,p,e,a,c,u,s);O("Bad words parameter: "+this.words)}else O("Ignoring words parameter with page!");A(),t.innerHTML="",t.removeAttribute("style"),o=x(u,o=(n=L.suras[h].ayas[p].r[0].l)!=(r=L.suras[f].ayas[m].r.slice(-1)[0].l)?!0:o),t.classList.toggle(C+"-inline",!o&&!c),o&&(z(t,i),a||t.appendChild(j(L.suras[h].name)));var v=p,g=h;for(let e=n;e<=r;e++){const T=e;var y=document.createElement("quran-madina-html-line"),b=(t.appendChild(y),o?y.style.setProperty("display","block",""):(y.style.setProperty("font-family",L.font_family,""),y.style.setProperty("font-size",L.font_size+"px","")),o&&l&&e===n&&H(y,R(h,i,n,p,-1)),h==f?m:L.suras[g].ayas.length-1);for(let e=v;e<=Math.min(v+5,b);e++){var w,_,E=L.suras[g].ayas[e];void 0!==E&&E.p==i&&(E=E.r.filter(e=>e.l==T)).length&&(o&&U(y,E[0].s),w=document.createElement("div"),_=D(g+1,e-1),DOMTokenList.prototype.add.apply(w.classList,_),w.textContent=S(g,e)&&""!==E[0].t?M:E[0].t,w.style.cssText="display:inline",y.appendChild(w),k(_.slice(-1)[0]),F(t,_.slice(-1)[0],g+1,e-1),v=e,E=g<113?L.suras[g+1].ayas[0]:void 0,b<=v)&&void 0!==E&&E.p==i&&E.r[0].l==T+1&&(g+=1,v=0)}o&&l&&e===r&&H(y,R(f,i,r,m,1))}}}})}function T(){h(u+"manifest.json",function(e){if(e.content_hash){var t="quran-madina-html:hash:"+u,n=null;try{n=sessionStorage.getItem(t)}catch(e){}if(null!==n&&n!==e.content_hash){var r=u;try{for(var o=sessionStorage.length-1;0<=o;o--){var i=sessionStorage.key(o);i&&0===i.indexOf("quran-madina-html:"+r)&&sessionStorage.removeItem(i)}}catch(e){}Object.keys(s).forEach(function(e){0===e.indexOf(r)&&delete s[e]})}try{sessionStorage.setItem(t,e.content_hash)}catch(e){}}L={title:e.title,published:e.published,font_family:e.font_family,font_url:e.font_url,font_size:e.font_size,line_width:e.line_width,suras:e.suras.map(function(e){return{name:e[0],ayas:new Array(e[1])}}),juz:e.juz,pages:e.pages},K(),J()},Q,!0)}function Q(){h(d+`assets/db/${G}.json`,function(e){L=e,K(),J()},function(e){y!=t?(O(`no DB for font: ${g} size: ${y}, falling back to size: `+t),w=null,b(t),T()):console.error(C+"> no manifest and no monolithic DB",e)})}function ee(){function o(e){l||(l=!0,console.error(C+"> missing anchor DB for font-size interpolation",e),O("falling back to size: "+t),b(t),T())}var i=y,a=n[0],s=n[1],c=i-a<=s-i?a:s,u={},l=!1;n.forEach(function(t){var e,n,r;n=o,h(d+`assets/db/${r=v+`-${g}-${t}px`}/manifest.json`,e=function(e){u[t]=e,!l&&a in u&&s in u&&(e=Math.round(u[a].line_width+(u[s].line_width-u[a].line_width)*(i-a)/(s-a)),w={font_size:i,line_width:e,stretch_scale:e*c/(u[c].line_width*i)},O(`font-size ${i}px interpolated from ${a}px/${s}px anchors: line_width ${e}, render data from ${c}px`),b(c),T())},function(){h(d+`assets/db/${r}.json`,e,n)})})}(0<=n.indexOf(y)?T:ee)()}(),function(){function e(e){if((this._element=e).className!=this._classCache&&(this._classCache=e.className,this._classCache))for(var t=this._classCache.replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;t.length>n;n++)o.call(this,t[n])}function t(e,t){e.className=t.join(" ")}var n,r,o,i,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,o=s.push,i=s.splice,a=s.join,e.prototype={add:function(e){this.contains(e)||(o.call(this,e),t(this._element,r.call(this,0)))},contains:function(e){return-1!==n.call(this,e)},item:function(e){return this[e]||null},remove:function(e){e=n.call(this,e);-1!==e&&(i.call(this,e,1),t(this._element,r.call(this,0)))},toString:function(){return a.call(this," ")},toggle:function(e){-1===n.call(this,e)?this.add(e):this.remove(e)}},window.DOMTokenList=e,s=Element.prototype,c="classList",u=function(){return new e(this)},Object.defineProperty?Object.defineProperty(s,c,{get:u}):s.__defineGetter__(c,u))}(),function(){window.WebComponents=window.WebComponents||{flags:{}};var e,t=document.querySelector('script[src*="webcomponents-lite.js"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,e=e.split("=");e[0]&&(t=e[0].match(/wc-(.+)/))&&(n[t[1]]=e[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(e=n.log.split(","),n.log={},e.forEach(function(e){n.log[e]=!0})):n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function g(e){return void 0!==_[e]}function y(){r.call(this),this._isInvalid=!0}function b(e){return""==e&&y.call(this),e.toLowerCase()}function w(e){var t=e.charCodeAt(0);return 32<t&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function n(e,t,n){function r(e){d.push(e)}var o,i,a=t||"scheme start",s=0,c="",u=!1,l=!1,d=[];e:for(;(e[s-1]!=T||0==s)&&!this._isInvalid;){var h=e[s];switch(a){case"scheme start":if(!h||!C.test(h)){if(t){r("Invalid scheme.");break e}c="",a="no scheme";continue}c+=h.toLowerCase(),a="scheme";break;case"scheme":if(h&&L.test(h))c+=h.toLowerCase();else{if(":"!=h){if(t){if(T==h)break e;r("Code point not allowed in scheme: "+h);break e}c="",s=0,a="no scheme";continue}if(this._scheme=c,c="",t)break e;g(this._scheme)&&(this._isRelative=!0),a="file"==this._scheme?"relative":this._isRelative&&n&&n._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==h?(this._query="?",a="query"):"#"==h?(this._fragment="#",a="fragment"):T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._schemeData+=w(h));break;case"no scheme":if(n&&g(n._scheme)){a="relative";continue}r("Missing scheme."),y.call(this);break;case"relative or authority":if("/"!=h||"/"!=e[s+1]){r("Expected /, got: "+h),a="relative";continue}a="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=n._scheme),T==h){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==h||"\\"==h)"\\"==h&&r("\\ is an invalid code point."),a="relative slash";else if("?"==h)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,a="query";else{if("#"!=h){var p=e[s+1],f=e[s+2];("file"!=this._scheme||!C.test(h)||":"!=p&&"|"!=p||T!=f&&"/"!=f&&"\\"!=f&&"?"!=f&&"#"!=f)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),a="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,a="fragment"}break;case"relative slash":if("/"!=h&&"\\"!=h){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),a="relative path";continue}"\\"==h&&r("\\ is an invalid code point."),a="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=h){r("Expected '/', got: "+h),a="authority ignore slashes";continue}a="authority second slash";break;case"authority second slash":if(a="authority ignore slashes","/"==h)break;r("Expected '/', got: "+h);continue;case"authority ignore slashes":if("/"!=h&&"\\"!=h){a="authority";continue}r("Expected authority, got: "+h);break;case"authority":if("@"==h){u&&(r("@ already seen."),c+="%40");for(var u=!0,m=0;c.length>m;m++){var v=c[m];"\t"!=v&&"\n"!=v&&"\r"!=v?":"!=v||null!==this._password?(v=w(v),null!==this._password?this._password+=v:this._username+=v):this._password="":r("Invalid whitespace in authority.")}c=""}else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){s-=c.length,c="",a="host";continue}c+=h}break;case"file host":if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){a=2!=c.length||!C.test(c[0])||":"!=c[1]&&"|"!=c[1]?(0==c.length||(this._host=b.call(this,c),c=""),"relative path start"):"relative path";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid whitespace in file host."):c+=h;break;case"host":case"hostname":if(":"!=h||l){if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h){if(this._host=b.call(this,c),c="",a="relative path start",t)break e;continue}"\t"!=h&&"\n"!=h&&"\r"!=h?("["==h?l=!0:"]"==h&&(l=!1),c+=h):r("Invalid code point in host/hostname: "+h)}else if(this._host=b.call(this,c),c="",a="port","hostname"==t)break e;break;case"port":if(/[0-9]/.test(h))c+=h;else{if(T==h||"/"==h||"\\"==h||"?"==h||"#"==h||t){if(""!=c&&((p=parseInt(c,10))!=_[this._scheme]&&(this._port=p+""),c=""),t)break e;a="relative path start";continue}"\t"==h||"\n"==h||"\r"==h?r("Invalid code point in port: "+h):y.call(this)}break;case"relative path start":if("\\"==h&&r("'\\' not allowed in path."),a="relative path","/"!=h&&"\\"!=h)continue;break;case"relative path":T!=h&&"/"!=h&&"\\"!=h&&(t||"?"!=h&&"#"!=h)?"\t"!=h&&"\n"!=h&&"\r"!=h&&(c+=w(h)):("\\"==h&&r("\\ not allowed in relative path."),".."==(c=(f=E[c.toLowerCase()])?f:c)?(this._path.pop(),"/"!=h&&"\\"!=h&&this._path.push("")):"."==c&&"/"!=h&&"\\"!=h?this._path.push(""):"."!=c&&("file"==this._scheme&&0==this._path.length&&2==c.length&&C.test(c[0])&&"|"==c[1]&&(c=c[0]+":"),this._path.push(c)),c="","?"==h?(this._query="?",a="query"):"#"==h&&(this._fragment="#",a="fragment"));break;case"query":t||"#"!=h?T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._query+=(i=void 0,32<(i=(o=h).charCodeAt(0))&&i<127&&-1==[34,35,60,62,96].indexOf(i)?o:encodeURIComponent(o))):(this._fragment="#",a="fragment");break;case"fragment":T!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._fragment+=h)}s++}}function r(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function o(e,t){void 0===t||t instanceof o||(t=new o(t+"")),this._url=e,r.call(this);e=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");n.call(this,e,null,t)}var _,E,T,C,L,t,i=!1;if(!e.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}catch(e){}i||((_=Object.create(null)).ftp=21,_.file=0,_.gopher=70,_.http=80,_.https=443,_.ws=80,_.wss=443,(E=Object.create(null))["%2e"]=".",E[".%2e"]="..",E["%2e."]="..",T=void(E["%2e%2e"]=".."),C=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,o.prototype={toString:function(){return this.href},get href(){var e;return this._isInvalid?this._url:((e="")==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment)},set href(e){r.call(this),n.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||n.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&n.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],n.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&((this._query="?")==e[0]&&(e=e.slice(1)),n.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||((this._fragment="#")==e[0]&&(e=e.slice(1)),n.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this._scheme+"://"+e:""}},(t=e.URL)&&(o.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)},o.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=o)}(self),"undefined"==typeof WeakMap&&function(){function e(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"}var r=Object.defineProperty,t=Date.now()%1e9;e.prototype={set:function(e,t){var n=e[this.name];return n&&n[0]===e?n[1]=t:r(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];return!(!t||t[0]!==e||(t[0]=t[1]=void 0))},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=e}(),function(e){function o(){p=!1;var e=f,r=(f=[],e.sort(function(e,t){return e.uid_-t.uid_}),!1);e.forEach(function(e){var t,n=e.takeRecords();(t=e).nodes_.forEach(function(e){e=s.get(e);e&&e.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(e.callback_(n,e),r=!0)}),r&&o()}function u(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var o=0;r.length>o;o++){var i=r[o],a=i.options;(n===e||a.subtree)&&(a=t(a))&&i.enqueue(a)}}}function t(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++m}function r(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function l(e,t){return v=new r(e,t)}function d(e){return g||((n=new r((t=v).type,t.target)).addedNodes=t.addedNodes.slice(),n.removedNodes=t.removedNodes.slice(),n.previousSibling=t.previousSibling,n.nextSibling=t.nextSibling,n.attributeName=t.attributeName,n.attributeNamespace=t.attributeNamespace,n.oldValue=t.oldValue,(g=n).oldValue=e,g);var t,n}function i(e,t){return e===t?e:g&&((t=e)===g||t===v)?g:null}function a(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var s,n,c,h,p,f,m,v,g;e.JsMutationObserver||(s=new WeakMap,h=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(n=[],c=Math.random()+"",window.addEventListener("message",function(e){e.data===c&&(e=n,n=[],e.forEach(function(e){e()}))}),function(e){n.push(e),window.postMessage(c,"*")}),p=!1,f=[],m=0,t.prototype={observe:function(e,t){if(n=e,e=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n,r=s.get(e);r||s.set(e,r=[]);for(var o,i=0;r.length>i;i++)if(r[i].observer===this){(o=r[i]).removeListeners(),o.options=t;break}o||(o=new a(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=s.get(e),n=0;t.length>n;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},a.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(0<t.length){var r=i(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,f.push(r),p||(p=!0,h(o));t[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){var t;e!==this.target&&(this.addListeners_(e),this.transientObservedNodes.push(e),(t=s.get(e))||s.set(e,t=[]),t.push(this))},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=s.get(e),n=0;t.length>n;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=((i=new l("attributes",r)).attributeName=t,i.attributeNamespace=n,e.attrChange===MutationEvent.ADDITION?null:e.prevValue);u(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?d(o):i});break;case"DOMCharacterDataModified":var i=l("characterData",r=e.target),o=e.prevValue;u(r,function(e){return e.characterData?e.characterDataOldValue?d(o):i:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var a,r=e.target,s="DOMNodeInserted"===e.type?(a=[r],[]):(a=[],[r]),c=r.previousSibling,r=r.nextSibling;(i=l("childList",e.target.parentNode)).addedNodes=a,i.removedNodes=s,i.previousSibling=c,i.nextSibling=r,u(e.relatedNode,function(e){return e.childList?i:void 0})}v=g=void 0}},e.JsMutationObserver=t,e.MutationObserver)||((e.MutationObserver=t)._isPolyfilled=!0)}(self),"undefined"==typeof HTMLTemplateElement&&function(){function n(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}var r=document.implementation.createHTMLDocument("template"),o=!0,t=((HTMLTemplateElement=function(){}).prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=r.createDocumentFragment();for(var t;t=e.firstChild;)e.content.appendChild(t);if(o)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(i,n);return e},set:function(e){for(r.body.innerHTML=e,HTMLTemplateElement.bootstrap(r);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;r.body.firstChild;)this.content.appendChild(r.body.firstChild)},configurable:!0})}catch(e){o=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,o=n.length;r<o&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),i=(document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e},/[&\u00A0<>]/g)}(),function(){"use strict";var e,t;window.performance||(e=Date.now(),window.performance={now:function(){return Date.now()-e}}),window.requestAnimationFrame||(window.requestAnimationFrame=(t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(e){return t(function(){e(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}),(r=document.createEvent("Event")).initEvent("foo",!0,!0),r.preventDefault();r.defaultPrevented||(n=Event.prototype.preventDefault,Event.prototype.preventDefault=function(){this.cancelable&&(n.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))});var n,r=/Trident/.test(navigator.userAgent);(!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),(!window.Event||r&&"function"!=typeof window.Event)&&(r=window.Event,window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=r.prototype)}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){(function e(t,n){{var r;o(n)?t&&t():(r=function(){"complete"!==n.readyState&&n.readyState!==s||(n.removeEventListener(c,r),e(t,n))},n.addEventListener(c,r))}})(function(){!function(e,t){function n(){a==s&&e&&e({allImports:i,loadedImports:c,errorImports:u})}function r(e){h(e),c.push(this),a++,n()}function o(){u.push(this),a++,n()}var i=t.querySelectorAll("link[rel=import]"),a=0,s=i.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=i[d]);d++)!function(e){return p?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",o)):(c.push(this),a++,n());else n()}(e,t)},t=t||i)}function o(e){return"complete"===e.readyState||e.readyState===s}function h(e){e.target.__loaded=!0}function u(e){e.import?h({target:e}):(e.addEventListener("load",h),e.addEventListener("error",h))}function n(e){return r?window.ShadowDOMPolyfill.wrapIfNeeded(e):e}var p=Boolean("import"in document.createElement("link")),r=Boolean(window.ShadowDOMPolyfill),i=n(document),a={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(e)},configurable:!0},a=(Object.defineProperty(document,"_currentScript",a),Object.defineProperty(i,"_currentScript",a),/Trident/.test(navigator.userAgent)),s=a?"complete":"interactive",c="readystatechange";if(p&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)if(t.addedNodes){o=void 0;i=void 0;s=void 0;c=void 0;a=void 0;var o=t.addedNodes;for(var i,a,s=0,c=o.length;s<c&&(i=o[s]);s++)"link"===(a=i).localName&&"import"===a.rel&&u(i)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),f=0,m=d.length;f<m&&(l=d[f]);f++)u(l);t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=i.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),i.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=p,e.rootDocument=i,e.whenReady=t,e.isIE=a}(window.HTMLImports),function(t){var n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})}}(window.HTMLImports),window.HTMLImports.addModule(function(e){var r=/(url\()([^)]*)(\))/g,o=/(@import[\s]+(?!url\())([^;]*)(;)/g;e.path={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,t,n){e=this.replaceUrls(e,n,t,r);return this.replaceUrls(e,n,t,o)},replaceUrls:function(e,o,i,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return i&&(n=new URL(n,i).href),o.href=n,t+"'"+(n=o.href)+"'"+r})}}}),window.HTMLImports.addModule(function(t){var a={async:!0,ok:function(e){return 200<=e.status&&e.status<300||304===e.status||0===e.status},load:function(e,r,o){var i=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),i.open("GET",e,a.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var t=null;try{var n=i.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(o,!a.ok(i)&&i,i.response||i.responseText,t)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};t.xhr=a}),window.HTMLImports.addModule(function(e){function t(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}}var i=e.xhr,a=e.flags;t.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){return this.pending[e]?(this.pending[e].push(t),!0):this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):!(this.pending[e]=[t])},fetch:function(r,o){var e,t,n;a.load&&console.log("fetch",r,o),r?r.match(/^data:/)?(e=(n=r.split(","))[0],t=n[1],t=(-1<e.indexOf(";base64")?atob:decodeURIComponent)(t),setTimeout(function(){this.receive(r,o,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,o,e,t,n)}.bind(this),i.load(r,n)):setTimeout(function(){this.receive(r,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=t}),window.HTMLImports.addModule(function(e){function t(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))}t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(n){function a(e){return"link"===e.localName&&e.rel===s}function r(e){e=e.textContent+function(e){var t=e.ownerDocument,e=(t.__importedScripts=t.__importedScripts||0,e.ownerDocument.baseURI),n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+e+n+".js\n"}(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(e)}var o=n.path,t=n.rootDocument,i=n.flags,u=n.isIE,s=n.IMPORT_LINK_TYPE,e="link[rel="+s+"]",c={documentSelectors:e,importsSelectors:[e,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){var t;this.isParsed(e)?i.parse&&console.log("[%s] is already parsed",e.localName):(t=this[this.map[e.localName]])&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){i.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){e=this.dynamicElements.indexOf(e);0<=e&&this.dynamicElements.splice(e,1)},parseImport:function(e){if(e.import=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)(t=e.__pending.shift())&&t({target:e});this.parseNext()},parseLink:function(e){a(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t,n,r=e;(n=(t=e).ownerDocument.createElement("style")).textContent=t.textContent,o.resolveUrlsInStyle(n),e=n,(r.__appliedElement=e).__importElement=r,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(t,n){function r(e){t.removeEventListener("load",r),t.removeEventListener("error",r),n&&n(e),o.markParsingComplete(t),o.parseNext()}var o=this;if(t.addEventListener("load",r),t.addEventListener("error",r),u&&"style"===t.localName){var e=!1;if(-1==t.textContent.indexOf("@import"))e=!0;else if(t.sheet)for(var i,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(i.styleSheet));e&&setTimeout(function(){t.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(e){var t=document.createElement("script");t.__importElement=e,t.src=e.src||r(e),n.currentScript=e,this.trackElement(t,function(){t.parentNode&&t.parentNode.removeChild(t),n.currentScript=null}),this.addElementToDocument(t)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(t)||this.nextToParseDynamic())},nextToParseInDoc:function(e,t){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,r=e.querySelectorAll(this.parseSelectorsForNode(e)),o=0,i=r.length;o<i&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?a(n)?this.nextToParseInDoc(n.__doc,n):n:void 0}return t},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){return(e.ownerDocument||e)===t?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return 0<=this.dynamicElements.indexOf(e)},hasResource:function(e){return!a(e)||void 0!==e.__doc}};n.parser=c,n.IMPORT_SELECTOR=e}),window.HTMLImports.addModule(function(e){function s(e,t){var n=document.implementation.createHTMLDocument(u),r=(n._URL=t,n.createElement("base")),t=(r.setAttribute("href",t),n.baseURI||Object.getOwnPropertyDescriptor(n,"baseURI")||Object.defineProperty(n,"baseURI",{value:t}),n.createElement("meta"));return t.setAttribute("charset","utf-8"),n.head.appendChild(t),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var c=e.flags,u=e.IMPORT_LINK_TYPE,t=e.IMPORT_SELECTOR,n=e.rootDocument,r=e.Loader,o=e.Observer,l=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){i.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);i.addNodes(e)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===n?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,t,n,r,o){var i,a;c.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,a=u,"link"===(i=i=t).localName&&i.getAttribute("rel")===a&&(void 0===(i=this.documents[e])&&((i=r?null:s(n,o||e))&&(i.__importLink=t,this.bootDocument(i)),this.documents[e]=i),t.__doc=i),l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},i=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new o,document.baseURI||(r={get:function(){var e=document.querySelector("base");return(e||window.location).href},configurable:!0},Object.defineProperty(document,"baseURI",r),Object.defineProperty(n,"baseURI",r)),e.importer=t,e.importLoader=i}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,o,i=0,a=e.length;i<a&&(o=e[i]);i++)t||(t=o.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(o))&&c.loadNode(o),this.shouldParseNode(o)&&n&&s.parseDynamic(o,r)},shouldLoadNode:function(e){return 1===e.nodeType&&t.call(e,c.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&t.call(e,s.parseSelectorsForNode(e))}},t=(c.observer.addCallback=e.added.bind(e),HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector)}),function(e){function t(){window.HTMLImports.importer.bootDocument(n)}var n,r=e.initializeModules;e.isIE,e.useNative||(r(),n=e.rootDocument,"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t))}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})},t.hasNative=Boolean(document.registerElement),t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function r(e,t){(function e(t,n,r){var o=t.firstElementChild;if(!o)for(o=t.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==n(o,r)&&e(o,n,r),o=o.nextElementSibling;return null})(e,function(e){return!!t(e)||void n(e,t)}),n(e,t)}function n(e,t){for(var n=e.shadowRoot;n;)r(n,t),n=n.olderShadowRoot}var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=function(e,t){!function e(t,n,r){if(t=window.wrap(t),!(0<=r.indexOf(t))){r.push(t);for(var o,i=t.querySelectorAll("link[rel="+c+"]"),a=0,s=i.length;a<s&&(o=i[a]);a++)o.import&&e(o.import,n,r);n(t)}}(e,t,[])},e.forSubtree=r}),window.CustomElements.addModule(function(n){function a(e,t){return r(e,t)||o(e,t)}function r(e,t){return!!n.upgrade(e,t)||void(t&&s(e))}function o(e,t){m(e,function(e){return!!r(e,t)||void 0})}function t(e){b.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=b,n=0,r=t.length;n<r&&(e=t[n]);n++)e();b=[]}function s(e){g?t(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback)&&e.attachedCallback()}function u(e){g?t(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback)&&e.detachedCallback()}function d(e,t){if(f.dom){var n=t[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=(o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,o||"")}var i=function(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);t.forEach(function(e){"childList"===e.type&&(w(e.addedNodes,function(e){e.localName&&a(e,i)}),w(e.removedNodes,function(e){e.localName&&(u(e=e),m(e,function(e){u(e)}))}))}),f.dom&&console.groupEnd()}function h(e){var t;e.__observer||((t=new MutationObserver(d.bind(this,e))).observe(e,{childList:!0,subtree:!0}),e.__observer=t)}function p(e){e=window.wrap(e),f.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),a(e,e===window.wrap(document)),h(e),f.dom&&console.groupEnd()}var f=n.flags,m=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&f["throttle-attached"],y=(n.hasPolyfillMutations=g,n.hasThrottledAttached=g,!1),b=[],w=Array.prototype.forEach.call.bind(Array.prototype.forEach),_=Element.prototype.createShadowRoot;_&&(Element.prototype.createShadowRoot=function(){var e=_.call(this);return window.CustomElements.watchShadow(this),e}),n.watchShadow=function(e){if(e.shadowRoot&&!e.shadowRoot.__watched){f.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)h(t),t=t.olderShadowRoot}},n.upgradeDocumentTree=function(e){v(e,p)},n.upgradeDocument=p,n.upgradeSubtree=o,n.upgradeAll=a,n.attached=s,n.takeRecords=function(e){for(e=(e=window.wrap(e))||window.wrap(document);e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(d(e,t.takeRecords()),i())}}),window.CustomElements.addModule(function(o){function i(e,t,n){return a.upgrade&&console.group("upgrade:",e.localName),t.is&&e.setAttribute("is",t.is),r(e,t),e.__upgraded__=!0,(t=e).createdCallback&&t.createdCallback(),n&&o.attached(e),o.upgradeSubtree(e,n),a.upgrade&&console.groupEnd(),e}function r(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,o=t.native,i={},a=r;a!==o&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)i[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),i[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}var a=o.flags;o.upgrade=function(e,t){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var n=e.getAttribute("is"),r=o.getRegisteredDefinition(e.localName)||o.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return i(e,r,t)}},o.upgradeWithDefinition=i,o.implementPrototype=r}),window.CustomElements.addModule(function(f){function m(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),o=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function v(e){return e?w[e.toLowerCase()]:void 0}function o(e,t){e=e&&e.toLowerCase();var n,r=v((t=t&&t.toLowerCase())||e);if(r){if(e==r.tag&&t==r.is)return new r.ctor;if(!t&&!r.is)return new r.ctor}return t?(n=o(e)).setAttribute("is",t):(n=_(e),0<=e.indexOf("-")&&i(n,HTMLElement)),n}function e(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return r(e),e}}var n,t=f.isIE,g=f.upgradeDocumentTree,r=f.upgradeAll,y=f.upgradeWithDefinition,i=f.implementPrototype,a=f.useNative,b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],w={},_=document.createElement.bind(document),s=document.createElementNS.bind(document),a=Object.__proto__||a?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1};e(Node.prototype,"cloneNode"),e(document,"importNode"),t&&(n=document.importNode,document.importNode=function(){var e,t=n.apply(document,arguments);return t.nodeType==t.DOCUMENT_FRAGMENT_NODE?((e=document.createDocumentFragment()).appendChild(t),e):t}),document.registerElement=function(e,t){var n,r,o,t=t||{};if(!e)throw Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+e+"'.");if(function(e){for(var t=0;b.length>t;t++)if(e===b[t])return 1}(e))throw Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+e+"'. The type name is invalid.");if(v(e))throw Error("DuplicateDefinitionError: a type with name '"+e+"' is already registered");t.prototype||(t.prototype=Object.create(HTMLElement.prototype)),t.__name=e.toLowerCase(),t.lifecycle=t.lifecycle||{},t.ancestry=function e(t){t=v(t);return t?e(t.extends).concat([t]):[]}(t.extends);for(var i,a=t,s=a.extends,c=0;i=a.ancestry[c];c++)s=i.is&&i.tag;a.tag=s||a.__name,s&&(a.is=a.__name);var e=t;if(!Object.__proto__){var u=HTMLElement.prototype;e.is&&(p=document.createElement(e.tag),u=Object.getPrototypeOf(p));for(var l,d=e.prototype,h=!1;d;)d==u&&(h=!0),(l=Object.getPrototypeOf(d))&&(d.__proto__=l),d=l;h||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=u}var p=t.prototype;return p.setAttribute._polyfilled||(n=p.setAttribute,p.setAttribute=function(e,t){m.call(this,e,t,n)},r=p.removeAttribute,p.removeAttribute=function(e){m.call(this,e,null,r)},p.setAttribute._polyfilled=!0),e=t.__name,(w[e]=t).ctor=(o=t,function(){return y(_((e=o).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,f.ready&&g(document),t.ctor},document.createElement=o,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?o(t,n):s(e,t)},f.registry=w,f.instanceof=a,f.reservedTagList=b,f.getRegisteredDefinition=v,document.register=document.registerElement}),function(e){function t(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(e){setTimeout(e,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules,o=(e.isIE,n?(e.watchShadow=n=function(){},e.upgrade=n,e.upgradeAll=n,e.upgradeDocumentTree=n,e.upgradeSubtree=n,e.takeRecords=n,e.instanceof=function(e,t){return e instanceof t}):r(),e.upgradeDocumentTree),i=e.upgradeDocument;window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e.import&&i(wrap(e.import))}),"complete"!==document.readyState&&!e.flags.eager&&("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready)?(n=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(n,t)):t()}(window.CustomElements),function(){var e=document.createElement("style"),t=(e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n",document.querySelector("head"));t.insertBefore(e,t.firstChild)}(window.WebComponents),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.PointerEventsPolyfill=t()}(this,function(){"use strict";function e(){this.array=[],this.size=0}function t(e,t,n,r){this.addCallback=e.bind(r),this.removeCallback=t.bind(r),this.changedCallback=n.bind(r),_&&(this.observer=new _(this.mutationWatcher.bind(this)))}function n(e){return"body /shadow-deep/ "+r(e)}function r(e){return'[touch-action="'+e+'"]'}function o(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}function i(e){if(!m.pointermap.has(e))throw Error("InvalidPointerId")}var a=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],s=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],c=function(e,t){t=t||Object.create(null);var n=document.createEvent("Event");n.initEvent(e,t.bubbles||!1,t.cancelable||!1);for(var r,o=2;o<a.length;o++)n[r=a[o]]=t[r]||s[o];return n.buttons=t.buttons||0,e=t.pressure||(n.buttons?.5:0),n.x=n.clientX,n.y=n.clientY,n.pointerId=t.pointerId||0,n.width=t.width||0,n.height=t.height||0,n.pressure=e,n.tiltX=t.tiltX||0,n.tiltY=t.tiltY||0,n.pointerType=t.pointerType||"",n.hwTimestamp=t.hwTimestamp||0,n.isPrimary=t.isPrimary||!1,n},u=window.Map&&window.Map.prototype.forEach?Map:e,l=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp"],d=[!(e.prototype={set:function(e,t){return void 0===t?this.delete(e):(this.has(e)||this.size++,void(this.array[e]=t))},has:function(e){return void 0!==this.array[e]},delete:function(e){this.has(e)&&(delete this.array[e],this.size--)},get:function(e){return this.array[e]},clear:function(){this.array.length=0,this.size=0},forEach:function(n,r){return this.array.forEach(function(e,t){n.call(r,e,t,this)},this)}}),!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],h={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},p="undefined"!=typeof SVGElementInstance,f={pointermap:new u,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(e,t){var n=t,t=n.events;t&&(t.forEach(function(e){n[e]&&(this.eventMap[e]=n[e].bind(n))},this),this.eventSources[e]=n,this.eventSourceList.push(n))},register:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.register.call(t,e)},unregister:function(e){for(var t,n=this.eventSourceList.length,r=0;r<n&&(t=this.eventSourceList[r]);r++)t.unregister.call(t,e)},contains:function(e,t){try{return e.contains(t)}catch(e){return!1}},down:function(e){e.bubbles=!0,this.fireEvent("pointerdown",e)},move:function(e){e.bubbles=!0,this.fireEvent("pointermove",e)},up:function(e){e.bubbles=!0,this.fireEvent("pointerup",e)},enter:function(e){e.bubbles=!1,this.fireEvent("pointerenter",e)},leave:function(e){e.bubbles=!1,this.fireEvent("pointerleave",e)},over:function(e){e.bubbles=!0,this.fireEvent("pointerover",e)},out:function(e){e.bubbles=!0,this.fireEvent("pointerout",e)},cancel:function(e){e.bubbles=!0,this.fireEvent("pointercancel",e)},leaveOut:function(e){this.out(e),this.contains(e.target,e.relatedTarget)||this.leave(e)},enterOver:function(e){this.over(e),this.contains(e.target,e.relatedTarget)||this.enter(e)},eventHandler:function(e){var t;e._handledByPE||(t=e.type,(t=this.eventMap&&this.eventMap[t])&&t(e),e._handledByPE=!0)},listen:function(t,e){e.forEach(function(e){this.addEvent(t,e)},this)},unlisten:function(t,e){e.forEach(function(e){this.removeEvent(t,e)},this)},addEvent:function(e,t){e.addEventListener(t,this.boundHandler)},removeEvent:function(e,t){e.removeEventListener(t,this.boundHandler)},makeEvent:function(e,t){this.captureInfo[t.pointerId]&&(t.relatedTarget=null);e=new c(e,t);return t.preventDefault&&(e.preventDefault=t.preventDefault),e._target=e._target||t.target,e},fireEvent:function(e,t){e=this.makeEvent(e,t);return this.dispatchEvent(e)},cloneEvent:function(e){for(var t,n=Object.create(null),r=0;r<l.length;r++)n[t=l[r]]=e[t]||d[r],!p||"target"!==t&&"relatedTarget"!==t||n[t]instanceof SVGElementInstance&&(n[t]=n[t].correspondingUseElement);return e.preventDefault&&(n.preventDefault=function(){e.preventDefault()}),n},getTarget:function(e){var t=this.captureInfo[e.pointerId];return t?e._target!==t&&e.type in h?void 0:t:e._target},setCapture:function(e,t){this.captureInfo[e]&&this.releaseCapture(e),this.captureInfo[e]=t;var n=document.createEvent("Event");n.initEvent("gotpointercapture",!0,!1),n.pointerId=e,this.implicitRelease=this.releaseCapture.bind(this,e),document.addEventListener("pointerup",this.implicitRelease),document.addEventListener("pointercancel",this.implicitRelease),n._target=t,this.asyncDispatchEvent(n)},releaseCapture:function(e){var t,n=this.captureInfo[e];n&&((t=document.createEvent("Event")).initEvent("lostpointercapture",!0,!1),t.pointerId=e,this.captureInfo[e]=void 0,document.removeEventListener("pointerup",this.implicitRelease),document.removeEventListener("pointercancel",this.implicitRelease),t._target=n,this.asyncDispatchEvent(t))},dispatchEvent:function(e){var t=this.getTarget(e);return t?t.dispatchEvent(e):void 0},asyncDispatchEvent:function(e){requestAnimationFrame(this.dispatchEvent.bind(this,e))}},m=(f.boundHandler=f.eventHandler.bind(f),f),v={shadow:function(e){return e?e.shadowRoot||e.webkitShadowRoot:void 0},canTarget:function(e){return e&&Boolean(e.elementFromPoint)},targetingShadow:function(e){e=this.shadow(e);return this.canTarget(e)?e:void 0},olderShadow:function(e){var t=e.olderShadowRoot;return t||(e=e.querySelector("shadow"))&&(t=e.olderShadowRoot),t},allShadows:function(e){for(var t=[],n=this.shadow(e);n;)t.push(n),n=this.olderShadow(n);return t},searchRoot:function(e,t,n){if(e){for(var r,o,e=e.elementFromPoint(t,n),i=this.targetingShadow(e);i;){if(r=i.elementFromPoint(t,n))return o=this.targetingShadow(r),this.searchRoot(o,t,n)||r;i=this.olderShadow(i)}return e}},owner:function(e){for(var t=e;t.parentNode;)t=t.parentNode;return t=t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?document:t},findTarget:function(e){var t=e.clientX,n=e.clientY,e=this.owner(e.target);return e.elementFromPoint(t,n)||(e=document),this.searchRoot(e,t,n)}},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),y=Array.prototype.map.call.bind(Array.prototype.map),b=Array.prototype.slice.call.bind(Array.prototype.slice),w=Array.prototype.filter.call.bind(Array.prototype.filter),_=window.MutationObserver||window.WebKitMutationObserver,R={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},f=(t.prototype={watchSubtree:function(e){this.observer&&v.canTarget(e)&&this.observer.observe(e,R)},enableOnSubtree:function(e){this.watchSubtree(e),e===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(e)},installNewSubtree:function(e){g(this.findElements(e),this.addElement,this)},findElements:function(e){return e.querySelectorAll?e.querySelectorAll("[touch-action]"):[]},removeElement:function(e){this.removeCallback(e)},addElement:function(e){this.addCallback(e)},elementChanged:function(e,t){this.changedCallback(e,t)},concatLists:function(e,t){return e.concat(b(t))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(e){return e.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(e){var t=y(e,this.findElements,this);return t.push(w(e,this.isElement)),t.reduce(this.concatLists,[])},mutationWatcher:function(e){e.forEach(this.mutationHandler,this)},mutationHandler:function(e){"childList"===e.type?(this.flattenMutationTree(e.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(e.removedNodes).forEach(this.removeElement,this)):"attributes"===e.type&&this.elementChanged(e.target,e.oldValue)}},t),E=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],T="",C=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,M=m.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var N,P={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,o=e.clientY,i=0,a=n.length;i<a&&(t=n[i]);i++){var s=Math.abs(r-t.x),c=Math.abs(o-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=m.cloneEvent(e),n=t.preventDefault;return t.preventDefault=function(){e.preventDefault(),n()},t.pointerId=this.POINTER_ID,t.isPrimary=!0,t.pointerType=this.POINTER_TYPE,t},prepareButtonsForMove:function(e,t){var n=M.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(n.buttons=S[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),M.set(this.POINTER_ID,e),t?m.move(n):m.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),O||(r=S[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),M.set(this.POINTER_ID,e),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),m.up(n)):m.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),m.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);m.cancel(e),this.cleanupMouse()},cleanupMouse:function(){M.delete(this.POINTER_ID)}},H=m.captureInfo,q=v.findTarget.bind(v),I=v.allShadows.bind(v),x=m.pointermap,k="touch-action",D={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){j.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(k),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,m.listen(e,this.events),I(e).forEach(function(e){e._scrollType=n,m.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,m.unlisten(e,this.events),I(e).forEach(function(e){e._scrollType=void 0,m.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(k),r=this.touchActionToScrollType(n),n=this.touchActionToScrollType(t);r&&n?(e._scrollType=r,I(e).forEach(function(e){e._scrollType=r},this)):n?this.elementRemoved(e):r&&this.elementAdded(e)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},touchActionToScrollType:function(e){var t=this.scrollTypes;return"none"===e?"none":e===t.XSCROLLER?"X":e===t.YSCROLLER?"Y":t.SCROLLER.exec(e)?"XY":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(e){return this.firstTouch===e.identifier},setPrimaryTouch:function(e){(0===x.size||1===x.size&&x.has(1))&&(this.firstTouch=e.identifier,this.firstXY={X:e.clientX,Y:e.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryPointer:function(e){e.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var e=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(e,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(e){return"touchstart"!==e&&"touchmove"!==e?0:1},touchToPointer:function(e){var t=this.currentTouchEvent,n=m.cloneEvent(e),r=n.pointerId=e.identifier+2,o=(n.target=H[r]||q(n),n.bubbles=!0,n.cancelable=!0,n.detail=this.clickCount,n.button=0,n.buttons=this.typeToButtons(t.type),n.width=e.radiusX||e.webkitRadiusX||0,n.height=e.radiusY||e.webkitRadiusY||0,n.pressure=e.force||e.webkitForce||.5,n.isPrimary=this.isPrimaryTouch(e),n.pointerType=this.POINTER_TYPE,this);return n.preventDefault=function(){o.scrolling=!1,o.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,o=0;n.length>o;o++)r=n[o],t.call(this,this.touchToPointer(r))},shouldScroll:function(e){var t,n;if(this.firstXY)return e="none"!==(n=e.currentTarget._scrollType)&&("XY"===n||(e=e.changedTouches[0],t="Y"===n?"X":"Y",n=Math.abs(e["client"+n]-this.firstXY[n]),Math.abs(e["client"+t]-this.firstXY[t])<=n)),this.firstXY=null,e},findTouch:function(e,t){for(var n,r=0,o=e.length;r<o&&(n=e[r]);r++)if(n.identifier===t)return!0},vacuumTouches:function(e){var n,r=e.touches;x.size>=r.length&&(n=[],x.forEach(function(e,t){1===t||this.findTouch(r,t-2)||(t=e.out,n.push(t))},this),n.forEach(this.cancelOut,this))},touchstart:function(e){this.vacuumTouches(e),this.setPrimaryTouch(e.changedTouches[0]),this.dedupSynthMouse(e),this.scrolling||(this.clickCount++,this.processTouches(e,this.overDown))},overDown:function(e){x.set(e.pointerId,{target:e.target,out:e,outTarget:e.target}),m.over(e),m.enter(e),m.down(e)},touchmove:function(e){this.scrolling||(this.shouldScroll(e)?(this.scrolling=!0,this.touchcancel(e)):(e.preventDefault(),this.processTouches(e,this.moveOverOut)))},moveOverOut:function(e){var t,n,r=x.get(e.pointerId);r&&(t=r.out,n=r.outTarget,m.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(m.leaveOut(t),m.enterOver(e)):(e.target=n,e.relatedTarget=null,this.cancelOut(e))),r.out=e,r.outTarget=e.target)},touchend:function(e){this.dedupSynthMouse(e),this.processTouches(e,this.upOut)},upOut:function(e){this.scrolling||(m.up(e),m.out(e),m.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){m.cancel(e),m.out(e),m.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){x.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=P.lastTouches,e=e.changedTouches[0];this.isPrimaryTouch(e)&&(e={x:e.clientX,y:e.clientY},t.push(e),t=function(e,t){t=e.indexOf(t);-1<t&&e.splice(t,1)}.bind(null,t,e),setTimeout(t,2500))}},j=new f(D.elementAdded,D.elementRemoved,D.elementChanged,D),A=m.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,z={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){m.listen(e,this.events)},unregister:function(e){m.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return F&&((t=m.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){A.delete(e)},MSPointerDown:function(e){A.set(e.pointerId,e);e=this.prepareEvent(e);m.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);m.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);m.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);m.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);m.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);m.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=m.makeEvent("lostpointercapture",e);m.dispatchEvent(e)},MSGotPointerCapture:function(e){e=m.makeEvent("gotpointercapture",e);m.dispatchEvent(e)}},U=window.navigator.msPointerEnabled?(N=function(e){i(e),this.msSetPointerCapture(e)},function(e){i(e),this.msReleasePointerCapture(e)}):(N=function(e){i(e),m.setCapture(e,this)},function(e){i(e),m.releaseCapture(e,this)});return C&&(E.forEach(function(e){e+""===e?(T+=r(e)+o(e)+"\n",L&&(T+=n(e)+o(e)+"\n")):(T+=e.selectors.map(r)+o(e.rule)+"\n",L&&(T+=e.selectors.map(n)+o(e.rule)+"\n"))}),(C=document.createElement("style")).textContent=T,document.head.appendChild(C)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),m.registerSource("ms",z)):(m.registerSource("mouse",P),void 0!==window.ontouchstart&&m.registerSource("touch",D)),m.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:N},releasePointerCapture:{value:U}}),{dispatcher:m,Installer:f,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(e){e=P.call(e);return N[e]||(N[e]=e.match(I)[1].toLowerCase())}function o(e,t){t=o[t||s(e)];return t?t(e):e}function p(e){return R[s(e)]?[e]:Array.prototype.slice.call(e,0)}function c(e,t,n){var r=s(n);return"object"==r&&"object"==s(e[t])?A.merge(e[t],n):e[t]=o(n,r),e}function d(e,t,n){var r,o,i={};for(o in t)i[o.split(":")[0]]=o;for(o in n)r=i[o.split(":")[0]],"function"==typeof t[r]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=A.applyPseudos(o+(o.match(":mixins")?"":":mixins"),n[o],e.pseudos,t[r].__mixin__)):(t[o]=n[o],delete t[r])}function f(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),A.mixins[t[r]].mixins&&e(A.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=A.mixins[e];for(t in n){var r=n[t],o=l[t];if(o)switch(t){case"mixins":break;case"events":i=c=s=a=void 0;var i,a=l,s=o,c=r;for(i in c)s[i+":__mixin__("+H+++")"]=A.applyPseudos(i,c[i],a.pseudos);break;case"accessors":case"prototype":for(var u in r)o[u]?d(l,o[u],r[u]):o[u]=r[u];break;default:d(l,o,r)}else l[t]=r}}),l}function e(e){return 0===e.button}function i(e,t){var n,r,o,i,a,s=Object.getOwnPropertyDescriptor(e,"target");for(n in t)x[n]||(r=n,o=e,i=t,a=s,a?o[r]=i[r]:Object.defineProperty(o,r,{writable:!0,enumerable:!0,value:i[r]}));e.baseEvent=t}function m(e,t,n,r,o){a[o].call(e,n,t&&t.boolean?"":r)}function v(e,t,n,r,o){if(t&&(t.property||t.selector))for(var i=t.property?[e.xtag[t.property]]:t.selector?A.query(e,t.selector):[],a=i.length;a--;)i[a][o](n,r)}function g(e,t){e.prototype[t]={};var n,r,o,i=e.accessors[t],a=i.attribute;for(r in a&&(n=a.name=(a?a.name||t.replace(T,"$1-$2"):t).toLowerCase(),a.key=t,e.attributes[n]=a),i)!function(e,t,r,o,i,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=A.applyPseudos(n.join(":"),o[r],e.pseudos,o[r])):"set"==s?(n[0]=t,e.prototype[t].set=A.applyPseudos(n.join(":"),i?function(e){var t,n="setAttribute";i.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=i.validate?i.validate.call(this,e):e,t=this.getAttribute(a)),m(this,i,a,e,n),o[r].call(this,e,t),v(this,i,a,e,n)}:o[r]?function(e){o[r].call(this,e)}:null,e.pseudos,o[r]),i&&(i.setter=o[r])):e.prototype[t][r]=o[r]}(e,t,r,i,a,n);a&&(e.prototype[t].get||(o=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[o](n)}),e.prototype[t].set||(e.prototype[t].set=function(e){e=a.boolean?!!e:a.validate?a.validate.call(this,e):e;var t=!a.boolean||e?"setAttribute":"removeAttribute";m(this,a,n,e,t),v(this,a,n,e,t)}))}function y(e){return"function"==typeof e?q.exec(""+e)[1]:e}function h(){}function b(){return!0}var t,n,w=window,_=document,a={setAttribute:Element.prototype.setAttribute,removeAttribute:Element.prototype.removeAttribute},E=Element.prototype.createShadowRoot,u=_.createElement("div"),l=/,/g,T=/([a-z])([A-Z])/g,r=/\(|\)/g,C=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,M={action:function(e,t){return-1<e.value.match(L).indexOf(t.keyCode+"")==("keypass"==e.name)||null}},S={dom:"ms"==(t=((t=Object.keys(window).join()).match(/,(ms)/)||t.match(/,(moz)/)||t.match(/,(O)/)||[null,"webkit"])[1].toLowerCase())?"MS":t,lowercase:t,css:"-"+t+"-",js:"ms"==t?t:t.charAt(0).toUpperCase()+t.substring(1)},O=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype[S.lowercase+"MatchesSelector"],N={},P=N.toString,I=/\s([a-zA-Z]+)/,R=(o.object=function(e){var t,n={};for(t in e)n[t]=o(e[t]);return n},o.array=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=o(e[t]);return n},{undefined:1,null:1,number:1,boolean:1,string:1,function:1}),H=0,x={};for(n in _.createEvent("CustomEvent"))x[n]=1;var k,D,q=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,A={tags:{},defaultOptions:{pseudos:[],mixins:[],events:{},methods:{},accessors:{},lifecycle:{},attributes:{},prototype:{xtag:{get:function(){return this.__xtag__||(this.__xtag__={data:{}})}}}},register:function(e,t){if("string"!=typeof e)throw"First argument must be a Custom Element string name";e=e.toLowerCase(),A.tags[e]=t||{};var n,o=t.prototype,a=(delete t.prototype,A.tags[e].compiled=f(A.merge({},A.defaultOptions,t))),i=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=A.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=A.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)i[n.split(":")[0]]={value:A.applyPseudos(n,a.methods[n],a.pseudos,a.methods[n]),enumerable:!0};for(n in a.accessors)g(a,n);a.shadow&&(a.shadow=a.shadow.nodeName?a.shadow:A.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(i.createdCallback={enumerable:!0,value:function(){var e,t=this,n=(a.shadow&&E&&this.createShadowRoot().appendChild(a.shadow.cloneNode(!0)),a.content&&(this.appendChild(document.createElement("div")).outerHTML=a.content),s?s.apply(this,arguments):null);for(e in A.addEvents(this,a.events),a.attributes){var r=a.attributes[e],o=this.hasAttribute(e),i=void 0!==r.def;(o||r.boolean||i)&&(this[r.key]=r.boolean?o:!o&&i?r.def:this.getAttribute(e))}return a.pseudos.forEach(function(e){e.onAdd.call(t,e)}),this.xtagComponentReady=!0,c&&c.apply(this,arguments),n}},r.inserted),l=r.removed,t=((u||l)&&(i.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(i.detachedCallback={value:function(){var e=p(arguments),e=(e.unshift(this.xtag.__parentNode__),l.apply(this,e));return delete this.xtag.__parentNode__,e},enumerable:!0}),r.attributeChanged&&(i.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),i.setAttribute={writable:!0,enumerable:!0,value:function(e,t){var n,e=e.toLowerCase(),r=a.attributes[e];r&&(n=this.getAttribute(e),t=r.boolean?"":r.validate?r.validate.call(this,t):t),m(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),v(this,r,e,t,"setAttribute"))}},i.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);m(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),v(this,t,e,"","removeAttribute"))}},{}),d=o instanceof w.HTMLElement,h=a.extends&&(t.extends=a.extends);return o&&Object.getOwnPropertyNames(o).forEach(function(e){var t=i[e],n=d?Object.getOwnPropertyDescriptor(o,e):o[e];if(t)for(var r in n)t[r]="function"==typeof n[r]&&t[r]?A.wrap(n[r],t[r]):n[r];i[e]=t||n}),t.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,i),_.registerElement(e,t)},mixins:{},prefix:S,captureEvents:{focus:1,blur:1,scroll:1,DOMMouseScroll:1},customEvents:{animationstart:{attach:[S.dom+"AnimationStart"]},animationend:{attach:[S.dom+"AnimationEnd"]},transitionend:{attach:[S.dom+"TransitionEnd"]},move:{attach:["pointermove"]},enter:{attach:["pointerenter"]},leave:{attach:["pointerleave"]},scrollwheel:{attach:["DOMMouseScroll","mousewheel"],condition:function(e){return e.delta=e.wheelDelta?e.wheelDelta/40:Math.round(e.detail/3.5*-1),!0}},tap:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)t.startX=e.clientX,t.startY=e.clientY;else if(0===e.button&&Math.abs(t.startX-e.clientX)<10&&Math.abs(t.startY-e.clientY)<10)return!0}},tapstart:{attach:["pointerdown"],condition:e},tapend:{attach:["pointerup"],condition:e},tapmove:{attach:["pointerdown"],condition:function(e,t){var n;return"pointerdown"==e.type?(n=t.listener.bind(this),t.tapmoveListeners||(t.tapmoveListeners=A.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=e.type&&"pointercancel"!=e.type||(A.removeEvents(document,t.tapmoveListeners),t.tapmoveListeners=null),!0}},taphold:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)(t.pointers=t.pointers||{})[e.pointerId]=setTimeout(A.fireEvent.bind(null,this,"taphold"),t.duration||1e3);else{if("pointerup"!=e.type)return!0;t.pointers&&(clearTimeout(t.pointers[e.pointerId]),delete t.pointers[e.pointerId])}}}},pseudos:{__mixin__:{},mixins:{onCompiled:function(t,e){var n=e.source&&e.source.__mixin__||e.source;if(!n)return t;switch(e.value){case null:case"":case"before":return function(){return n.apply(this,arguments),t.apply(this,arguments)};case"after":return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e};case"none":return t}}},keypass:M,keyfail:M,delegate:{action:function(e,t){for(var n,r=t.target,o=t.currentTarget;!n&&r&&r!=o;)r.tagName&&O.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&o.tagName&&O.call(o,e.value)?o:n)?e.listener=e.listener.bind(n):null}},preventable:{action:function(e,t){return!t.defaultPrevented}},duration:{onAdd:function(e){e.source.duration=Number(e.value)}},capture:{onCompiled:function(e,t){t.source&&(t.source.capture=!0)}}},clone:o,typeOf:s,toArray:p,wrap:function(t,n){return function(){var e=t.apply(this,arguments);return n.apply(this,arguments),e}},merge:function(e,t,n){if("string"==s(t))return c(e,t,n);for(var r=1,o=arguments.length;r<o;r++){var i,a=arguments[r];for(i in a)c(e,i,a[i])}return e},uid:function(){return Math.random().toString(36).substr(2,10)},query:function(e,t){return(t||"").length?p(e.querySelectorAll(t)):[]},skipTransition:function(e,t,n){var r=S.js+"TransitionProperty",o=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return A.skipFrame(function(){e.style[r]=e.style.transitionProperty="",o&&o.call(n||e)})},requestFrame:(D=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(e){return w.setTimeout(e,20)},function(e){return D(e)}),cancelFrame:(k=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(e){return k(e)}),skipFrame:function(e){var t=A.requestFrame(function(){t=A.requestFrame(e)});return t},matchSelector:function(e,t){return O.call(e,t)},set:function(e,t,n){e[t]=n,window.CustomElements&&CustomElements.upgradeAll(e)},innerHTML:function(e,t){A.set(e,"innerHTML",t)},hasClass:function(e,t){return-1<e.className.split(" ").indexOf(t.trim())},addClass:function(e,t){var n=e.className.trim().split(" ");return t.trim().split(" ").forEach(function(e){~n.indexOf(e)||n.push(e)}),e.className=n.join(" ").trim(),e},removeClass:function(e,t){var n=t.trim().split(" ");return e.className=e.className.trim().split(" ").filter(function(e){return e&&!~n.indexOf(e)}).join(" "),e},toggleClass:function(e,t){return A[A.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+A.uid())+" > ",o=e.parentNode||!u.appendChild(e),r=(t=r+(t+"").replace(l,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),o||u.removeChild(e),p(r)},createFragment:function(e){var t=document.createElement("template");return e&&(e.nodeName?p(arguments).forEach(function(e){t.content.appendChild(e)}):t.innerHTML=y(e)),document.importNode(t.content,!0)},manipulate:function(e,t){var n=e.nextSibling,r=e.parentNode,t=t.call(e)||e;n?r.insertBefore(t,n):r.appendChild(t)},applyPseudos:function(o,i,a,s){var e,c=i,u={};if(o.match(":")){var l=[],t=0;o.replace(r,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(C,function(e,t,n,r){l.push([t||r,n])});for(var d=l.length;d--;)!function(){var e=l[d][0],t=l[d][1];if(!A.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(A.pseudos[e]),r=(n.key=o,n.name=e,n.value=t,n.arguments=(t||"").split(","),n.action=n.action||b,n.source=s,n.onAdd=n.onAdd||h,n.onRemove=n.onRemove||h,n.listener=c);c=function(){var e=n.action.apply(this,[n].concat(p(arguments)));return null===e||!1===e||(e=n.listener.apply(this,arguments),n.listener=r),e},a?a.push(n):n.onAdd.call(i,n)}()}for(e in u)u[e].onCompiled&&(c=u[e].onCompiled(c,u[e])||c);return c},removePseudos:function(t,e){e.forEach(function(e){e.onRemove.call(t,e)})},parseEvent:function(e,t){var e=e.split(":"),r=e.shift(),n=A.customEvents[r],o=A.merge({type:r,stack:h,condition:b,capture:A.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),i=(o.attach=p(o.base||o.attach),o.chain=r+(o.pseudos.length?":"+o.pseudos:"")+(e.length?":"+e.join(":"):""),A.applyPseudos(o.chain,t,o._pseudos,o));return o.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==i?(e.stopPropagation(),e.cancelBubble=!0,i.apply(this,arguments)):void 0:i.apply(this,arguments)},o.listener=function(e){var t=p(arguments),n=o.condition.apply(this,t.concat([o]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void A.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=i)?n:{__stack__:i}}):o.stack.apply(this,t))},o.attach.forEach(function(e){o._attach.push(A.parseEvent(e,o.listener))}),o},addEvent:function(t,e,n,r){e="function"==typeof n?A.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){A.addEvent(t,e.type,e)}),e.onAdd.call(t,e,e.listener),t.addEventListener(e.type,e.stack,r||e.capture),e},addEvents:function(e,t){var n,r={};for(n in t)r[n]=A.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),A.removePseudos(t,n._pseudos),n._attach.forEach(function(e){A.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)A.removeEvent(e,t[n])},fireEvent:function(e,t,n){var r=_.createEvent("CustomEvent");r.initCustomEvent(t,!1!==(n=n||{}).bubbles,!1!==n.cancelable,n.detail),n.baseEvent&&i(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(A):"undefined"!=typeof module&&module.exports?module.exports=A:w.xtag=A,_.addEventListener("WebComponentsReady",function(){A.fireEvent(_.body,"DOMComponentsLoaded")})}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quran-madina-html",
3
- "version": "0.9.7",
3
+ "version": "0.10.0",
4
4
  "devDependencies": {
5
5
  "grunt": "^1.6.2",
6
6
  "grunt-contrib-clean": "^2.0.1",