diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 594abb81c..f9cfd4072 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,6 +2,21 @@ FROM python:3.7 WORKDIR /workspace +# install Node/Yarn for Frontent +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + git \ + apt-utils \ + apt-transport-https \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update && apt-get install -y --no-install-recommends \ + nodejs \ + yarn \ + && curl -o - https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \ + && rm -rf /var/lib/apt/lists/* +ENV NVM_DIR /root/.nvm + # Install Python dependencies from requirements.txt if it exists COPY requirements.txt requirements_tests.txt /workspace/ RUN pip install -r requirements.txt \ diff --git a/.dockerignore b/.dockerignore index c47f5f91e..262de6b84 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,13 +1,20 @@ # General files .git .github +.devcontainer +.vscode # Test related files .tox # Temporary files **/__pycache__ +.pytest_cache # virtualenv venv/ -ENV/ + +# HA +home-assistant-polymer/* +misc/* +script/* diff --git a/.gitignore b/.gitignore index 41395a7ea..74453f62e 100644 --- a/.gitignore +++ b/.gitignore @@ -92,4 +92,6 @@ ENV/ .pylint.d/ # VS Code -.vscode/ +.vscode/* +!.vscode/cSpell.json +!.vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..1cf011efd --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,19 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Update UI", + "type": "shell", + "command": "./script/update-frontend.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 79da6e6a8..671d5619e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ ARG BUILD_FROM FROM $BUILD_FROM -ARG BUILD_ARCH - # Install base RUN apk add --no-cache \ openssl \ @@ -15,21 +13,26 @@ RUN apk add --no-cache \ eudev \ eudev-libs +ARG BUILD_ARCH +WORKDIR /usr/src + # Install requirements -COPY requirements.txt /usr/src/ +COPY requirements.txt . RUN export MAKEFLAGS="-j$(nproc)" \ && pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links \ "https://wheels.home-assistant.io/alpine-$(cut -d '.' -f 1-2 < /etc/alpine-release)/${BUILD_ARCH}/" \ - -r /usr/src/requirements.txt \ - && rm -f /usr/src/requirements.txt + -r ./requirements.txt \ + && rm -f requirements.txt # Install HassIO -COPY . /usr/src/hassio -RUN pip3 install --no-cache-dir -e /usr/src/hassio \ - && python3 -m compileall /usr/src/hassio/hassio +COPY . hassio +RUN pip3 install --no-cache-dir -e ./hassio \ + && python3 -m compileall ./hassio/hassio + # Initialize udev daemon, handle CMD COPY entry.sh /bin/ ENTRYPOINT ["/bin/entry.sh"] +WORKDIR / CMD [ "python3", "-m", "hassio" ] diff --git a/hassio/api/panel/chunk.04bcaa18b59728e10be9.js b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js new file mode 100644 index 000000000..f9494f74b --- /dev/null +++ b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{136:function(C,H,V){"use strict";V.r(H);var L=document.createElement("template");L.setAttribute("style","display: none;"),L.innerHTML='',document.head.appendChild(L.content)}}]); +//# sourceMappingURL=chunk.04bcaa18b59728e10be9.js.map \ No newline at end of file diff --git a/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.gz b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.gz new file mode 100644 index 000000000..1a13c167a Binary files /dev/null and b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.gz differ diff --git a/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.map b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.map new file mode 100644 index 000000000..2aa6ffb35 --- /dev/null +++ b/hassio/api/panel/chunk.04bcaa18b59728e10be9.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///../build/mdi.html","webpack:///../src/resources/mdi-icons.js"],"names":["documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","content"],"mappings":"kGAAe,ICETA,EAAoBC,SAASC,cAAc,YACjDF,EAAkBG,aAAa,QAAS,kBACxCH,EAAkBI,UDJH,ooizCCKfH,SAASI,KAAKC,YAAYN,EAAkBO","file":"chunk.04bcaa18b59728e10be9.js","sourcesContent":["export default \"\";","import iconSetContent from \"../../build/mdi.html\";\n\nconst documentContainer = document.createElement(\"template\");\ndocumentContainer.setAttribute(\"style\", \"display: none;\");\ndocumentContainer.innerHTML = iconSetContent;\ndocument.head.appendChild(documentContainer.content);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js b/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js deleted file mode 100644 index 1536afa50..000000000 --- a/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{102:function(n,r,t){"use strict";t.r(r),t.d(r,"marked",function(){return a}),t.d(r,"filterXSS",function(){return c});var e=t(124),i=t.n(e),o=t(126),u=t.n(o),a=i.a,c=u.a}}]); \ No newline at end of file diff --git a/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js.gz b/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js.gz deleted file mode 100644 index d174aa4f6..000000000 Binary files a/hassio/api/panel/chunk.0f38aa06224ef471d7a4.js.gz and /dev/null differ diff --git a/hassio/api/panel/chunk.320d5a8af6741fdbfaaf.js b/hassio/api/panel/chunk.320d5a8af6741fdbfaaf.js deleted file mode 100644 index ce8ed7d2a..000000000 --- a/hassio/api/panel/chunk.320d5a8af6741fdbfaaf.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{103:function(e,t,n){var r=n(73).FilterCSS,i=n(73).getDefaultWhiteList,o=n(74);function s(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var a=new r;function l(e){return e.replace(c,"<").replace(u,">")}var c=//g,p=/"/g,h=/"/g,g=/&#([a-zA-Z0-9]*);?/gim,f=/:?/gim,d=/&newline;?/gim,m=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,b=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x=/u\s*r\s*l\s*\(.*/gi;function k(e){return e.replace(p,""")}function y(e){return e.replace(h,'"')}function w(e){return e.replace(g,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function v(e){return e.replace(f,":").replace(d," ")}function _(e){for(var t="",n=0,r=e.length;n/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},t.getDefaultWhiteList=s,t.onTag=function(e,t,n){},t.onIgnoreTag=function(e,t,n){},t.onTagAttr=function(e,t,n){},t.onIgnoreTagAttr=function(e,t,n){},t.safeAttrValue=function(e,t,n,r){if(n=A(n),"href"===t||"src"===t){if("#"===(n=o.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(m.lastIndex=0,m.test(n))return""}else if("style"===t){if(b.lastIndex=0,b.test(n))return"";if(x.lastIndex=0,x.test(n)&&(m.lastIndex=0,m.test(n)))return"";!1!==r&&(n=(r=r||a).process(n))}return n=S(n)},t.escapeHtml=l,t.escapeQuote=k,t.unescapeQuote=y,t.escapeHtmlEntities=w,t.escapeDangerHtml5Entities=v,t.clearNonPrintableCharacter=_,t.friendlyAttrValue=A,t.escapeAttrValue=S,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var n=!Array.isArray(e),r=[],i=!1;return{onIgnoreTag:function(s,a,l){if(function(t){return!!n||-1!==o.indexOf(e,t)}(s)){if(l.isClosing){var c="[/removed]",u=l.position+c.length;return r.push([!1!==i?i:l.position,u]),i=!1,c}return i||(i=l.position),"[removed]"}return t(s,a,l)},remove:function(e){var t="",n=0;return o.forEach(r,function(r){t+=e.slice(n,r[0]),n=r[1]}),t+=e.slice(n)}}},t.stripCommentTag=function(e){return e.replace($,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter(function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)})).join("")},t.cssFilter=a,t.getDefaultCSSWhiteList=i},104:function(e,t){function n(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var r=/javascript\s*\:/gim;t.whiteList=n(),t.getDefaultWhiteList=n,t.onAttr=function(e,t,n){},t.onIgnoreAttr=function(e,t,n){},t.safeAttrValue=function(e,t){return r.test(t)?"":t}},105:function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,n){var r="",s=0,a=!1,l=!1,c=0,u=e.length,p="",h="";for(c=0;c"===g){r+=n(e.slice(s,a)),p=i(h=e.slice(a,c+1)),r+=t(a,r.length,p,h,o(h)),s=c+1,a=!1;continue}if(('"'===g||"'"===g)&&"="===e.charAt(c-1)){l=g;continue}}else if(g===l){l=!1;continue}}return s ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:y,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||S.defaults,this.rules=s.normal,this.options.pedantic?this.rules=s.pedantic:this.options.gfm&&(this.options.tables?this.rules=s.tables:this.rules=s.gfm)}s._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,s._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,s.def=m(s.def).replace("label",s._label).replace("title",s._title).getRegex(),s.bullet=/(?:[*+-]|\d{1,9}\.)/,s.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,s.item=m(s.item,"gm").replace(/bull/g,s.bullet).getRegex(),s.list=m(s.list).replace(/bull/g,s.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+s.def.source+")").getRegex(),s._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",s._comment=//,s.html=m(s.html,"i").replace("comment",s._comment).replace("tag",s._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),s.paragraph=m(s.paragraph).replace("hr",s.hr).replace("heading",s.heading).replace("lheading",s.lheading).replace("tag",s._tag).getRegex(),s.blockquote=m(s.blockquote).replace("paragraph",s.paragraph).getRegex(),s.normal=w({},s),s.gfm=w({},s.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),s.gfm.paragraph=m(s.paragraph).replace("(?!","(?!"+s.gfm.fences.source.replace("\\1","\\2")+"|"+s.list.source.replace("\\1","\\3")+"|").getRegex(),s.tables=w({},s.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),s.pedantic=w({},s.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",s._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),a.rules=s,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,i,o,a,l,c,u,p,h,g,f,d,m,b,x;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:_(i,"\n")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2]?i[2].trim():i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))&&(l={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(i[0].length),g=0;g ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),c={type:"list_start",ordered:m=(o=i[2]).length>1,start:m?+o:"",loose:!1},this.tokens.push(c),u=[],n=!1,d=(i=i[0].match(this.rules.item)).length,g=0;g1?1===a.length:a.length>1||this.options.smartLists&&a!==o)&&(e=i.slice(g+1).join("\n")+e,g=d-1)),r=n||/\n\n(?!\s*$)/.test(l),g!==d-1&&(n="\n"===l.charAt(l.length-1),r||(r=n)),r&&(c.loose=!0),x=void 0,(b=/^\[[ xX]\] /.test(l))&&(x=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),p={type:"list_item_start",task:b,checked:x,loose:r},u.push(p),this.tokens.push(p),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(c.loose)for(d=u.length,g=0;g?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:y,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:y,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\\[^_{|}~",l.em=m(l.em).replace(/punctuation/g,l._punctuation).getRegex(),l._escapes=/\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/g,l._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,l._email=/[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,l.autolink=m(l.autolink).replace("scheme",l._scheme).replace("email",l._email).getRegex(),l._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,l.tag=m(l.tag).replace("comment",s._comment).replace("attribute",l._attribute).getRegex(),l._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,l._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,l._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,l.link=m(l.link).replace("label",l._label).replace("href",l._href).replace("title",l._title).getRegex(),l.reflink=m(l.reflink).replace("label",l._label).getRegex(),l.normal=w({},l),l.pedantic=w({},l.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",l._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",l._label).getRegex()}),l.gfm=w({},l.normal,{escape:m(l.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:m(l.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),l.gfm.url=m(l.gfm.url,"i").replace("email",l.gfm._extended_email).getRegex(),l.breaks=w({},l.gfm,{br:m(l.br).replace("{2,}","*").getRegex(),text:m(l.gfm.text).replace("{2,}","*").getRegex()}),c.rules=l,c.output=function(e,t,n){return new c(t,n).output(e)},c.prototype.output=function(e){for(var t,n,r,i,o,s,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=f(o[1]);else if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.inRawBlock=!1),e=e.substring(o[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):f(o[0]):o[0];else if(o=this.rules.link.exec(e)){var l=A(o[2],"()");if(l>-1){var u=o[2].length-l;o[2]=o[2].substring(0,l),o[0]=o[0].substring(0,o[0].length-u)}e=e.substring(o[0].length),this.inLink=!0,r=o[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=o[3]?o[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(o,{href:c.escapes(r),title:c.escapes(i)}),this.inLink=!1}else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[6]||o[5]||o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(f(o[2].trim(),!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),r="@"===o[2]?"mailto:"+(n=f(this.mangle(o[1]))):n=f(o[1]),a+=this.renderer.link(r,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.inRawBlock?a+=this.renderer.text(o[0]):a+=this.renderer.text(f(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===o[2])r="mailto:"+(n=f(o[0]));else{do{s=o[0],o[0]=this.rules._backpedal.exec(o[0])[0]}while(s!==o[0]);n=f(o[0]),r="www."===o[1]?"http://"+n:n}e=e.substring(o[0].length),a+=this.renderer.link(r,null,n)}return a},c.escapes=function(e){return e?e.replace(c.rules._escapes,"$1"):e},c.prototype.outputLink=function(e,t){var n=t.href,r=t.title?f(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,f(e[1]))},c.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},c.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},u.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
'+(n?e:f(e,!0))+"
\n":"
"+(n?e:f(e,!0))+"
"},u.prototype.blockquote=function(e){return"
\n"+e+"
\n"},u.prototype.html=function(e){return e},u.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},u.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},u.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},u.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},u.prototype.checkbox=function(e){return" "},u.prototype.paragraph=function(e){return"

    "+e+"

    \n"},u.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},u.prototype.tablerow=function(e){return"\n"+e+"\n"},u.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},u.prototype.strong=function(e){return""+e+""},u.prototype.em=function(e){return""+e+""},u.prototype.codespan=function(e){return""+e+""},u.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},u.prototype.del=function(e){return""+e+""},u.prototype.link=function(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},u.prototype.image=function(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},u.prototype.text=function(e){return e},p.prototype.strong=p.prototype.em=p.prototype.codespan=p.prototype.del=p.prototype.text=function(e){return e},p.prototype.link=p.prototype.image=function(e,t,n){return""+n},p.prototype.br=function(){return""},h.parse=function(e,t){return new h(t).parse(e)},h.prototype.parse=function(e){this.inline=new c(e.links,this.options),this.inlineText=new c(e.links,w({},this.options,{renderer:new p})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},h.prototype.next=function(){return this.token=this.tokens.pop()},h.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},h.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},h.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},f.escapeTest=/[&<>"']/,f.escapeReplace=/[&<>"']/g,f.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},f.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,f.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var x={},k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(){}function w(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+f(c.message+"",!0)+"
    ";throw c}}y.exec=y,S.options=S.setOptions=function(e){return w(S.defaults,e),S},S.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new u,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},S.defaults=S.getDefaults(),S.Parser=h,S.parser=h.parse,S.Renderer=u,S.TextRenderer=p,S.Lexer=a,S.lexer=a.lex,S.InlineLexer=c,S.inlineLexer=c.output,S.Slugger=g,S.parse=S,"object"===o(t)?e.exports=S:void 0===(i=function(){return S}.call(t,n,t,e))||(e.exports=i)}(this||"undefined"!=typeof window&&window)}).call(this,n(125))},125:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},126:function(e,t,n){var r=n(103),i=n(106),o=n(129);function s(e,t){return new o(t).process(e)}for(var a in(t=e.exports=s).filterXSS=s,t.FilterXSS=o,r)t[a]=r[a];for(var a in i)t[a]=i[a];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},127:function(e,t,n){var r=n(104),i=n(128);n(105);function o(e){return null==e}function s(e){(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{})).whiteList=e.whiteList||r.whiteList,e.onAttr=e.onAttr||r.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||r.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,this.options=e}s.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,n=t.whiteList,r=t.onAttr,s=t.onIgnoreAttr,a=t.safeAttrValue;return i(e,function(e,t,i,l,c){var u=n[i],p=!1;if(!0===u?p=u:"function"==typeof u?p=u(l):u instanceof RegExp&&(p=u.test(l)),!0!==p&&(p=!1),l=a(i,l)){var h,g={position:t,sourcePosition:e,source:c,isWhite:p};return p?o(h=r(i,l,g))?i+":"+l:h:o(h=s(i,l,g))?void 0:h}})},e.exports=s},128:function(e,t,n){var r=n(105);e.exports=function(e,t){";"!==(e=r.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,i=!1,o=0,s=0,a="";function l(){if(!i){var n=r.trim(e.slice(o,s)),l=n.indexOf(":");if(-1!==l){var c=r.trim(n.slice(0,l)),u=r.trim(n.slice(l+1));if(c){var p=t(o,a.length,c,u,n);p&&(a+=p+"; ")}}}o=s+1}for(;s";var x=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=l.trim(e.slice(0,-1))),{html:e,closing:n}}(s),k=n[i],y=a(x.html,function(e,t){var n,r=-1!==l.indexOf(k,e);return c(n=u(i,e,t,r))?r?(t=h(i,e,t,f))?e+'="'+t+'"':e:c(n=p(i,e,t,r))?void 0:n:n});s="<"+i;return y&&(s+=" "+y),x.closing&&(s+=" /"),s+=">"}return c(m=o(i,s,b))?g(s):m},g);return d&&(m=d.remove(m)),m},e.exports=u},73:function(e,t,n){var r=n(104),i=n(127);for(var o in(t=e.exports=function(e,t){return new i(t).process(e)}).FilterCSS=i,r)t[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=e.exports)},74:function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n\n \n \n "]);return l=function(){return e},e}function u(){var e=f(["\n \n "]);return u=function(){return e},e}function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t,r=w(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function m(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function y(e){return e.decorators&&e.decorators.length}function v(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function b(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function w(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function g(e){if(Array.isArray(e))return e}function E(e,t,r){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!y(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s can only be templatized once");t.__templatizeOwner=e;var r=(e?e.constructor:N)._parseTemplate(t),o=r.templatizeInstanceClass;o||(o=M(t,r,n),r.templatizeInstanceClass=o),L(t,r,n);var i=function(t){function e(){return C(this,e),g(this,P(e).apply(this,arguments))}return k(e,o),e}();return i.prototype._methodHost=I(t),i.prototype.__dataHost=t,i.prototype.__templatizeOwner=e,i.prototype.__hostProps=r.hostProps,i=i}function z(t,e){for(var n;e;)if(n=e.__templatizeInstance){if(n.__dataHost==t)return n;e=n.__dataHost}else e=e.parentNode;return null}var B=n(84);function q(t){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Y(t,e){return!e||"object"!==q(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function V(t){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function U(t,e){for(var n=0;n child");n.disconnect(),e.render()});return void n.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(var r=this.root.firstChild;r;r=r.nextSibling)this.__children[this.__children.length]=r;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}]),e}();customElements.define("dom-bind",G);var W=n(9),K=n(27),Z=n(32),Q=n(45),tt=n(23);function et(t){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nt(t,e){return!e||"object"!==et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rt(t,e,n){return(rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ot(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function ot(t){return(ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function it(t,e){for(var n=0;n child");n.disconnect(),t.__render()});return n.observe(this,{childList:!0}),!1}var r={};r[this.as]=!0,r[this.indexAs]=!0,r[this.itemsIndexAs]=!0,this.__ctor=H(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:r,forwardHostProp:function(t,e){for(var n,r=this.__instances,o=0;o1&&void 0!==arguments[1]?arguments[1]:0;this.__renderDebouncer=K.a.debounce(this.__renderDebouncer,e>0?tt.c.after(e):tt.b,t.bind(this)),Object(Z.a)(this.__renderDebouncer)}},{key:"render",value:function(){this.__debounceRender(this.__render),Object(Z.b)()}},{key:"__render",value:function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())}},{key:"__applyFullRefresh",value:function(){for(var t=this,e=this.items||[],n=new Array(e.length),r=0;r=i;l--)this.__detachAndRemoveInstance(l)}},{key:"__detachInstance",value:function(t){for(var e=this.__instances[t],n=0;n child");r.disconnect(),t.__render()});return r.observe(this,{childList:!0}),!1}this.__ctor=H(n,this,{mutableData:!0,forwardHostProp:function(t,e){this.__instance&&(this.if?this.__instance.forwardHostProp(t,e):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Object(Q.g)(t)]=!0))}})}if(this.__instance){this.__syncHostProperties();var o=this.__instance.children;if(o&&o.length)if(this.previousSibling!==o[o.length-1])for(var i,a=0;a=o.index+o.removed.length?n.set(e,t+o.addedCount-o.removed.length):n.set(e,-1))});for(var i=0;i=0&&t.linkPaths("items."+n,"selected."+e++)})}else this.__selectedMap.forEach(function(e){t.linkPaths("selected","items."+e),t.linkPaths("selectedItem","items."+e)})}},{key:"clearSelection",value:function(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}},{key:"isSelected",value:function(t){return this.__selectedMap.has(t)}},{key:"isIndexSelected",value:function(t){return this.isSelected(this.items[t])}},{key:"__deselectChangedIdx",value:function(t){var e=this,n=this.__selectedIndexForItemIndex(t);if(n>=0){var r=0;this.__selectedMap.forEach(function(t,o){n==r++&&e.deselect(o)})}}},{key:"__selectedIndexForItemIndex",value:function(t){var e=this.__dataLinkedPaths["items."+t];if(e)return parseInt(e.slice("selected.".length),10)}},{key:"deselect",value:function(t){var e,n=this.__selectedMap.get(t);n>=0&&(this.__selectedMap.delete(t),this.multi&&(e=this.__selectedIndexForItemIndex(n)),this.__updateLinks(),this.multi?this.splice("selected",e,1):this.selected=this.selectedItem=null)}},{key:"deselectIndex",value:function(t){this.deselect(this.items[t])}},{key:"select",value:function(t){this.selectIndex(this.items.indexOf(t))}},{key:"selectIndex",value:function(t){var e=this.items[t];this.isSelected(e)?this.toggle&&this.deselectIndex(t):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(e,t),this.__updateLinks(),this.multi?this.push("selected",e):this.selected=this.selectedItem=e)}}]),n}()})(W.a),jt=function(t){function e(){return Ot(this,e),wt(this,Pt(e).apply(this,arguments))}return Ct(e,Tt),St(e,null,[{key:"is",get:function(){return"array-selector"}}]),e}();customElements.define(jt.is,jt);n(108);y._mutablePropertyChange;Boolean,n(4);n.d(e,"a",function(){return At});var At=Object(r.a)(HTMLElement).prototype},function(t,e,n){"use strict";n.d(e,"a",function(){return a});n(8);function r(t,e){for(var n=0;n1?n-1:0),a=1;a=0){if(!i[e])throw new Error("invalid async handle: "+t);i[e]=null}}}},,,,function(t,e,n){"use strict";n.d(e,"a",function(){return o});n(8),n(12),n(23);function r(t,e){for(var n=0;n-1}var v=!1;function m(t){if(!_(t)&&"touchend"!==t)return a&&v&&i.b?{passive:!0}:void 0}!function(){try{var t=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}();var b=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),g=[],O={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},w={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function P(t){var e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];var n=t.getRootNode();if(t.id)for(var r=n.querySelectorAll("label[for = ".concat(t.id,"]")),o=0;o-1;if(o[i]===E.mouse.target)return}if(r)return;t.preventDefault(),t.stopPropagation()}};function S(t){for(var e,n=b?["click"]:p,r=0;r0?e[0]:t.target}return t.target}function R(t){var e,n=t.type,r=t.currentTarget[s];if(r){var o=r[n];if(o){if(!t[u]&&(t[u]={},"touch"===n.slice(0,5))){var i=(t=t).changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(E.touch.id=i.identifier),E.touch.id!==i.identifier)return;a||"touchstart"!==n&&"touchmove"!==n||function(t){var e=t.changedTouches[0],n=t.type;if("touchstart"===n)E.touch.x=e.clientX,E.touch.y=e.clientY,E.touch.scrollDecided=!1;else if("touchmove"===n){if(E.touch.scrollDecided)return;E.touch.scrollDecided=!0;var r=function(t){var e="auto",n=t.composedPath&&t.composedPath();if(n)for(var r,o=0;oi:"pan-y"===r&&(o=i>a)),o?t.preventDefault():H("track")}}(t)}if(!(e=t[u]).skip){for(var l,f=0;f-1&&l.reset&&l.reset();for(var h,p=0;p=f||o>=f}function q(t,e,n){if(e){var r,o=t.moves[t.moves.length-2],i=t.moves[t.moves.length-1],a=i.x-t.x,s=i.y-t.y,u=0;o&&(r=i.x-o.x,u=i.y-o.y),F(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:a,dy:s,ddx:r,ddy:u,sourceEvent:n,hover:function(){return function(t,e){for(var n=document.elementFromPoint(t,e),r=n;r&&r.shadowRoot&&!window.ShadyDOM&&r!==(r=r.shadowRoot.elementFromPoint(t,e));)r&&(n=r);return n}(n.clientX,n.clientY)}})}}function Y(t,e,n){var r=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),i=N(n||e);!i||w[i.localName]&&i.hasAttribute("disabled")||(isNaN(r)||isNaN(o)||r<=l&&o<=l||function(t){if("click"===t.type){if(0===t.detail)return!0;var e=N(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;var n=e.getBoundingClientRect(),r=t.pageX,o=t.pageY;return!(r>=n.left&&r<=n.right&&o>=n.top&&o<=n.bottom)}return!1}(e))&&(t.prevent||F(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}L({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){j(this.info)},mousedown:function(t){if(C(t)){var e=N(t),n=this;T(this.info,function(t){C(t)||(z("up",e,t),j(n.info))},function(t){C(t)&&z("up",e,t),j(n.info)}),z("down",e,t)}},touchstart:function(t){z("down",N(t),t.changedTouches[0],t)},touchend:function(t){z("up",N(t),t.changedTouches[0],t)}}),L({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,j(this.info)},mousedown:function(t){if(C(t)){var e=N(t),n=this,r=function(t){var r=t.clientX,o=t.clientY;B(n.info,r,o)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&H("tap"),n.info.addMove({x:r,y:o}),C(t)||(n.info.state="end",j(n.info)),e&&q(n.info,e,t),n.info.started=!0)};T(this.info,r,function(t){n.info.started&&r(t),j(n.info)}),this.info.x=t.clientX,this.info.y=t.clientY}},touchstart:function(t){var e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){var e=N(t),n=t.changedTouches[0],r=n.clientX,o=n.clientY;B(this.info,r,o)&&("start"===this.info.state&&H("tap"),this.info.addMove({x:r,y:o}),q(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){var e=N(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),q(this.info,e,n))}}),L({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){C(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){C(t)&&Y(this.info,t)},touchstart:function(t){var e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Y(this.info,t.changedTouches[0],t)}});var V=N,U=I},,,,,,,,function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"g",function(){return o}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return a}),n.d(e,"i",function(){return s}),n.d(e,"e",function(){return u}),n.d(e,"f",function(){return c}),n.d(e,"a",function(){return f}),n.d(e,"h",function(){return h});n(8);function r(t){return t.indexOf(".")>=0}function o(t){var e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function i(t,e){return 0===t.indexOf(e+".")}function a(t,e){return 0===e.indexOf(t+".")}function s(t,e,n){return e+n.slice(t.length)}function u(t,e){return t===e||i(t,e)||a(t,e)}function c(t){if(Array.isArray(t)){for(var e=[],n=0;n1){for(var a=0;a=0;o--){var i=e[o];i?Array.isArray(i)?t(i,n):n.indexOf(i)<0&&(!r||r.indexOf(i)<0)&&n.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return n}(t,null,n),e),n&&(t=n.concat(t)),e.prototype.behaviors=t,e}function h(t,e){var n=function(n){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),a(this,u(r).apply(this,arguments))}var o,l,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(r,e),o=r,f=[{key:"properties",get:function(){return t.properties}},{key:"observers",get:function(){return t.observers}}],(l=[{key:"created",value:function(){s(u(r.prototype),"created",this).call(this),t.created&&t.created.call(this)}},{key:"_registered",value:function(){s(u(r.prototype),"_registered",this).call(this),t.beforeRegister&&t.beforeRegister.call(Object.getPrototypeOf(this)),t.registered&&t.registered.call(Object.getPrototypeOf(this))}},{key:"_applyListeners",value:function(){if(s(u(r.prototype),"_applyListeners",this).call(this),t.listeners)for(var e in t.listeners)this._addMethodEventListenerToNode(this,e,t.listeners[e])}},{key:"_ensureAttributes",value:function(){if(t.hostAttributes)for(var e in t.hostAttributes)this._ensureAttribute(e,t.hostAttributes[e]);s(u(r.prototype),"_ensureAttributes",this).call(this)}},{key:"ready",value:function(){s(u(r.prototype),"ready",this).call(this),t.ready&&t.ready.call(this)}},{key:"attached",value:function(){s(u(r.prototype),"attached",this).call(this),t.attached&&t.attached.call(this)}},{key:"detached",value:function(){s(u(r.prototype),"detached",this).call(this),t.detached&&t.detached.call(this)}},{key:"attributeChanged",value:function(e,n,o){s(u(r.prototype),"attributeChanged",this).call(this,e,n,o),t.attributeChanged&&t.attributeChanged.call(this,e,n,o)}}])&&i(o.prototype,l),f&&i(o,f),r}();for(var r in n.generatedFrom=t,t)if(!(r in l)){var o=Object.getOwnPropertyDescriptor(t,r);o&&Object.defineProperty(n.prototype,r,o)}return n}var p=function(t,e){t||console.warn("Polymer's Class function requires `info` argument");var n=t.behaviors?f(t.behaviors,HTMLElement):Object(r.a)(HTMLElement),o=h(t,e?e(n):n);return o.is=t.is,o}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});n(3);var r=n(5);function o(t,e){for(var n=0;nl.source.length&&"property"==c.kind&&!c.isCompound&&u.__isPropertyEffectsClient&&u.__dataHasAccessor&&u.__dataHasAccessor[c.target]){var f=n[e];e=Object(o.i)(l.source,c.target,e),u._setPendingPropertyOrPath(e,f,!1,!0)&&t._enqueueClient(u)}else{!function(t,e,n,r,o){o=function(t,e,n,r){if(n.isCompound){var o=t.__dataCompoundStorage[n.target];o[r.compoundIndex]=e,e=o.join("")}return"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,n,r),b.d&&(o=Object(b.d)(o,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,o,n.target);else{var i=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[j.READ_ONLY]&&e[j.READ_ONLY][i]||e._setPendingProperty(i,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,o)}}(t,u,c,l,i.evaluator._evaluateBinding(t,l,e,n,r,a))}}function V(t,e){if(e.isCompound){for(var n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,o=new Array(r.length),i=0;i="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=Object(o.g)(e),n.structured=Object(o.d)(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function Q(t,e,n,r){var o=n+".splices";t.notifyPath(o,{indexSplices:r}),t.notifyPath(n+".length",e.length),t.__data[o]={indexSplices:null}}function tt(t,e,n,r,o,i){Q(t,e,n,[{index:r,addedCount:o,removed:i,object:e,type:"splice"}])}var et=Object(r.a)(function(t){var e=m(Object(a.a)(t)),n=function(t){function n(){var t;return g(this,n),(t=P(this,S(n).call(this))).__isPropertyEffectsClient=!0,t.__dataCounter=0,t.__dataClientsReady,t.__dataPendingClients,t.__dataToNotify,t.__dataLinkedPaths,t.__dataHasPaths,t.__dataCompoundStorage,t.__dataHost,t.__dataTemp,t.__dataClientsInitialized,t.__data,t.__dataPending,t.__dataOld,t.__computeEffects,t.__reflectEffects,t.__notifyEffects,t.__propagateEffects,t.__observeEffects,t.__readOnly,t.__templateInfo,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(n,e),w(n,[{key:"_initializeProperties",value:function(){k(S(n.prototype),"_initializeProperties",this).call(this),nt.registerHost(this),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}},{key:"_initializeProtoProperties",value:function(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}},{key:"_initializeInstanceProperties",value:function(t){var e=this[j.READ_ONLY];for(var n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}},{key:"_addPropertyEffect",value:function(t,e,n){this._createPropertyAccessor(t,e==j.READ_ONLY);var r=x(this,e)[t];r||(r=this[e][t]=[]),r.push(n)}},{key:"_removePropertyEffect",value:function(t,e,n){var r=x(this,e)[t],o=r.indexOf(n);o>=0&&r.splice(o,1)}},{key:"_hasPropertyEffect",value:function(t,e){var n=this[e];return Boolean(n&&n[t])}},{key:"_hasReadOnlyEffect",value:function(t){return this._hasPropertyEffect(t,j.READ_ONLY)}},{key:"_hasNotifyEffect",value:function(t){return this._hasPropertyEffect(t,j.NOTIFY)}},{key:"_hasReflectEffect",value:function(t){return this._hasPropertyEffect(t,j.REFLECT)}},{key:"_hasComputedEffect",value:function(t){return this._hasPropertyEffect(t,j.COMPUTE)}},{key:"_setPendingPropertyOrPath",value:function(t,e,r,i){if(i||Object(o.g)(Array.isArray(t)?t[0]:t)!==t){if(!i){var a=Object(o.a)(this,t);if(!(t=Object(o.h)(this,t,e))||!k(S(n.prototype),"_shouldPropertyChange",this).call(this,t,e,a))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,r))return function(t,e,n){var r,i=t.__dataLinkedPaths;if(i)for(var a in i){var s=i[a];Object(o.c)(a,e)?(r=Object(o.i)(a,s,e),t._setPendingPropertyOrPath(r,n,!0,!0)):Object(o.c)(s,e)&&(r=Object(o.i)(s,a,e),t._setPendingPropertyOrPath(r,n,!0,!0))}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,r);this[t]=e}return!1}},{key:"_setUnmanagedPropertyToNode",value:function(t,e,n){n===t[e]&&"object"!=E(n)||(t[e]=n)}},{key:"_setPendingProperty",value:function(t,e,n){var r=this.__dataHasPaths&&Object(o.d)(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[j.NOTIFY]&&this[j.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}},{key:"_setProperty",value:function(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}},{key:"_invalidateProperties",value:function(){this.__dataReady&&this._flushProperties()}},{key:"_enqueueClient",value:function(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}},{key:"_flushProperties",value:function(){this.__dataCounter++,k(S(n.prototype),"_flushProperties",this).call(this),this.__dataCounter--}},{key:"_flushClients",value:function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}},{key:"__enableOrFlushClients",value:function(){var t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(var e=0;e1?i-1:0),s=1;s3?r-3:0),a=3;a1?r-1:0),a=1;ao&&r.push({literal:t.slice(o,n.index)});var i=n[1][0],a=Boolean(n[2]),s=n[3].trim(),u=!1,c="",l=-1;"{"==i&&(l=s.indexOf("::"))>0&&(c=s.substring(l+2),s=s.substring(0,l),u=!0);var f=K(s),h=[];if(f){for(var p=f.args,d=f.methodName,y=0;y0||n>0;)if(0!=e)if(0!=n){var c=t[e-1][n-1],l=t[e-1][n],f=t[e][n-1],h=void 0;(h=l2&&void 0!==arguments[2]?arguments[2]:"",r="";if(t.cssText||t.rules){var o=t.rules;if(o&&!function(t){var e=t[0];return Boolean(e)&&Boolean(e.selector)&&0===e.selector.indexOf(f)}(o))for(var i,s=0,h=o.length;s1&&void 0!==arguments[1]?arguments[1]:"",n=g(t);return this.transformRules(n,e),t.textContent=b(n),n}},{key:"transformCustomStyle",value:function(t){var e=this,n=g(t);return O(n,function(t){":root"===t.selector&&(t.selector="html"),e.transformRule(t)}),t.textContent=b(n),n}},{key:"transformRules",value:function(t,e){var n=this;this._currentElement=e,O(t,function(t){n.transformRule(t)}),this._currentElement=null}},{key:"transformRule",value:function(t){t.cssText=this.transformCssText(t.parsedCssText,t),":root"===t.selector&&(t.selector=":host > *")}},{key:"transformCssText",value:function(t,e){var n=this;return t=t.replace(d.c,function(t,r,o,i){return n._produceCssProperties(t,r,o,i,e)}),this._consumeCssProperties(t,e)}},{key:"_getInitialValueForProperty",value:function(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}},{key:"_fallbacksFromPreviousRules",value:function(t){for(var e=this,n=t;n.parent;)n=n.parent;var r={},o=!1;return O(n,function(n){(o=o||n===t)||n.selector===t.selector&&Object.assign(r,e._cssTextToMap(n.parsedCssText))}),r}},{key:"_consumeCssProperties",value:function(t,e){for(var n=null;n=d.b.exec(t);){var r=n[0],o=n[1],i=n.index,a=i+r.indexOf("@apply"),s=i+r.length,u=t.slice(0,a),c=t.slice(s),l=e?this._fallbacksFromPreviousRules(e):{};Object.assign(l,this._cssTextToMap(u));var f=this._atApplyToCssProperties(o,l);t="".concat(u).concat(f).concat(c),d.b.lastIndex=i+f.length}return t}},{key:"_atApplyToCssProperties",value:function(t,e){t=t.replace(A,"");var n=[],r=this._map.get(t);if(r||(this._map.set(t,{}),r=this._map.get(t)),r){var o,i,a;this._currentElement&&(r.dependants[this._currentElement]=!0);var s=r.properties;for(o in s)i=[o,": var(",t,"_-_",o],(a=e&&e[o])&&i.push(",",a.replace(N,"")),i.push(")"),N.test(s[o])&&i.push(" !important"),n.push(i.join(""))}return n.join("; ")}},{key:"_replaceInitialOrInherit",value:function(t,e){var n=x.exec(e);return n&&(e=n[1]?this._getInitialValueForProperty(t):"apply-shim-inherit"),e}},{key:"_cssTextToMap",value:function(t){for(var e,n,r,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=t.split(";"),s={},u=0;u1&&(e=o[0].trim(),n=o.slice(1).join(":"),i&&(n=this._replaceInitialOrInherit(e,n)),s[e]=n);return s}},{key:"_invalidateMixinEntry",value:function(t){if(I)for(var e in t.dependants)e!==this._currentElement&&I(e)}},{key:"_produceCssProperties",value:function(t,e,n,r,o){var i=this;if(n&&function t(e,n){var r=e.indexOf("var(");if(-1===r)return n(e,"","","");var o=w(e,r+3),i=e.substring(r+4,o),a=e.substring(0,r),s=t(e.substring(o+1),n),u=i.indexOf(",");return-1===u?n(a,i.trim(),"",s):n(a,i.substring(0,u).trim(),i.substring(u+1).trim(),s)}(n,function(t,e){e&&i._map.get(e)&&(r="@apply ".concat(e,";"))}),!r)return t;var a=this._consumeCssProperties(""+r,o),s=t.slice(0,t.indexOf("--")),u=this._cssTextToMap(a,!0),c=u,l=this._map.get(e),f=l&&l.properties;f?c=Object.assign(Object.create(f),u):this._map.set(e,c);var h,p,d=[],y=!1;for(h in c)void 0===(p=u[h])&&(p="initial"),!f||h in f||(y=!0),d.push("".concat(e).concat("_-_").concat(h,": ").concat(p));return y&&this._invalidateMixinEntry(l),l&&(l.properties=c),n&&(s="".concat(t,";").concat(s)),"".concat(s).concat(d.join("; "),";")}}]),t}();M.prototype.detectMixin=M.prototype.detectMixin,M.prototype.transformStyle=M.prototype.transformStyle,M.prototype.transformCustomStyle=M.prototype.transformCustomStyle,M.prototype.transformRules=M.prototype.transformRules,M.prototype.transformRule=M.prototype.transformRule,M.prototype.transformTemplate=M.prototype.transformTemplate,M.prototype._separator="_-_",Object.defineProperty(M.prototype,"invalidCallback",{get:function(){return I},set:function(t){I=t}});var L=M,D={},F="_applyShimCurrentVersion",H="_applyShimNextVersion",z="_applyShimValidatingVersion",B=Promise.resolve();function q(t){var e=D[t];e&&function(t){t[F]=t[F]||0,t[z]=t[z]||0,t[H]=(t[H]||0)+1}(e)}function Y(t){return t[F]===t[H]}function V(t){return!Y(t)&&t[z]===t[H]}function U(t){t[z]=t[H],t._validating||(t._validating=!0,B.then(function(){t[F]=t[H],t._validating=!1}))}n(109);function $(t,e){for(var n=0;n-1?n=e:(r=e,n=t.getAttribute&&t.getAttribute("is")||""):(n=t.is,r=t.extends),{is:n,typeExtension:r}}(t).is,n=D[e];if((!n||!S(n))&&n&&!Y(n)){V(n)||(this.prepareTemplate(n,e),U(n));var r=t.shadowRoot;if(r){var o=r.querySelector("style");o&&(o.__cssRules=n._styleAst,o.textContent=b(n._styleAst))}}}},{key:"styleDocument",value:function(t){this.ensure(),this.styleSubtree(document.body,t)}}])&&$(e.prototype,n),r&&$(e,r),t}();if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var G=new X,W=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(t,e,n){G.flushCustomStyles(),G.prepareTemplate(t,e)},prepareTemplateStyles:function(t,e,n){window.ShadyCSS.prepareTemplate(t,e,n)},prepareTemplateDom:function(t,e){},styleSubtree:function(t,e){G.flushCustomStyles(),G.styleSubtree(t,e)},styleElement:function(t){G.flushCustomStyles(),G.styleElement(t)},styleDocument:function(t){G.flushCustomStyles(),G.styleDocument(t)},getComputedStyleValue:function(t,e){return Object(C.b)(t,e)},flushCustomStyles:function(){G.flushCustomStyles()},nativeCss:r.c,nativeShadow:r.d,cssBuild:r.a,disableRuntime:r.b},W&&(window.ShadyCSS.CustomStyleInterface=W)}window.ShadyCSS.ApplyShim=J;var K=n(54),Z=n(84),Q=n(82),tt=n(12);function et(t){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nt(t,e){return!e||"object"!==et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rt(t,e){for(var n=0;n-1&<.splice(t,1)}}}]),n}();return n.__activateDir=!1,n});n(47);function vt(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?vt():window.addEventListener("DOMContentLoaded",vt);var mt=n(6),bt=n(37),gt=n(27),Ot=n(23),wt=n(45);function Pt(t){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?Ot.c.after(n):Ot.b,e.bind(this))}},{key:"isDebouncerActive",value:function(t){this._debouncers=this._debouncers||{};var e=this._debouncers[t];return!(!e||!e.isActive())}},{key:"flushDebouncer",value:function(t){this._debouncers=this._debouncers||{};var e=this._debouncers[t];e&&e.flush()}},{key:"cancelDebouncer",value:function(t){this._debouncers=this._debouncers||{};var e=this._debouncers[t];e&&e.cancel()}},{key:"async",value:function(t,e){return e>0?Ot.c.run(t.bind(this),e):~Ot.b.run(t.bind(this))}},{key:"cancelAsync",value:function(t){t<0?Ot.b.cancel(~t):Ot.c.cancel(t)}},{key:"create",value:function(t,e){var n=document.createElement(t);if(e)if(n.setProperties)n.setProperties(e);else for(var r in e)n[r]=e[r];return n}},{key:"elementMatches",value:function(t,e){return Object(mt.b)(e||this,t)}},{key:"toggleAttribute",value:function(t,e){var n=this;return 3===arguments.length&&(n=arguments[2]),1==arguments.length&&(e=!n.hasAttribute(t)),e?(n.setAttribute(t,""),!0):(n.removeAttribute(t),!1)}},{key:"toggleClass",value:function(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?n.classList.add(t):n.classList.remove(t)}},{key:"transform",value:function(t,e){(e=e||this).style.webkitTransform=t,e.style.transform=t}},{key:"translate3d",value:function(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)}},{key:"arrayDelete",value:function(t,e){var n;if(Array.isArray(t)){if((n=t.indexOf(e))>=0)return t.splice(n,1)}else if((n=Object(wt.a)(this,t).indexOf(e))>=0)return this.splice(t,n,1);return null}},{key:"_logger",value:function(t,e){var n;switch(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":(n=console)[t].apply(n,kt(e))}}},{key:"_log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;r {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_MutableData}\n */\n class MutableData extends superClass {\n /**\n * Overrides `PropertyEffects` to provide option for skipping\n * strict equality checking for Objects and Arrays.\n *\n * This method pulls the value to dirty check against from the `__dataTemp`\n * cache (rather than the normal `__data` cache) for Objects. Since the temp\n * cache is cleared at the end of a turn, this implementation allows\n * side-effects of deep object changes to be processed by re-setting the\n * same object (using the temp cache as an in-turn backstop to prevent\n * cycles due to 2-way notification).\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * @protected\n */\n _shouldPropertyChange(property, value, old) {\n return mutablePropertyChange(this, property, value, old, true);\n }\n\n }\n\n return MutableData;\n\n});\n\n/**\n * Element class mixin to add the optional ability to skip strict\n * dirty-checking for objects and arrays (always consider them to be\n * \"dirty\") by setting a `mutable-data` attribute on an element instance.\n *\n * By default, `PropertyEffects` performs strict dirty checking on\n * objects, which means that any deep modifications to an object or array will\n * not be propagated unless \"immutable\" data patterns are used (i.e. all object\n * references from the root to the mutation were changed).\n *\n * Polymer also provides a proprietary data mutation and path notification API\n * (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient\n * mutation and notification of deep changes in an object graph to all elements\n * bound to the same object graph.\n *\n * In cases where neither immutable patterns nor the data mutation API can be\n * used, applying this mixin will allow Polymer to skip dirty checking for\n * objects and arrays (always consider them to be \"dirty\"). This allows a\n * user to make a deep modification to a bound object graph, and then either\n * simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`\n * (e.g. `this.notifyPath('items')`) to update the tree. Note that all\n * elements that wish to be updated based on deep mutations must apply this\n * mixin or otherwise skip strict dirty checking for objects/arrays.\n * Specifically, any elements in the binding tree between the source of a\n * mutation and the consumption of it must enable this mixin or apply the\n * `MutableData` mixin.\n *\n * While this mixin adds the ability to forgo Object/Array dirty checking,\n * the `mutableData` flag defaults to false and must be set on the instance.\n *\n * Note, the performance characteristics of propagating large object graphs\n * will be worse by relying on `mutableData: true` as opposed to using\n * strict dirty checking with immutable patterns or Polymer's path notification\n * API.\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin to optionally skip strict dirty-checking\n * for objects and arrays\n */\nexport const OptionalMutableData = dedupingMixin(superClass => {\n\n /**\n * @mixinClass\n * @polymer\n * @implements {Polymer_OptionalMutableData}\n */\n class OptionalMutableData extends superClass {\n\n static get properties() {\n return {\n /**\n * Instance-level flag for configuring the dirty-checking strategy\n * for this element. When true, Objects and Arrays will skip dirty\n * checking, otherwise strict equality checking will be used.\n */\n mutableData: Boolean\n };\n }\n\n /**\n * Overrides `PropertyEffects` to provide option for skipping\n * strict equality checking for Objects and Arrays.\n *\n * When `this.mutableData` is true on this instance, this method\n * pulls the value to dirty check against from the `__dataTemp` cache\n * (rather than the normal `__data` cache) for Objects. Since the temp\n * cache is cleared at the end of a turn, this implementation allows\n * side-effects of deep object changes to be processed by re-setting the\n * same object (using the temp cache as an in-turn backstop to prevent\n * cycles due to 2-way notification).\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * @protected\n */\n _shouldPropertyChange(property, value, old) {\n return mutablePropertyChange(this, property, value, old, this.mutableData);\n }\n }\n\n return OptionalMutableData;\n\n});\n\n// Export for use by legacy behavior\nMutableData._mutablePropertyChange = mutablePropertyChange;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Module for preparing and stamping instances of templates that utilize\n * Polymer's data-binding and declarative event listener features.\n *\n * Example:\n *\n * // Get a template from somewhere, e.g. light DOM\n * let template = this.querySelector('template');\n * // Prepare the template\n * let TemplateClass = Templatize.templatize(template);\n * // Instance the template with an initial data model\n * let instance = new TemplateClass({myProp: 'initial'});\n * // Insert the instance's DOM somewhere, e.g. element's shadow DOM\n * this.shadowRoot.appendChild(instance.root);\n * // Changing a property on the instance will propagate to bindings\n * // in the template\n * instance.myProp = 'new value';\n *\n * The `options` dictionary passed to `templatize` allows for customizing\n * features of the generated template class, including how outer-scope host\n * properties should be forwarded into template instances, how any instance\n * properties added into the template's scope should be notified out to\n * the host, and whether the instance should be decorated as a \"parent model\"\n * of any event handlers.\n *\n * // Customize property forwarding and event model decoration\n * let TemplateClass = Templatize.templatize(template, this, {\n * parentModel: true,\n * forwardHostProp(property, value) {...},\n * instanceProps: {...},\n * notifyInstanceProp(instance, property, value) {...},\n * });\n *\n * @summary Module for preparing and stamping instances of templates\n * utilizing Polymer templating features.\n */\n\nimport './boot.js';\n\nimport { PropertyEffects } from '../mixins/property-effects.js';\nimport { MutableData } from '../mixins/mutable-data.js';\nimport { strictTemplatePolicy } from '../utils/settings.js';\n\n// Base class for HTMLTemplateElement extension that has property effects\n// machinery for propagating host properties to children. This is an ES5\n// class only because Babel (incorrectly) requires super() in the class\n// constructor even though no `this` is used and it returns an instance.\nlet newInstance = null;\n\n/**\n * @constructor\n * @extends {HTMLTemplateElement}\n * @private\n */\nfunction HTMLTemplateElementExtension() { return newInstance; }\nHTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.prototype, {\n constructor: {\n value: HTMLTemplateElementExtension,\n writable: true\n }\n});\n\n/**\n * @constructor\n * @implements {Polymer_PropertyEffects}\n * @extends {HTMLTemplateElementExtension}\n * @private\n */\nconst DataTemplate = PropertyEffects(HTMLTemplateElementExtension);\n\n/**\n * @constructor\n * @implements {Polymer_MutableData}\n * @extends {DataTemplate}\n * @private\n */\nconst MutableDataTemplate = MutableData(DataTemplate);\n\n// Applies a DataTemplate subclass to a