quran-madina-html 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! quran-madina-html 12-07-2023 */
2
+ !function(){var e="quran-madina-html";function l(e){return 2==e.split("-").length?e.split("-").map(e=>e-1):Array(2).fill(e.split("-")[0]-1)}var t,n,r,o,i,d={content:"Loading .."},a=document.querySelector("script[data-name]"),s=a.getAttribute("data-name")||"Madina",c=a.getAttribute("data-font")||"Amiri",a=a.getAttribute("data-font-size")||16;console.log("Quran> "+s+" with font:"+c+" size:"+a);document.getElementById(e)||(t=document.getElementsByTagName("head")[0],(n=document.createElement("link")).id=e,n.rel="stylesheet",n.type="text/css",n.href="../src/quran-madina-html.css",n.media="all",t.appendChild(n)),e="https://raw.githubusercontent.com/tarekeldeeb/quran-madina-html-no-images/main/DBs/"+s+"-"+c+"-"+a+"px.json",r=function(e){d=e;const t=new FontFace(d.font_family,"url("+encodeURI(d.font_url)+")");t.load().then(()=>{document.fonts.add(t)}),xtag.register("quran-madina-html",{lifecycle:{created:function(){this.render(this)},inserted:function(){},removed:function(){},attributeChanged:function(){}},events:{},accessors:{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,o=l(this.sura)[0],i=!1,a=([aya_from,aya_to]=l(this.aya),d.suras[o].ayas[aya_from].r[0].l),s=d.suras[o].ayas[aya_to].r.slice(-1)[0].l,c=(a!=s&&(i=!0,t.style="display:block;"),i&&(t.style.setProperty("font-family",d.font_family,""),t.style.setProperty("font-size",d.font_size+"px","")),aya_from);for(let e=a;e<=s;e++){const u=e;line=document.createElement("quran-madina-html-line"),t.appendChild(line),i||(line.style.setProperty("font-family",d.font_family,""),line.style.setProperty("font-size",d.font_size+"px","")),i&&(t.style.width=d.line_width+10+"px",n=d.suras[o].ayas[aya_from].p%2==1?"":"-",t.style.setProperty("box-shadow","inset "+n+"8px 0 7px -7px #333",""),line.style.setProperty("display","block",""));for(let e=c;e<c+5&&e<=aya_to;e++)(line_match=d.suras[o].ayas[e].r.filter(e=>e.l==u)).length&&(""==line.innerHTML.trim()&&(r=line_match[0].o,line.style.setProperty("padding-right",r+"px",""),0<r)&&line.style.setProperty("transform-origin","left"),line.style.setProperty("transform","scaleX("+line_match[0].s+")",""),line.innerHTML+=line_match[0].t,c=e)}}}})},o=function(e){console.error(e)},(i=new XMLHttpRequest).onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(200===i.status?r&&r(JSON.parse(i.responseText)):o&&o(i))},i.open("GET",e,!0),i.send()}(),function(){var t,n,r,o,e,i,a,s;function c(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;n<t.length;n++)r.call(this,t[n])}function u(e,t){e.className=t.join(" ")}void 0===window.Element||"classList"in document.documentElement||(i=Array.prototype,t=i.indexOf,n=i.slice,r=i.push,o=i.splice,e=i.join,c.prototype={add:function(e){this.contains(e)||(r.call(this,e),u(this._element,n.call(this,0)))},contains:function(e){return-1!==t.call(this,e)},item:function(e){return this[e]||null},remove:function(e){e=t.call(this,e);-1!==e&&(o.call(this,e,1),u(this._element,n.call(this,0)))},toString:function(){return e.call(this," ")},toggle:function(e){-1===t.call(this,e)?this.add(e):this.remove(e)}},window.DOMTokenList=c,i=Element.prototype,a="classList",s=function(){return new c(this)},Object.defineProperty?Object.defineProperty(i,a,{get:s}):i.__defineGetter__(a,s))}(),function(){window.WebComponents=window.WebComponents||{flags:{}};var e,t=document.querySelector('script[src*="webcomponents-lite.js"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,e=e.split("=");e[0]&&(t=e[0].match(/wc-(.+)/))&&(n[t[1]]=e[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(e=n.log.split(","),n.log={},e.forEach(function(e){n.log[e]=!0})):n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";var y,b,g,w,_,t,n=!1;if(!e.forceJURL)try{var r=new URL("b","http://a");r.pathname="c%20d",n="http://a/c%20d"===r.href}catch(e){}function E(e){return void 0!==y[e]}function T(){i.call(this),this._isInvalid=!0}function M(e){return""==e&&T.call(this),e.toLowerCase()}function L(e){var t=e.charCodeAt(0);return 32<t&&t<127&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function o(e,t,n){function r(e){d.push(e)}var o,i,a=t||"scheme start",s=0,c="",u=!1,l=!1,d=[];e:for(;(e[s-1]!=g||0==s)&&!this._isInvalid;){var h=e[s];switch(a){case"scheme start":if(!h||!w.test(h)){if(t){r("Invalid scheme.");break e}c="",a="no scheme";continue}c+=h.toLowerCase(),a="scheme";break;case"scheme":if(h&&_.test(h))c+=h.toLowerCase();else{if(":"!=h){if(t){if(g==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;E(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"):g!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._schemeData+=L(h));break;case"no scheme":if(n&&E(n._scheme)){a="relative";continue}r("Missing scheme."),T.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),g==h){this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._username=n._username,this._password=n._password;break e}if("/"==h||"\\"==h)"\\"==h&&r("\\ is an invalid code point."),a="relative slash";else if("?"==h)this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query="?",this._username=n._username,this._password=n._password,a="query";else{if("#"!=h){var p=e[s+1],f=e[s+2];("file"!=this._scheme||!w.test(h)||":"!=p&&"|"!=p||g!=f&&"/"!=f&&"\\"!=f&&"?"!=f&&"#"!=f)&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password,this._path=n._path.slice(),this._path.pop()),a="relative path";continue}this._host=n._host,this._port=n._port,this._path=n._path.slice(),this._query=n._query,this._fragment="#",this._username=n._username,this._password=n._password,a="fragment"}break;case"relative slash":if("/"!=h&&"\\"!=h){"file"!=this._scheme&&(this._host=n._host,this._port=n._port,this._username=n._username,this._password=n._password),a="relative path";continue}"\\"==h&&r("\\ is an invalid code point."),a="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=h){r("Expected '/', got: "+h),a="authority ignore slashes";continue}a="authority second slash";break;case"authority second slash":if(a="authority ignore slashes","/"==h)break;r("Expected '/', got: "+h);continue;case"authority ignore slashes":if("/"!=h&&"\\"!=h){a="authority";continue}r("Expected authority, got: "+h);break;case"authority":if("@"==h){u&&(r("@ already seen."),c+="%40");for(var u=!0,m=0;m<c.length;m++){var v=c[m];"\t"==v||"\n"==v||"\r"==v?r("Invalid whitespace in authority."):":"==v&&null===this._password?this._password="":(v=L(v),null!==this._password?this._password+=v:this._username+=v)}c=""}else{if(g==h||"/"==h||"\\"==h||"?"==h||"#"==h){s-=c.length,c="",a="host";continue}c+=h}break;case"file host":if(g==h||"/"==h||"\\"==h||"?"==h||"#"==h){a=2!=c.length||!w.test(c[0])||":"!=c[1]&&"|"!=c[1]?(0==c.length||(this._host=M.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(g==h||"/"==h||"\\"==h||"?"==h||"#"==h){if(this._host=M.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=M.call(this,c),c="",a="port","hostname"==t)break e;break;case"port":if(/[0-9]/.test(h))c+=h;else{if(g==h||"/"==h||"\\"==h||"?"==h||"#"==h||t){if(""!=c&&((p=parseInt(c,10))!=y[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):T.call(this)}break;case"relative path start":if("\\"==h&&r("'\\' not allowed in path."),a="relative path","/"!=h&&"\\"!=h)continue;break;case"relative path":g!=h&&"/"!=h&&"\\"!=h&&(t||"?"!=h&&"#"!=h)?"\t"!=h&&"\n"!=h&&"\r"!=h&&(c+=L(h)):("\\"==h&&r("\\ not allowed in relative path."),".."==(c=(f=b[c.toLowerCase()])?f:c)?(this._path.pop(),"/"!=h&&"\\"!=h&&this._path.push("")):"."==c&&"/"!=h&&"\\"!=h?this._path.push(""):"."!=c&&("file"==this._scheme&&0==this._path.length&&2==c.length&&w.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?g!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._query+=(i=void 0,32<(i=(o=h).charCodeAt(0))&&i<127&&-1==[34,35,60,62,96].indexOf(i)?o:encodeURIComponent(o))):(this._fragment="#",a="fragment");break;case"fragment":g!=h&&"\t"!=h&&"\n"!=h&&"\r"!=h&&(this._fragment+=h)}s++}}function i(){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 a(e,t){void 0===t||t instanceof a||(t=new a(String(t))),this._url=e,i.call(this);e=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");o.call(this,e,null,t)}n||((y=Object.create(null)).ftp=21,y.file=0,y.gopher=70,y.http=80,y.https=443,y.ws=80,y.wss=443,(b=Object.create(null))["%2e"]=".",b[".%2e"]="..",b["%2e."]="..",g=void(b["%2e%2e"]=".."),w=/[a-zA-Z]/,_=/[a-zA-Z0-9\+\-\.]/,a.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){i.call(this),o.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||o.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&&o.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&o.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&o.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=[],o.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)),o.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)),o.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)&&(a.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},a.revokeObjectURL=function(e){t.revokeObjectURL(e)}),e.URL=a)}(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){var s,t,n,o,i,a,r,u,l;function c(){i=!1;var e=a,r=(a=[],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&&c()}function d(e,t){for(var n=e;n;n=n.parentNode){var r=s.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;(n===e||a.subtree)&&(a=t(a))&&i.enqueue(a)}}}function h(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++r}function p(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 f(e,t){return u=new p(e,t)}function m(e){var t,n;return l||((n=new p((t=u).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,(l=n).oldValue=e),l}function v(e,t){return e===t?e:!l||(t=e)!==l&&t!==u?null:l}function y(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}e.JsMutationObserver||(s=new WeakMap,o=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(t=[],n=String(Math.random()),window.addEventListener("message",function(e){e.data===n&&(e=t,t=[],e.forEach(function(e){e()}))}),function(e){t.push(e),window.postMessage(n,"*")}),i=!1,a=[],r=0,h.prototype={observe:function(e,t){var n;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 r,o=s.get(e);o||s.set(e,o=[]);for(var i=0;i<o.length;i++)if(o[i].observer===this){(r=o[i]).removeListeners(),r.options=t;break}r||(r=new y(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=s.get(e),n=0;n<t.length;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}},y.prototype={enqueue:function(e){var t=this.observer.records_,n=t.length;if(0<t.length){var r=v(t[n-1],e);if(r)return void(t[n-1]=r)}else r=this.observer,a.push(r),i||(i=!0,o(c));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;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=((i=new f("attributes",r)).attributeName=t,i.attributeNamespace=n,e.attrChange===MutationEvent.ADDITION?null:e.prevValue);d(r,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||-1!==e.attributeFilter.indexOf(t)||-1!==e.attributeFilter.indexOf(n)))return e.attributeOldValue?m(o):i});break;case"DOMCharacterDataModified":var i=f("characterData",r=e.target),o=e.prevValue;d(r,function(e){if(e.characterData)return e.characterDataOldValue?m(o):i});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var a,r=e.target,s="DOMNodeInserted"===e.type?(a=[r],[]):(a=[],[r]),c=r.previousSibling,r=r.nextSibling;(i=f("childList",e.target.parentNode)).addedNodes=a,i.removedNodes=s,i.previousSibling=c,i.nextSibling=r,d(e.relatedNode,function(e){if(e.childList)return i})}u=l=void 0}},e.JsMutationObserver=h,e.MutationObserver)||((e.MutationObserver=h)._isPolyfilled=!0)}(self),"undefined"==typeof HTMLTemplateElement&&function(){var n=document.implementation.createHTMLDocument("template"),r=!0,t=((HTMLTemplateElement=function(){}).prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){var t;for(e.content=n.createDocumentFragment();t=e.firstChild;)e.content.appendChild(t);if(r)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,i);return e},set:function(e){for(n.body.innerHTML=e,HTMLTemplateElement.bootstrap(n);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;n.body.firstChild;)this.content.appendChild(n.body.firstChild)},configurable:!0})}catch(e){r=!1}HTMLTemplateElement.bootstrap(e.content)}},HTMLTemplateElement.bootstrap=function(e){for(var t,n=e.querySelectorAll("template"),r=0,o=n.length;r<o&&(t=n[r]);r++)HTMLTemplateElement.decorate(t)},document.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)}),document.createElement),o=(document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e},/[&\u00A0<>]/g);function i(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}}(),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){return n?window.ShadowDOMPolyfill.wrapIfNeeded(e):e}var h=Boolean("import"in document.createElement("link")),n=Boolean(window.ShadowDOMPolyfill),r=t(document),o={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return t(e)},configurable:!0},o=(Object.defineProperty(document,"_currentScript",o),Object.defineProperty(r,"_currentScript",o),/Trident/.test(navigator.userAgent));function i(e,t){!function e(t,n){{var r;c(n)?t&&t():(r=function(){"complete"!==n.readyState&&n.readyState!==a||(n.removeEventListener(s,r),e(t,n))},n.addEventListener(s,r))}}(function(){!function(e,t){var n=t.querySelectorAll("link[rel=import]"),r=0,o=n.length,i=[],a=[];function s(){r==o&&e&&e({allImports:n,loadedImports:i,errorImports:a})}function c(e){p(e),i.push(this),r++,s()}function u(e){a.push(this),r++,s()}if(o)for(var l,d=0;d<o&&(l=n[d]);d++)!function(e){return h?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}(l)?(l.addEventListener("load",c),l.addEventListener("error",u)):(i.push(this),r++,s());else s()}(e,t)},t=t||r)}var a=o?"complete":"interactive",s="readystatechange";function c(e){return"complete"===e.readyState||e.readyState===a}function p(e){e.target.__loaded=!0}if(h){function u(e){e.import?p({target:e}):(e.addEventListener("load",p),e.addEventListener("error",p))}if(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)if(t.addedNodes){o=s=a=i=void 0;for(var o,i=t.addedNodes,a=0,s=i.length;a<s&&(o=i[a]);a++)!function(e){return"link"===e.localName&&"import"===e.rel}(o)||u(o)}}).observe(document.head,{childList:!0}),"loading"===document.readyState)for(var l,d=document.querySelectorAll("link[rel=import]"),f=0,m=d.length;f<m&&(l=d[f]);f++)u(l)}i(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=r.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),r.dispatchEvent(t)}),e.IMPORT_LINK_TYPE="import",e.useNative=h,e.rootDocument=r,e.whenReady=i,e.isIE=o}(window.HTMLImports),function(t){var n=[];t.addModule=function(e){n.push(e)},t.initializeModules=function(){n.forEach(function(e){e(t)})}}(window.HTMLImports),window.HTMLImports.addModule(function(e){var r=/(url\()([^)]*)(\))/g,o=/(@import[\s]+(?!url\())([^;]*)(;)/g;e.path={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,t,n){e=this.replaceUrls(e,n,t,r);return this.replaceUrls(e,n,t,o)},replaceUrls:function(e,o,i,t){return e.replace(t,function(e,t,n,r){n=n.replace(/["']/g,"");return i&&(n=new URL(n,i).href),o.href=n,t+"'"+(n=o.href)+"'"+r})}}}),window.HTMLImports.addModule(function(t){var a={async:!0,ok:function(e){return 200<=e.status&&e.status<300||304===e.status||0===e.status},load:function(e,r,o){var i=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(e+="?"+Math.random()),i.open("GET",e,a.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var t=null;try{var n=i.getResponseHeader("Location");n&&(t="/"===n.substr(0,1)?location.origin+n:n)}catch(e){console.error(e.message)}r.call(o,!a.ok(i)&&i,i.response||i.responseText,t)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};t.xhr=a}),window.HTMLImports.addModule(function(e){function t(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}}var i=e.xhr,a=e.flags;t.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){return this.pending[e]?(this.pending[e].push(t),!0):this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):!(this.pending[e]=[t])},fetch:function(r,o){var e,t,n;a.load&&console.log("fetch",r,o),r?r.match(/^data:/)?(e=(n=r.split(","))[0],t=n[1],t=(-1<e.indexOf(";base64")?atob:decodeURIComponent)(t),setTimeout(function(){this.receive(r,o,null,t)}.bind(this),0)):(n=function(e,t,n){this.receive(r,o,e,t,n)}.bind(this),i.load(r,n)):setTimeout(function(){this.receive(r,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=t}),window.HTMLImports.addModule(function(e){function t(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))}t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(n){var o=n.path,t=n.rootDocument,r=n.flags,u=n.isIE,i=n.IMPORT_LINK_TYPE,e="link[rel="+i+"]",a={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)?r.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){r.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,r.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){s(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t,n,r=e;(n=(t=e).ownerDocument.createElement("style")).textContent=t.textContent,o.resolveUrlsInStyle(n),e=n,(r.__appliedElement=e).__importElement=r,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(t,n){function r(e){t.removeEventListener("load",r),t.removeEventListener("error",r),n&&n(e),o.markParsingComplete(t),o.parseNext()}var o=this;if(t.addEventListener("load",r),t.addEventListener("error",r),u&&"style"===t.localName){var e=!1;if(-1==t.textContent.indexOf("@import"))e=!0;else if(t.sheet)for(var i,e=!0,a=t.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(i.styleSheet));e&&setTimeout(function(){t.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(e){var t=document.createElement("script");t.__importElement=e,t.src=e.src||function(e){e=function(e){return 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)}(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(e)}(e),n.currentScript=e,this.trackElement(t,function(e){t.parentNode&&t.parentNode.removeChild(t),n.currentScript=null}),this.addElementToDocument(t)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(t)||this.nextToParseDynamic())},nextToParseInDoc:function(e,t){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,r=e.querySelectorAll(this.parseSelectorsForNode(e)),o=0,i=r.length;o<i&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?s(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!s(e)||void 0!==e.__doc}};function s(e){return"link"===e.localName&&e.rel===i}n.parser=a,n.IMPORT_SELECTOR=e}),window.HTMLImports.addModule(function(e){var a=e.flags,s=e.IMPORT_LINK_TYPE,t=e.IMPORT_SELECTOR,n=e.rootDocument,r=e.Loader,o=e.Observer,c=e.parser,t={documents:{},documentPreloadSelectors:t,importsPreloadSelectors:[t].join(","),loadNode:function(e){i.addNode(e)},loadSubtree:function(e){e=this.marshalNodes(e);i.addNodes(e)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){return(e.ownerDocument||e)===n?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,t,n,r,o){var i;a.load&&console.log("loaded",e,t),t.__resource=n,t.__error=r,function(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}(t,s)&&(void 0===(i=this.documents[e])&&((i=r?null:function(e,t){var n=document.implementation.createHTMLDocument(s),r=(n._URL=t,n.createElement("base"));r.setAttribute("href",t),n.baseURI||function(e){return Object.getOwnPropertyDescriptor(e,"baseURI")}(n)||Object.defineProperty(n,"baseURI",{value:t});t=n.createElement("meta");t.setAttribute("charset","utf-8"),n.head.appendChild(t),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n);return n}(n,o||e))&&(i.__importLink=t,this.bootDocument(i)),this.documents[e]=i),t.__doc=i),c.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),c.parseNext()},loadedAll:function(){c.parseNext()}},i=new r(t.loaded.bind(t),t.loadedAll.bind(t));t.observer=new o,document.baseURI||(r={get:function(){var e=document.querySelector("base");return(e||window.location).href},configurable:!0},Object.defineProperty(document,"baseURI",r),Object.defineProperty(n,"baseURI",r)),e.importer=t,e.importLoader=i}),window.HTMLImports.addModule(function(e){var s=e.parser,c=e.importer,e={added:function(e){for(var t,n,r,o,i=0,a=e.length;i<a&&(o=e[i]);i++)t||(t=o.ownerDocument,n=s.isParsed(t)),(r=this.shouldLoadNode(o))&&c.loadNode(o),this.shouldParseNode(o)&&n&&s.parseDynamic(o,r)},shouldLoadNode:function(e){return 1===e.nodeType&&t.call(e,c.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&t.call(e,s.parseSelectorsForNode(e))}},t=(c.observer.addCallback=e.added.bind(e),HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector)}),function(e){var t,n=e.initializeModules;e.isIE;function r(){window.HTMLImports.importer.bootDocument(t)}e.useNative||(n(),t=e.rootDocument,"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?r():document.addEventListener("DOMContentLoaded",r))}(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){var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";function r(e,t){!function e(t,n,r){var o=t.firstElementChild;if(!o)for(o=t.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==n(o,r)&&e(o,n,r),o=o.nextElementSibling;return null}(e,function(e){if(t(e))return!0;n(e,t)}),n(e,t)}function n(e,t){for(var n=e.shadowRoot;n;)r(n,t),n=n.olderShadowRoot}e.forDocumentTree=function(e,t){!function e(t,n,r){t=window.wrap(t);if(0<=r.indexOf(t))return;r.push(t);var o=t.querySelectorAll("link[rel="+c+"]");for(var i,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){var a=n.flags,s=n.forSubtree,t=n.forDocumentTree;function c(e,t){return r(e,t)||o(e,t)}function r(e,t){if(n.upgrade(e,t))return!0;t&&p(e)}function o(e,t){s(e,function(e){if(r(e,t))return!0})}var i=window.MutationObserver._isPolyfilled&&a["throttle-attached"],u=(n.hasPolyfillMutations=i,n.hasThrottledAttached=i,!1),l=[];function d(e){l.push(e),u||(u=!0,setTimeout(h))}function h(){u=!1;for(var e,t=l,n=0,r=t.length;n<r&&(e=t[n]);n++)e();l=[]}function p(e){i?d(function(){f(e)}):f(e)}function f(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback)&&e.attachedCallback()}function m(e){i?d(function(){v(e)}):v(e)}function v(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback)&&e.detachedCallback()}function y(e,t){if(a.dom){var n=t[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=(o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"").split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",t.length,o||"")}var i=function(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}(e);t.forEach(function(e){"childList"===e.type&&(b(e.addedNodes,function(e){e.localName&&c(e,i)}),b(e.removedNodes,function(e){e.localName&&(m(e=e),s(e,function(e){m(e)}))}))}),a.dom&&console.groupEnd()}var b=Array.prototype.forEach.call.bind(Array.prototype.forEach);function g(e){var t;e.__observer||((t=new MutationObserver(y.bind(this,e))).observe(e,{childList:!0,subtree:!0}),e.__observer=t)}function w(e){e=window.wrap(e),a.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),c(e,e===window.wrap(document)),g(e),a.dom&&console.groupEnd()}var _=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){a.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)g(t),t=t.olderShadowRoot}},n.upgradeDocumentTree=function(e){t(e,w)},n.upgradeDocument=w,n.upgradeSubtree=o,n.upgradeAll=c,n.attached=p,n.takeRecords=function(e){for(e=(e=window.wrap(e))||window.wrap(document);e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(y(e,t.takeRecords()),h())}}),window.CustomElements.addModule(function(o){var r=o.flags;function i(e,t,n){return r.upgrade&&console.group("upgrade:",e.localName),t.is&&e.setAttribute("is",t.is),a(e,t),e.__upgraded__=!0,(t=e).createdCallback&&t.createdCallback(),n&&o.attached(e),o.upgradeSubtree(e,n),r.upgrade&&console.groupEnd(),e}function a(e,t){if(!Object.__proto__)for(var n=e,r=t.prototype,o=t.native,i={},a=r;a!==o&&a!==HTMLElement.prototype;){for(var s,c=Object.getOwnPropertyNames(a),u=0;s=c[u];u++)i[s]||(Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s)),i[s]=1);a=Object.getPrototypeOf(a)}e.__proto__=t.prototype}o.upgrade=function(e,t){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var n=e.getAttribute("is"),r=o.getRegisteredDefinition(e.localName)||o.getRegisteredDefinition(n);if(r&&(n&&r.tag==e.localName||!n&&!r.extends))return i(e,r,t)}},o.upgradeWithDefinition=i,o.implementPrototype=a}),window.CustomElements.addModule(function(f){var e=f.isIE,m=f.upgradeDocumentTree,r=f.upgradeAll,v=f.upgradeWithDefinition,o=f.implementPrototype,t=f.useNative;function y(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e),o=(n.apply(this,arguments),this.getAttribute(e));this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}var b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];var g={};function w(e){if(e)return g[e.toLowerCase()]}function i(e,t){e=e&&e.toLowerCase();var n,r=w((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}var n,_=document.createElement.bind(document),a=document.createElementNS.bind(document);function s(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return r(e),e}}t=Object.__proto__||t?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},s(Node.prototype,"cloneNode"),s(document,"importNode"),e&&(n=document.importNode,document.importNode=function(){var e,t=n.apply(document,arguments);return t.nodeType==t.DOCUMENT_FRAGMENT_NODE?((e=document.createDocumentFragment()).appendChild(t),e):t}),document.registerElement=function(e,t){var n,r,o,t=t||{};if(!e)throw new Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(e)+"'.");if(function(e){for(var t=0;t<b.length;t++)if(e===b[t])return 1}(e))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(e)+"'. The type name is invalid.");if(w(e))throw new Error("DuplicateDefinitionError: a type with name '"+String(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=w(t);if(t)return e(t.extends).concat([t]);return[]}(t.extends);for(var i,a=t,s=a.extends,c=0;i=a.ancestry[c];c++)s=i.is&&i.tag;a.tag=s||a.__name,s&&(a.is=a.__name);var e=t;if(!Object.__proto__){for(var u,l,d=HTMLElement.prototype,h=(e.is&&(u=document.createElement(e.tag),d=Object.getPrototypeOf(u)),e.prototype),p=!1;h;)h==d&&(p=!0),(l=Object.getPrototypeOf(h))&&(h.__proto__=l),h=l;p||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e.native=d}return(u=t.prototype).setAttribute._polyfilled||(n=u.setAttribute,u.setAttribute=function(e,t){y.call(this,e,t,n)},r=u.removeAttribute,u.removeAttribute=function(e){y.call(this,e,null,r)},u.setAttribute._polyfilled=!0),e=t.__name,(g[e]=t).ctor=(o=t,function(){return v(_((e=o).tag),e);var e}),t.ctor.prototype=t.prototype,t.prototype.constructor=t.ctor,f.ready&&m(document),t.ctor},document.createElement=i,document.createElementNS=function(e,t,n){return"http://www.w3.org/1999/xhtml"===e?i(t,n):a(e,t)},f.registry=g,f.instanceof=t,f.reservedTagList=b,f.getRegisteredDefinition=w,document.register=document.registerElement}),function(e){var t=e.useNative,n=e.initializeModules,r=(e.isIE,t?(e.watchShadow=t=function(){},e.upgrade=t,e.upgradeAll=t,e.upgradeDocumentTree=t,e.upgradeSubtree=t,e.takeRecords=t,e.instanceof=function(e,t){return e instanceof t}):n(),e.upgradeDocumentTree),o=e.upgradeDocument;function i(){r(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}))})})}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)?(t=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded",window.addEventListener(t,i)):i()}(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";var i=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],a=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0];var n=function(e,t){t=t||Object.create(null);var n=document.createEvent("Event");n.initEvent(e,t.bubbles||!1,t.cancelable||!1);for(var r,o=2;o<i.length;o++)n[r=i[o]]=t[r]||a[o];return n.buttons=t.buttons||0,e=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};function e(){this.array=[],this.size=0}var t=window.Map&&window.Map.prototype.forEach?Map:e,o=["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"],s=[!(e.prototype={set:function(e,t){if(void 0===t)return this.delete(e);this.has(e)||this.size++,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],c="undefined"!=typeof SVGElementInstance,r={pointermap:new t,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 n(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<o.length;r++)n[t=o[r]]=e[t]||s[r],!c||"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){return this.captureInfo[e.pointerId]||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);if(t)return t.dispatchEvent(e)},asyncDispatchEvent:function(e){requestAnimationFrame(this.dispatchEvent.bind(this,e))}},u=(r.boundHandler=r.eventHandler.bind(r),r),l={shadow:function(e){if(e)return e.shadowRoot||e.webkitShadowRoot},canTarget:function(e){return e&&Boolean(e.elementFromPoint)},targetingShadow:function(e){e=this.shadow(e);if(this.canTarget(e))return e},olderShadow:function(e){var t=e.olderShadowRoot;return t||(e=e.querySelector("shadow"))&&(t=e.olderShadowRoot),t},allShadows:function(e){for(var t=[],n=this.shadow(e);n;)t.push(n),n=this.olderShadow(n);return t},searchRoot:function(e,t,n){if(e){for(var r,o,e=e.elementFromPoint(t,n),i=this.targetingShadow(e);i;){if(o=i.elementFromPoint(t,n))return r=this.targetingShadow(o),this.searchRoot(r,t,n)||o;i=this.olderShadow(i)}return e}},owner:function(e){for(var t=e;t.parentNode;)t=t.parentNode;return t=t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?document:t},findTarget:function(e){var t=e.clientX,n=e.clientY,e=this.owner(e.target);return e.elementFromPoint(t,n)||(e=document),this.searchRoot(e,t,n)}},d=Array.prototype.forEach.call.bind(Array.prototype.forEach),h=Array.prototype.map.call.bind(Array.prototype.map),p=Array.prototype.slice.call.bind(Array.prototype.slice),f=Array.prototype.filter.call.bind(Array.prototype.filter),m=window.MutationObserver||window.WebKitMutationObserver,A={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};function v(e,t,n,r){this.addCallback=e.bind(r),this.removeCallback=t.bind(r),this.changedCallback=n.bind(r),m&&(this.observer=new m(this.mutationWatcher.bind(this)))}v.prototype={watchSubtree:function(e){this.observer&&l.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){d(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(p(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=h(e,this.findElements,this);return t.push(f(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)}};r=v;function y(e){return"body /shadow-deep/ "+b(e)}function b(e){return'[touch-action="'+e+'"]'}function g(e){return"{ -ms-touch-action: "+e+"; touch-action: "+e+"; touch-action-delay: none; }"}var w=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],_="",E=window.PointerEvent||window.MSPointerEvent,T=!window.ShadowDOMPolyfill&&document.head.createShadowRoot;var M=u.pointermap,L=[1,4,2,8,16],S=!1;try{S=1===new MouseEvent("test",{buttons:1}).buttons}catch(e){}var C={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(e){u.listen(e,this.events)},unregister:function(e){u.unlisten(e,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(e){for(var t,n=this.lastTouches,r=e.clientX,o=e.clientY,i=0,a=n.length;i<a&&(t=n[i]);i++){var s=Math.abs(r-t.x),c=Math.abs(o-t.y);if(s<=25&&c<=25)return!0}},prepareEvent:function(e){var t=u.cloneEvent(e),n=t.preventDefault;return t.preventDefault=function(){e.preventDefault(),n()},t.pointerId=this.POINTER_ID,t.isPrimary=!0,t.pointerType=this.POINTER_TYPE,t},prepareButtonsForMove:function(e,t){var n=M.get(this.POINTER_ID);e.buttons=n?n.buttons:0,t.buttons=e.buttons},mousedown:function(e){var t,n;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),S||(n.buttons=L[n.button],t&&(n.buttons|=t.buttons),e.buttons=n.buttons),M.set(this.POINTER_ID,e),t?u.move(n):u.down(n))},mousemove:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),S||this.prepareButtonsForMove(t,e),u.move(t))},mouseup:function(e){var t,n,r;this.isEventSimulatedFromTouch(e)||(t=M.get(this.POINTER_ID),n=this.prepareEvent(e),S||(r=L[n.button],n.buttons=t?t.buttons&~r:0,e.buttons=n.buttons),M.set(this.POINTER_ID,e),0===n.buttons||n.buttons===L[n.button]?(this.cleanupMouse(),u.up(n)):u.move(n))},mouseover:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),S||this.prepareButtonsForMove(t,e),u.enterOver(t))},mouseout:function(e){var t;this.isEventSimulatedFromTouch(e)||(t=this.prepareEvent(e),S||this.prepareButtonsForMove(t,e),u.leaveOut(t))},cancel:function(e){e=this.prepareEvent(e);u.cancel(e),this.cleanupMouse()},cleanupMouse:function(){M.delete(this.POINTER_ID)}},H=u.captureInfo,j=l.findTarget.bind(l),O=l.allShadows.bind(l),P=u.pointermap,N="touch-action",I={events:["touchstart","touchmove","touchend","touchcancel"],register:function(e){F.enableOnSubtree(e)},unregister:function(e){},elementAdded:function(e){var t=e.getAttribute(N),n=this.touchActionToScrollType(t);n&&(e._scrollType=n,u.listen(e,this.events),O(e).forEach(function(e){e._scrollType=n,u.listen(e,this.events)},this))},elementRemoved:function(e){e._scrollType=void 0,u.unlisten(e,this.events),O(e).forEach(function(e){e._scrollType=void 0,u.unlisten(e,this.events)},this)},elementChanged:function(e,t){var n=e.getAttribute(N),r=this.touchActionToScrollType(n),n=this.touchActionToScrollType(t);r&&n?(e._scrollType=r,O(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===P.size||1===P.size&&P.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=u.cloneEvent(e),r=n.pointerId=e.identifier+2,o=(n.target=H[r]||j(n),n.bubbles=!0,n.cancelable=!0,n.detail=this.clickCount,n.button=0,n.buttons=this.typeToButtons(t.type),n.width=e.radiusX||e.webkitRadiusX||0,n.height=e.radiusY||e.webkitRadiusY||0,n.pressure=e.force||e.webkitForce||.5,n.isPrimary=this.isPrimaryTouch(e),n.pointerType=this.POINTER_TYPE,this);return n.preventDefault=function(){o.scrolling=!1,o.firstXY=null,t.preventDefault()},n},processTouches:function(e,t){var n=e.changedTouches;this.currentTouchEvent=e;for(var r,o=0;o<n.length;o++)r=n[o],t.call(this,this.touchToPointer(r))},shouldScroll:function(e){var t,n;if(this.firstXY)return e="none"!==(n=e.currentTarget._scrollType)&&("XY"===n||(e=e.changedTouches[0],t="Y"===n?"X":"Y",n=Math.abs(e["client"+n]-this.firstXY[n]),Math.abs(e["client"+t]-this.firstXY[t])<=n)),this.firstXY=null,e},findTouch:function(e,t){for(var n,r=0,o=e.length;r<o&&(n=e[r]);r++)if(n.identifier===t)return!0},vacuumTouches:function(e){var n,r=e.touches;P.size>=r.length&&(n=[],P.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){P.set(e.pointerId,{target:e.target,out:e,outTarget:e.target}),u.over(e),u.enter(e),u.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=P.get(e.pointerId);r&&(t=r.out,n=r.outTarget,u.move(e),t&&n!==e.target&&(t.relatedTarget=e.target,e.relatedTarget=n,t.target=n,e.target?(u.leaveOut(t),u.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||(u.up(e),u.out(e),u.leave(e)),this.cleanUpPointer(e)},touchcancel:function(e){this.processTouches(e,this.cancelOut)},cancelOut:function(e){u.cancel(e),u.out(e),u.leave(e),this.cleanUpPointer(e)},cleanUpPointer:function(e){P.delete(e.pointerId),this.removePrimaryPointer(e)},dedupSynthMouse:function(e){var t=C.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))}},F=new r(I.elementAdded,I.elementRemoved,I.elementChanged,I),D=u.pointermap,q=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,U={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(e){u.listen(e,this.events)},unregister:function(e){u.unlisten(e,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(e){var t=e;return q&&((t=u.cloneEvent(e)).pointerType=this.POINTER_TYPES[e.pointerType]),t},cleanup:function(e){D.delete(e)},MSPointerDown:function(e){D.set(e.pointerId,e);e=this.prepareEvent(e);u.down(e)},MSPointerMove:function(e){e=this.prepareEvent(e);u.move(e)},MSPointerUp:function(e){var t=this.prepareEvent(e);u.up(t),this.cleanup(e.pointerId)},MSPointerOut:function(e){e=this.prepareEvent(e);u.leaveOut(e)},MSPointerOver:function(e){e=this.prepareEvent(e);u.enterOver(e)},MSPointerCancel:function(e){var t=this.prepareEvent(e);u.cancel(t),this.cleanup(e.pointerId)},MSLostPointerCapture:function(e){e=u.makeEvent("lostpointercapture",e);u.dispatchEvent(e)},MSGotPointerCapture:function(e){e=u.makeEvent("gotpointercapture",e);u.dispatchEvent(e)}};var k,R=window.navigator;function x(e){if(!u.pointermap.has(e))throw new Error("InvalidPointerId")}return R=R.msPointerEnabled?(k=function(e){x(e),this.msSetPointerCapture(e)},function(e){x(e),this.msReleasePointerCapture(e)}):(k=function(e){x(e),u.setCapture(e,this)},function(e){x(e),u.releaseCapture(e,this)}),E&&(w.forEach(function(e){String(e)===e?(_+=b(e)+g(e)+"\n",T&&(_+=y(e)+g(e)+"\n")):(_+=e.selectors.map(b)+g(e.rule)+"\n",T&&(_+=e.selectors.map(y)+g(e.rule)+"\n"))}),(E=document.createElement("style")).textContent=_,document.head.appendChild(E)),window.PointerEvent||(window.PointerEvent=n,window.navigator.msPointerEnabled?(w=window.navigator.msMaxTouchPoints,Object.defineProperty(window.navigator,"maxTouchPoints",{value:w,enumerable:!0}),u.registerSource("ms",U)):(u.registerSource("mouse",C),void 0!==window.ontouchstart&&u.registerSource("touch",I)),u.register(document)),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:k},releasePointerCapture:{value:R}}),{dispatcher:u,Installer:r,PointerEvent:n,PointerMap:t,targetFinding:l}}),function(){function h(){}function p(){return!0}var e,u=window,l=document,i={setAttribute:Element.prototype.setAttribute,removeAttribute:Element.prototype.removeAttribute},d=Element.prototype.createShadowRoot,a=l.createElement("div"),s=/,/g,c=/([a-z])([A-Z])/g,n=/\(|\)/g,r=/:(\w+)\u276A(.+?(?=\u276B))|:(\w+)/g,o=/(\d+)/g,t={action:function(e,t){return-1<e.value.match(o).indexOf(String(t.keyCode))==("keypass"==e.name)||null}},f=(e=u.getComputedStyle(l.documentElement,""),{dom:"ms"==(e=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1])?"MS":e,lowercase:e,css:"-"+e+"-",js:"ms"==e?e:e[0].toUpperCase()+e.substr(1)}),m=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype[f.lowercase+"MatchesSelector"],v={},y=v.toString,b=/\s([a-zA-Z]+)/;function g(e){e=y.call(e);return v[e]||(v[e]=e.match(b)[1].toLowerCase())}function w(e,t){t=w[t||g(e)];return t?t(e):e}w.object=function(e){var t,n={};for(t in e)n[t]=w(e[t]);return n},w.array=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=w(e[t]);return n};var _={undefined:1,null:1,number:1,boolean:1,string:1,function:1};function E(e){return _[g(e)]?[e]:Array.prototype.slice.call(e,0)}function T(e,t,n){var r=g(n);return"object"==r&&"object"==g(e[t])?x.merge(e[t],n):e[t]=w(n,r),e}function M(e,t,n){var r,o,i={};for(o in t)i[o.split(":")[0]]=o;for(o in n)"function"==typeof t[r=i[o.split(":")[0]]]?(r.match(":mixins")||(t[r+":mixins"]=t[r],delete t[r],r+=":mixins"),t[r].__mixin__=x.applyPseudos(o+(o.match(":mixins")?"":":mixins"),n[o],e.pseudos,t[r].__mixin__)):(t[o]=n[o],delete t[r])}var L=0;function S(l){return function e(t,n){for(var r=t.length;r--;)n.unshift(t[r]),x.mixins[t[r]].mixins&&e(x.mixins[t[r]].mixins,n);return n}(l.mixins,[]).forEach(function(e){var t,n=x.mixins[e];for(t in n){var r=n[t],o=l[t];if(o)switch(t){case"mixins":break;case"events":i=c=s=a=void 0;var i,a=l,s=o,c=r;for(i in c)s[i+":__mixin__("+L+++")"]=x.applyPseudos(i,c[i],a.pseudos);break;case"accessors":case"prototype":for(var u in r)o[u]?M(l,o[u],r[u]):o[u]=r[u];break;default:M(l,o,r)}else l[t]=r}}),l}function C(e){return 0===e.button}var O,P={};for(O in l.createEvent("CustomEvent"))P[O]=1;function A(e,t){var n,r,o,i,a=Object.getOwnPropertyDescriptor(e,"target");for(n in t)P[n]||(r=n,o=e,i=t,a?o[r]=i[r]:Object.defineProperty(o,r,{writable:!0,enumerable:!0,value:i[r]}));e.baseEvent=t}function N(e,t,n,r,o){i[o].call(e,n,t&&t.boolean?"":r)}function I(e,t,n,r,o){if(t&&(t.property||t.selector))for(var i=t.property?[e.xtag[t.property]]:t.selector?x.query(e,t.selector):[],a=i.length;a--;)i[a][o](n,r)}function H(e,t){e.prototype[t]={};var n,r,o,i=e.accessors[t],a=i.attribute;for(r in a&&(n=a.name=(a?a.name||t.replace(c,"$1-$2"):t).toLowerCase(),a.key=t,e.attributes[n]=a),i)!function(e,t,r,o,i,a){var n=r.split(":"),s=n[0];"get"==s?(n[0]=t,e.prototype[t].get=x.applyPseudos(n.join(":"),o[r],e.pseudos,o[r])):"set"==s?(n[0]=t,e.prototype[t].set=x.applyPseudos(n.join(":"),i?function(e){var t,n="setAttribute";i.boolean?(e=!!e,t=this.hasAttribute(a),e||(n="removeAttribute")):(e=i.validate?i.validate.call(this,e):e,t=this.getAttribute(a)),N(this,i,a,e,n),o[r].call(this,e,t),I(this,i,a,e,n)}:o[r]?function(e){o[r].call(this,e)}:null,e.pseudos,o[r]),i&&(i.setter=o[r])):e.prototype[t][r]=o[r]}(e,t,r,i,a,n);a&&(e.prototype[t].get||(o=(a.boolean?"has":"get")+"Attribute",e.prototype[t].get=function(){return this[o](n)}),e.prototype[t].set||(e.prototype[t].set=function(e){e=a.boolean?!!e:a.validate?a.validate.call(this,e):e;var t=!a.boolean||e?"setAttribute":"removeAttribute";N(this,a,n,e,t),I(this,a,n,e,t)}))}var j=/\/\*!?(?:\@preserve)?[ \t]*(?:\r\n|\n)([\s\S]*?)(?:\r\n|\n)\s*\*\//;function D(e){return"function"==typeof e?j.exec(e.toString())[1]:e}var k,R,x={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(),x.tags[e]=t||{};var n,r=t.prototype,a=(delete t.prototype,x.tags[e].compiled=S(x.merge({},x.defaultOptions,t)));for(n in a.events)a.events[n]=x.parseEvent(n,a.events[n]);for(n in a.lifecycle)a.lifecycle[n.split(":")[0]]=x.applyPseudos(n,a.lifecycle[n],a.pseudos,a.lifecycle[n]);for(n in a.methods)a.prototype[n.split(":")[0]]={value:x.applyPseudos(n,a.methods[n],a.pseudos,a.methods[n]),enumerable:!0};for(n in a.accessors)H(a,n);a.shadow&&(a.shadow=a.shadow.nodeName?a.shadow:x.createFragment(a.shadow)),a.content&&(a.content=a.content.nodeName?a.content.innerHTML:D(a.content));var s=a.lifecycle.created,c=a.lifecycle.finalized,o=(a.prototype.createdCallback={enumerable:!0,value:function(){var e,t=this,n=(a.shadow&&d&&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 x.addEvents(this,a.events),a.attributes){var r=a.attributes[e],o=this.hasAttribute(e),i=void 0!==r.def;(o||r.boolean||i)&&(this[r.key]=r.boolean?o:!o&&i?r.def:this.getAttribute(e))}return a.pseudos.forEach(function(e){e.onAdd.call(t,e)}),this.xtagComponentReady=!0,c&&c.apply(this,arguments),n}},a.lifecycle.inserted),i=a.lifecycle.removed,t=((o||i)&&(a.prototype.attachedCallback={value:function(){if(i&&(this.xtag.__parentNode__=this.parentNode),o)return o.apply(this,arguments)},enumerable:!0}),i&&(a.prototype.detachedCallback={value:function(){var e=E(arguments),e=(e.unshift(this.xtag.__parentNode__),i.apply(this,e));return delete this.xtag.__parentNode__,e},enumerable:!0}),a.lifecycle.attributeChanged&&(a.prototype.attributeChangedCallback={value:a.lifecycle.attributeChanged,enumerable:!0}),a.prototype.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),N(this,r,e,t,"setAttribute"),r&&(r.setter&&r.setter.call(this,!!r.boolean||t,n),I(this,r,e,t,"setAttribute"))}},a.prototype.removeAttribute={writable:!0,enumerable:!0,value:function(e){var e=e.toLowerCase(),t=a.attributes[e],n=this.hasAttribute(e);N(this,t,e,"","removeAttribute"),t&&(t.setter&&t.setter.call(this,!t.boolean&&void 0,n),I(this,t,e,"","removeAttribute"))}},r||(a.extends?Object.create(l.createElement(a.extends).constructor):u.HTMLElement).prototype),r={prototype:Object.create(t,a.prototype)};return a.extends&&(r.extends=a.extends),l.registerElement(e,r)},mixins:{},prefix:f,captureEvents:{focus:1,blur:1,scroll:1,DOMMouseScroll:1},customEvents:{animationstart:{attach:[f.dom+"AnimationStart"]},animationend:{attach:[f.dom+"AnimationEnd"]},transitionend:{attach:[f.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:C},tapend:{attach:["pointerup"],condition:C},tapmove:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)t.moveListener||(t.moveListener=x.addEvent(this,"pointermove",t.listener));else{if("pointerup"!=e.type)return!0;x.removeEvent(this,t.moveListener),t.moveListener=null}}},taphold:{attach:["pointerdown","pointerup"],condition:function(e,t){if("pointerdown"==e.type)(t.pointers=t.pointers||{})[e.pointerId]=setTimeout(x.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:t,keyfail:t,delegate:{action:function(e,t){for(var n,r=t.target,o=t.currentTarget;!n&&r&&r!=o;)r.tagName&&m.call(r,e.value)&&(n=r),r=r.parentNode;return(n=!n&&o.tagName&&m.call(o,e.value)?o:n)?e.listener=e.listener.bind(n):null}},preventable:{action:function(e,t){return!t.defaultPrevented}},duration:{onAdd:function(e){e.source.duration=Number(e.value)}},capture:{onCompiled:function(e,t){t.source&&(t.source.capture=!0)}}},clone:w,typeOf:g,toArray:E,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"==g(t))return T(e,t,n);for(var r=1,o=arguments.length;r<o;r++){var i,a=arguments[r];for(i in a)T(e,i,a[i])}return e},uid:function(){return Math.random().toString(36).substr(2,10)},query:function(e,t){return(t||"").length?E(e.querySelectorAll(t)):[]},skipTransition:function(e,t,n){var r=f.js+"TransitionProperty",o=(e.style[r]=e.style.transitionProperty="none",t?t.call(n||e):null);return x.skipFrame(function(){e.style[r]=e.style.transitionProperty="",o&&o.call(n||e)})},requestFrame:(R=u.requestAnimationFrame||u[f.lowercase+"RequestAnimationFrame"]||function(e){return u.setTimeout(e,20)},function(e){return R(e)}),cancelFrame:(k=u.cancelAnimationFrame||u[f.lowercase+"CancelAnimationFrame"]||u.clearTimeout,function(e){return k(e)}),skipFrame:function(e){var t=x.requestFrame(function(){t=x.requestFrame(e)});return t},matchSelector:function(e,t){return m.call(e,t)},set:function(e,t,n){e[t]=n,window.CustomElements&&CustomElements.upgradeAll(e)},innerHTML:function(e,t){x.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 x[x.hasClass(e,t)?"removeClass":"addClass"].call(null,e,t)},queryChildren:function(e,t){var n=e.id,r="#"+(e.id=n||"x_"+x.uid())+" > ",o=e.parentNode||!a.appendChild(e),r=(t=r+(t+"").replace(s,","+r),e.parentNode.querySelectorAll(t));return n||e.removeAttribute("id"),o||a.removeChild(e),E(r)},createFragment:function(e){var t=document.createElement("template");return e&&(e.nodeName?E(arguments).forEach(function(e){t.content.appendChild(e)}):t.innerHTML=D(e)),document.importNode(t.content,!0)},manipulate:function(e,t){var n=e.nextSibling,r=e.parentNode,t=t.call(e)||e;n?r.insertBefore(t,n):r.appendChild(t)},applyPseudos:function(o,i,a,s){var e,c=i,u={};if(o.match(":"))for(var l=[],t=0,d=(o.replace(n,function(e){return"("==e?1==++t?"❪":"(":--t?")":"❫"}).replace(r,function(e,t,n,r){l.push([t||r,n])}),l.length);d--;)!function(){var e=l[d][0],t=l[d][1];if(!x.pseudos[e])throw"pseudo not found: "+e+" "+t;var t=""===t||void 0===t?null:t,n=u[d]=Object.create(x.pseudos[e]),r=(n.key=o,n.name=e,n.value=t,n.arguments=(t||"").split(","),n.action=n.action||p,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(E(arguments)));return null!==e&&!1!==e&&(e=n.listener.apply(this,arguments),n.listener=r),e},a?a.push(n):n.onAdd.call(i,n)}();for(e in u)u[e].onCompiled&&(c=u[e].onCompiled(c,u[e])||c);return c},removePseudos:function(t,e){e.forEach(function(e){e.onRemove.call(t,e)})},parseEvent:function(e,t){var e=e.split(":"),r=e.shift(),n=x.customEvents[r],o=x.merge({type:r,stack:h,condition:p,capture:x.captureEvents[r],attach:[],_attach:[],pseudos:"",_pseudos:[],onAdd:h,onRemove:h},n||{}),i=(o.attach=E(o.base||o.attach),o.chain=r+(o.pseudos.length?":"+o.pseudos:"")+(e.length?":"+e.join(":"):""),x.applyPseudos(o.chain,t,o._pseudos,o));return o.stack=function(e){e.currentTarget=e.currentTarget||this;var t=e.detail||{};return t.__stack__?t.__stack__==i?(e.stopPropagation(),e.cancelBubble=!0,i.apply(this,arguments)):void 0:i.apply(this,arguments)},o.listener=function(e){var t=E(arguments),n=o.condition.apply(this,t.concat([o]));return n&&(e.type!=r&&e.baseEvent&&e.type!=e.baseEvent.type?void x.fireEvent(e.target,r,{baseEvent:e,detail:!0!==n&&(n.__stack__=i)?n:{__stack__:i}}):o.stack.apply(this,t))},o.attach.forEach(function(e){o._attach.push(x.parseEvent(e,o.listener))}),o},addEvent:function(t,e,n,r){e="function"==typeof n?x.parseEvent(e,n):n;return e._pseudos.forEach(function(e){e.onAdd.call(t,e)}),e._attach.forEach(function(e){x.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]=x.addEvent(e,n,t[n]);return r},removeEvent:function(t,e,n){(n=n||e).onRemove.call(t,n,n.listener),x.removePseudos(t,n._pseudos),n._attach.forEach(function(e){x.removeEvent(t,e)}),t.removeEventListener(n.type,n.stack)},removeEvents:function(e,t){for(var n in t)x.removeEvent(e,t[n])},fireEvent:function(e,t,n){var r=l.createEvent("CustomEvent");r.initCustomEvent(t,!1!==(n=n||{}).bubbles,!1!==n.cancelable,n.detail),n.baseEvent&&A(r,n.baseEvent),e.dispatchEvent(r)}};"function"==typeof define&&define.amd?define(x):"undefined"!=typeof module&&module.exports?module.exports=x:u.xtag=x,l.addEventListener("WebComponentsReady",function(){x.fireEvent(l.body,"DOMComponentsLoaded")})}();