quran-madina-html 0.3.2 → 0.3.3

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/demo/index.html CHANGED
@@ -18,6 +18,7 @@
18
18
  } else {
19
19
  script.setAttribute("src", "https://unpkg.com/quran-madina-html");
20
20
  }
21
+ script.setAttribute("data-font", "hafs");
21
22
  document.head.appendChild(script);
22
23
  </script>
23
24
  </head>
@@ -47,7 +47,7 @@
47
47
  function getAyaClass(sura, aya){
48
48
  const zeroPad = (num, places) => String(num).padStart(places, '0');
49
49
  const classes = [`${name}-part`, `${name}-${zeroPad(sura,3)}-${zeroPad(aya,3)}`];
50
- if(!aya) classes.push("quran-madina-html-sura-start"); // Decorate Sura Name @Aya0
50
+ if(aya == -1) classes.push("quran-madina-html-sura-start"); // Decorate Sura Name
51
51
  return classes;
52
52
  }
53
53
  function getCopyIcon(){
@@ -1,2 +1,2 @@
1
1
  /*! quran-madina-html 03-10-2023 */
2
- !function(){var w="quran-madina-html",e=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${w}/`;function _(){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 E(e){console.log(w+"> "+e)}function T(){var e;textWithHeader=this.parentElement.parentElement.innerText.split("\n"),text=1<textWithHeader.length?textWithHeader.slice(1).join(" ")+"\n\n"+textWithHeader[0]:(e=this.parentElement.parentElement.getAttribute("sura"),textWithHeader[0]+"\n\n"+L.suras[e-1].name),navigator.clipboard.writeText(text),alert("⎘ تم نسخ:\n\n"+text)}function M(){URL="true"===this.parentElement.parentElement.getAttribute("page_param")?"https://quran.com/page/"+this.parentElement.parentElement.getAttribute("page"):`https://quran.com/${this.parentElement.parentElement.getAttribute("sura")}/`+this.parentElement.parentElement.getAttribute("aya"),window.open(URL,"_blank")}var t,n,r,i,o,L={content:"Loading .."},a=document.currentScript||document.querySelector(`script[src*="${w}"]`),s=a.getAttribute("data-name")||"Madina05",c=(a.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),a=a.getAttribute("data-font-size")||16,u=(E(s+` with font: ${c} size: `+a),e+"dist/"+w+".min.css?v=1.1");document.getElementById(w)||(t=document.getElementsByTagName("head")[0],(n=document.createElement("link")).id=w,n.rel="stylesheet",n.type="text/css",n.href=u,n.media="all",t.appendChild(n)),u=e+`assets/db/${s}-${c}-${a}px.json`,r=function(e){L=e;const t=new FontFace(L.font_family,"url("+encodeURI(L.font_url)+")");t.load().then(()=>{document.fonts.add(t)}),xtag.register(w,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:{page:{attribute:{},set:function(e){this.xtag.data.page=e},get:function(){return this.getAttribute("page")}},page_param:{attribute:{},set:function(e){this.xtag.data.page_param=e},get:function(){return this.getAttribute("page_param")}},aya:{attribute:{},set:function(e){this.xtag.data.aya=e},get:function(){return this.getAttribute("aya")}},sura:{attribute:{},set:function(e){this.xtag.data.sura=e},get:function(){return this.getAttribute("sura")}}},methods:{render:function(t){var n,r,i,e,o,a,s;if(null==this.page&&(this.page_param="false"),null!=this.sura&&null!=this.aya&&"true"!=this.page_param)s=this.sura,n=Array(2).fill(s.split("-")[0]-1)[0],this.sura=(n+1).toString(),r=n,i=!1,[e,o]=2==(s=this.aya).split("-").length?s.split("-").map(e=>parseInt(e)+1):Array(2).fill(parseInt(s.split("-")[0])+1),null!=this.page&&E("Ignoring page parameter!"),this.page=L.suras[n].ayas[e].p,this.page_param=!1;else{if(null==this.page)return console.error(w+"> Bad arguments: Not rendering!"),1;for(o=e=r=n=0;L.suras[n].ayas.slice(-1)[0].p<this.page;)n+=1;for(r=n;r<114&&L.suras[r].ayas[0].p<=this.page;)r+=1;for(this.sura=n==(r-=1)?""+(n+1):n+1+"-"+(r+1);L.suras[n].ayas[e].p<this.page;)e+=1;for(o=L.suras[r].ayas.length-1;L.suras[r].ayas[o].p>this.page;)o-=1;this.aya=e-1+"-"+(o-1),this.page_param=i=!0}t.innerHTML="",t.removeAttribute("style"),(s=L.suras[n].ayas[e].r[0].l)!=(a=L.suras[r].ayas[o].r.slice(-1)[0].l)&&(i=!0,t.style="display:block;"),i&&(t.style.setProperty("font-family",L.font_family,""),t.style.setProperty("font-size",L.font_size+"px",""),"me_quran"===L.font_family)&&t.style.setProperty("line-height",2*L.font_size+"px","");var c,u,l,d,h="",p=(i&&((h=document.createElement("quran-madina-html-header")).innerHTML=L.suras[n].name,(d=_()).addEventListener("click",T),(c=document.createElement("div")).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(),(c=c.firstChild).addEventListener("click",M),h.appendChild(d),h.appendChild(c),t.appendChild(h)),e),m=n;for(let e=s;e<=a;e++){const b=e;line=document.createElement("quran-madina-html-line"),t.appendChild(line),i||(line.style.setProperty("font-family",L.font_family,""),line.style.setProperty("font-size",L.font_size+"px","")),i&&(t.style.width=L.line_width+10+"px",f=L.suras[m].ayas[p].p%2==1?"":"-",t.style.setProperty("box-shadow","inset "+f+"8px 0 7px -7px #333",""),line.style.setProperty("display","block",""));var f,v,g,y=n==r?o:L.suras[m].ayas.length-1;for(let e=p;e<=Math.min(p+5,y);e++)L.suras[m].ayas[e].p==this.page&&(line_match=L.suras[m].ayas[e].r.filter(e=>e.l==b)).length&&(i&&(""==line.innerHTML.trim()&&(v=line_match[0].o,line.style.setProperty("padding-right",v+"px",""),0<v)&&line.style.setProperty("transform-origin","left"),0<=line_match[0].s?line.style.setProperty("transform",`scaleX(${line_match[0].s})`,""):line.style.setProperty("text-align","center","")),v=document.createElement("div"),u=m+1,l=e-1,u=[w+"-part",w+`-${(g=(e,t)=>String(e).padStart(t,"0"))(u,3)}-`+g(l,3)],l||u.push("quran-madina-html-sura-start"),g=u,DOMTokenList.prototype.add.apply(v.classList,g),v.textContent=line_match[0].t,v.style.cssText="display:inline",line.appendChild(v),function(e,t="class",n="lightgrey",r="transparent"){var i="tag"===t.toLowerCase()?document.getElementsByTagName(e):document.getElementsByClassName(e);Array.from(i).forEach(function(e){e.onmouseover=function(){Array.from(i).forEach(function(e){e.style.backgroundColor=n})},e.onmouseout=function(){Array.from(i).forEach(function(e){e.style.backgroundColor=r})}})}(g.slice(-1)[0]),y<=(p=e))&&m<113&&L.suras[m+1].ayas[0].p==this.page&&L.suras[m+1].ayas[0].r[0].l==b+1&&(m+=1,p=0)}i||(h=document.createElement("quran-madina-html-copy"),(d=_()).addEventListener("click",T),h.appendChild(d),t.appendChild(h))}}})},i=function(e){console.error(e)},(o=new XMLHttpRequest).onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(200===o.status?r&&r(JSON.parse(o.responseText)):i&&i(o))},o.open("GET",u,!0),o.send()}(),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++)i.call(this,t[n])}function t(e,t){e.className=t.join(" ")}var n,r,i,o,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,i=s.push,o=s.splice,a=s.join,e.prototype={add:function(e){this.contains(e)||(i.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&&(o.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,i=0;r=t.attributes[i];i++)"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 i,o,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||!M.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],m=e[s+2];("file"!=this._scheme||!M.test(h)||":"!=p&&"|"!=p||T!=m&&"/"!=m&&"\\"!=m&&"?"!=m&&"#"!=m)&&(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,f=0;c.length>f;f++){var v=c[f];"\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||!M.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=(m=E[c.toLowerCase()])?m: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&&M.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+=(o=void 0,32<(o=(i=h).charCodeAt(0))&&o<127&&-1==[34,35,60,62,96].indexOf(o)?i:encodeURIComponent(i))):(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 i(e,t){void 0===t||t instanceof i||(t=new i(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,M,L,t,o=!1;if(!e.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",o="http://a/c%20d"===a.href}catch(e){}o||((_=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"]=".."),M=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,i.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)&&(i.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)},i.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=i)}(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 i(){p=!1;var e=m,r=(m=[],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&&i()}function u(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;(n===e||a.subtree)&&(a=t(a))&&o.enqueue(a)}}}function t(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++f}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 o(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,m,f,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,m=[],f=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 i,o=0;r.length>o;o++)if(r[o].observer===this){(i=r[o]).removeListeners(),i.options=t;break}i||(i=new a(this,e,t),r.push(i),this.nodes_.push(e)),i.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=o(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,m.push(r),p||(p=!0,h(i));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,i=((o=new l("attributes",r)).attributeName=t,o.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(i):o});break;case"DOMCharacterDataModified":var o=l("characterData",r=e.target),i=e.prevValue;u(r,function(e){return e.characterData?e.characterDataOldValue?d(i):o: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;(o=l("childList",e.target.parentNode)).addedNodes=a,o.removedNodes=s,o.previousSibling=c,o.nextSibling=r,u(e.relatedNode,function(e){return e.childList?o: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"),i=!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(i)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(o,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){i=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,i=n.length;r<i&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),o=(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;i(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:o,loadedImports:c,errorImports:u})}function r(e){h(e),c.push(this),a++,n()}function i(){u.push(this),a++,n()}var o=t.querySelectorAll("link[rel=import]"),a=0,s=o.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=o[d]);d++)!function(e){return p?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",i)):(c.push(this),a++,n());else n()}(e,t)},t=t||o)}function i(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),o=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(o,"_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){i=void 0;o=void 0;s=void 0;c=void 0;a=void 0;var i=t.addedNodes;for(var o,a,s=0,c=i.length;s<c&&(o=i[s]);s++)"link"===(a=o).localName&&"import"===a.rel&&u(o)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),m=0,f=d.length;m<f&&(l=d[m]);m++)u(l);t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=o.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),o.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=p,e.rootDocument=o,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,i=/(@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,i)},replaceUrls:function(e,i,o,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return o&&(n=new URL(n,o).href),i.href=n,t+"'"+(n=i.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,i){var o=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),o.open("GET",e,a.async),o.addEventListener("readystatechange",function(e){if(4===o.readyState){var t=null;try{var n=o.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(i,!a.ok(o)&&o,o.response||o.responseText,t)}}),o.send(),o},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 o=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,i){var e,t,n;a.load&&console.log("fetch",r,i),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,i,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,i,e,t,n)}.bind(this),o.load(r,n)):setTimeout(function(){this.receive(r,i,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,i){this.cache[e]=r;for(var o,a=this.pending[e],s=0,c=a.length;s<c&&(o=a[s]);s++)this.onload(e,o,r,n,i),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 i=n.path,t=n.rootDocument,o=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)?o.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){o.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,o.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,i.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),i.markParsingComplete(t),i.parseNext()}var i=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 o,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(o=a[c]);c++)o.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(o.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)),i=0,o=r.length;i<o&&(n=r[i]);i++)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,i=e.Observer,l=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){o.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);o.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,i){var o,a;c.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,a=u,"link"===(o=o=t).localName&&o.getAttribute("rel")===a&&(void 0===(o=this.documents[e])&&((o=r?null:s(n,i||e))&&(o.__importLink=t,this.bootDocument(o)),this.documents[e]=o),t.__doc=o),l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},o=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new i,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=o}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,i,o=0,a=e.length;o<a&&(i=e[o]);o++)t||(t=i.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(i))&&c.loadNode(i),this.shouldParseNode(i)&&n&&s.parseDynamic(i,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 i=t.firstElementChild;if(!i)for(i=t.firstChild;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.nextSibling;for(;i;)!0!==n(i,r)&&e(i,n,r),i=i.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 i,o=t.querySelectorAll("link[rel="+c+"]"),a=0,s=o.length;a<s&&(i=o[a]);a++)i.import&&e(i.import,n,r);n(t)}}(e,t,[])},e.forSubtree=r}),window.CustomElements.addModule(function(n){function a(e,t){return r(e,t)||i(e,t)}function r(e,t){return!!n.upgrade(e,t)||void(t&&s(e))}function i(e,t){f(e,function(e){return!!r(e,t)||void 0})}function t(e){b.push(e),y||(y=!0,setTimeout(o))}function o(){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(m.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 i=(i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,i||"")}var o=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,o)}),w(e.removedNodes,function(e){e.localName&&(u(e=e),f(e,function(e){u(e)}))}))}),m.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),m.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),a(e,e===window.wrap(document)),h(e),m.dom&&console.groupEnd()}var m=n.flags,f=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&m["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){m.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=i,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()),o())}}),window.CustomElements.addModule(function(i){function o(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&&i.attached(e),i.upgradeSubtree(e,n),a.upgrade&&console.groupEnd(),e}function r(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,i=t.native,o={},a=r;a!==i&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)o[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),o[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}var a=i.flags;i.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=i.getRegisteredDefinition(e.localName)||i.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return o(e,r,t)}},i.upgradeWithDefinition=o,i.implementPrototype=r}),window.CustomElements.addModule(function(m){function f(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),i=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&i!==r&&this.attributeChangedCallback(e,r,i)}function v(e){return e?w[e.toLowerCase()]:void 0}function i(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=i(e)).setAttribute("is",t):(n=_(e),0<=e.indexOf("-")&&o(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=m.isIE,g=m.upgradeDocumentTree,r=m.upgradeAll,y=m.upgradeWithDefinition,o=m.implementPrototype,a=m.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,i,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 o,a=t,s=a.extends,c=0;o=a.ancestry[c];c++)s=o.is&&o.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){f.call(this,e,t,n)},r=p.removeAttribute,p.removeAttribute=function(e){f.call(this,e,null,r)},p.setAttribute._polyfilled=!0),e=t.__name,(w[e]=t).ctor=(i=t,function(){return y(_((e=i).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,m.ready&&g(document),t.ctor},document.createElement=i,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?i(t,n):s(e,t)},m.registry=w,m.instanceof=a,m.reservedTagList=b,m.getRegisteredDefinition=v,document.register=document.registerElement}),function(e){function t(){i(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,i=(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),o=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&&o(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 i(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}function o(e){if(!f.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,i=2;i<a.length;i++)n[r=a[i]]=t[r]||s[i];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,m={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))}},f=(m.boundHandler=m.eventHandler.bind(m),m),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,i,e=e.elementFromPoint(t,n),o=this.targetingShadow(e);o;){if(r=o.elementFromPoint(t,n))return i=this.targetingShadow(r),this.searchRoot(i,t,n)||r;o=this.olderShadow(o)}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,A={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},m=(t.prototype={watchSubtree:function(e){this.observer&&v.canTarget(e)&&this.observer.observe(e,A)},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="",M=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,C=f.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var P,N={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){f.listen(e,this.events)},unregister:function(e){f.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,i=e.clientY,o=0,a=n.length;o<a&&(t=n[o]);o++){var s=Math.abs(r-t.x),c=Math.abs(i-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=f.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=C.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=C.get(this.POINTER_ID),n=this.prepareEvent(e),O||(n.buttons=S[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),C.set(this.POINTER_ID,e),t?f.move(n):f.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=C.get(this.POINTER_ID),n=this.prepareEvent(e),O||(r=S[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),C.set(this.POINTER_ID,e),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),f.up(n)):f.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);f.cancel(e),this.cleanupMouse()},cleanupMouse:function(){C.delete(this.POINTER_ID)}},H=f.captureInfo,q=v.findTarget.bind(v),I=v.allShadows.bind(v),k=f.pointermap,D="touch-action",x={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){j.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(D),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,f.listen(e,this.events),I(e).forEach(function(e){e._scrollType=n,f.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,f.unlisten(e,this.events),I(e).forEach(function(e){e._scrollType=void 0,f.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(D),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=f.cloneEvent(e),r=n.pointerId=e.identifier+2,i=(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(){i.scrolling=!1,i.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,i=0;n.length>i;i++)r=n[i],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,i=e.length;r<i&&(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}),f.over(e),f.enter(e),f.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,f.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(f.leaveOut(t),f.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||(f.up(e),f.out(e),f.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){f.cancel(e),f.out(e),f.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){k.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=N.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 m(x.elementAdded,x.elementRemoved,x.elementChanged,x),R=f.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,U={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){f.listen(e,this.events)},unregister:function(e){f.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return F&&((t=f.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){R.delete(e)},MSPointerDown:function(e){R.set(e.pointerId,e);e=this.prepareEvent(e);f.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);f.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);f.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);f.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);f.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);f.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=f.makeEvent("lostpointercapture",e);f.dispatchEvent(e)},MSGotPointerCapture:function(e){e=f.makeEvent("gotpointercapture",e);f.dispatchEvent(e)}},Y=window.navigator.msPointerEnabled?(P=function(e){o(e),this.msSetPointerCapture(e)},function(e){o(e),this.msReleasePointerCapture(e)}):(P=function(e){o(e),f.setCapture(e,this)},function(e){o(e),f.releaseCapture(e,this)});return M&&(E.forEach(function(e){e+""===e?(T+=r(e)+i(e)+"\n",L&&(T+=n(e)+i(e)+"\n")):(T+=e.selectors.map(r)+i(e.rule)+"\n",L&&(T+=e.selectors.map(n)+i(e.rule)+"\n"))}),(M=document.createElement("style")).textContent=T,document.head.appendChild(M)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),f.registerSource("ms",U)):(f.registerSource("mouse",N),void 0!==window.ontouchstart&&f.registerSource("touch",x)),f.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:P},releasePointerCapture:{value:Y}}),{dispatcher:f,Installer:m,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(e){e=N.call(e);return P[e]||(P[e]=e.match(I)[1].toLowerCase())}function i(e,t){t=i[t||s(e)];return t?t(e):e}function p(e){return A[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])?R.merge(e[t],n):e[t]=i(n,r),e}function d(e,t,n){var r,i,o={};for(i in t)o[i.split(":")[0]]=i;for(i in n)r=o[i.split(":")[0]],"function"==typeof t[r]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=R.applyPseudos(i+(i.match(":mixins")?"":":mixins"),n[i],e.pseudos,t[r].__mixin__)):(t[i]=n[i],delete t[r])}function m(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),R.mixins[t[r]].mixins&&e(R.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=R.mixins[e];for(t in n){var r=n[t],i=l[t];if(i)switch(t){case"mixins":break;case"events":o=c=s=a=void 0;var o,a=l,s=i,c=r;for(o in c)s[o+":__mixin__("+H+++")"]=R.applyPseudos(o,c[o],a.pseudos);break;case"accessors":case"prototype":for(var u in r)i[u]?d(l,i[u],r[u]):i[u]=r[u];break;default:d(l,i,r)}else l[t]=r}}),l}function e(e){return 0===e.button}function o(e,t){var n,r,i,o,a,s=Object.getOwnPropertyDescriptor(e,"target");for(n in t)k[n]||(r=n,i=e,o=t,a=s,a?i[r]=o[r]:Object.defineProperty(i,r,{writable:!0,enumerable:!0,value:o[r]}));e.baseEvent=t}function f(e,t,n,r,i){a[i].call(e,n,t&&t.boolean?"":r)}function v(e,t,n,r,i){if(t&&(t.property||t.selector))for(var o=t.property?[e.xtag[t.property]]:t.selector?R.query(e,t.selector):[],a=o.length;a--;)o[a][i](n,r)}function g(e,t){e.prototype[t]={};var n,r,i,o=e.accessors[t],a=o.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),o)!function(e,t,r,i,o,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=R.applyPseudos(n.join(":"),i[r],e.pseudos,i[r])):"set"==s?(n[0]=t,e.prototype[t].set=R.applyPseudos(n.join(":"),o?function(e){var t,n="setAttribute";o.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=o.validate?o.validate.call(this,e):e,t=this.getAttribute(a)),f(this,o,a,e,n),i[r].call(this,e,t),v(this,o,a,e,n)}:i[r]?function(e){i[r].call(this,e)}:null,e.pseudos,i[r]),o&&(o.setter=i[r])):e.prototype[t][r]=i[r]}(e,t,r,o,a,n);a&&(e.prototype[t].get||(i=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[i](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";f(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,M=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,C={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"],P={},N=P.toString,I=/\s([a-zA-Z]+)/,A=(i.object=function(e){var t,n={};for(t in e)n[t]=i(e[t]);return n},i.array=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=i(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 D,x,q=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,R={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(),R.tags[e]=t||{};var n,i=t.prototype,a=(delete t.prototype,R.tags[e].compiled=m(R.merge({},R.defaultOptions,t))),o=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=R.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=R.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)o[n.split(":")[0]]={value:R.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:R.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(o.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 R.addEvents(this,a.events),a.attributes){var r=a.attributes[e],i=this.hasAttribute(e),o=void 0!==r.def;(i||r.boolean||o)&&(this[r.key]=r.boolean?i:!i&&o?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)&&(o.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(o.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&&(o.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),o.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),f(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),v(this,r,e,t,"setAttribute"))}},o.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);f(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),v(this,t,e,"","removeAttribute"))}},{}),d=i instanceof w.HTMLElement,h=a.extends&&(t.extends=a.extends);return i&&Object.getOwnPropertyNames(i).forEach(function(e){var t=o[e],n=d?Object.getOwnPropertyDescriptor(i,e):i[e];if(t)for(var r in n)t[r]="function"==typeof n[r]&&t[r]?R.wrap(n[r],t[r]):n[r];o[e]=t||n}),t.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,o),_.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=R.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=e.type&&"pointercancel"!=e.type||(R.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(R.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:C,keyfail:C,delegate:{action:function(e,t){for(var n,r=t.target,i=t.currentTarget;!n&&r&&r!=i;)r.tagName&&O.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&i.tagName&&O.call(i,e.value)?i: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:i,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,i=arguments.length;r<i;r++){var o,a=arguments[r];for(o in a)c(e,o,a[o])}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",i=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return R.skipFrame(function(){e.style[r]=e.style.transitionProperty="",i&&i.call(n||e)})},requestFrame:(x=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(e){return w.setTimeout(e,20)},function(e){return x(e)}),cancelFrame:(D=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(e){return D(e)}),skipFrame:function(e){var t=R.requestFrame(function(){t=R.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){R.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 R[R.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+R.uid())+" > ",i=e.parentNode||!u.appendChild(e),r=(t=r+(t+"").replace(l,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),i||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(i,o,a,s){var e,c=o,u={};if(i.match(":")){var l=[],t=0;i.replace(r,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(M,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(!R.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(R.pseudos[e]),r=(n.key=i,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(o,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=R.customEvents[r],i=R.merge({type:r,stack:h,condition:b,capture:R.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),o=(i.attach=p(i.base||i.attach),i.chain=r+(i.pseudos.length?":"+i.pseudos:"")+(e.length?":"+e.join(":"):""),R.applyPseudos(i.chain,t,i._pseudos,i));return i.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==o?(e.stopPropagation(),e.cancelBubble=!0,o.apply(this,arguments)):void 0:o.apply(this,arguments)},i.listener=function(e){var t=p(arguments),n=i.condition.apply(this,t.concat([i]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void R.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=o)?n:{__stack__:o}}):i.stack.apply(this,t))},i.attach.forEach(function(e){i._attach.push(R.parseEvent(e,i.listener))}),i},addEvent:function(t,e,n,r){e="function"==typeof n?R.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){R.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]=R.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),R.removePseudos(t,n._pseudos),n._attach.forEach(function(e){R.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)R.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&&o(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(R):"undefined"!=typeof module&&module.exports?module.exports=R:w.xtag=R,_.addEventListener("WebComponentsReady",function(){R.fireEvent(_.body,"DOMComponentsLoaded")})}();
2
+ !function(){var w="quran-madina-html",e=/localhost/.test(document.location.hostname)?"../":`https://www.unpkg.com/${w}/`;function _(){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 E(e){console.log(w+"> "+e)}function T(){var e;textWithHeader=this.parentElement.parentElement.innerText.split("\n"),text=1<textWithHeader.length?textWithHeader.slice(1).join(" ")+"\n\n"+textWithHeader[0]:(e=this.parentElement.parentElement.getAttribute("sura"),textWithHeader[0]+"\n\n"+L.suras[e-1].name),navigator.clipboard.writeText(text),alert("⎘ تم نسخ:\n\n"+text)}function M(){URL="true"===this.parentElement.parentElement.getAttribute("page_param")?"https://quran.com/page/"+this.parentElement.parentElement.getAttribute("page"):`https://quran.com/${this.parentElement.parentElement.getAttribute("sura")}/`+this.parentElement.parentElement.getAttribute("aya"),window.open(URL,"_blank")}var t,n,r,i,o,L={content:"Loading .."},a=document.currentScript||document.querySelector(`script[src*="${w}"]`),s=a.getAttribute("data-name")||"Madina05",c=(a.getAttribute("data-font")||"me_quran").replaceAll(" ","_"),a=a.getAttribute("data-font-size")||16,u=(E(s+` with font: ${c} size: `+a),e+"dist/"+w+".min.css?v=1.1");document.getElementById(w)||(t=document.getElementsByTagName("head")[0],(n=document.createElement("link")).id=w,n.rel="stylesheet",n.type="text/css",n.href=u,n.media="all",t.appendChild(n)),u=e+`assets/db/${s}-${c}-${a}px.json`,r=function(e){L=e;const t=new FontFace(L.font_family,"url("+encodeURI(L.font_url)+")");t.load().then(()=>{document.fonts.add(t)}),xtag.register(w,{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){this.render(this)}},events:{},accessors:{page:{attribute:{},set:function(e){this.xtag.data.page=e},get:function(){return this.getAttribute("page")}},page_param:{attribute:{},set:function(e){this.xtag.data.page_param=e},get:function(){return this.getAttribute("page_param")}},aya:{attribute:{},set:function(e){this.xtag.data.aya=e},get:function(){return this.getAttribute("aya")}},sura:{attribute:{},set:function(e){this.xtag.data.sura=e},get:function(){return this.getAttribute("sura")}}},methods:{render:function(t){var n,r,i,e,o,a,s;if(null==this.page&&(this.page_param="false"),null!=this.sura&&null!=this.aya&&"true"!=this.page_param)s=this.sura,n=Array(2).fill(s.split("-")[0]-1)[0],this.sura=(n+1).toString(),r=n,i=!1,[e,o]=2==(s=this.aya).split("-").length?s.split("-").map(e=>parseInt(e)+1):Array(2).fill(parseInt(s.split("-")[0])+1),null!=this.page&&E("Ignoring page parameter!"),this.page=L.suras[n].ayas[e].p,this.page_param=!1;else{if(null==this.page)return console.error(w+"> Bad arguments: Not rendering!"),1;for(o=e=r=n=0;L.suras[n].ayas.slice(-1)[0].p<this.page;)n+=1;for(r=n;r<114&&L.suras[r].ayas[0].p<=this.page;)r+=1;for(this.sura=n==(r-=1)?""+(n+1):n+1+"-"+(r+1);L.suras[n].ayas[e].p<this.page;)e+=1;for(o=L.suras[r].ayas.length-1;L.suras[r].ayas[o].p>this.page;)o-=1;this.aya=e-1+"-"+(o-1),this.page_param=i=!0}t.innerHTML="",t.removeAttribute("style"),(s=L.suras[n].ayas[e].r[0].l)!=(a=L.suras[r].ayas[o].r.slice(-1)[0].l)&&(i=!0,t.style="display:block;"),i&&(t.style.setProperty("font-family",L.font_family,""),t.style.setProperty("font-size",L.font_size+"px",""),"me_quran"===L.font_family)&&t.style.setProperty("line-height",2*L.font_size+"px","");var c,u,l,d,h="",p=(i&&((h=document.createElement("quran-madina-html-header")).innerHTML=L.suras[n].name,(d=_()).addEventListener("click",T),(c=document.createElement("div")).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(),(c=c.firstChild).addEventListener("click",M),h.appendChild(d),h.appendChild(c),t.appendChild(h)),e),m=n;for(let e=s;e<=a;e++){const b=e;line=document.createElement("quran-madina-html-line"),t.appendChild(line),i||(line.style.setProperty("font-family",L.font_family,""),line.style.setProperty("font-size",L.font_size+"px","")),i&&(t.style.width=L.line_width+10+"px",f=L.suras[m].ayas[p].p%2==1?"":"-",t.style.setProperty("box-shadow","inset "+f+"8px 0 7px -7px #333",""),line.style.setProperty("display","block",""));var f,v,g,y=n==r?o:L.suras[m].ayas.length-1;for(let e=p;e<=Math.min(p+5,y);e++)L.suras[m].ayas[e].p==this.page&&(line_match=L.suras[m].ayas[e].r.filter(e=>e.l==b)).length&&(i&&(""==line.innerHTML.trim()&&(v=line_match[0].o,line.style.setProperty("padding-right",v+"px",""),0<v)&&line.style.setProperty("transform-origin","left"),0<=line_match[0].s?line.style.setProperty("transform",`scaleX(${line_match[0].s})`,""):line.style.setProperty("text-align","center","")),v=document.createElement("div"),u=m+1,l=e-1,u=[w+"-part",w+`-${(g=(e,t)=>String(e).padStart(t,"0"))(u,3)}-`+g(l,3)],-1==l&&u.push("quran-madina-html-sura-start"),g=u,DOMTokenList.prototype.add.apply(v.classList,g),v.textContent=line_match[0].t,v.style.cssText="display:inline",line.appendChild(v),function(e,t="class",n="lightgrey",r="transparent"){var i="tag"===t.toLowerCase()?document.getElementsByTagName(e):document.getElementsByClassName(e);Array.from(i).forEach(function(e){e.onmouseover=function(){Array.from(i).forEach(function(e){e.style.backgroundColor=n})},e.onmouseout=function(){Array.from(i).forEach(function(e){e.style.backgroundColor=r})}})}(g.slice(-1)[0]),y<=(p=e))&&m<113&&L.suras[m+1].ayas[0].p==this.page&&L.suras[m+1].ayas[0].r[0].l==b+1&&(m+=1,p=0)}i||(h=document.createElement("quran-madina-html-copy"),(d=_()).addEventListener("click",T),h.appendChild(d),t.appendChild(h))}}})},i=function(e){console.error(e)},(o=new XMLHttpRequest).onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(200===o.status?r&&r(JSON.parse(o.responseText)):i&&i(o))},o.open("GET",u,!0),o.send()}(),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++)i.call(this,t[n])}function t(e,t){e.className=t.join(" ")}var n,r,i,o,a,s,c,u;void 0===window.Element||"classList"in document.documentElement||(s=Array.prototype,n=s.indexOf,r=s.slice,i=s.push,o=s.splice,a=s.join,e.prototype={add:function(e){this.contains(e)||(i.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&&(o.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,i=0;r=t.attributes[i];i++)"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 i,o,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||!M.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],m=e[s+2];("file"!=this._scheme||!M.test(h)||":"!=p&&"|"!=p||T!=m&&"/"!=m&&"\\"!=m&&"?"!=m&&"#"!=m)&&(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,f=0;c.length>f;f++){var v=c[f];"\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||!M.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=(m=E[c.toLowerCase()])?m: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&&M.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+=(o=void 0,32<(o=(i=h).charCodeAt(0))&&o<127&&-1==[34,35,60,62,96].indexOf(o)?i:encodeURIComponent(i))):(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 i(e,t){void 0===t||t instanceof i||(t=new i(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,M,L,t,o=!1;if(!e.forceJURL)try{var a=new URL("b","http://a");a.pathname="c%20d",o="http://a/c%20d"===a.href}catch(e){}o||((_=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"]=".."),M=/[a-zA-Z]/,L=/[a-zA-Z0-9\+\-\.]/,i.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)&&(i.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)},i.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=i)}(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 i(){p=!1;var e=m,r=(m=[],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&&i()}function u(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var i=0;r.length>i;i++){var o=r[i],a=o.options;(n===e||a.subtree)&&(a=t(a))&&o.enqueue(a)}}}function t(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++f}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 o(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,m,f,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,m=[],f=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 i,o=0;r.length>o;o++)if(r[o].observer===this){(i=r[o]).removeListeners(),i.options=t;break}i||(i=new a(this,e,t),r.push(i),this.nodes_.push(e)),i.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=o(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,m.push(r),p||(p=!0,h(i));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,i=((o=new l("attributes",r)).attributeName=t,o.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(i):o});break;case"DOMCharacterDataModified":var o=l("characterData",r=e.target),i=e.prevValue;u(r,function(e){return e.characterData?e.characterDataOldValue?d(i):o: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;(o=l("childList",e.target.parentNode)).addedNodes=a,o.removedNodes=s,o.previousSibling=c,o.nextSibling=r,u(e.relatedNode,function(e){return e.childList?o: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"),i=!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(i)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",t=this.content.firstChild;t;t=t.nextSibling)e+=t.outerHTML||t.data.replace(o,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){i=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,i=n.length;r<i&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),o=(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;i(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:o,loadedImports:c,errorImports:u})}function r(e){h(e),c.push(this),a++,n()}function i(){u.push(this),a++,n()}var o=t.querySelectorAll("link[rel=import]"),a=0,s=o.length,c=[],u=[];if(s)for(var l,d=0;d<s&&(l=o[d]);d++)!function(e){return p?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",r),l.addEventListener("error",i)):(c.push(this),a++,n());else n()}(e,t)},t=t||o)}function i(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),o=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(o,"_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){i=void 0;o=void 0;s=void 0;c=void 0;a=void 0;var i=t.addedNodes;for(var o,a,s=0,c=i.length;s<c&&(o=i[s]);s++)"link"===(a=o).localName&&"import"===a.rel&&u(o)}}).observe(document.head,{childList:!0}),"loading"===document.readyState))for(var l,d=document.querySelectorAll("link[rel=import]"),m=0,f=d.length;m<f&&(l=d[m]);m++)u(l);t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=o.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),o.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=p,e.rootDocument=o,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,i=/(@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,i)},replaceUrls:function(e,i,o,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return o&&(n=new URL(n,o).href),i.href=n,t+"'"+(n=i.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,i){var o=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),o.open("GET",e,a.async),o.addEventListener("readystatechange",function(e){if(4===o.readyState){var t=null;try{var n=o.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(i,!a.ok(o)&&o,o.response||o.responseText,t)}}),o.send(),o},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 o=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,i){var e,t,n;a.load&&console.log("fetch",r,i),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,i,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,i,e,t,n)}.bind(this),o.load(r,n)):setTimeout(function(){this.receive(r,i,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,i){this.cache[e]=r;for(var o,a=this.pending[e],s=0,c=a.length;s<c&&(o=a[s]);s++)this.onload(e,o,r,n,i),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 i=n.path,t=n.rootDocument,o=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)?o.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){o.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,o.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,i.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),i.markParsingComplete(t),i.parseNext()}var i=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 o,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(o=a[c]);c++)o.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(o.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)),i=0,o=r.length;i<o&&(n=r[i]);i++)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,i=e.Observer,l=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){o.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);o.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,i){var o,a;c.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,a=u,"link"===(o=o=t).localName&&o.getAttribute("rel")===a&&(void 0===(o=this.documents[e])&&((o=r?null:s(n,i||e))&&(o.__importLink=t,this.bootDocument(o)),this.documents[e]=o),t.__doc=o),l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},o=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new i,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=o}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,i,o=0,a=e.length;o<a&&(i=e[o]);o++)t||(t=i.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(i))&&c.loadNode(i),this.shouldParseNode(i)&&n&&s.parseDynamic(i,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 i=t.firstElementChild;if(!i)for(i=t.firstChild;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.nextSibling;for(;i;)!0!==n(i,r)&&e(i,n,r),i=i.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 i,o=t.querySelectorAll("link[rel="+c+"]"),a=0,s=o.length;a<s&&(i=o[a]);a++)i.import&&e(i.import,n,r);n(t)}}(e,t,[])},e.forSubtree=r}),window.CustomElements.addModule(function(n){function a(e,t){return r(e,t)||i(e,t)}function r(e,t){return!!n.upgrade(e,t)||void(t&&s(e))}function i(e,t){f(e,function(e){return!!r(e,t)||void 0})}function t(e){b.push(e),y||(y=!0,setTimeout(o))}function o(){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(m.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 i=(i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,i||"")}var o=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,o)}),w(e.removedNodes,function(e){e.localName&&(u(e=e),f(e,function(e){u(e)}))}))}),m.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),m.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),a(e,e===window.wrap(document)),h(e),m.dom&&console.groupEnd()}var m=n.flags,f=n.forSubtree,v=n.forDocumentTree,g=window.MutationObserver._isPolyfilled&&m["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){m.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=i,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()),o())}}),window.CustomElements.addModule(function(i){function o(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&&i.attached(e),i.upgradeSubtree(e,n),a.upgrade&&console.groupEnd(),e}function r(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,i=t.native,o={},a=r;a!==i&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)o[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),o[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}var a=i.flags;i.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=i.getRegisteredDefinition(e.localName)||i.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return o(e,r,t)}},i.upgradeWithDefinition=o,i.implementPrototype=r}),window.CustomElements.addModule(function(m){function f(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),i=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&i!==r&&this.attributeChangedCallback(e,r,i)}function v(e){return e?w[e.toLowerCase()]:void 0}function i(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=i(e)).setAttribute("is",t):(n=_(e),0<=e.indexOf("-")&&o(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=m.isIE,g=m.upgradeDocumentTree,r=m.upgradeAll,y=m.upgradeWithDefinition,o=m.implementPrototype,a=m.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,i,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 o,a=t,s=a.extends,c=0;o=a.ancestry[c];c++)s=o.is&&o.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){f.call(this,e,t,n)},r=p.removeAttribute,p.removeAttribute=function(e){f.call(this,e,null,r)},p.setAttribute._polyfilled=!0),e=t.__name,(w[e]=t).ctor=(i=t,function(){return y(_((e=i).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,m.ready&&g(document),t.ctor},document.createElement=i,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?i(t,n):s(e,t)},m.registry=w,m.instanceof=a,m.reservedTagList=b,m.getRegisteredDefinition=v,document.register=document.registerElement}),function(e){function t(){i(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,i=(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),o=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&&o(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 i(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}function o(e){if(!f.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,i=2;i<a.length;i++)n[r=a[i]]=t[r]||s[i];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,m={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))}},f=(m.boundHandler=m.eventHandler.bind(m),m),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,i,e=e.elementFromPoint(t,n),o=this.targetingShadow(e);o;){if(r=o.elementFromPoint(t,n))return i=this.targetingShadow(r),this.searchRoot(i,t,n)||r;o=this.olderShadow(o)}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,A={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]},m=(t.prototype={watchSubtree:function(e){this.observer&&v.canTarget(e)&&this.observer.observe(e,A)},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="",M=window.PointerEvent||window.MSPointerEvent,L=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,C=f.pointermap,S=[1,4,2,8,16],O=!1;try{O=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var P,N={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){f.listen(e,this.events)},unregister:function(e){f.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,i=e.clientY,o=0,a=n.length;o<a&&(t=n[o]);o++){var s=Math.abs(r-t.x),c=Math.abs(i-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=f.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=C.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=C.get(this.POINTER_ID),n=this.prepareEvent(e),O||(n.buttons=S[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),C.set(this.POINTER_ID,e),t?f.move(n):f.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=C.get(this.POINTER_ID),n=this.prepareEvent(e),O||(r=S[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),C.set(this.POINTER_ID,e),0===n.buttons||n.buttons===S[n.button]?(this.cleanupMouse(),f.up(n)):f.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),O||this.prepareButtonsForMove(t,e),f.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);f.cancel(e),this.cleanupMouse()},cleanupMouse:function(){C.delete(this.POINTER_ID)}},H=f.captureInfo,q=v.findTarget.bind(v),I=v.allShadows.bind(v),k=f.pointermap,D="touch-action",x={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){j.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(D),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,f.listen(e,this.events),I(e).forEach(function(e){e._scrollType=n,f.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,f.unlisten(e,this.events),I(e).forEach(function(e){e._scrollType=void 0,f.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(D),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=f.cloneEvent(e),r=n.pointerId=e.identifier+2,i=(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(){i.scrolling=!1,i.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,i=0;n.length>i;i++)r=n[i],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,i=e.length;r<i&&(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}),f.over(e),f.enter(e),f.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,f.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(f.leaveOut(t),f.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||(f.up(e),f.out(e),f.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){f.cancel(e),f.out(e),f.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){k.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=N.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 m(x.elementAdded,x.elementRemoved,x.elementChanged,x),R=f.pointermap,F=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,U={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){f.listen(e,this.events)},unregister:function(e){f.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return F&&((t=f.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){R.delete(e)},MSPointerDown:function(e){R.set(e.pointerId,e);e=this.prepareEvent(e);f.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);f.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);f.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);f.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);f.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);f.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=f.makeEvent("lostpointercapture",e);f.dispatchEvent(e)},MSGotPointerCapture:function(e){e=f.makeEvent("gotpointercapture",e);f.dispatchEvent(e)}},Y=window.navigator.msPointerEnabled?(P=function(e){o(e),this.msSetPointerCapture(e)},function(e){o(e),this.msReleasePointerCapture(e)}):(P=function(e){o(e),f.setCapture(e,this)},function(e){o(e),f.releaseCapture(e,this)});return M&&(E.forEach(function(e){e+""===e?(T+=r(e)+i(e)+"\n",L&&(T+=n(e)+i(e)+"\n")):(T+=e.selectors.map(r)+i(e.rule)+"\n",L&&(T+=e.selectors.map(n)+i(e.rule)+"\n"))}),(M=document.createElement("style")).textContent=T,document.head.appendChild(M)),window.PointerEvent||(window.PointerEvent=c,window.navigator.msPointerEnabled?(E=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:E,enumerable:!0}),f.registerSource("ms",U)):(f.registerSource("mouse",N),void 0!==window.ontouchstart&&f.registerSource("touch",x)),f.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:P},releasePointerCapture:{value:Y}}),{dispatcher:f,Installer:m,PointerEvent:c,PointerMap:u,targetFinding:v}}),function(){function s(e){e=N.call(e);return P[e]||(P[e]=e.match(I)[1].toLowerCase())}function i(e,t){t=i[t||s(e)];return t?t(e):e}function p(e){return A[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])?R.merge(e[t],n):e[t]=i(n,r),e}function d(e,t,n){var r,i,o={};for(i in t)o[i.split(":")[0]]=i;for(i in n)r=o[i.split(":")[0]],"function"==typeof t[r]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=R.applyPseudos(i+(i.match(":mixins")?"":":mixins"),n[i],e.pseudos,t[r].__mixin__)):(t[i]=n[i],delete t[r])}function m(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),R.mixins[t[r]].mixins&&e(R.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=R.mixins[e];for(t in n){var r=n[t],i=l[t];if(i)switch(t){case"mixins":break;case"events":o=c=s=a=void 0;var o,a=l,s=i,c=r;for(o in c)s[o+":__mixin__("+H+++")"]=R.applyPseudos(o,c[o],a.pseudos);break;case"accessors":case"prototype":for(var u in r)i[u]?d(l,i[u],r[u]):i[u]=r[u];break;default:d(l,i,r)}else l[t]=r}}),l}function e(e){return 0===e.button}function o(e,t){var n,r,i,o,a,s=Object.getOwnPropertyDescriptor(e,"target");for(n in t)k[n]||(r=n,i=e,o=t,a=s,a?i[r]=o[r]:Object.defineProperty(i,r,{writable:!0,enumerable:!0,value:o[r]}));e.baseEvent=t}function f(e,t,n,r,i){a[i].call(e,n,t&&t.boolean?"":r)}function v(e,t,n,r,i){if(t&&(t.property||t.selector))for(var o=t.property?[e.xtag[t.property]]:t.selector?R.query(e,t.selector):[],a=o.length;a--;)o[a][i](n,r)}function g(e,t){e.prototype[t]={};var n,r,i,o=e.accessors[t],a=o.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),o)!function(e,t,r,i,o,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=R.applyPseudos(n.join(":"),i[r],e.pseudos,i[r])):"set"==s?(n[0]=t,e.prototype[t].set=R.applyPseudos(n.join(":"),o?function(e){var t,n="setAttribute";o.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=o.validate?o.validate.call(this,e):e,t=this.getAttribute(a)),f(this,o,a,e,n),i[r].call(this,e,t),v(this,o,a,e,n)}:i[r]?function(e){i[r].call(this,e)}:null,e.pseudos,i[r]),o&&(o.setter=i[r])):e.prototype[t][r]=i[r]}(e,t,r,o,a,n);a&&(e.prototype[t].get||(i=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[i](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";f(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,M=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,L=/(\d+)/g,C={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"],P={},N=P.toString,I=/\s([a-zA-Z]+)/,A=(i.object=function(e){var t,n={};for(t in e)n[t]=i(e[t]);return n},i.array=function(e){for(var t=e.length,n=Array(t);t--;)n[t]=i(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 D,x,q=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//,R={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(),R.tags[e]=t||{};var n,i=t.prototype,a=(delete t.prototype,R.tags[e].compiled=m(R.merge({},R.defaultOptions,t))),o=a.prototype,r=a.lifecycle;for(n in a.events)a.events[n]=R.parseEvent(n,a.events[n]);for(n in r)r[n.split(":")[0]]=R.applyPseudos(n,r[n],a.pseudos,r[n]);for(n in a.methods)o[n.split(":")[0]]={value:R.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:R.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:y(a.content));var s=r.created,c=r.finalized,u=(o.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 R.addEvents(this,a.events),a.attributes){var r=a.attributes[e],i=this.hasAttribute(e),o=void 0!==r.def;(i||r.boolean||o)&&(this[r.key]=r.boolean?i:!i&&o?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)&&(o.attachedCallback={value:function(){return l&&(this.xtag.__parentNode__=this.parentNode),u?u.apply(this,arguments):void 0},enumerable:!0}),l&&(o.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&&(o.attributeChangedCallback={value:r.attributeChanged,enumerable:!0}),o.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),f(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),v(this,r,e,t,"setAttribute"))}},o.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);f(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),v(this,t,e,"","removeAttribute"))}},{}),d=i instanceof w.HTMLElement,h=a.extends&&(t.extends=a.extends);return i&&Object.getOwnPropertyNames(i).forEach(function(e){var t=o[e],n=d?Object.getOwnPropertyDescriptor(i,e):i[e];if(t)for(var r in n)t[r]="function"==typeof n[r]&&t[r]?R.wrap(n[r],t[r]):n[r];o[e]=t||n}),t.prototype=Object.create((h?Object.create(_.createElement(h).constructor):w.HTMLElement).prototype,o),_.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=R.addEvents(document,{pointermove:n,pointerup:n,pointercancel:n}))):"pointerup"!=e.type&&"pointercancel"!=e.type||(R.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(R.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:C,keyfail:C,delegate:{action:function(e,t){for(var n,r=t.target,i=t.currentTarget;!n&&r&&r!=i;)r.tagName&&O.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&i.tagName&&O.call(i,e.value)?i: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:i,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,i=arguments.length;r<i;r++){var o,a=arguments[r];for(o in a)c(e,o,a[o])}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",i=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return R.skipFrame(function(){e.style[r]=e.style.transitionProperty="",i&&i.call(n||e)})},requestFrame:(x=w.requestAnimationFrame||w[S.lowercase+"RequestAnimationFrame"]||function(e){return w.setTimeout(e,20)},function(e){return x(e)}),cancelFrame:(D=w.cancelAnimationFrame||w[S.lowercase+"CancelAnimationFrame"]||w.clearTimeout,function(e){return D(e)}),skipFrame:function(e){var t=R.requestFrame(function(){t=R.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){R.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 R[R.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+R.uid())+" > ",i=e.parentNode||!u.appendChild(e),r=(t=r+(t+"").replace(l,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),i||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(i,o,a,s){var e,c=o,u={};if(i.match(":")){var l=[],t=0;i.replace(r,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(M,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(!R.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(R.pseudos[e]),r=(n.key=i,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(o,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=R.customEvents[r],i=R.merge({type:r,stack:h,condition:b,capture:R.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),o=(i.attach=p(i.base||i.attach),i.chain=r+(i.pseudos.length?":"+i.pseudos:"")+(e.length?":"+e.join(":"):""),R.applyPseudos(i.chain,t,i._pseudos,i));return i.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==o?(e.stopPropagation(),e.cancelBubble=!0,o.apply(this,arguments)):void 0:o.apply(this,arguments)},i.listener=function(e){var t=p(arguments),n=i.condition.apply(this,t.concat([i]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void R.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=o)?n:{__stack__:o}}):i.stack.apply(this,t))},i.attach.forEach(function(e){i._attach.push(R.parseEvent(e,i.listener))}),i},addEvent:function(t,e,n,r){e="function"==typeof n?R.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){R.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]=R.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),R.removePseudos(t,n._pseudos),n._attach.forEach(function(e){R.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)R.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&&o(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(R):"undefined"!=typeof module&&module.exports?module.exports=R:w.xtag=R,_.addEventListener("WebComponentsReady",function(){R.fireEvent(_.body,"DOMComponentsLoaded")})}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quran-madina-html",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "devDependencies": {
5
5
  "grunt": "^1.6.1",
6
6
  "grunt-contrib-clean": "^2.0.1",
@@ -47,7 +47,7 @@
47
47
  function getAyaClass(sura, aya){
48
48
  const zeroPad = (num, places) => String(num).padStart(places, '0');
49
49
  const classes = [`${name}-part`, `${name}-${zeroPad(sura,3)}-${zeroPad(aya,3)}`];
50
- if(!aya) classes.push("quran-madina-html-sura-start"); // Decorate Sura Name @Aya0
50
+ if(aya == -1) classes.push("quran-madina-html-sura-start"); // Decorate Sura Name
51
51
  return classes;
52
52
  }
53
53
  function getCopyIcon(){