diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-04 09:20:25 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-04 09:20:25 +0200 |
| commit | 0b9ceb4bef00aae3c49271f8171d8acaba5455d6 (patch) | |
| tree | 9b1092ccd88d42e0ebae68053f956d228527426a /Software/Embedded_SW | |
| parent | 312cff53fcd1744f915a286332d2dd923e23d393 (diff) | |
| parent | 6f3abda6cf8034ce4c18d39f82ce38c256ac2d34 (diff) | |
| download | Tango-0b9ceb4bef00aae3c49271f8171d8acaba5455d6.tar.gz Tango-0b9ceb4bef00aae3c49271f8171d8acaba5455d6.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW')
24 files changed, 5767 insertions, 9290 deletions
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 Binary files differindex 43bc4dd30..2695bfe60 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 Binary files differindex 98e1cbae6..a837bff36 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 Binary files differindex 616f7914e..e3d7d7fe8 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 Binary files differindex af4db3b45..dd5978d30 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a index e4a0d245b..b7a05571e 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a @@ -1,88 +1,4662 @@ <!-- +@license Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt ---> +--><link rel="import" href="polymer-mini.html"> -<link rel="import" href="../iron-icon/iron-icon.html"> -<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html"> -<iron-iconset-svg name="av" size="24"> -<svg><defs> -<g id="add-to-queue"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2h-3v3h-2v-3H8v-2h3V7h2v3h3z"/></g> -<g id="airplay"><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g> -<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></g> -<g id="art-track"><path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1.51L3.5 15h7z"/></g> -<g id="av-timer"><path d="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-1.41-6.8-6.8v.02C4.42 6.45 3 9.05 3 12c0 4.97 4.02 9 9 9 4.97 0 9-4.03 9-9s-4.03-9-9-9h-1zm7 9c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zM6 12c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z"/></g> -<g id="closed-caption"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z"/></g> -<g id="equalizer"><path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"/></g> -<g id="explicit"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h4v2h-4v2h4v2H9V7h6v2z"/></g> -<g id="fast-forward"><path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/></g> -<g id="fast-rewind"><path d="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"/></g> -<g id="fiber-dvr"><path d="M17.5 10.5h2v1h-2zm-13 0h2v3h-2zM21 3H3c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h18c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zM8 13.5c0 .85-.65 1.5-1.5 1.5H3V9h3.5c.85 0 1.5.65 1.5 1.5v3zm4.62 1.5h-1.5L9.37 9h1.5l1 3.43 1-3.43h1.5l-1.75 6zM21 11.5c0 .6-.4 1.15-.9 1.4L21 15h-1.5l-.85-2H17.5v2H16V9h3.5c.85 0 1.5.65 1.5 1.5v1z"/></g> -<g id="fiber-manual-record"><circle cx="12" cy="12" r="8"/></g> -<g id="fiber-new"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM8.5 15H7.3l-2.55-3.5V15H3.5V9h1.25l2.5 3.5V9H8.5v6zm5-4.74H11v1.12h2.5v1.26H11v1.11h2.5V15h-4V9h4v1.26zm7 3.74c0 .55-.45 1-1 1h-4c-.55 0-1-.45-1-1V9h1.25v4.51h1.13V9.99h1.25v3.51h1.12V9h1.25v5z"/></g> -<g id="fiber-pin"><path d="M5.5 10.5h2v1h-2zM20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM9 11.5c0 .85-.65 1.5-1.5 1.5h-2v2H4V9h3.5c.85 0 1.5.65 1.5 1.5v1zm3.5 3.5H11V9h1.5v6zm7.5 0h-1.2l-2.55-3.5V15H15V9h1.25l2.5 3.5V9H20v6z"/></g> -<g id="fiber-smart-record"><g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g></g> -<g id="forward-10"><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g> -<g id="forward-30"><path d="M9.6 13.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5zM4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8z"/></g> -<g id="forward-5"><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.7.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.5.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.6z"/></g> -<g id="games"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g> -<g id="hd"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"/></g> -<g id="hearing"><path d="M17 20c-.29 0-.56-.06-.76-.15-.71-.37-1.21-.88-1.71-2.38-.51-1.56-1.47-2.29-2.39-3-.79-.61-1.61-1.24-2.32-2.53C9.29 10.98 9 9.93 9 9c0-2.8 2.2-5 5-5s5 2.2 5 5h2c0-3.93-3.07-7-7-7S7 5.07 7 9c0 1.26.38 2.65 1.07 3.9.91 1.65 1.98 2.48 2.85 3.15.81.62 1.39 1.07 1.71 2.05.6 1.82 1.37 2.84 2.73 3.55.51.23 1.07.35 1.64.35 2.21 0 4-1.79 4-4h-2c0 1.1-.9 2-2 2zM7.64 2.64L6.22 1.22C4.23 3.21 3 5.96 3 9s1.23 5.79 3.22 7.78l1.41-1.41C6.01 13.74 5 11.49 5 9s1.01-4.74 2.64-6.36zM11.5 9c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5-2.5 1.12-2.5 2.5z"/></g> -<g id="high-quality"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z"/></g> -<g id="library-add"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g> -<g id="library-books"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/></g> -<g id="library-music"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57 0 1.08.19 1.5.51V5h4v2zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"/></g> -<g id="loop"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></g> -<g id="mic"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g> -<g id="mic-none"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1.2-9.1c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2l-.01 6.2c0 .66-.53 1.2-1.19 1.2-.66 0-1.2-.54-1.2-1.2V4.9zm6.5 6.1c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g> -<g id="mic-off"><path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73 4.27 3z"/></g> -<g id="movie"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></g> -<g id="music-video"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/></g> -<g id="new-releases"><path d="M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"/></g> -<g id="not-interested"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"/></g> -<g id="pause"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></g> -<g id="pause-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/></g> -<g id="pause-circle-outline"><path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2V8h-2v8z"/></g> -<g id="play-arrow"><path d="M8 5v14l11-7z"/></g> -<g id="play-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/></g> -<g id="play-circle-outline"><path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g> -<g id="playlist-add"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2 16h8v-2H2v2z"/></g> -<g id="playlist-add-check"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zM2 16h8v-2H2v2zm19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/></g> -<g id="playlist-play"><path d="M19 9H2v2h17V9zm0-4H2v2h17V5zM2 15h13v-2H2v2zm15-2v6l5-3-5-3z"/></g> -<g id="queue"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g> -<g id="queue-music"><path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"/></g> -<g id="queue-play-next"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h2v-2H3V5h18v8h2V5c0-1.11-.9-2-2-2zm-8 7V7h-2v3H8v2h3v3h2v-3h3v-2h-3zm11 8l-4.5 4.5L18 21l3-3-3-3 1.5-1.5L24 18z"/></g> -<g id="radio"><path d="M3.24 6.15C2.51 6.43 2 7.17 2 8v12c0 1.1.89 2 2 2h16c1.11 0 2-.9 2-2V8c0-1.11-.89-2-2-2H8.3l8.26-3.34L15.88 1 3.24 6.15zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z"/></g> -<g id="recent-actors"><path d="M21 5v14h2V5h-2zm-4 14h2V5h-2v14zM14 5H2c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM8 7.75c1.24 0 2.25 1.01 2.25 2.25S9.24 12.25 8 12.25 5.75 11.24 5.75 10 6.76 7.75 8 7.75zM12.5 17h-9v-.75c0-1.5 3-2.25 4.5-2.25s4.5.75 4.5 2.25V17z"/></g> -<g id="remove-from-queue"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2H8v-2h8z"/></g> -<g id="repeat"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/></g> -<g id="repeat-one"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4zm-4-2V9h-1l-2 1v1h1.5v4H13z"/></g> -<g id="replay"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/></g> -<g id="replay-10"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.1 11H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1c.2.1.3.2.5.3s.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g> -<g id="replay-30"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-2.4 8.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5c0-.1-.1-.2-.1-.3s-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g> -<g id="replay-5"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.4.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.7z"/></g> -<g id="shuffle"><path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z"/></g> -<g id="skip-next"><path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/></g> -<g id="skip-previous"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/></g> -<g id="slow-motion-video"><path d="M13.05 9.79L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zm1.61 6.74C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43zM22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12z"/></g> -<g id="snooze"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-3-9h3.63L9 15.2V17h6v-2h-3.63L15 10.8V9H9v2z"/></g> -<g id="sort-by-alpha"><path d="M14.94 4.66h-4.72l2.36-2.36zm-4.69 14.71h4.66l-2.33 2.33zM6.1 6.27L1.6 17.73h1.84l.92-2.45h5.11l.92 2.45h1.84L7.74 6.27H6.1zm-1.13 7.37l1.94-5.18 1.94 5.18H4.97zm10.76 2.5h6.12v1.59h-8.53v-1.29l5.92-8.56h-5.88v-1.6h8.3v1.26l-5.93 8.6z"/></g> -<g id="stop"><path d="M6 6h12v12H6z"/></g> -<g id="subscriptions"><path d="M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z"/></g> -<g id="subtitles"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/></g> -<g id="surround-sound"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.76 16.24l-1.41 1.41C4.78 16.1 4 14.05 4 12c0-2.05.78-4.1 2.34-5.66l1.41 1.41C6.59 8.93 6 10.46 6 12s.59 3.07 1.76 4.24zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm5.66 1.66l-1.41-1.41C17.41 15.07 18 13.54 18 12s-.59-3.07-1.76-4.24l1.41-1.41C19.22 7.9 20 9.95 20 12c0 2.05-.78 4.1-2.34 5.66zM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g> -<g id="video-library"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"/></g> -<g id="videocam"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></g> -<g id="videocam-off"><path d="M21 6.5l-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2L2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3.27 2z"/></g> -<g id="volume-down"><path d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/></g> -<g id="volume-mute"><path d="M7 9v6h4l5 5V4l-5 5H7z"/></g> -<g id="volume-off"><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/></g> -<g id="volume-up"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></g> -<g id="web"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/></g> -<g id="web-asset"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H5V8h14v10z"/></g> -</defs></svg> -</iron-iconset-svg> + + +<script>Polymer.nar = []; +Polymer.Annotations = { +parseAnnotations: function (template) { +var list = []; +var content = template._content || template.content; +this._parseNodeAnnotations(content, list, template.hasAttribute('strip-whitespace')); +return list; +}, +_parseNodeAnnotations: function (node, list, stripWhiteSpace) { +return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list, stripWhiteSpace); +}, +_bindingRegex: function () { +var IDENT = '(?:' + '[a-zA-Z_$][\\w.:$-*]*' + ')'; +var NUMBER = '(?:' + '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')'; +var SQUOTE_STRING = '(?:' + '\'(?:[^\'\\\\]|\\\\.)*\'' + ')'; +var DQUOTE_STRING = '(?:' + '"(?:[^"\\\\]|\\\\.)*"' + ')'; +var STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')'; +var ARGUMENT = '(?:' + IDENT + '|' + NUMBER + '|' + STRING + '\\s*' + ')'; +var ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\s*' + ARGUMENT + ')*' + ')'; +var ARGUMENT_LIST = '(?:' + '\\(\\s*' + '(?:' + ARGUMENTS + '?' + ')' + '\\)\\s*' + ')'; +var BINDING = '(' + IDENT + '\\s*' + ARGUMENT_LIST + '?' + ')'; +var OPEN_BRACKET = '(\\[\\[|{{)' + '\\s*'; +var CLOSE_BRACKET = '(?:]]|}})'; +var NEGATE = '(?:(!)\\s*)?'; +var EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET; +return new RegExp(EXPRESSION, 'g'); +}(), +_parseBindings: function (text) { +var re = this._bindingRegex; +var parts = []; +var lastIndex = 0; +var m; +while ((m = re.exec(text)) !== null) { +if (m.index > lastIndex) { +parts.push({ literal: text.slice(lastIndex, m.index) }); +} +var mode = m[1][0]; +var negate = Boolean(m[2]); +var value = m[3].trim(); +var customEvent, notifyEvent, colon; +if (mode == '{' && (colon = value.indexOf('::')) > 0) { +notifyEvent = value.substring(colon + 2); +value = value.substring(0, colon); +customEvent = true; +} +parts.push({ +compoundIndex: parts.length, +value: value, +mode: mode, +negate: negate, +event: notifyEvent, +customEvent: customEvent +}); +lastIndex = re.lastIndex; +} +if (lastIndex && lastIndex < text.length) { +var literal = text.substring(lastIndex); +if (literal) { +parts.push({ literal: literal }); +} +} +if (parts.length) { +return parts; +} +}, +_literalFromParts: function (parts) { +var s = ''; +for (var i = 0; i < parts.length; i++) { +var literal = parts[i].literal; +s += literal || ''; +} +return s; +}, +_parseTextNodeAnnotation: function (node, list) { +var parts = this._parseBindings(node.textContent); +if (parts) { +node.textContent = this._literalFromParts(parts) || ' '; +var annote = { +bindings: [{ +kind: 'text', +name: 'textContent', +parts: parts, +isCompound: parts.length !== 1 +}] +}; +list.push(annote); +return annote; +} +}, +_parseElementAnnotations: function (element, list, stripWhiteSpace) { +var annote = { +bindings: [], +events: [] +}; +if (element.localName === 'content') { +list._hasContent = true; +} +this._parseChildNodesAnnotations(element, annote, list, stripWhiteSpace); +if (element.attributes) { +this._parseNodeAttributeAnnotations(element, annote, list); +if (this.prepElement) { +this.prepElement(element); +} +} +if (annote.bindings.length || annote.events.length || annote.id) { +list.push(annote); +} +return annote; +}, +_parseChildNodesAnnotations: function (root, annote, list, stripWhiteSpace) { +if (root.firstChild) { +var node = root.firstChild; +var i = 0; +while (node) { +var next = node.nextSibling; +if (node.localName === 'template' && !node.hasAttribute('preserve-content')) { +this._parseTemplate(node, i, list, annote); +} +if (node.nodeType === Node.TEXT_NODE) { +var n = next; +while (n && n.nodeType === Node.TEXT_NODE) { +node.textContent += n.textContent; +next = n.nextSibling; +root.removeChild(n); +n = next; +} +if (stripWhiteSpace && !node.textContent.trim()) { +root.removeChild(node); +i--; +} +} +if (node.parentNode) { +var childAnnotation = this._parseNodeAnnotations(node, list, stripWhiteSpace); +if (childAnnotation) { +childAnnotation.parent = annote; +childAnnotation.index = i; +} +} +node = next; +i++; +} +} +}, +_parseTemplate: function (node, index, list, parent) { +var content = document.createDocumentFragment(); +content._notes = this.parseAnnotations(node); +content.appendChild(node.content); +list.push({ +bindings: Polymer.nar, +events: Polymer.nar, +templateContent: content, +parent: parent, +index: index +}); +}, +_parseNodeAttributeAnnotations: function (node, annotation) { +var attrs = Array.prototype.slice.call(node.attributes); +for (var i = attrs.length - 1, a; a = attrs[i]; i--) { +var n = a.name; +var v = a.value; +var b; +if (n.slice(0, 3) === 'on-') { +node.removeAttribute(n); +annotation.events.push({ +name: n.slice(3), +value: v +}); +} else if (b = this._parseNodeAttributeAnnotation(node, n, v)) { +annotation.bindings.push(b); +} else if (n === 'id') { +annotation.id = v; +} +} +}, +_parseNodeAttributeAnnotation: function (node, name, value) { +var parts = this._parseBindings(value); +if (parts) { +var origName = name; +var kind = 'property'; +if (name[name.length - 1] == '$') { +name = name.slice(0, -1); +kind = 'attribute'; +} +var literal = this._literalFromParts(parts); +if (literal && kind == 'attribute') { +node.setAttribute(name, literal); +} +if (node.localName === 'input' && origName === 'value') { +node.setAttribute(origName, ''); +} +node.removeAttribute(origName); +if (kind === 'property') { +name = Polymer.CaseMap.dashToCamelCase(name); +} +return { +kind: kind, +name: name, +parts: parts, +literal: literal, +isCompound: parts.length !== 1 +}; +} +}, +findAnnotatedNode: function (root, annote) { +var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent); +if (parent) { +for (var n = parent.firstChild, i = 0; n; n = n.nextSibling) { +if (annote.index === i++) { +return n; +} +} +} else { +return root; +} +} +}; +(function () { +function resolveCss(cssText, ownerDocument) { +return cssText.replace(CSS_URL_RX, function (m, pre, url, post) { +return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post; +}); +} +function resolveAttrs(element, ownerDocument) { +for (var name in URL_ATTRS) { +var a$ = URL_ATTRS[name]; +for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) { +if (name === '*' || element.localName === name) { +at = element.attributes[a]; +v = at && at.value; +if (v && v.search(BINDING_RX) < 0) { +at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument); +} +} +} +} +} +function resolve(url, ownerDocument) { +if (url && url[0] === '#') { +return url; +} +var resolver = getUrlResolver(ownerDocument); +resolver.href = url; +return resolver.href || url; +} +var tempDoc; +var tempDocBase; +function resolveUrl(url, baseUri) { +if (!tempDoc) { +tempDoc = document.implementation.createHTMLDocument('temp'); +tempDocBase = tempDoc.createElement('base'); +tempDoc.head.appendChild(tempDocBase); +} +tempDocBase.href = baseUri; +return resolve(url, tempDoc); +} +function getUrlResolver(ownerDocument) { +return ownerDocument.__urlResolver || (ownerDocument.__urlResolver = ownerDocument.createElement('a')); +} +var CSS_URL_RX = /(url\()([^)]*)(\))/g; +var URL_ATTRS = { +'*': [ +'href', +'src', +'style', +'url' +], +form: ['action'] +}; +var BINDING_RX = /\{\{|\[\[/; +Polymer.ResolveUrl = { +resolveCss: resolveCss, +resolveAttrs: resolveAttrs, +resolveUrl: resolveUrl +}; +}()); +Polymer.Base._addFeature({ +_prepAnnotations: function () { +if (!this._template) { +this._notes = []; +} else { +var self = this; +Polymer.Annotations.prepElement = function (element) { +self._prepElement(element); +}; +if (this._template._content && this._template._content._notes) { +this._notes = this._template._content._notes; +} else { +this._notes = Polymer.Annotations.parseAnnotations(this._template); +this._processAnnotations(this._notes); +} +Polymer.Annotations.prepElement = null; +} +}, +_processAnnotations: function (notes) { +for (var i = 0; i < notes.length; i++) { +var note = notes[i]; +for (var j = 0; j < note.bindings.length; j++) { +var b = note.bindings[j]; +for (var k = 0; k < b.parts.length; k++) { +var p = b.parts[k]; +if (!p.literal) { +p.signature = this._parseMethod(p.value); +if (!p.signature) { +p.model = this._modelForPath(p.value); +} +} +} +} +if (note.templateContent) { +this._processAnnotations(note.templateContent._notes); +var pp = note.templateContent._parentProps = this._discoverTemplateParentProps(note.templateContent._notes); +var bindings = []; +for (var prop in pp) { +bindings.push({ +index: note.index, +kind: 'property', +name: '_parent_' + prop, +parts: [{ +mode: '{', +model: prop, +value: prop +}] +}); +} +note.bindings = note.bindings.concat(bindings); +} +} +}, +_discoverTemplateParentProps: function (notes) { +var pp = {}; +for (var i = 0, n; i < notes.length && (n = notes[i]); i++) { +for (var j = 0, b$ = n.bindings, b; j < b$.length && (b = b$[j]); j++) { +for (var k = 0, p$ = b.parts, p; k < p$.length && (p = p$[k]); k++) { +if (p.signature) { +var args = p.signature.args; +for (var kk = 0; kk < args.length; kk++) { +var model = args[kk].model; +if (model) { +pp[model] = true; +} +} +} else { +if (p.model) { +pp[p.model] = true; +} +} +} +} +if (n.templateContent) { +var tpp = n.templateContent._parentProps; +Polymer.Base.mixin(pp, tpp); +} +} +return pp; +}, +_prepElement: function (element) { +Polymer.ResolveUrl.resolveAttrs(element, this._template.ownerDocument); +}, +_findAnnotatedNode: Polymer.Annotations.findAnnotatedNode, +_marshalAnnotationReferences: function () { +if (this._template) { +this._marshalIdNodes(); +this._marshalAnnotatedNodes(); +this._marshalAnnotatedListeners(); +} +}, +_configureAnnotationReferences: function (config) { +var notes = this._notes; +var nodes = this._nodes; +for (var i = 0; i < notes.length; i++) { +var note = notes[i]; +var node = nodes[i]; +this._configureTemplateContent(note, node); +this._configureCompoundBindings(note, node); +} +}, +_configureTemplateContent: function (note, node) { +if (note.templateContent) { +node._content = note.templateContent; +} +}, +_configureCompoundBindings: function (note, node) { +var bindings = note.bindings; +for (var i = 0; i < bindings.length; i++) { +var binding = bindings[i]; +if (binding.isCompound) { +var storage = node.__compoundStorage__ || (node.__compoundStorage__ = {}); +var parts = binding.parts; +var literals = new Array(parts.length); +for (var j = 0; j < parts.length; j++) { +literals[j] = parts[j].literal; +} +var name = binding.name; +storage[name] = literals; +if (binding.literal && binding.kind == 'property') { +if (node._configValue) { +node._configValue(name, binding.literal); +} else { +node[name] = binding.literal; +} +} +} +} +}, +_marshalIdNodes: function () { +this.$ = {}; +for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) { +if (a.id) { +this.$[a.id] = this._findAnnotatedNode(this.root, a); +} +} +}, +_marshalAnnotatedNodes: function () { +if (this._notes && this._notes.length) { +var r = new Array(this._notes.length); +for (var i = 0; i < this._notes.length; i++) { +r[i] = this._findAnnotatedNode(this.root, this._notes[i]); +} +this._nodes = r; +} +}, +_marshalAnnotatedListeners: function () { +for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) { +if (a.events && a.events.length) { +var node = this._findAnnotatedNode(this.root, a); +for (var j = 0, e$ = a.events, e; j < e$.length && (e = e$[j]); j++) { +this.listen(node, e.name, e.value); +} +} +} +} +}); +Polymer.Base._addFeature({ +listeners: {}, +_listenListeners: function (listeners) { +var node, name, eventName; +for (eventName in listeners) { +if (eventName.indexOf('.') < 0) { +node = this; +name = eventName; +} else { +name = eventName.split('.'); +node = this.$[name[0]]; +name = name[1]; +} +this.listen(node, name, listeners[eventName]); +} +}, +listen: function (node, eventName, methodName) { +var handler = this._recallEventHandler(this, eventName, node, methodName); +if (!handler) { +handler = this._createEventHandler(node, eventName, methodName); +} +if (handler._listening) { +return; +} +this._listen(node, eventName, handler); +handler._listening = true; +}, +_boundListenerKey: function (eventName, methodName) { +return eventName + ':' + methodName; +}, +_recordEventHandler: function (host, eventName, target, methodName, handler) { +var hbl = host.__boundListeners; +if (!hbl) { +hbl = host.__boundListeners = new WeakMap(); +} +var bl = hbl.get(target); +if (!bl) { +bl = {}; +hbl.set(target, bl); +} +var key = this._boundListenerKey(eventName, methodName); +bl[key] = handler; +}, +_recallEventHandler: function (host, eventName, target, methodName) { +var hbl = host.__boundListeners; +if (!hbl) { +return; +} +var bl = hbl.get(target); +if (!bl) { +return; +} +var key = this._boundListenerKey(eventName, methodName); +return bl[key]; +}, +_createEventHandler: function (node, eventName, methodName) { +var host = this; +var handler = function (e) { +if (host[methodName]) { +host[methodName](e, e.detail); +} else { +host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined')); +} +}; +handler._listening = false; +this._recordEventHandler(host, eventName, node, methodName, handler); +return handler; +}, +unlisten: function (node, eventName, methodName) { +var handler = this._recallEventHandler(this, eventName, node, methodName); +if (handler) { +this._unlisten(node, eventName, handler); +handler._listening = false; +} +}, +_listen: function (node, eventName, handler) { +node.addEventListener(eventName, handler); +}, +_unlisten: function (node, eventName, handler) { +node.removeEventListener(eventName, handler); +} +}); +(function () { +'use strict'; +var wrap = Polymer.DomApi.wrap; +var HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string'; +var GESTURE_KEY = '__polymerGestures'; +var HANDLED_OBJ = '__polymerGesturesHandled'; +var TOUCH_ACTION = '__polymerGesturesTouchAction'; +var TAP_DISTANCE = 25; +var TRACK_DISTANCE = 5; +var TRACK_LENGTH = 2; +var MOUSE_TIMEOUT = 2500; +var MOUSE_EVENTS = [ +'mousedown', +'mousemove', +'mouseup', +'click' +]; +var MOUSE_WHICH_TO_BUTTONS = [ +0, +1, +4, +2 +]; +var MOUSE_HAS_BUTTONS = function () { +try { +return new MouseEvent('test', { buttons: 1 }).buttons === 1; +} catch (e) { +return false; +} +}(); +var IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/); +var mouseCanceller = function (mouseEvent) { +mouseEvent[HANDLED_OBJ] = { skip: true }; +if (mouseEvent.type === 'click') { +var path = Polymer.dom(mouseEvent).path; +for (var i = 0; i < path.length; i++) { +if (path[i] === POINTERSTATE.mouse.target) { +return; +} +} +mouseEvent.preventDefault(); +mouseEvent.stopPropagation(); +} +}; +function setupTeardownMouseCanceller(setup) { +for (var i = 0, en; i < MOUSE_EVENTS.length; i++) { +en = MOUSE_EVENTS[i]; +if (setup) { +document.addEventListener(en, mouseCanceller, true); +} else { +document.removeEventListener(en, mouseCanceller, true); +} +} +} +function ignoreMouse() { +if (IS_TOUCH_ONLY) { +return; +} +if (!POINTERSTATE.mouse.mouseIgnoreJob) { +setupTeardownMouseCanceller(true); +} +var unset = function () { +setupTeardownMouseCanceller(); +POINTERSTATE.mouse.target = null; +POINTERSTATE.mouse.mouseIgnoreJob = null; +}; +POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT); +} +function hasLeftMouseButton(ev) { +var type = ev.type; +if (MOUSE_EVENTS.indexOf(type) === -1) { +return false; +} +if (type === 'mousemove') { +var buttons = ev.buttons === undefined ? 1 : ev.buttons; +if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) { +buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0; +} +return Boolean(buttons & 1); +} else { +var button = ev.button === undefined ? 0 : ev.button; +return button === 0; +} +} +function isSyntheticClick(ev) { +if (ev.type === 'click') { +if (ev.detail === 0) { +return true; +} +var t = Gestures.findOriginalTarget(ev); +var bcr = t.getBoundingClientRect(); +var x = ev.pageX, y = ev.pageY; +return !(x >= bcr.left && x <= bcr.right && (y >= bcr.top && y <= bcr.bottom)); +} +return false; +} +var POINTERSTATE = { +mouse: { +target: null, +mouseIgnoreJob: null +}, +touch: { +x: 0, +y: 0, +id: -1, +scrollDecided: false +} +}; +function firstTouchAction(ev) { +var path = Polymer.dom(ev).path; +var ta = 'auto'; +for (var i = 0, n; i < path.length; i++) { +n = path[i]; +if (n[TOUCH_ACTION]) { +ta = n[TOUCH_ACTION]; +break; +} +} +return ta; +} +function trackDocument(stateObj, movefn, upfn) { +stateObj.movefn = movefn; +stateObj.upfn = upfn; +document.addEventListener('mousemove', movefn); +document.addEventListener('mouseup', upfn); +} +function untrackDocument(stateObj) { +document.removeEventListener('mousemove', stateObj.movefn); +document.removeEventListener('mouseup', stateObj.upfn); +stateObj.movefn = null; +stateObj.upfn = null; +} +var Gestures = { +gestures: {}, +recognizers: [], +deepTargetFind: function (x, y) { +var node = document.elementFromPoint(x, y); +var next = node; +while (next && next.shadowRoot) { +next = next.shadowRoot.elementFromPoint(x, y); +if (next) { +node = next; +} +} +return node; +}, +findOriginalTarget: function (ev) { +if (ev.path) { +return ev.path[0]; +} +return ev.target; +}, +handleNative: function (ev) { +var handled; +var type = ev.type; +var node = wrap(ev.currentTarget); +var gobj = node[GESTURE_KEY]; +if (!gobj) { +return; +} +var gs = gobj[type]; +if (!gs) { +return; +} +if (!ev[HANDLED_OBJ]) { +ev[HANDLED_OBJ] = {}; +if (type.slice(0, 5) === 'touch') { +var t = ev.changedTouches[0]; +if (type === 'touchstart') { +if (ev.touches.length === 1) { +POINTERSTATE.touch.id = t.identifier; +} +} +if (POINTERSTATE.touch.id !== t.identifier) { +return; +} +if (!HAS_NATIVE_TA) { +if (type === 'touchstart' || type === 'touchmove') { +Gestures.handleTouchAction(ev); +} +} +if (type === 'touchend') { +POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget; +ignoreMouse(true); +} +} +} +handled = ev[HANDLED_OBJ]; +if (handled.skip) { +return; +} +var recognizers = Gestures.recognizers; +for (var i = 0, r; i < recognizers.length; i++) { +r = recognizers[i]; +if (gs[r.name] && !handled[r.name]) { +if (r.flow && r.flow.start.indexOf(ev.type) > -1) { +if (r.reset) { +r.reset(); +} +} +} +} +for (var i = 0, r; i < recognizers.length; i++) { +r = recognizers[i]; +if (gs[r.name] && !handled[r.name]) { +handled[r.name] = true; +r[type](ev); +} +} +}, +handleTouchAction: function (ev) { +var t = ev.changedTouches[0]; +var type = ev.type; +if (type === 'touchstart') { +POINTERSTATE.touch.x = t.clientX; +POINTERSTATE.touch.y = t.clientY; +POINTERSTATE.touch.scrollDecided = false; +} else if (type === 'touchmove') { +if (POINTERSTATE.touch.scrollDecided) { +return; +} +POINTERSTATE.touch.scrollDecided = true; +var ta = firstTouchAction(ev); +var prevent = false; +var dx = Math.abs(POINTERSTATE.touch.x - t.clientX); +var dy = Math.abs(POINTERSTATE.touch.y - t.clientY); +if (!ev.cancelable) { +} else if (ta === 'none') { +prevent = true; +} else if (ta === 'pan-x') { +prevent = dy > dx; +} else if (ta === 'pan-y') { +prevent = dx > dy; +} +if (prevent) { +ev.preventDefault(); +} else { +Gestures.prevent('track'); +} +} +}, +add: function (node, evType, handler) { +node = wrap(node); +var recognizer = this.gestures[evType]; +var deps = recognizer.deps; +var name = recognizer.name; +var gobj = node[GESTURE_KEY]; +if (!gobj) { +node[GESTURE_KEY] = gobj = {}; +} +for (var i = 0, dep, gd; i < deps.length; i++) { +dep = deps[i]; +if (IS_TOUCH_ONLY && MOUSE_EVENTS.indexOf(dep) > -1) { +continue; +} +gd = gobj[dep]; +if (!gd) { +gobj[dep] = gd = { _count: 0 }; +} +if (gd._count === 0) { +node.addEventListener(dep, this.handleNative); +} +gd[name] = (gd[name] || 0) + 1; +gd._count = (gd._count || 0) + 1; +} +node.addEventListener(evType, handler); +if (recognizer.touchAction) { +this.setTouchAction(node, recognizer.touchAction); +} +}, +remove: function (node, evType, handler) { +node = wrap(node); +var recognizer = this.gestures[evType]; +var deps = recognizer.deps; +var name = recognizer.name; +var gobj = node[GESTURE_KEY]; +if (gobj) { +for (var i = 0, dep, gd; i < deps.length; i++) { +dep = deps[i]; +gd = gobj[dep]; +if (gd && gd[name]) { +gd[name] = (gd[name] || 1) - 1; +gd._count = (gd._count || 1) - 1; +if (gd._count === 0) { +node.removeEventListener(dep, this.handleNative); +} +} +} +} +node.removeEventListener(evType, handler); +}, +register: function (recog) { +this.recognizers.push(recog); +for (var i = 0; i < recog.emits.length; i++) { +this.gestures[recog.emits[i]] = recog; +} +}, +findRecognizerByEvent: function (evName) { +for (var i = 0, r; i < this.recognizers.length; i++) { +r = this.recognizers[i]; +for (var j = 0, n; j < r.emits.length; j++) { +n = r.emits[j]; +if (n === evName) { +return r; +} +} +} +return null; +}, +setTouchAction: function (node, value) { +if (HAS_NATIVE_TA) { +node.style.touchAction = value; +} +node[TOUCH_ACTION] = value; +}, +fire: function (target, type, detail) { +var ev = Polymer.Base.fire(type, detail, { +node: target, +bubbles: true, +cancelable: true +}); +if (ev.defaultPrevented) { +var se = detail.sourceEvent; +if (se && se.preventDefault) { +se.preventDefault(); +} +} +}, +prevent: function (evName) { +var recognizer = this.findRecognizerByEvent(evName); +if (recognizer.info) { +recognizer.info.prevent = true; +} +} +}; +Gestures.register({ +name: 'downup', +deps: [ +'mousedown', +'touchstart', +'touchend' +], +flow: { +start: [ +'mousedown', +'touchstart' +], +end: [ +'mouseup', +'touchend' +] +}, +emits: [ +'down', +'up' +], +info: { +movefn: null, +upfn: null +}, +reset: function () { +untrackDocument(this.info); +}, +mousedown: function (e) { +if (!hasLeftMouseButton(e)) { +return; +} +var t = Gestures.findOriginalTarget(e); +var self = this; +var movefn = function movefn(e) { +if (!hasLeftMouseButton(e)) { +self.fire('up', t, e); +untrackDocument(self.info); +} +}; +var upfn = function upfn(e) { +if (hasLeftMouseButton(e)) { +self.fire('up', t, e); +} +untrackDocument(self.info); +}; +trackDocument(this.info, movefn, upfn); +this.fire('down', t, e); +}, +touchstart: function (e) { +this.fire('down', Gestures.findOriginalTarget(e), e.changedTouches[0]); +}, +touchend: function (e) { +this.fire('up', Gestures.findOriginalTarget(e), e.changedTouches[0]); +}, +fire: function (type, target, event) { +Gestures.fire(target, type, { +x: event.clientX, +y: event.clientY, +sourceEvent: event, +prevent: function (e) { +return Gestures.prevent(e); +} +}); +} +}); +Gestures.register({ +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: false, +moves: [], +addMove: function (move) { +if (this.moves.length > TRACK_LENGTH) { +this.moves.shift(); +} +this.moves.push(move); +}, +movefn: null, +upfn: null, +prevent: false +}, +reset: function () { +this.info.state = 'start'; +this.info.started = false; +this.info.moves = []; +this.info.x = 0; +this.info.y = 0; +this.info.prevent = false; +untrackDocument(this.info); +}, +hasMovedEnough: function (x, y) { +if (this.info.prevent) { +return false; +} +if (this.info.started) { +return true; +} +var dx = Math.abs(this.info.x - x); +var dy = Math.abs(this.info.y - y); +return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE; +}, +mousedown: function (e) { +if (!hasLeftMouseButton(e)) { +return; +} +var t = Gestures.findOriginalTarget(e); +var self = this; +var movefn = function movefn(e) { +var x = e.clientX, y = e.clientY; +if (self.hasMovedEnough(x, y)) { +self.info.state = self.info.started ? e.type === 'mouseup' ? 'end' : 'track' : 'start'; +self.info.addMove({ +x: x, +y: y +}); +if (!hasLeftMouseButton(e)) { +self.info.state = 'end'; +untrackDocument(self.info); +} +self.fire(t, e); +self.info.started = true; +} +}; +var upfn = function upfn(e) { +if (self.info.started) { +Gestures.prevent('tap'); +movefn(e); +} +untrackDocument(self.info); +}; +trackDocument(this.info, movefn, upfn); +this.info.x = e.clientX; +this.info.y = e.clientY; +}, +touchstart: function (e) { +var ct = e.changedTouches[0]; +this.info.x = ct.clientX; +this.info.y = ct.clientY; +}, +touchmove: function (e) { +var t = Gestures.findOriginalTarget(e); +var ct = e.changedTouches[0]; +var x = ct.clientX, y = ct.clientY; +if (this.hasMovedEnough(x, y)) { +this.info.addMove({ +x: x, +y: y +}); +this.fire(t, ct); +this.info.state = 'track'; +this.info.started = true; +} +}, +touchend: function (e) { +var t = Gestures.findOriginalTarget(e); +var ct = e.changedTouches[0]; +if (this.info.started) { +Gestures.prevent('tap'); +this.info.state = 'end'; +this.info.addMove({ +x: ct.clientX, +y: ct.clientY +}); +this.fire(t, ct); +} +}, +fire: function (target, touch) { +var secondlast = this.info.moves[this.info.moves.length - 2]; +var lastmove = this.info.moves[this.info.moves.length - 1]; +var dx = lastmove.x - this.info.x; +var dy = lastmove.y - this.info.y; +var ddx, ddy = 0; +if (secondlast) { +ddx = lastmove.x - secondlast.x; +ddy = lastmove.y - secondlast.y; +} +return Gestures.fire(target, 'track', { +state: this.info.state, +x: touch.clientX, +y: touch.clientY, +dx: dx, +dy: dy, +ddx: ddx, +ddy: ddy, +sourceEvent: touch, +hover: function () { +return Gestures.deepTargetFind(touch.clientX, touch.clientY); +} +}); +} +}); +Gestures.register({ +name: 'tap', +deps: [ +'mousedown', +'click', +'touchstart', +'touchend' +], +flow: { +start: [ +'mousedown', +'touchstart' +], +end: [ +'click', +'touchend' +] +}, +emits: ['tap'], +info: { +x: NaN, +y: NaN, +prevent: false +}, +reset: function () { +this.info.x = NaN; +this.info.y = NaN; +this.info.prevent = false; +}, +save: function (e) { +this.info.x = e.clientX; +this.info.y = e.clientY; +}, +mousedown: function (e) { +if (hasLeftMouseButton(e)) { +this.save(e); +} +}, +click: function (e) { +if (hasLeftMouseButton(e)) { +this.forward(e); +} +}, +touchstart: function (e) { +this.save(e.changedTouches[0]); +}, +touchend: function (e) { +this.forward(e.changedTouches[0]); +}, +forward: function (e) { +var dx = Math.abs(e.clientX - this.info.x); +var dy = Math.abs(e.clientY - this.info.y); +var t = Gestures.findOriginalTarget(e); +if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE || isSyntheticClick(e)) { +if (!this.info.prevent) { +Gestures.fire(t, 'tap', { +x: e.clientX, +y: e.clientY, +sourceEvent: e +}); +} +} +} +}); +var DIRECTION_MAP = { +x: 'pan-x', +y: 'pan-y', +none: 'none', +all: 'auto' +}; +Polymer.Base._addFeature({ +_setupGestures: function () { +this.__polymerGestures = null; +}, +_listen: function (node, eventName, handler) { +if (Gestures.gestures[eventName]) { +Gestures.add(node, eventName, handler); +} else { +node.addEventListener(eventName, handler); +} +}, +_unlisten: function (node, eventName, handler) { +if (Gestures.gestures[eventName]) { +Gestures.remove(node, eventName, handler); +} else { +node.removeEventListener(eventName, handler); +} +}, +setScrollDirection: function (direction, node) { +node = node || this; +Gestures.setTouchAction(node, DIRECTION_MAP[direction] || 'auto'); +} +}); +Polymer.Gestures = Gestures; +}()); +Polymer.Base._addFeature({ +$$: function (slctr) { +return Polymer.dom(this.root).querySelector(slctr); +}, +toggleClass: function (name, bool, node) { +node = node || this; +if (arguments.length == 1) { +bool = !node.classList.contains(name); +} +if (bool) { +Polymer.dom(node).classList.add(name); +} else { +Polymer.dom(node).classList.remove(name); +} +}, +toggleAttribute: function (name, bool, node) { +node = node || this; +if (arguments.length == 1) { +bool = !node.hasAttribute(name); +} +if (bool) { +Polymer.dom(node).setAttribute(name, ''); +} else { +Polymer.dom(node).removeAttribute(name); +} +}, +classFollows: function (name, toElement, fromElement) { +if (fromElement) { +Polymer.dom(fromElement).classList.remove(name); +} +if (toElement) { +Polymer.dom(toElement).classList.add(name); +} +}, +attributeFollows: function (name, toElement, fromElement) { +if (fromElement) { +Polymer.dom(fromElement).removeAttribute(name); +} +if (toElement) { +Polymer.dom(toElement).setAttribute(name, ''); +} +}, +getEffectiveChildNodes: function () { +return Polymer.dom(this).getEffectiveChildNodes(); +}, +getEffectiveChildren: function () { +var list = Polymer.dom(this).getEffectiveChildNodes(); +return list.filter(function (n) { +return n.nodeType === Node.ELEMENT_NODE; +}); +}, +getEffectiveTextContent: function () { +var cn = this.getEffectiveChildNodes(); +var tc = []; +for (var i = 0, c; c = cn[i]; i++) { +if (c.nodeType !== Node.COMMENT_NODE) { +tc.push(Polymer.dom(c).textContent); +} +} +return tc.join(''); +}, +queryEffectiveChildren: function (slctr) { +var e$ = Polymer.dom(this).queryDistributedElements(slctr); +return e$ && e$[0]; +}, +queryAllEffectiveChildren: function (slctr) { +return Polymer.dom(this).queryDistributedElements(slctr); +}, +getContentChildNodes: function (slctr) { +var content = Polymer.dom(this.root).querySelector(slctr || 'content'); +return content ? Polymer.dom(content).getDistributedNodes() : []; +}, +getContentChildren: function (slctr) { +return this.getContentChildNodes(slctr).filter(function (n) { +return n.nodeType === Node.ELEMENT_NODE; +}); +}, +fire: function (type, detail, options) { +options = options || Polymer.nob; +var node = options.node || this; +var detail = detail === null || detail === undefined ? {} : detail; +var bubbles = options.bubbles === undefined ? true : options.bubbles; +var cancelable = Boolean(options.cancelable); +var useCache = options._useCache; +var event = this._getEvent(type, bubbles, cancelable, useCache); +event.detail = detail; +if (useCache) { +this.__eventCache[type] = null; +} +node.dispatchEvent(event); +if (useCache) { +this.__eventCache[type] = event; +} +return event; +}, +__eventCache: {}, +_getEvent: function (type, bubbles, cancelable, useCache) { +var event = useCache && this.__eventCache[type]; +if (!event || (event.bubbles != bubbles || event.cancelable != cancelable)) { +event = new Event(type, { +bubbles: Boolean(bubbles), +cancelable: cancelable +}); +} +return event; +}, +async: function (callback, waitTime) { +var self = this; +return Polymer.Async.run(function () { +callback.call(self); +}, waitTime); +}, +cancelAsync: function (handle) { +Polymer.Async.cancel(handle); +}, +arrayDelete: function (path, item) { +var index; +if (Array.isArray(path)) { +index = path.indexOf(item); +if (index >= 0) { +return path.splice(index, 1); +} +} else { +var arr = this._get(path); +index = arr.indexOf(item); +if (index >= 0) { +return this.splice(path, index, 1); +} +} +}, +transform: function (transform, node) { +node = node || this; +node.style.webkitTransform = transform; +node.style.transform = transform; +}, +translate3d: function (x, y, z, node) { +node = node || this; +this.transform('translate3d(' + x + ',' + y + ',' + z + ')', node); +}, +importHref: function (href, onload, onerror, optAsync) { +var l = document.createElement('link'); +l.rel = 'import'; +l.href = href; +optAsync = Boolean(optAsync); +if (optAsync) { +l.setAttribute('async', ''); +} +var self = this; +if (onload) { +l.onload = function (e) { +return onload.call(self, e); +}; +} +if (onerror) { +l.onerror = function (e) { +return onerror.call(self, e); +}; +} +document.head.appendChild(l); +return l; +}, +create: function (tag, props) { +var elt = document.createElement(tag); +if (props) { +for (var n in props) { +elt[n] = props[n]; +} +} +return elt; +}, +isLightDescendant: function (node) { +return this !== node && this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot(); +}, +isLocalDescendant: function (node) { +return this.root === Polymer.dom(node).getOwnerRoot(); +} +}); +Polymer.Bind = { +_dataEventCache: {}, +prepareModel: function (model) { +Polymer.Base.mixin(model, this._modelApi); +}, +_modelApi: { +_notifyChange: function (source, event, value) { +value = value === undefined ? this[source] : value; +event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed'; +this.fire(event, { value: value }, { +bubbles: false, +cancelable: false, +_useCache: true +}); +}, +_propertySetter: function (property, value, effects, fromAbove) { +var old = this.__data__[property]; +if (old !== value && (old === old || value === value)) { +this.__data__[property] = value; +if (typeof value == 'object') { +this._clearPath(property); +} +if (this._propertyChanged) { +this._propertyChanged(property, value, old); +} +if (effects) { +this._effectEffects(property, value, effects, old, fromAbove); +} +} +return old; +}, +__setProperty: function (property, value, quiet, node) { +node = node || this; +var effects = node._propertyEffects && node._propertyEffects[property]; +if (effects) { +node._propertySetter(property, value, effects, quiet); +} else { +node[property] = value; +} +}, +_effectEffects: function (property, value, effects, old, fromAbove) { +for (var i = 0, l = effects.length, fx; i < l && (fx = effects[i]); i++) { +fx.fn.call(this, property, value, fx.effect, old, fromAbove); +} +}, +_clearPath: function (path) { +for (var prop in this.__data__) { +if (prop.indexOf(path + '.') === 0) { +this.__data__[prop] = undefined; +} +} +} +}, +ensurePropertyEffects: function (model, property) { +if (!model._propertyEffects) { +model._propertyEffects = {}; +} +var fx = model._propertyEffects[property]; +if (!fx) { +fx = model._propertyEffects[property] = []; +} +return fx; +}, +addPropertyEffect: function (model, property, kind, effect) { +var fx = this.ensurePropertyEffects(model, property); +var propEffect = { +kind: kind, +effect: effect, +fn: Polymer.Bind['_' + kind + 'Effect'] +}; +fx.push(propEffect); +return propEffect; +}, +createBindings: function (model) { +var fx$ = model._propertyEffects; +if (fx$) { +for (var n in fx$) { +var fx = fx$[n]; +fx.sort(this._sortPropertyEffects); +this._createAccessors(model, n, fx); +} +} +}, +_sortPropertyEffects: function () { +var EFFECT_ORDER = { +'compute': 0, +'annotation': 1, +'computedAnnotation': 2, +'reflect': 3, +'notify': 4, +'observer': 5, +'complexObserver': 6, +'function': 7 +}; +return function (a, b) { +return EFFECT_ORDER[a.kind] - EFFECT_ORDER[b.kind]; +}; +}(), +_createAccessors: function (model, property, effects) { +var defun = { +get: function () { +return this.__data__[property]; +} +}; +var setter = function (value) { +this._propertySetter(property, value, effects); +}; +var info = model.getPropertyInfo && model.getPropertyInfo(property); +if (info && info.readOnly) { +if (!info.computed) { +model['_set' + this.upper(property)] = setter; +} +} else { +defun.set = setter; +} +Object.defineProperty(model, property, defun); +}, +upper: function (name) { +return name[0].toUpperCase() + name.substring(1); +}, +_addAnnotatedListener: function (model, index, property, path, event) { +if (!model._bindListeners) { +model._bindListeners = []; +} +var fn = this._notedListenerFactory(property, path, this._isStructured(path)); +var eventName = event || Polymer.CaseMap.camelToDashCase(property) + '-changed'; +model._bindListeners.push({ +index: index, +property: property, +path: path, +changedFn: fn, +event: eventName +}); +}, +_isStructured: function (path) { +return path.indexOf('.') > 0; +}, +_isEventBogus: function (e, target) { +return e.path && e.path[0] !== target; +}, +_notedListenerFactory: function (property, path, isStructured) { +return function (target, value, targetPath) { +if (targetPath) { +this._notifyPath(this._fixPath(path, property, targetPath), value); +} else { +value = target[property]; +if (!isStructured) { +this[path] = value; +} else { +if (this.__data__[path] != value) { +this.set(path, value); +} +} +} +}; +}, +prepareInstance: function (inst) { +inst.__data__ = Object.create(null); +}, +setupBindListeners: function (inst) { +var b$ = inst._bindListeners; +for (var i = 0, l = b$.length, info; i < l && (info = b$[i]); i++) { +var node = inst._nodes[info.index]; +this._addNotifyListener(node, inst, info.event, info.changedFn); +} +; +}, +_addNotifyListener: function (element, context, event, changedFn) { +element.addEventListener(event, function (e) { +return context._notifyListener(changedFn, e); +}); +} +}; +Polymer.Base.extend(Polymer.Bind, { +_shouldAddListener: function (effect) { +return effect.name && effect.kind != 'attribute' && effect.kind != 'text' && !effect.isCompound && effect.parts[0].mode === '{' && !effect.parts[0].negate; +}, +_annotationEffect: function (source, value, effect) { +if (source != effect.value) { +value = this._get(effect.value); +this.__data__[effect.value] = value; +} +var calc = effect.negate ? !value : value; +if (!effect.customEvent || this._nodes[effect.index][effect.name] !== calc) { +return this._applyEffectValue(effect, calc); +} +}, +_reflectEffect: function (source, value, effect) { +this.reflectPropertyToAttribute(source, effect.attribute, value); +}, +_notifyEffect: function (source, value, effect, old, fromAbove) { +if (!fromAbove) { +this._notifyChange(source, effect.event, value); +} +}, +_functionEffect: function (source, value, fn, old, fromAbove) { +fn.call(this, source, value, old, fromAbove); +}, +_observerEffect: function (source, value, effect, old) { +var fn = this[effect.method]; +if (fn) { +fn.call(this, value, old); +} else { +this._warn(this._logf('_observerEffect', 'observer method `' + effect.method + '` not defined')); +} +}, +_complexObserverEffect: function (source, value, effect) { +var fn = this[effect.method]; +if (fn) { +var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value); +if (args) { +fn.apply(this, args); +} +} else { +this._warn(this._logf('_complexObserverEffect', 'observer method `' + effect.method + '` not defined')); +} +}, +_computeEffect: function (source, value, effect) { +var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value); +if (args) { +var fn = this[effect.method]; +if (fn) { +this.__setProperty(effect.name, fn.apply(this, args)); +} else { +this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined')); +} +} +}, +_annotatedComputationEffect: function (source, value, effect) { +var computedHost = this._rootDataHost || this; +var fn = computedHost[effect.method]; +if (fn) { +var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value); +if (args) { +var computedvalue = fn.apply(computedHost, args); +if (effect.negate) { +computedvalue = !computedvalue; +} +this._applyEffectValue(effect, computedvalue); +} +} else { +computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined')); +} +}, +_marshalArgs: function (model, effect, path, value) { +var values = []; +var args = effect.args; +for (var i = 0, l = args.length; i < l; i++) { +var arg = args[i]; +var name = arg.name; +var v; +if (arg.literal) { +v = arg.value; +} else if (arg.structured) { +v = Polymer.Base._get(name, model); +} else { +v = model[name]; +} +if (args.length > 1 && v === undefined) { +return; +} +if (arg.wildcard) { +var baseChanged = name.indexOf(path + '.') === 0; +var matches = effect.trigger.name.indexOf(name) === 0 && !baseChanged; +values[i] = { +path: matches ? path : name, +value: matches ? value : v, +base: v +}; +} else { +values[i] = v; +} +} +return values; +} +}); +Polymer.Base._addFeature({ +_addPropertyEffect: function (property, kind, effect) { +var prop = Polymer.Bind.addPropertyEffect(this, property, kind, effect); +prop.pathFn = this['_' + prop.kind + 'PathEffect']; +}, +_prepEffects: function () { +Polymer.Bind.prepareModel(this); +this._addAnnotationEffects(this._notes); +}, +_prepBindings: function () { +Polymer.Bind.createBindings(this); +}, +_addPropertyEffects: function (properties) { +if (properties) { +for (var p in properties) { +var prop = properties[p]; +if (prop.observer) { +this._addObserverEffect(p, prop.observer); +} +if (prop.computed) { +prop.readOnly = true; +this._addComputedEffect(p, prop.computed); +} +if (prop.notify) { +this._addPropertyEffect(p, 'notify', { event: Polymer.CaseMap.camelToDashCase(p) + '-changed' }); +} +if (prop.reflectToAttribute) { +this._addPropertyEffect(p, 'reflect', { attribute: Polymer.CaseMap.camelToDashCase(p) }); +} +if (prop.readOnly) { +Polymer.Bind.ensurePropertyEffects(this, p); +} +} +} +}, +_addComputedEffect: function (name, expression) { +var sig = this._parseMethod(expression); +for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) { +this._addPropertyEffect(arg.model, 'compute', { +method: sig.method, +args: sig.args, +trigger: arg, +name: name +}); +} +}, +_addObserverEffect: function (property, observer) { +this._addPropertyEffect(property, 'observer', { +method: observer, +property: property +}); +}, +_addComplexObserverEffects: function (observers) { +if (observers) { +for (var i = 0, o; i < observers.length && (o = observers[i]); i++) { +this._addComplexObserverEffect(o); +} +} +}, +_addComplexObserverEffect: function (observer) { +var sig = this._parseMethod(observer); +if (!sig) { +throw new Error('Malformed observer expression \'' + observer + '\''); +} +for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) { +this._addPropertyEffect(arg.model, 'complexObserver', { +method: sig.method, +args: sig.args, +trigger: arg +}); +} +}, +_addAnnotationEffects: function (notes) { +for (var i = 0, note; i < notes.length && (note = notes[i]); i++) { +var b$ = note.bindings; +for (var j = 0, binding; j < b$.length && (binding = b$[j]); j++) { +this._addAnnotationEffect(binding, i); +} +} +}, +_addAnnotationEffect: function (note, index) { +if (Polymer.Bind._shouldAddListener(note)) { +Polymer.Bind._addAnnotatedListener(this, index, note.name, note.parts[0].value, note.parts[0].event); +} +for (var i = 0; i < note.parts.length; i++) { +var part = note.parts[i]; +if (part.signature) { +this._addAnnotatedComputationEffect(note, part, index); +} else if (!part.literal) { +this._addPropertyEffect(part.model, 'annotation', { +kind: note.kind, +index: index, +name: note.name, +value: part.value, +isCompound: note.isCompound, +compoundIndex: part.compoundIndex, +event: part.event, +customEvent: part.customEvent, +negate: part.negate +}); +} +} +}, +_addAnnotatedComputationEffect: function (note, part, index) { +var sig = part.signature; +if (sig.static) { +this.__addAnnotatedComputationEffect('__static__', index, note, part, null); +} else { +for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) { +if (!arg.literal) { +this.__addAnnotatedComputationEffect(arg.model, index, note, part, arg); +} +} +} +}, +__addAnnotatedComputationEffect: function (property, index, note, part, trigger) { +this._addPropertyEffect(property, 'annotatedComputation', { +index: index, +isCompound: note.isCompound, +compoundIndex: part.compoundIndex, +kind: note.kind, +name: note.name, +negate: part.negate, +method: part.signature.method, +args: part.signature.args, +trigger: trigger +}); +}, +_parseMethod: function (expression) { +var m = expression.match(/([^\s]+?)\((.*)\)/); +if (m) { +var sig = { +method: m[1], +static: true +}; +if (m[2].trim()) { +var args = m[2].replace(/\\,/g, ',').split(','); +return this._parseArgs(args, sig); +} else { +sig.args = Polymer.nar; +return sig; +} +} +}, +_parseArgs: function (argList, sig) { +sig.args = argList.map(function (rawArg) { +var arg = this._parseArg(rawArg); +if (!arg.literal) { +sig.static = false; +} +return arg; +}, this); +return sig; +}, +_parseArg: function (rawArg) { +var arg = rawArg.trim().replace(/,/g, ',').replace(/\\(.)/g, '$1'); +var a = { name: arg }; +var fc = arg[0]; +if (fc === '-') { +fc = arg[1]; +} +if (fc >= '0' && fc <= '9') { +fc = '#'; +} +switch (fc) { +case '\'': +case '"': +a.value = arg.slice(1, -1); +a.literal = true; +break; +case '#': +a.value = Number(arg); +a.literal = true; +break; +} +if (!a.literal) { +a.model = this._modelForPath(arg); +a.structured = arg.indexOf('.') > 0; +if (a.structured) { +a.wildcard = arg.slice(-2) == '.*'; +if (a.wildcard) { +a.name = arg.slice(0, -2); +} +} +} +return a; +}, +_marshalInstanceEffects: function () { +Polymer.Bind.prepareInstance(this); +if (this._bindListeners) { +Polymer.Bind.setupBindListeners(this); +} +}, +_applyEffectValue: function (info, value) { +var node = this._nodes[info.index]; +var property = info.name; +if (info.isCompound) { +var storage = node.__compoundStorage__[property]; +storage[info.compoundIndex] = value; +value = storage.join(''); +} +if (info.kind == 'attribute') { +this.serializeValueToAttribute(value, property, node); +} else { +if (property === 'className') { +value = this._scopeElementClass(node, value); +} +if (property === 'textContent' || node.localName == 'input' && property == 'value') { +value = value == undefined ? '' : value; +} +var pinfo; +if (!node._propertyInfo || !(pinfo = node._propertyInfo[property]) || !pinfo.readOnly) { +this.__setProperty(property, value, false, node); +} +} +}, +_executeStaticEffects: function () { +if (this._propertyEffects && this._propertyEffects.__static__) { +this._effectEffects('__static__', null, this._propertyEffects.__static__); +} +} +}); +Polymer.Base._addFeature({ +_setupConfigure: function (initialConfig) { +this._config = {}; +this._handlers = []; +this._aboveConfig = null; +if (initialConfig) { +for (var i in initialConfig) { +if (initialConfig[i] !== undefined) { +this._config[i] = initialConfig[i]; +} +} +} +}, +_marshalAttributes: function () { +this._takeAttributesToModel(this._config); +}, +_attributeChangedImpl: function (name) { +var model = this._clientsReadied ? this : this._config; +this._setAttributeToProperty(model, name); +}, +_configValue: function (name, value) { +var info = this._propertyInfo[name]; +if (!info || !info.readOnly) { +this._config[name] = value; +} +}, +_beforeClientsReady: function () { +this._configure(); +}, +_configure: function () { +this._configureAnnotationReferences(); +this._aboveConfig = this.mixin({}, this._config); +var config = {}; +for (var i = 0; i < this.behaviors.length; i++) { +this._configureProperties(this.behaviors[i].properties, config); +} +this._configureProperties(this.properties, config); +this.mixin(config, this._aboveConfig); +this._config = config; +if (this._clients && this._clients.length) { +this._distributeConfig(this._config); +} +}, +_configureProperties: function (properties, config) { +for (var i in properties) { +var c = properties[i]; +if (c.value !== undefined) { +var value = c.value; +if (typeof value == 'function') { +value = value.call(this, this._config); +} +config[i] = value; +} +} +}, +_distributeConfig: function (config) { +var fx$ = this._propertyEffects; +if (fx$) { +for (var p in config) { +var fx = fx$[p]; +if (fx) { +for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) { +if (x.kind === 'annotation' && !x.isCompound) { +var node = this._nodes[x.effect.index]; +if (node._configValue) { +var value = p === x.effect.value ? config[p] : this._get(x.effect.value, config); +node._configValue(x.effect.name, value); +} +} +} +} +} +} +}, +_afterClientsReady: function () { +this._executeStaticEffects(); +this._applyConfig(this._config, this._aboveConfig); +this._flushHandlers(); +}, +_applyConfig: function (config, aboveConfig) { +for (var n in config) { +if (this[n] === undefined) { +this.__setProperty(n, config[n], n in aboveConfig); +} +} +}, +_notifyListener: function (fn, e) { +if (!Polymer.Bind._isEventBogus(e, e.target)) { +var value, path; +if (e.detail) { +value = e.detail.value; +path = e.detail.path; +} +if (!this._clientsReadied) { +this._queueHandler([ +fn, +e.target, +value, +path +]); +} else { +return fn.call(this, e.target, value, path); +} +} +}, +_queueHandler: function (args) { +this._handlers.push(args); +}, +_flushHandlers: function () { +var h$ = this._handlers; +for (var i = 0, l = h$.length, h; i < l && (h = h$[i]); i++) { +h[0].call(this, h[1], h[2], h[3]); +} +this._handlers = []; +} +}); +(function () { +'use strict'; +Polymer.Base._addFeature({ +notifyPath: function (path, value, fromAbove) { +var info = {}; +this._get(path, this, info); +if (info.path) { +this._notifyPath(info.path, value, fromAbove); +} +}, +_notifyPath: function (path, value, fromAbove) { +var old = this._propertySetter(path, value); +if (old !== value && (old === old || value === value)) { +this._pathEffector(path, value); +if (!fromAbove) { +this._notifyPathUp(path, value); +} +return true; +} +}, +_getPathParts: function (path) { +if (Array.isArray(path)) { +var parts = []; +for (var i = 0; i < path.length; i++) { +var args = path[i].toString().split('.'); +for (var j = 0; j < args.length; j++) { +parts.push(args[j]); +} +} +return parts; +} else { +return path.toString().split('.'); +} +}, +set: function (path, value, root) { +var prop = root || this; +var parts = this._getPathParts(path); +var array; +var last = parts[parts.length - 1]; +if (parts.length > 1) { +for (var i = 0; i < parts.length - 1; i++) { +var part = parts[i]; +if (array && part[0] == '#') { +prop = Polymer.Collection.get(array).getItem(part); +} else { +prop = prop[part]; +if (array && parseInt(part, 10) == part) { +parts[i] = Polymer.Collection.get(array).getKey(prop); +} +} +if (!prop) { +return; +} +array = Array.isArray(prop) ? prop : null; +} +if (array) { +var coll = Polymer.Collection.get(array); +if (last[0] == '#') { +var key = last; +var old = coll.getItem(key); +last = array.indexOf(old); +coll.setItem(key, value); +} else if (parseInt(last, 10) == last) { +var old = prop[last]; +var key = coll.getKey(old); +parts[i] = key; +coll.setItem(key, value); +} +} +prop[last] = value; +if (!root) { +this._notifyPath(parts.join('.'), value); +} +} else { +prop[path] = value; +} +}, +get: function (path, root) { +return this._get(path, root); +}, +_get: function (path, root, info) { +var prop = root || this; +var parts = this._getPathParts(path); +var array; +for (var i = 0; i < parts.length; i++) { +if (!prop) { +return; +} +var part = parts[i]; +if (array && part[0] == '#') { +prop = Polymer.Collection.get(array).getItem(part); +} else { +prop = prop[part]; +if (info && array && parseInt(part, 10) == part) { +parts[i] = Polymer.Collection.get(array).getKey(prop); +} +} +array = Array.isArray(prop) ? prop : null; +} +if (info) { +info.path = parts.join('.'); +} +return prop; +}, +_pathEffector: function (path, value) { +var model = this._modelForPath(path); +var fx$ = this._propertyEffects && this._propertyEffects[model]; +if (fx$) { +for (var i = 0, fx; i < fx$.length && (fx = fx$[i]); i++) { +var fxFn = fx.pathFn; +if (fxFn) { +fxFn.call(this, path, value, fx.effect); +} +} +} +if (this._boundPaths) { +this._notifyBoundPaths(path, value); +} +}, +_annotationPathEffect: function (path, value, effect) { +if (effect.value === path || effect.value.indexOf(path + '.') === 0) { +Polymer.Bind._annotationEffect.call(this, path, value, effect); +} else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) { +var node = this._nodes[effect.index]; +if (node && node._notifyPath) { +var p = this._fixPath(effect.name, effect.value, path); +node._notifyPath(p, value, true); +} +} +}, +_complexObserverPathEffect: function (path, value, effect) { +if (this._pathMatchesEffect(path, effect)) { +Polymer.Bind._complexObserverEffect.call(this, path, value, effect); +} +}, +_computePathEffect: function (path, value, effect) { +if (this._pathMatchesEffect(path, effect)) { +Polymer.Bind._computeEffect.call(this, path, value, effect); +} +}, +_annotatedComputationPathEffect: function (path, value, effect) { +if (this._pathMatchesEffect(path, effect)) { +Polymer.Bind._annotatedComputationEffect.call(this, path, value, effect); +} +}, +_pathMatchesEffect: function (path, effect) { +var effectArg = effect.trigger.name; +return effectArg == path || effectArg.indexOf(path + '.') === 0 || effect.trigger.wildcard && path.indexOf(effectArg) === 0; +}, +linkPaths: function (to, from) { +this._boundPaths = this._boundPaths || {}; +if (from) { +this._boundPaths[to] = from; +} else { +this.unlinkPaths(to); +} +}, +unlinkPaths: function (path) { +if (this._boundPaths) { +delete this._boundPaths[path]; +} +}, +_notifyBoundPaths: function (path, value) { +for (var a in this._boundPaths) { +var b = this._boundPaths[a]; +if (path.indexOf(a + '.') == 0) { +this._notifyPath(this._fixPath(b, a, path), value); +} else if (path.indexOf(b + '.') == 0) { +this._notifyPath(this._fixPath(a, b, path), value); +} +} +}, +_fixPath: function (property, root, path) { +return property + path.slice(root.length); +}, +_notifyPathUp: function (path, value) { +var rootName = this._modelForPath(path); +var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName); +var eventName = dashCaseName + this._EVENT_CHANGED; +this.fire(eventName, { +path: path, +value: value +}, { +bubbles: false, +_useCache: true +}); +}, +_modelForPath: function (path) { +var dot = path.indexOf('.'); +return dot < 0 ? path : path.slice(0, dot); +}, +_EVENT_CHANGED: '-changed', +notifySplices: function (path, splices) { +var info = {}; +var array = this._get(path, this, info); +this._notifySplices(array, info.path, splices); +}, +_notifySplices: function (array, path, splices) { +var change = { +keySplices: Polymer.Collection.applySplices(array, splices), +indexSplices: splices +}; +if (!array.hasOwnProperty('splices')) { +Object.defineProperty(array, 'splices', { +configurable: true, +writable: true +}); +} +array.splices = change; +this._notifyPath(path + '.splices', change); +this._notifyPath(path + '.length', array.length); +change.keySplices = null; +change.indexSplices = null; +}, +_notifySplice: function (array, path, index, added, removed) { +this._notifySplices(array, path, [{ +index: index, +addedCount: added, +removed: removed, +object: array, +type: 'splice' +}]); +}, +push: function (path) { +var info = {}; +var array = this._get(path, this, info); +var args = Array.prototype.slice.call(arguments, 1); +var len = array.length; +var ret = array.push.apply(array, args); +if (args.length) { +this._notifySplice(array, info.path, len, args.length, []); +} +return ret; +}, +pop: function (path) { +var info = {}; +var array = this._get(path, this, info); +var hadLength = Boolean(array.length); +var args = Array.prototype.slice.call(arguments, 1); +var ret = array.pop.apply(array, args); +if (hadLength) { +this._notifySplice(array, info.path, array.length, 0, [ret]); +} +return ret; +}, +splice: function (path, start, deleteCount) { +var info = {}; +var array = this._get(path, this, info); +if (start < 0) { +start = array.length - Math.floor(-start); +} else { +start = Math.floor(start); +} +if (!start) { +start = 0; +} +var args = Array.prototype.slice.call(arguments, 1); +var ret = array.splice.apply(array, args); +var addedCount = Math.max(args.length - 2, 0); +if (addedCount || ret.length) { +this._notifySplice(array, info.path, start, addedCount, ret); +} +return ret; +}, +shift: function (path) { +var info = {}; +var array = this._get(path, this, info); +var hadLength = Boolean(array.length); +var args = Array.prototype.slice.call(arguments, 1); +var ret = array.shift.apply(array, args); +if (hadLength) { +this._notifySplice(array, info.path, 0, 0, [ret]); +} +return ret; +}, +unshift: function (path) { +var info = {}; +var array = this._get(path, this, info); +var args = Array.prototype.slice.call(arguments, 1); +var ret = array.unshift.apply(array, args); +if (args.length) { +this._notifySplice(array, info.path, 0, args.length, []); +} +return ret; +}, +prepareModelNotifyPath: function (model) { +this.mixin(model, { +fire: Polymer.Base.fire, +_getEvent: Polymer.Base._getEvent, +__eventCache: Polymer.Base.__eventCache, +notifyPath: Polymer.Base.notifyPath, +_get: Polymer.Base._get, +_EVENT_CHANGED: Polymer.Base._EVENT_CHANGED, +_notifyPath: Polymer.Base._notifyPath, +_notifyPathUp: Polymer.Base._notifyPathUp, +_pathEffector: Polymer.Base._pathEffector, +_annotationPathEffect: Polymer.Base._annotationPathEffect, +_complexObserverPathEffect: Polymer.Base._complexObserverPathEffect, +_annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect, +_computePathEffect: Polymer.Base._computePathEffect, +_modelForPath: Polymer.Base._modelForPath, +_pathMatchesEffect: Polymer.Base._pathMatchesEffect, +_notifyBoundPaths: Polymer.Base._notifyBoundPaths, +_getPathParts: Polymer.Base._getPathParts +}); +} +}); +}()); +Polymer.Base._addFeature({ +resolveUrl: function (url) { +var module = Polymer.DomModule.import(this.is); +var root = ''; +if (module) { +var assetPath = module.getAttribute('assetpath') || ''; +root = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI); +} +return Polymer.ResolveUrl.resolveUrl(url, root); +} +}); +Polymer.CssParse = function () { +return { +parse: function (text) { +text = this._clean(text); +return this._parseCss(this._lex(text), text); +}, +_clean: function (cssText) { +return cssText.replace(this._rx.comments, '').replace(this._rx.port, ''); +}, +_lex: function (text) { +var root = { +start: 0, +end: text.length +}; +var n = root; +for (var i = 0, l = text.length; i < l; i++) { +switch (text[i]) { +case this.OPEN_BRACE: +if (!n.rules) { +n.rules = []; +} +var p = n; +var previous = p.rules[p.rules.length - 1]; +n = { +start: i + 1, +parent: p, +previous: previous +}; +p.rules.push(n); +break; +case this.CLOSE_BRACE: +n.end = i + 1; +n = n.parent || root; +break; +} +} +return root; +}, +_parseCss: function (node, text) { +var t = text.substring(node.start, node.end - 1); +node.parsedCssText = node.cssText = t.trim(); +if (node.parent) { +var ss = node.previous ? node.previous.end : node.parent.start; +t = text.substring(ss, node.start - 1); +t = this._expandUnicodeEscapes(t); +t = t.replace(this._rx.multipleSpaces, ' '); +t = t.substring(t.lastIndexOf(';') + 1); +var s = node.parsedSelector = node.selector = t.trim(); +node.atRule = s.indexOf(this.AT_START) === 0; +if (node.atRule) { +if (s.indexOf(this.MEDIA_START) === 0) { +node.type = this.types.MEDIA_RULE; +} else if (s.match(this._rx.keyframesRule)) { +node.type = this.types.KEYFRAMES_RULE; +} +} else { +if (s.indexOf(this.VAR_START) === 0) { +node.type = this.types.MIXIN_RULE; +} else { +node.type = this.types.STYLE_RULE; +} +} +} +var r$ = node.rules; +if (r$) { +for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) { +this._parseCss(r, text); +} +} +return node; +}, +_expandUnicodeEscapes: function (s) { +return s.replace(/\\([0-9a-f]{1,6})\s/gi, function () { +var code = arguments[1], repeat = 6 - code.length; +while (repeat--) { +code = '0' + code; +} +return '\\' + code; +}); +}, +stringify: function (node, preserveProperties, text) { +text = text || ''; +var cssText = ''; +if (node.cssText || node.rules) { +var r$ = node.rules; +if (r$ && (preserveProperties || !this._hasMixinRules(r$))) { +for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) { +cssText = this.stringify(r, preserveProperties, cssText); +} +} else { +cssText = preserveProperties ? node.cssText : this.removeCustomProps(node.cssText); +cssText = cssText.trim(); +if (cssText) { +cssText = ' ' + cssText + '\n'; +} +} +} +if (cssText) { +if (node.selector) { +text += node.selector + ' ' + this.OPEN_BRACE + '\n'; +} +text += cssText; +if (node.selector) { +text += this.CLOSE_BRACE + '\n\n'; +} +} +return text; +}, +_hasMixinRules: function (rules) { +return rules[0].selector.indexOf(this.VAR_START) === 0; +}, +removeCustomProps: function (cssText) { +cssText = this.removeCustomPropAssignment(cssText); +return this.removeCustomPropApply(cssText); +}, +removeCustomPropAssignment: function (cssText) { +return cssText.replace(this._rx.customProp, '').replace(this._rx.mixinProp, ''); +}, +removeCustomPropApply: function (cssText) { +return cssText.replace(this._rx.mixinApply, '').replace(this._rx.varApply, ''); +}, +types: { +STYLE_RULE: 1, +KEYFRAMES_RULE: 7, +MEDIA_RULE: 4, +MIXIN_RULE: 1000 +}, +OPEN_BRACE: '{', +CLOSE_BRACE: '}', +_rx: { +comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, +port: /@import[^;]*;/gim, +customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim, +mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim, +mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim, +varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim, +keyframesRule: /^@[^\s]*keyframes/, +multipleSpaces: /\s+/g +}, +VAR_START: '--', +MEDIA_START: '@media', +AT_START: '@' +}; +}(); +Polymer.StyleUtil = function () { +return { +MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template', +INCLUDE_ATTR: 'include', +toCssText: function (rules, callback, preserveProperties) { +if (typeof rules === 'string') { +rules = this.parser.parse(rules); +} +if (callback) { +this.forEachStyleRule(rules, callback); +} +return this.parser.stringify(rules, preserveProperties); +}, +forRulesInStyles: function (styles, callback) { +if (styles) { +for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) { +this.forEachStyleRule(this.rulesForStyle(s), callback); +} +} +}, +rulesForStyle: function (style) { +if (!style.__cssRules && style.textContent) { +style.__cssRules = this.parser.parse(style.textContent); +} +return style.__cssRules; +}, +forEachStyleRule: function (node, callback) { +if (!node) { +return; +} +var skipRules = false; +if (node.type === this.ruleTypes.STYLE_RULE) { +callback(node); +} else if (node.type === this.ruleTypes.KEYFRAMES_RULE || node.type === this.ruleTypes.MIXIN_RULE) { +skipRules = true; +} +var r$ = node.rules; +if (r$ && !skipRules) { +for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) { +this.forEachStyleRule(r, callback); +} +} +}, +applyCss: function (cssText, moniker, target, afterNode) { +var style = document.createElement('style'); +if (moniker) { +style.setAttribute('scope', moniker); +} +style.textContent = cssText; +target = target || document.head; +if (!afterNode) { +var n$ = target.querySelectorAll('style[scope]'); +afterNode = n$[n$.length - 1]; +} +target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild); +return style; +}, +cssFromModules: function (moduleIds, warnIfNotFound) { +var modules = moduleIds.trim().split(' '); +var cssText = ''; +for (var i = 0; i < modules.length; i++) { +cssText += this.cssFromModule(modules[i], warnIfNotFound); +} +return cssText; +}, +cssFromModule: function (moduleId, warnIfNotFound) { +var m = Polymer.DomModule.import(moduleId); +if (m && !m._cssText) { +m._cssText = this.cssFromElement(m); +} +if (!m && warnIfNotFound) { +console.warn('Could not find style data in module named', moduleId); +} +return m && m._cssText || ''; +}, +cssFromElement: function (element) { +var cssText = ''; +var content = element.content || element; +var e$ = Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR)); +for (var i = 0, e; i < e$.length; i++) { +e = e$[i]; +if (e.localName === 'template') { +cssText += this.cssFromElement(e); +} else { +if (e.localName === 'style') { +var include = e.getAttribute(this.INCLUDE_ATTR); +if (include) { +cssText += this.cssFromModules(include, true); +} +e = e.__appliedElement || e; +e.parentNode.removeChild(e); +cssText += this.resolveCss(e.textContent, element.ownerDocument); +} else if (e.import && e.import.body) { +cssText += this.resolveCss(e.import.body.textContent, e.import); +} +} +} +return cssText; +}, +resolveCss: Polymer.ResolveUrl.resolveCss, +parser: Polymer.CssParse, +ruleTypes: Polymer.CssParse.types +}; +}(); +Polymer.StyleTransformer = function () { +var nativeShadow = Polymer.Settings.useNativeShadow; +var styleUtil = Polymer.StyleUtil; +var api = { +dom: function (node, scope, useAttr, shouldRemoveScope) { +this._transformDom(node, scope || '', useAttr, shouldRemoveScope); +}, +_transformDom: function (node, selector, useAttr, shouldRemoveScope) { +if (node.setAttribute) { +this.element(node, selector, useAttr, shouldRemoveScope); +} +var c$ = Polymer.dom(node).childNodes; +for (var i = 0; i < c$.length; i++) { +this._transformDom(c$[i], selector, useAttr, shouldRemoveScope); +} +}, +element: function (element, scope, useAttr, shouldRemoveScope) { +if (useAttr) { +if (shouldRemoveScope) { +element.removeAttribute(SCOPE_NAME); +} else { +element.setAttribute(SCOPE_NAME, scope); +} +} else { +if (scope) { +if (element.classList) { +if (shouldRemoveScope) { +element.classList.remove(SCOPE_NAME); +element.classList.remove(scope); +} else { +element.classList.add(SCOPE_NAME); +element.classList.add(scope); +} +} else if (element.getAttribute) { +var c = element.getAttribute(CLASS); +if (shouldRemoveScope) { +if (c) { +element.setAttribute(CLASS, c.replace(SCOPE_NAME, '').replace(scope, '')); +} +} else { +element.setAttribute(CLASS, (c ? c + ' ' : '') + SCOPE_NAME + ' ' + scope); +} +} +} +} +}, +elementStyles: function (element, callback) { +var styles = element._styles; +var cssText = ''; +for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) { +var rules = styleUtil.rulesForStyle(s); +cssText += nativeShadow ? styleUtil.toCssText(rules, callback) : this.css(rules, element.is, element.extends, callback, element._scopeCssViaAttr) + '\n\n'; +} +return cssText.trim(); +}, +css: function (rules, scope, ext, callback, useAttr) { +var hostScope = this._calcHostScope(scope, ext); +scope = this._calcElementScope(scope, useAttr); +var self = this; +return styleUtil.toCssText(rules, function (rule) { +if (!rule.isScoped) { +self.rule(rule, scope, hostScope); +rule.isScoped = true; +} +if (callback) { +callback(rule, scope, hostScope); +} +}); +}, +_calcElementScope: function (scope, useAttr) { +if (scope) { +return useAttr ? CSS_ATTR_PREFIX + scope + CSS_ATTR_SUFFIX : CSS_CLASS_PREFIX + scope; +} else { +return ''; +} +}, +_calcHostScope: function (scope, ext) { +return ext ? '[is=' + scope + ']' : scope; +}, +rule: function (rule, scope, hostScope) { +this._transformRule(rule, this._transformComplexSelector, scope, hostScope); +}, +_transformRule: function (rule, transformer, scope, hostScope) { +var p$ = rule.selector.split(COMPLEX_SELECTOR_SEP); +for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) { +p$[i] = transformer.call(this, p, scope, hostScope); +} +rule.selector = rule.transformedSelector = p$.join(COMPLEX_SELECTOR_SEP); +}, +_transformComplexSelector: function (selector, scope, hostScope) { +var stop = false; +var hostContext = false; +var self = this; +selector = selector.replace(SIMPLE_SELECTOR_SEP, function (m, c, s) { +if (!stop) { +var info = self._transformCompoundSelector(s, c, scope, hostScope); +stop = stop || info.stop; +hostContext = hostContext || info.hostContext; +c = info.combinator; +s = info.value; +} else { +s = s.replace(SCOPE_JUMP, ' '); +} +return c + s; +}); +if (hostContext) { +selector = selector.replace(HOST_CONTEXT_PAREN, function (m, pre, paren, post) { +return pre + paren + ' ' + hostScope + post + COMPLEX_SELECTOR_SEP + ' ' + pre + hostScope + paren + post; +}); +} +return selector; +}, +_transformCompoundSelector: function (selector, combinator, scope, hostScope) { +var jumpIndex = selector.search(SCOPE_JUMP); +var hostContext = false; +if (selector.indexOf(HOST_CONTEXT) >= 0) { +hostContext = true; +} else if (selector.indexOf(HOST) >= 0) { +selector = selector.replace(HOST_PAREN, function (m, host, paren) { +return hostScope + paren; +}); +selector = selector.replace(HOST, hostScope); +} else if (jumpIndex !== 0) { +selector = scope ? this._transformSimpleSelector(selector, scope) : selector; +} +if (selector.indexOf(CONTENT) >= 0) { +combinator = ''; +} +var stop; +if (jumpIndex >= 0) { +selector = selector.replace(SCOPE_JUMP, ' '); +stop = true; +} +return { +value: selector, +combinator: combinator, +stop: stop, +hostContext: hostContext +}; +}, +_transformSimpleSelector: function (selector, scope) { +var p$ = selector.split(PSEUDO_PREFIX); +p$[0] += scope; +return p$.join(PSEUDO_PREFIX); +}, +documentRule: function (rule) { +rule.selector = rule.parsedSelector; +this.normalizeRootSelector(rule); +if (!nativeShadow) { +this._transformRule(rule, this._transformDocumentSelector); +} +}, +normalizeRootSelector: function (rule) { +if (rule.selector === ROOT) { +rule.selector = 'body'; +} +}, +_transformDocumentSelector: function (selector) { +return selector.match(SCOPE_JUMP) ? this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) : this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR); +}, +SCOPE_NAME: 'style-scope' +}; +var SCOPE_NAME = api.SCOPE_NAME; +var SCOPE_DOC_SELECTOR = ':not([' + SCOPE_NAME + '])' + ':not(.' + SCOPE_NAME + ')'; +var COMPLEX_SELECTOR_SEP = ','; +var SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)([^\s>+~]+)/g; +var HOST = ':host'; +var ROOT = ':root'; +var HOST_PAREN = /(\:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g; +var HOST_CONTEXT = ':host-context'; +var HOST_CONTEXT_PAREN = /(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/; +var CONTENT = '::content'; +var SCOPE_JUMP = /::content|::shadow|\/deep\//; +var CSS_CLASS_PREFIX = '.'; +var CSS_ATTR_PREFIX = '[' + SCOPE_NAME + '~='; +var CSS_ATTR_SUFFIX = ']'; +var PSEUDO_PREFIX = ':'; +var CLASS = 'class'; +return api; +}(); +Polymer.StyleExtends = function () { +var styleUtil = Polymer.StyleUtil; +return { +hasExtends: function (cssText) { +return Boolean(cssText.match(this.rx.EXTEND)); +}, +transform: function (style) { +var rules = styleUtil.rulesForStyle(style); +var self = this; +styleUtil.forEachStyleRule(rules, function (rule) { +var map = self._mapRule(rule); +if (rule.parent) { +var m; +while (m = self.rx.EXTEND.exec(rule.cssText)) { +var extend = m[1]; +var extendor = self._findExtendor(extend, rule); +if (extendor) { +self._extendRule(rule, extendor); +} +} +} +rule.cssText = rule.cssText.replace(self.rx.EXTEND, ''); +}); +return styleUtil.toCssText(rules, function (rule) { +if (rule.selector.match(self.rx.STRIP)) { +rule.cssText = ''; +} +}, true); +}, +_mapRule: function (rule) { +if (rule.parent) { +var map = rule.parent.map || (rule.parent.map = {}); +var parts = rule.selector.split(','); +for (var i = 0, p; i < parts.length; i++) { +p = parts[i]; +map[p.trim()] = rule; +} +return map; +} +}, +_findExtendor: function (extend, rule) { +return rule.parent && rule.parent.map && rule.parent.map[extend] || this._findExtendor(extend, rule.parent); +}, +_extendRule: function (target, source) { +if (target.parent !== source.parent) { +this._cloneAndAddRuleToParent(source, target.parent); +} +target.extends = target.extends || []; +target.extends.push(source); +source.selector = source.selector.replace(this.rx.STRIP, ''); +source.selector = (source.selector && source.selector + ',\n') + target.selector; +if (source.extends) { +source.extends.forEach(function (e) { +this._extendRule(target, e); +}, this); +} +}, +_cloneAndAddRuleToParent: function (rule, parent) { +rule = Object.create(rule); +rule.parent = parent; +if (rule.extends) { +rule.extends = rule.extends.slice(); +} +parent.rules.push(rule); +}, +rx: { +EXTEND: /@extends\(([^)]*)\)\s*?;/gim, +STRIP: /%[^,]*$/ +} +}; +}(); +(function () { +var prepElement = Polymer.Base._prepElement; +var nativeShadow = Polymer.Settings.useNativeShadow; +var styleUtil = Polymer.StyleUtil; +var styleTransformer = Polymer.StyleTransformer; +var styleExtends = Polymer.StyleExtends; +Polymer.Base._addFeature({ +_prepElement: function (element) { +if (this._encapsulateStyle) { +styleTransformer.element(element, this.is, this._scopeCssViaAttr); +} +prepElement.call(this, element); +}, +_prepStyles: function () { +if (this._encapsulateStyle === undefined) { +this._encapsulateStyle = !nativeShadow && Boolean(this._template); +} +if (this._template) { +this._styles = this._collectStyles(); +var cssText = styleTransformer.elementStyles(this); +if (cssText) { +var style = styleUtil.applyCss(cssText, this.is, nativeShadow ? this._template.content : null); +if (!nativeShadow) { +this._scopeStyle = style; +} +} +} else { +this._styles = []; +} +}, +_collectStyles: function () { +var styles = []; +var cssText = '', m$ = this.styleModules; +if (m$) { +for (var i = 0, l = m$.length, m; i < l && (m = m$[i]); i++) { +cssText += styleUtil.cssFromModule(m); +} +} +cssText += styleUtil.cssFromModule(this.is); +var p = this._template && this._template.parentNode; +if (this._template && (!p || p.id.toLowerCase() !== this.is)) { +cssText += styleUtil.cssFromElement(this._template); +} +if (cssText) { +var style = document.createElement('style'); +style.textContent = cssText; +if (styleExtends.hasExtends(style.textContent)) { +cssText = styleExtends.transform(style); +} +styles.push(style); +} +return styles; +}, +_elementAdd: function (node) { +if (this._encapsulateStyle) { +if (node.__styleScoped) { +node.__styleScoped = false; +} else { +styleTransformer.dom(node, this.is, this._scopeCssViaAttr); +} +} +}, +_elementRemove: function (node) { +if (this._encapsulateStyle) { +styleTransformer.dom(node, this.is, this._scopeCssViaAttr, true); +} +}, +scopeSubtree: function (container, shouldObserve) { +if (nativeShadow) { +return; +} +var self = this; +var scopify = function (node) { +if (node.nodeType === Node.ELEMENT_NODE) { +var className = node.getAttribute('class'); +node.setAttribute('class', self._scopeElementClass(node, className)); +var n$ = node.querySelectorAll('*'); +for (var i = 0, n; i < n$.length && (n = n$[i]); i++) { +className = n.getAttribute('class'); +n.setAttribute('class', self._scopeElementClass(n, className)); +} +} +}; +scopify(container); +if (shouldObserve) { +var mo = new MutationObserver(function (mxns) { +for (var i = 0, m; i < mxns.length && (m = mxns[i]); i++) { +if (m.addedNodes) { +for (var j = 0; j < m.addedNodes.length; j++) { +scopify(m.addedNodes[j]); +} +} +} +}); +mo.observe(container, { +childList: true, +subtree: true +}); +return mo; +} +} +}); +}()); +Polymer.StyleProperties = function () { +'use strict'; +var nativeShadow = Polymer.Settings.useNativeShadow; +var matchesSelector = Polymer.DomApi.matchesSelector; +var styleUtil = Polymer.StyleUtil; +var styleTransformer = Polymer.StyleTransformer; +return { +decorateStyles: function (styles) { +var self = this, props = {}; +styleUtil.forRulesInStyles(styles, function (rule) { +self.decorateRule(rule); +self.collectPropertiesInCssText(rule.propertyInfo.cssText, props); +}); +var names = []; +for (var i in props) { +names.push(i); +} +return names; +}, +decorateRule: function (rule) { +if (rule.propertyInfo) { +return rule.propertyInfo; +} +var info = {}, properties = {}; +var hasProperties = this.collectProperties(rule, properties); +if (hasProperties) { +info.properties = properties; +rule.rules = null; +} +info.cssText = this.collectCssText(rule); +rule.propertyInfo = info; +return info; +}, +collectProperties: function (rule, properties) { +var info = rule.propertyInfo; +if (info) { +if (info.properties) { +Polymer.Base.mixin(properties, info.properties); +return true; +} +} else { +var m, rx = this.rx.VAR_ASSIGN; +var cssText = rule.parsedCssText; +var any; +while (m = rx.exec(cssText)) { +properties[m[1]] = (m[2] || m[3]).trim(); +any = true; +} +return any; +} +}, +collectCssText: function (rule) { +var customCssText = ''; +var cssText = rule.parsedCssText; +cssText = cssText.replace(this.rx.BRACKETED, '').replace(this.rx.VAR_ASSIGN, ''); +var parts = cssText.split(';'); +for (var i = 0, p; i < parts.length; i++) { +p = parts[i]; +if (p.match(this.rx.MIXIN_MATCH) || p.match(this.rx.VAR_MATCH)) { +customCssText += p + ';\n'; +} +} +return customCssText; +}, +collectPropertiesInCssText: function (cssText, props) { +var m; +while (m = this.rx.VAR_CAPTURE.exec(cssText)) { +props[m[1]] = true; +var def = m[2]; +if (def && def.match(this.rx.IS_VAR)) { +props[def] = true; +} +} +}, +reify: function (props) { +var names = Object.getOwnPropertyNames(props); +for (var i = 0, n; i < names.length; i++) { +n = names[i]; +props[n] = this.valueForProperty(props[n], props); +} +}, +valueForProperty: function (property, props) { +if (property) { +if (property.indexOf(';') >= 0) { +property = this.valueForProperties(property, props); +} else { +var self = this; +var fn = function (all, prefix, value, fallback) { +var propertyValue = self.valueForProperty(props[value], props) || (props[fallback] ? self.valueForProperty(props[fallback], props) : fallback); +return prefix + (propertyValue || ''); +}; +property = property.replace(this.rx.VAR_MATCH, fn); +} +} +return property && property.trim() || ''; +}, +valueForProperties: function (property, props) { +var parts = property.split(';'); +for (var i = 0, p, m; i < parts.length; i++) { +if (p = parts[i]) { +m = p.match(this.rx.MIXIN_MATCH); +if (m) { +p = this.valueForProperty(props[m[1]], props); +} else { +var pp = p.split(':'); +if (pp[1]) { +pp[1] = pp[1].trim(); +pp[1] = this.valueForProperty(pp[1], props) || pp[1]; +} +p = pp.join(':'); +} +parts[i] = p && p.lastIndexOf(';') === p.length - 1 ? p.slice(0, -1) : p || ''; +} +} +return parts.join(';'); +}, +applyProperties: function (rule, props) { +var output = ''; +if (!rule.propertyInfo) { +this.decorateRule(rule); +} +if (rule.propertyInfo.cssText) { +output = this.valueForProperties(rule.propertyInfo.cssText, props); +} +rule.cssText = output; +}, +propertyDataFromStyles: function (styles, element) { +var props = {}, self = this; +var o = [], i = 0; +styleUtil.forRulesInStyles(styles, function (rule) { +if (!rule.propertyInfo) { +self.decorateRule(rule); +} +if (element && rule.propertyInfo.properties && matchesSelector.call(element, rule.transformedSelector || rule.parsedSelector)) { +self.collectProperties(rule, props); +addToBitMask(i, o); +} +i++; +}); +return { +properties: props, +key: o +}; +}, +scopePropertiesFromStyles: function (styles) { +if (!styles._scopeStyleProperties) { +styles._scopeStyleProperties = this.selectedPropertiesFromStyles(styles, this.SCOPE_SELECTORS); +} +return styles._scopeStyleProperties; +}, +hostPropertiesFromStyles: function (styles) { +if (!styles._hostStyleProperties) { +styles._hostStyleProperties = this.selectedPropertiesFromStyles(styles, this.HOST_SELECTORS); +} +return styles._hostStyleProperties; +}, +selectedPropertiesFromStyles: function (styles, selectors) { +var props = {}, self = this; +styleUtil.forRulesInStyles(styles, function (rule) { +if (!rule.propertyInfo) { +self.decorateRule(rule); +} +for (var i = 0; i < selectors.length; i++) { +if (rule.parsedSelector === selectors[i]) { +self.collectProperties(rule, props); +return; +} +} +}); +return props; +}, +transformStyles: function (element, properties, scopeSelector) { +var self = this; +var hostSelector = styleTransformer._calcHostScope(element.is, element.extends); +var rxHostSelector = element.extends ? '\\' + hostSelector.slice(0, -1) + '\\]' : hostSelector; +var hostRx = new RegExp(this.rx.HOST_PREFIX + rxHostSelector + this.rx.HOST_SUFFIX); +return styleTransformer.elementStyles(element, function (rule) { +self.applyProperties(rule, properties); +if (rule.cssText && !nativeShadow) { +self._scopeSelector(rule, hostRx, hostSelector, element._scopeCssViaAttr, scopeSelector); +} +}); +}, +_scopeSelector: function (rule, hostRx, hostSelector, viaAttr, scopeId) { +rule.transformedSelector = rule.transformedSelector || rule.selector; +var selector = rule.transformedSelector; +var scope = viaAttr ? '[' + styleTransformer.SCOPE_NAME + '~=' + scopeId + ']' : '.' + scopeId; +var parts = selector.split(','); +for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) { +parts[i] = p.match(hostRx) ? p.replace(hostSelector, hostSelector + scope) : scope + ' ' + p; +} +rule.selector = parts.join(','); +}, +applyElementScopeSelector: function (element, selector, old, viaAttr) { +var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.getAttribute('class') || ''; +var v = old ? c.replace(old, selector) : (c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector; +if (c !== v) { +if (viaAttr) { +element.setAttribute(styleTransformer.SCOPE_NAME, v); +} else { +element.setAttribute('class', v); +} +} +}, +applyElementStyle: function (element, properties, selector, style) { +var cssText = style ? style.textContent || '' : this.transformStyles(element, properties, selector); +var s = element._customStyle; +if (s && !nativeShadow && s !== style) { +s._useCount--; +if (s._useCount <= 0 && s.parentNode) { +s.parentNode.removeChild(s); +} +} +if (nativeShadow || (!style || !style.parentNode)) { +if (nativeShadow && element._customStyle) { +element._customStyle.textContent = cssText; +style = element._customStyle; +} else if (cssText) { +style = styleUtil.applyCss(cssText, selector, nativeShadow ? element.root : null, element._scopeStyle); +} +} +if (style) { +style._useCount = style._useCount || 0; +if (element._customStyle != style) { +style._useCount++; +} +element._customStyle = style; +} +return style; +}, +mixinCustomStyle: function (props, customStyle) { +var v; +for (var i in customStyle) { +v = customStyle[i]; +if (v || v === 0) { +props[i] = v; +} +} +}, +rx: { +VAR_ASSIGN: /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi, +MIXIN_MATCH: /(?:^|\W+)@apply[\s]*\(([^)]*)\)/i, +VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi, +VAR_CAPTURE: /\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi, +IS_VAR: /^--/, +BRACKETED: /\{[^}]*\}/g, +HOST_PREFIX: '(?:^|[^.#[:])', +HOST_SUFFIX: '($|[.:[\\s>+~])' +}, +HOST_SELECTORS: [':host'], +SCOPE_SELECTORS: [':root'], +XSCOPE_NAME: 'x-scope' +}; +function addToBitMask(n, bits) { +var o = parseInt(n / 32); +var v = 1 << n % 32; +bits[o] = (bits[o] || 0) | v; +} +}(); +(function () { +Polymer.StyleCache = function () { +this.cache = {}; +}; +Polymer.StyleCache.prototype = { +MAX: 100, +store: function (is, data, keyValues, keyStyles) { +data.keyValues = keyValues; +data.styles = keyStyles; +var s$ = this.cache[is] = this.cache[is] || []; +s$.push(data); +if (s$.length > this.MAX) { +s$.shift(); +} +}, +retrieve: function (is, keyValues, keyStyles) { +var cache = this.cache[is]; +if (cache) { +for (var i = cache.length - 1, data; i >= 0; i--) { +data = cache[i]; +if (keyStyles === data.styles && this._objectsEqual(keyValues, data.keyValues)) { +return data; +} +} +} +}, +clear: function () { +this.cache = {}; +}, +_objectsEqual: function (target, source) { +var t, s; +for (var i in target) { +t = target[i], s = source[i]; +if (!(typeof t === 'object' && t ? this._objectsStrictlyEqual(t, s) : t === s)) { +return false; +} +} +if (Array.isArray(target)) { +return target.length === source.length; +} +return true; +}, +_objectsStrictlyEqual: function (target, source) { +return this._objectsEqual(target, source) && this._objectsEqual(source, target); +} +}; +}()); +Polymer.StyleDefaults = function () { +var styleProperties = Polymer.StyleProperties; +var styleUtil = Polymer.StyleUtil; +var StyleCache = Polymer.StyleCache; +var api = { +_styles: [], +_properties: null, +customStyle: {}, +_styleCache: new StyleCache(), +addStyle: function (style) { +this._styles.push(style); +this._properties = null; +}, +get _styleProperties() { +if (!this._properties) { +styleProperties.decorateStyles(this._styles); +this._styles._scopeStyleProperties = null; +this._properties = styleProperties.scopePropertiesFromStyles(this._styles); +styleProperties.mixinCustomStyle(this._properties, this.customStyle); +styleProperties.reify(this._properties); +} +return this._properties; +}, +_needsStyleProperties: function () { +}, +_computeStyleProperties: function () { +return this._styleProperties; +}, +updateStyles: function (properties) { +this._properties = null; +if (properties) { +Polymer.Base.mixin(this.customStyle, properties); +} +this._styleCache.clear(); +for (var i = 0, s; i < this._styles.length; i++) { +s = this._styles[i]; +s = s.__importElement || s; +s._apply(); +} +} +}; +return api; +}(); +(function () { +'use strict'; +var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute; +var propertyUtils = Polymer.StyleProperties; +var styleTransformer = Polymer.StyleTransformer; +var styleUtil = Polymer.StyleUtil; +var styleDefaults = Polymer.StyleDefaults; +var nativeShadow = Polymer.Settings.useNativeShadow; +Polymer.Base._addFeature({ +_prepStyleProperties: function () { +this._ownStylePropertyNames = this._styles ? propertyUtils.decorateStyles(this._styles) : null; +}, +customStyle: null, +getComputedStyleValue: function (property) { +return this._styleProperties && this._styleProperties[property] || getComputedStyle(this).getPropertyValue(property); +}, +_setupStyleProperties: function () { +this.customStyle = {}; +this._styleCache = null; +this._styleProperties = null; +this._scopeSelector = null; +this._ownStyleProperties = null; +this._customStyle = null; +}, +_needsStyleProperties: function () { +return Boolean(this._ownStylePropertyNames && this._ownStylePropertyNames.length); +}, +_beforeAttached: function () { +if (!this._scopeSelector && this._needsStyleProperties()) { +this._updateStyleProperties(); +} +}, +_findStyleHost: function () { +var e = this, root; +while (root = Polymer.dom(e).getOwnerRoot()) { +if (Polymer.isInstance(root.host)) { +return root.host; +} +e = root.host; +} +return styleDefaults; +}, +_updateStyleProperties: function () { +var info, scope = this._findStyleHost(); +if (!scope._styleCache) { +scope._styleCache = new Polymer.StyleCache(); +} +var scopeData = propertyUtils.propertyDataFromStyles(scope._styles, this); +scopeData.key.customStyle = this.customStyle; +info = scope._styleCache.retrieve(this.is, scopeData.key, this._styles); +var scopeCached = Boolean(info); +if (scopeCached) { +this._styleProperties = info._styleProperties; +} else { +this._computeStyleProperties(scopeData.properties); +} +this._computeOwnStyleProperties(); +if (!scopeCached) { +info = styleCache.retrieve(this.is, this._ownStyleProperties, this._styles); +} +var globalCached = Boolean(info) && !scopeCached; +var style = this._applyStyleProperties(info); +if (!scopeCached) { +style = style && nativeShadow ? style.cloneNode(true) : style; +info = { +style: style, +_scopeSelector: this._scopeSelector, +_styleProperties: this._styleProperties +}; +scopeData.key.customStyle = {}; +this.mixin(scopeData.key.customStyle, this.customStyle); +scope._styleCache.store(this.is, info, scopeData.key, this._styles); +if (!globalCached) { +styleCache.store(this.is, Object.create(info), this._ownStyleProperties, this._styles); +} +} +}, +_computeStyleProperties: function (scopeProps) { +var scope = this._findStyleHost(); +if (!scope._styleProperties) { +scope._computeStyleProperties(); +} +var props = Object.create(scope._styleProperties); +this.mixin(props, propertyUtils.hostPropertiesFromStyles(this._styles)); +scopeProps = scopeProps || propertyUtils.propertyDataFromStyles(scope._styles, this).properties; +this.mixin(props, scopeProps); +this.mixin(props, propertyUtils.scopePropertiesFromStyles(this._styles)); +propertyUtils.mixinCustomStyle(props, this.customStyle); +propertyUtils.reify(props); +this._styleProperties = props; +}, +_computeOwnStyleProperties: function () { +var props = {}; +for (var i = 0, n; i < this._ownStylePropertyNames.length; i++) { +n = this._ownStylePropertyNames[i]; +props[n] = this._styleProperties[n]; +} +this._ownStyleProperties = props; +}, +_scopeCount: 0, +_applyStyleProperties: function (info) { +var oldScopeSelector = this._scopeSelector; +this._scopeSelector = info ? info._scopeSelector : this.is + '-' + this.__proto__._scopeCount++; +var style = propertyUtils.applyElementStyle(this, this._styleProperties, this._scopeSelector, info && info.style); +if (!nativeShadow) { +propertyUtils.applyElementScopeSelector(this, this._scopeSelector, oldScopeSelector, this._scopeCssViaAttr); +} +return style; +}, +serializeValueToAttribute: function (value, attribute, node) { +node = node || this; +if (attribute === 'class' && !nativeShadow) { +var host = node === this ? this.domHost || this.dataHost : this; +if (host) { +value = host._scopeElementClass(node, value); +} +} +node = this.shadyRoot && this.shadyRoot._hasDistributed ? Polymer.dom(node) : node; +serializeValueToAttribute.call(this, value, attribute, node); +}, +_scopeElementClass: function (element, selector) { +if (!nativeShadow && !this._scopeCssViaAttr) { +selector += (selector ? ' ' : '') + SCOPE_NAME + ' ' + this.is + (element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' + element._scopeSelector : ''); +} +return selector; +}, +updateStyles: function (properties) { +if (this.isAttached) { +if (properties) { +this.mixin(this.customStyle, properties); +} +if (this._needsStyleProperties()) { +this._updateStyleProperties(); +} else { +this._styleProperties = null; +} +if (this._styleCache) { +this._styleCache.clear(); +} +this._updateRootStyles(); +} +}, +_updateRootStyles: function (root) { +root = root || this.root; +var c$ = Polymer.dom(root)._query(function (e) { +return e.shadyRoot || e.shadowRoot; +}); +for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) { +if (c.updateStyles) { +c.updateStyles(); +} +} +} +}); +Polymer.updateStyles = function (properties) { +styleDefaults.updateStyles(properties); +Polymer.Base._updateRootStyles(document); +}; +var styleCache = new Polymer.StyleCache(); +Polymer.customStyleCache = styleCache; +var SCOPE_NAME = styleTransformer.SCOPE_NAME; +var XSCOPE_NAME = propertyUtils.XSCOPE_NAME; +}()); +Polymer.Base._addFeature({ +_registerFeatures: function () { +this._prepIs(); +this._prepConstructor(); +this._prepTemplate(); +this._prepStyles(); +this._prepStyleProperties(); +this._prepAnnotations(); +this._prepEffects(); +this._prepBehaviors(); +this._prepPropertyInfo(); +this._prepBindings(); +this._prepShady(); +}, +_prepBehavior: function (b) { +this._addPropertyEffects(b.properties); +this._addComplexObserverEffects(b.observers); +this._addHostAttributes(b.hostAttributes); +}, +_initFeatures: function () { +this._setupGestures(); +this._setupConfigure(); +this._setupStyleProperties(); +this._setupDebouncers(); +this._setupShady(); +this._registerHost(); +if (this._template) { +this._poolContent(); +this._beginHosting(); +this._stampTemplate(); +this._endHosting(); +this._marshalAnnotationReferences(); +} +this._marshalInstanceEffects(); +this._marshalBehaviors(); +this._marshalHostAttributes(); +this._marshalAttributes(); +this._tryReady(); +}, +_marshalBehavior: function (b) { +if (b.listeners) { +this._listenListeners(b.listeners); +} +} +}); +(function () { +var nativeShadow = Polymer.Settings.useNativeShadow; +var propertyUtils = Polymer.StyleProperties; +var styleUtil = Polymer.StyleUtil; +var cssParse = Polymer.CssParse; +var styleDefaults = Polymer.StyleDefaults; +var styleTransformer = Polymer.StyleTransformer; +Polymer({ +is: 'custom-style', +extends: 'style', +_template: null, +properties: { include: String }, +ready: function () { +this._tryApply(); +}, +attached: function () { +this._tryApply(); +}, +_tryApply: function () { +if (!this._appliesToDocument) { +if (this.parentNode && this.parentNode.localName !== 'dom-module') { +this._appliesToDocument = true; +var e = this.__appliedElement || this; +styleDefaults.addStyle(e); +if (e.textContent || this.include) { +this._apply(true); +} else { +var self = this; +var observer = new MutationObserver(function () { +observer.disconnect(); +self._apply(true); +}); +observer.observe(e, { childList: true }); +} +} +} +}, +_apply: function (deferProperties) { +var e = this.__appliedElement || this; +if (this.include) { +e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent; +} +if (e.textContent) { +styleUtil.forEachStyleRule(styleUtil.rulesForStyle(e), function (rule) { +styleTransformer.documentRule(rule); +}); +var self = this; +var fn = function fn() { +self._applyCustomProperties(e); +}; +if (this._pendingApplyProperties) { +cancelAnimationFrame(this._pendingApplyProperties); +this._pendingApplyProperties = null; +} +if (deferProperties) { +this._pendingApplyProperties = requestAnimationFrame(fn); +} else { +fn(); +} +} +}, +_applyCustomProperties: function (element) { +this._computeStyleProperties(); +var props = this._styleProperties; +var rules = styleUtil.rulesForStyle(element); +element.textContent = styleUtil.toCssText(rules, function (rule) { +var css = rule.cssText = rule.parsedCssText; +if (rule.propertyInfo && rule.propertyInfo.cssText) { +css = cssParse.removeCustomPropAssignment(css); +rule.cssText = propertyUtils.valueForProperties(css, props); +} +}); +} +}); +}()); +Polymer.Templatizer = { +properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } }, +_instanceProps: Polymer.nob, +_parentPropPrefix: '_parent_', +templatize: function (template) { +this._templatized = template; +if (!template._content) { +template._content = template.content; +} +if (template._content._ctor) { +this.ctor = template._content._ctor; +this._prepParentProperties(this.ctor.prototype, template); +return; +} +var archetype = Object.create(Polymer.Base); +this._customPrepAnnotations(archetype, template); +this._prepParentProperties(archetype, template); +archetype._prepEffects(); +this._customPrepEffects(archetype); +archetype._prepBehaviors(); +archetype._prepPropertyInfo(); +archetype._prepBindings(); +archetype._notifyPathUp = this._notifyPathUpImpl; +archetype._scopeElementClass = this._scopeElementClassImpl; +archetype.listen = this._listenImpl; +archetype._showHideChildren = this._showHideChildrenImpl; +archetype.__setPropertyOrig = this.__setProperty; +archetype.__setProperty = this.__setPropertyImpl; +var _constructor = this._constructorImpl; +var ctor = function TemplateInstance(model, host) { +_constructor.call(this, model, host); +}; +ctor.prototype = archetype; +archetype.constructor = ctor; +template._content._ctor = ctor; +this.ctor = ctor; +}, +_getRootDataHost: function () { +return this.dataHost && this.dataHost._rootDataHost || this.dataHost; +}, +_showHideChildrenImpl: function (hide) { +var c = this._children; +for (var i = 0; i < c.length; i++) { +var n = c[i]; +if (Boolean(hide) != Boolean(n.__hideTemplateChildren__)) { +if (n.nodeType === Node.TEXT_NODE) { +if (hide) { +n.__polymerTextContent__ = n.textContent; +n.textContent = ''; +} else { +n.textContent = n.__polymerTextContent__; +} +} else if (n.style) { +if (hide) { +n.__polymerDisplay__ = n.style.display; +n.style.display = 'none'; +} else { +n.style.display = n.__polymerDisplay__; +} +} +} +n.__hideTemplateChildren__ = hide; +} +}, +__setPropertyImpl: function (property, value, fromAbove, node) { +if (node && node.__hideTemplateChildren__ && property == 'textContent') { +property = '__polymerTextContent__'; +} +this.__setPropertyOrig(property, value, fromAbove, node); +}, +_debounceTemplate: function (fn) { +Polymer.dom.addDebouncer(this.debounce('_debounceTemplate', fn)); +}, +_flushTemplates: function (debouncerExpired) { +Polymer.dom.flush(); +}, +_customPrepEffects: function (archetype) { +var parentProps = archetype._parentProps; +for (var prop in parentProps) { +archetype._addPropertyEffect(prop, 'function', this._createHostPropEffector(prop)); +} +for (var prop in this._instanceProps) { +archetype._addPropertyEffect(prop, 'function', this._createInstancePropEffector(prop)); +} +}, +_customPrepAnnotations: function (archetype, template) { +archetype._template = template; +var c = template._content; +if (!c._notes) { +var rootDataHost = archetype._rootDataHost; +if (rootDataHost) { +Polymer.Annotations.prepElement = function () { +rootDataHost._prepElement(); +}; +} +c._notes = Polymer.Annotations.parseAnnotations(template); +Polymer.Annotations.prepElement = null; +this._processAnnotations(c._notes); +} +archetype._notes = c._notes; +archetype._parentProps = c._parentProps; +}, +_prepParentProperties: function (archetype, template) { +var parentProps = this._parentProps = archetype._parentProps; +if (this._forwardParentProp && parentProps) { +var proto = archetype._parentPropProto; +var prop; +if (!proto) { +for (prop in this._instanceProps) { +delete parentProps[prop]; +} +proto = archetype._parentPropProto = Object.create(null); +if (template != this) { +Polymer.Bind.prepareModel(proto); +Polymer.Base.prepareModelNotifyPath(proto); +} +for (prop in parentProps) { +var parentProp = this._parentPropPrefix + prop; +var effects = [ +{ +kind: 'function', +effect: this._createForwardPropEffector(prop), +fn: Polymer.Bind._functionEffect +}, +{ +kind: 'notify', +fn: Polymer.Bind._notifyEffect, +effect: { event: Polymer.CaseMap.camelToDashCase(parentProp) + '-changed' } +} +]; +Polymer.Bind._createAccessors(proto, parentProp, effects); +} +} +var self = this; +if (template != this) { +Polymer.Bind.prepareInstance(template); +template._forwardParentProp = function (source, value) { +self._forwardParentProp(source, value); +}; +} +this._extendTemplate(template, proto); +template._pathEffector = function (path, value, fromAbove) { +return self._pathEffectorImpl(path, value, fromAbove); +}; +} +}, +_createForwardPropEffector: function (prop) { +return function (source, value) { +this._forwardParentProp(prop, value); +}; +}, +_createHostPropEffector: function (prop) { +var prefix = this._parentPropPrefix; +return function (source, value) { +this.dataHost._templatized[prefix + prop] = value; +}; +}, +_createInstancePropEffector: function (prop) { +return function (source, value, old, fromAbove) { +if (!fromAbove) { +this.dataHost._forwardInstanceProp(this, prop, value); +} +}; +}, +_extendTemplate: function (template, proto) { +var n$ = Object.getOwnPropertyNames(proto); +for (var i = 0, n; i < n$.length && (n = n$[i]); i++) { +var val = template[n]; +var pd = Object.getOwnPropertyDescriptor(proto, n); +Object.defineProperty(template, n, pd); +if (val !== undefined) { +template._propertySetter(n, val); +} +} +}, +_showHideChildren: function (hidden) { +}, +_forwardInstancePath: function (inst, path, value) { +}, +_forwardInstanceProp: function (inst, prop, value) { +}, +_notifyPathUpImpl: function (path, value) { +var dataHost = this.dataHost; +var dot = path.indexOf('.'); +var root = dot < 0 ? path : path.slice(0, dot); +dataHost._forwardInstancePath.call(dataHost, this, path, value); +if (root in dataHost._parentProps) { +dataHost._templatized.notifyPath(dataHost._parentPropPrefix + path, value); +} +}, +_pathEffectorImpl: function (path, value, fromAbove) { +if (this._forwardParentPath) { +if (path.indexOf(this._parentPropPrefix) === 0) { +var subPath = path.substring(this._parentPropPrefix.length); +var model = this._modelForPath(subPath); +if (model in this._parentProps) { +this._forwardParentPath(subPath, value); +} +} +} +Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove); +}, +_constructorImpl: function (model, host) { +this._rootDataHost = host._getRootDataHost(); +this._setupConfigure(model); +this._registerHost(host); +this._beginHosting(); +this.root = this.instanceTemplate(this._template); +this.root.__noContent = !this._notes._hasContent; +this.root.__styleScoped = true; +this._endHosting(); +this._marshalAnnotatedNodes(); +this._marshalInstanceEffects(); +this._marshalAnnotatedListeners(); +var children = []; +for (var n = this.root.firstChild; n; n = n.nextSibling) { +children.push(n); +n._templateInstance = this; +} +this._children = children; +if (host.__hideTemplateChildren__) { +this._showHideChildren(true); +} +this._tryReady(); +}, +_listenImpl: function (node, eventName, methodName) { +var model = this; +var host = this._rootDataHost; +var handler = host._createEventHandler(node, eventName, methodName); +var decorated = function (e) { +e.model = model; +handler(e); +}; +host._listen(node, eventName, decorated); +}, +_scopeElementClassImpl: function (node, value) { +var host = this._rootDataHost; +if (host) { +return host._scopeElementClass(node, value); +} +}, +stamp: function (model) { +model = model || {}; +if (this._parentProps) { +var templatized = this._templatized; +for (var prop in this._parentProps) { +model[prop] = templatized[this._parentPropPrefix + prop]; +} +} +return new this.ctor(model, this); +}, +modelForElement: function (el) { +var model; +while (el) { +if (model = el._templateInstance) { +if (model.dataHost != this) { +el = model.dataHost; +} else { +return model; +} +} else { +el = el.parentNode; +} +} +} +}; +Polymer({ +is: 'dom-template', +extends: 'template', +_template: null, +behaviors: [Polymer.Templatizer], +ready: function () { +this.templatize(this); +} +}); +Polymer._collections = new WeakMap(); +Polymer.Collection = function (userArray) { +Polymer._collections.set(userArray, this); +this.userArray = userArray; +this.store = userArray.slice(); +this.initMap(); +}; +Polymer.Collection.prototype = { +constructor: Polymer.Collection, +initMap: function () { +var omap = this.omap = new WeakMap(); +var pmap = this.pmap = {}; +var s = this.store; +for (var i = 0; i < s.length; i++) { +var item = s[i]; +if (item && typeof item == 'object') { +omap.set(item, i); +} else { +pmap[item] = i; +} +} +}, +add: function (item) { +var key = this.store.push(item) - 1; +if (item && typeof item == 'object') { +this.omap.set(item, key); +} else { +this.pmap[item] = key; +} +return '#' + key; +}, +removeKey: function (key) { +if (key = this._parseKey(key)) { +this._removeFromMap(this.store[key]); +delete this.store[key]; +} +}, +_removeFromMap: function (item) { +if (item && typeof item == 'object') { +this.omap.delete(item); +} else { +delete this.pmap[item]; +} +}, +remove: function (item) { +var key = this.getKey(item); +this.removeKey(key); +return key; +}, +getKey: function (item) { +var key; +if (item && typeof item == 'object') { +key = this.omap.get(item); +} else { +key = this.pmap[item]; +} +if (key != undefined) { +return '#' + key; +} +}, +getKeys: function () { +return Object.keys(this.store).map(function (key) { +return '#' + key; +}); +}, +_parseKey: function (key) { +if (key && key[0] == '#') { +return key.slice(1); +} +}, +setItem: function (key, item) { +if (key = this._parseKey(key)) { +var old = this.store[key]; +if (old) { +this._removeFromMap(old); +} +if (item && typeof item == 'object') { +this.omap.set(item, key); +} else { +this.pmap[item] = key; +} +this.store[key] = item; +} +}, +getItem: function (key) { +if (key = this._parseKey(key)) { +return this.store[key]; +} +}, +getItems: function () { +var items = [], store = this.store; +for (var key in store) { +items.push(store[key]); +} +return items; +}, +_applySplices: function (splices) { +var keyMap = {}, key; +for (var i = 0, s; i < splices.length && (s = splices[i]); i++) { +s.addedKeys = []; +for (var j = 0; j < s.removed.length; j++) { +key = this.getKey(s.removed[j]); +keyMap[key] = keyMap[key] ? null : -1; +} +for (var j = 0; j < s.addedCount; j++) { +var item = this.userArray[s.index + j]; +key = this.getKey(item); +key = key === undefined ? this.add(item) : key; +keyMap[key] = keyMap[key] ? null : 1; +s.addedKeys.push(key); +} +} +var removed = []; +var added = []; +for (var key in keyMap) { +if (keyMap[key] < 0) { +this.removeKey(key); +removed.push(key); +} +if (keyMap[key] > 0) { +added.push(key); +} +} +return [{ +removed: removed, +added: added +}]; +} +}; +Polymer.Collection.get = function (userArray) { +return Polymer._collections.get(userArray) || new Polymer.Collection(userArray); +}; +Polymer.Collection.applySplices = function (userArray, splices) { +var coll = Polymer._collections.get(userArray); +return coll ? coll._applySplices(splices) : null; +}; +Polymer({ +is: 'dom-repeat', +extends: 'template', +_template: null, +properties: { +items: { type: Array }, +as: { +type: String, +value: 'item' +}, +indexAs: { +type: String, +value: 'index' +}, +sort: { +type: Function, +observer: '_sortChanged' +}, +filter: { +type: Function, +observer: '_filterChanged' +}, +observe: { +type: String, +observer: '_observeChanged' +}, +delay: Number, +renderedItemCount: { +type: Number, +notify: true, +readOnly: true +}, +initialCount: { +type: Number, +observer: '_initializeChunking' +}, +targetFramerate: { +type: Number, +value: 20 +}, +_targetFrameTime: { +type: Number, +computed: '_computeFrameTime(targetFramerate)' +} +}, +behaviors: [Polymer.Templatizer], +observers: ['_itemsChanged(items.*)'], +created: function () { +this._instances = []; +this._pool = []; +this._limit = Infinity; +var self = this; +this._boundRenderChunk = function () { +self._renderChunk(); +}; +}, +detached: function () { +this.__isDetached = true; +for (var i = 0; i < this._instances.length; i++) { +this._detachInstance(i); +} +}, +attached: function () { +if (this.__isDetached) { +this.__isDetached = false; +var parent = Polymer.dom(Polymer.dom(this).parentNode); +for (var i = 0; i < this._instances.length; i++) { +this._attachInstance(i, parent); +} +} +}, +ready: function () { +this._instanceProps = { __key__: true }; +this._instanceProps[this.as] = true; +this._instanceProps[this.indexAs] = true; +if (!this.ctor) { +this.templatize(this); +} +}, +_sortChanged: function (sort) { +var dataHost = this._getRootDataHost(); +this._sortFn = sort && (typeof sort == 'function' ? sort : function () { +return dataHost[sort].apply(dataHost, arguments); +}); +this._needFullRefresh = true; +if (this.items) { +this._debounceTemplate(this._render); +} +}, +_filterChanged: function (filter) { +var dataHost = this._getRootDataHost(); +this._filterFn = filter && (typeof filter == 'function' ? filter : function () { +return dataHost[filter].apply(dataHost, arguments); +}); +this._needFullRefresh = true; +if (this.items) { +this._debounceTemplate(this._render); +} +}, +_computeFrameTime: function (rate) { +return Math.ceil(1000 / rate); +}, +_initializeChunking: function () { +if (this.initialCount) { +this._limit = this.initialCount; +this._chunkCount = this.initialCount; +this._lastChunkTime = performance.now(); +} +}, +_tryRenderChunk: function () { +if (this.items && this._limit < this.items.length) { +this.debounce('renderChunk', this._requestRenderChunk); +} +}, +_requestRenderChunk: function () { +requestAnimationFrame(this._boundRenderChunk); +}, +_renderChunk: function () { +var currChunkTime = performance.now(); +var ratio = this._targetFrameTime / (currChunkTime - this._lastChunkTime); +this._chunkCount = Math.round(this._chunkCount * ratio) || 1; +this._limit += this._chunkCount; +this._lastChunkTime = currChunkTime; +this._debounceTemplate(this._render); +}, +_observeChanged: function () { +this._observePaths = this.observe && this.observe.replace('.*', '.').split(' '); +}, +_itemsChanged: function (change) { +if (change.path == 'items') { +if (Array.isArray(this.items)) { +this.collection = Polymer.Collection.get(this.items); +} else if (!this.items) { +this.collection = null; +} else { +this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items)); +} +this._keySplices = []; +this._indexSplices = []; +this._needFullRefresh = true; +this._initializeChunking(); +this._debounceTemplate(this._render); +} else if (change.path == 'items.splices') { +this._keySplices = this._keySplices.concat(change.value.keySplices); +this._indexSplices = this._indexSplices.concat(change.value.indexSplices); +this._debounceTemplate(this._render); +} else { +var subpath = change.path.slice(6); +this._forwardItemPath(subpath, change.value); +this._checkObservedPaths(subpath); +} +}, +_checkObservedPaths: function (path) { +if (this._observePaths) { +path = path.substring(path.indexOf('.') + 1); +var paths = this._observePaths; +for (var i = 0; i < paths.length; i++) { +if (path.indexOf(paths[i]) === 0) { +this._needFullRefresh = true; +if (this.delay) { +this.debounce('render', this._render, this.delay); +} else { +this._debounceTemplate(this._render); +} +return; +} +} +} +}, +render: function () { +this._needFullRefresh = true; +this._debounceTemplate(this._render); +this._flushTemplates(); +}, +_render: function () { +var c = this.collection; +if (this._needFullRefresh) { +this._applyFullRefresh(); +this._needFullRefresh = false; +} else if (this._keySplices.length) { +if (this._sortFn) { +this._applySplicesUserSort(this._keySplices); +} else { +if (this._filterFn) { +this._applyFullRefresh(); +} else { +this._applySplicesArrayOrder(this._indexSplices); +} +} +} else { +} +this._keySplices = []; +this._indexSplices = []; +var keyToIdx = this._keyToInstIdx = {}; +for (var i = this._instances.length - 1; i >= 0; i--) { +var inst = this._instances[i]; +if (inst.isPlaceholder && i < this._limit) { +inst = this._insertInstance(i, inst.__key__); +} else if (!inst.isPlaceholder && i >= this._limit) { +inst = this._downgradeInstance(i, inst.__key__); +} +keyToIdx[inst.__key__] = i; +if (!inst.isPlaceholder) { +inst.__setProperty(this.indexAs, i, true); +} +} +this._pool.length = 0; +this._setRenderedItemCount(this._instances.length); +this.fire('dom-change'); +this._tryRenderChunk(); +}, +_applyFullRefresh: function () { +var c = this.collection; +var keys; +if (this._sortFn) { +keys = c ? c.getKeys() : []; +} else { +keys = []; +var items = this.items; +if (items) { +for (var i = 0; i < items.length; i++) { +keys.push(c.getKey(items[i])); +} +} +} +var self = this; +if (this._filterFn) { +keys = keys.filter(function (a) { +return self._filterFn(c.getItem(a)); +}); +} +if (this._sortFn) { +keys.sort(function (a, b) { +return self._sortFn(c.getItem(a), c.getItem(b)); +}); +} +for (var i = 0; i < keys.length; i++) { +var key = keys[i]; +var inst = this._instances[i]; +if (inst) { +inst.__key__ = key; +if (!inst.isPlaceholder && i < this._limit) { +inst.__setProperty(this.as, c.getItem(key), true); +} +} else if (i < this._limit) { +this._insertInstance(i, key); +} else { +this._insertPlaceholder(i, key); +} +} +for (var j = this._instances.length - 1; j >= i; j--) { +this._detachAndRemoveInstance(j); +} +}, +_numericSort: function (a, b) { +return a - b; +}, +_applySplicesUserSort: function (splices) { +var c = this.collection; +var instances = this._instances; +var keyMap = {}; +for (var i = 0, s; i < splices.length && (s = splices[i]); i++) { +for (var j = 0; j < s.removed.length; j++) { +var key = s.removed[j]; +keyMap[key] = keyMap[key] ? null : -1; +} +for (var j = 0; j < s.added.length; j++) { +var key = s.added[j]; +keyMap[key] = keyMap[key] ? null : 1; +} +} +var removedIdxs = []; +var addedKeys = []; +for (var key in keyMap) { +if (keyMap[key] === -1) { +removedIdxs.push(this._keyToInstIdx[key]); +} +if (keyMap[key] === 1) { +addedKeys.push(key); +} +} +if (removedIdxs.length) { +removedIdxs.sort(this._numericSort); +for (var i = removedIdxs.length - 1; i >= 0; i--) { +var idx = removedIdxs[i]; +if (idx !== undefined) { +this._detachAndRemoveInstance(idx); +} +} +} +var self = this; +if (addedKeys.length) { +if (this._filterFn) { +addedKeys = addedKeys.filter(function (a) { +return self._filterFn(c.getItem(a)); +}); +} +addedKeys.sort(function (a, b) { +return self._sortFn(c.getItem(a), c.getItem(b)); +}); +var start = 0; +for (var i = 0; i < addedKeys.length; i++) { +start = this._insertRowUserSort(start, addedKeys[i]); +} +} +}, +_insertRowUserSort: function (start, key) { +var c = this.collection; +var item = c.getItem(key); +var end = this._instances.length - 1; +var idx = -1; +while (start <= end) { +var mid = start + end >> 1; +var midKey = this._instances[mid].__key__; +var cmp = this._sortFn(c.getItem(midKey), item); +if (cmp < 0) { +start = mid + 1; +} else if (cmp > 0) { +end = mid - 1; +} else { +idx = mid; +break; +} +} +if (idx < 0) { +idx = end + 1; +} +this._insertPlaceholder(idx, key); +return idx; +}, +_applySplicesArrayOrder: function (splices) { +var c = this.collection; +for (var i = 0, s; i < splices.length && (s = splices[i]); i++) { +for (var j = 0; j < s.removed.length; j++) { +this._detachAndRemoveInstance(s.index); +} +for (var j = 0; j < s.addedKeys.length; j++) { +this._insertPlaceholder(s.index + j, s.addedKeys[j]); +} +} +}, +_detachInstance: function (idx) { +var inst = this._instances[idx]; +if (!inst.isPlaceholder) { +for (var i = 0; i < inst._children.length; i++) { +var el = inst._children[i]; +Polymer.dom(inst.root).appendChild(el); +} +return inst; +} +}, +_attachInstance: function (idx, parent) { +var inst = this._instances[idx]; +if (!inst.isPlaceholder) { +parent.insertBefore(inst.root, this); +} +}, +_detachAndRemoveInstance: function (idx) { +var inst = this._detachInstance(idx); +if (inst) { +this._pool.push(inst); +} +this._instances.splice(idx, 1); +}, +_insertPlaceholder: function (idx, key) { +this._instances.splice(idx, 0, { +isPlaceholder: true, +__key__: key +}); +}, +_stampInstance: function (idx, key) { +var model = { __key__: key }; +model[this.as] = this.collection.getItem(key); +model[this.indexAs] = idx; +return this.stamp(model); +}, +_insertInstance: function (idx, key) { +var inst = this._pool.pop(); +if (inst) { +inst.__setProperty(this.as, this.collection.getItem(key), true); +inst.__setProperty('__key__', key, true); +} else { +inst = this._stampInstance(idx, key); +} +var beforeRow = this._instances[idx + 1]; +var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this; +var parentNode = Polymer.dom(this).parentNode; +Polymer.dom(parentNode).insertBefore(inst.root, beforeNode); +this._instances[idx] = inst; +return inst; +}, +_downgradeInstance: function (idx, key) { +var inst = this._detachInstance(idx); +if (inst) { +this._pool.push(inst); +} +inst = { +isPlaceholder: true, +__key__: key +}; +this._instances[idx] = inst; +return inst; +}, +_showHideChildren: function (hidden) { +for (var i = 0; i < this._instances.length; i++) { +this._instances[i]._showHideChildren(hidden); +} +}, +_forwardInstanceProp: function (inst, prop, value) { +if (prop == this.as) { +var idx; +if (this._sortFn || this._filterFn) { +idx = this.items.indexOf(this.collection.getItem(inst.__key__)); +} else { +idx = inst[this.indexAs]; +} +this.set('items.' + idx, value); +} +}, +_forwardInstancePath: function (inst, path, value) { +if (path.indexOf(this.as + '.') === 0) { +this._notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value); +} +}, +_forwardParentProp: function (prop, value) { +var i$ = this._instances; +for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) { +if (!inst.isPlaceholder) { +inst.__setProperty(prop, value, true); +} +} +}, +_forwardParentPath: function (path, value) { +var i$ = this._instances; +for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) { +if (!inst.isPlaceholder) { +inst._notifyPath(path, value, true); +} +} +}, +_forwardItemPath: function (path, value) { +if (this._keyToInstIdx) { +var dot = path.indexOf('.'); +var key = path.substring(0, dot < 0 ? path.length : dot); +var idx = this._keyToInstIdx[key]; +var inst = this._instances[idx]; +if (inst && !inst.isPlaceholder) { +if (dot >= 0) { +path = this.as + '.' + path.substring(dot + 1); +inst._notifyPath(path, value, true); +} else { +inst.__setProperty(this.as, value, true); +} +} +} +}, +itemForElement: function (el) { +var instance = this.modelForElement(el); +return instance && instance[this.as]; +}, +keyForElement: function (el) { +var instance = this.modelForElement(el); +return instance && instance.__key__; +}, +indexForElement: function (el) { +var instance = this.modelForElement(el); +return instance && instance[this.indexAs]; +} +}); +Polymer({ +is: 'array-selector', +_template: null, +properties: { +items: { +type: Array, +observer: 'clearSelection' +}, +multi: { +type: Boolean, +value: false, +observer: 'clearSelection' +}, +selected: { +type: Object, +notify: true +}, +selectedItem: { +type: Object, +notify: true +}, +toggle: { +type: Boolean, +value: false +} +}, +clearSelection: function () { +if (Array.isArray(this.selected)) { +for (var i = 0; i < this.selected.length; i++) { +this.unlinkPaths('selected.' + i); +} +} else { +this.unlinkPaths('selected'); +this.unlinkPaths('selectedItem'); +} +if (this.multi) { +if (!this.selected || this.selected.length) { +this.selected = []; +this._selectedColl = Polymer.Collection.get(this.selected); +} +} else { +this.selected = null; +this._selectedColl = null; +} +this.selectedItem = null; +}, +isSelected: function (item) { +if (this.multi) { +return this._selectedColl.getKey(item) !== undefined; +} else { +return this.selected == item; +} +}, +deselect: function (item) { +if (this.multi) { +if (this.isSelected(item)) { +var skey = this._selectedColl.getKey(item); +this.arrayDelete('selected', item); +this.unlinkPaths('selected.' + skey); +} +} else { +this.selected = null; +this.selectedItem = null; +this.unlinkPaths('selected'); +this.unlinkPaths('selectedItem'); +} +}, +select: function (item) { +var icol = Polymer.Collection.get(this.items); +var key = icol.getKey(item); +if (this.multi) { +if (this.isSelected(item)) { +if (this.toggle) { +this.deselect(item); +} +} else { +this.push('selected', item); +var skey = this._selectedColl.getKey(item); +this.linkPaths('selected.' + skey, 'items.' + key); +} +} else { +if (this.toggle && item == this.selected) { +this.deselect(); +} else { +this.selected = item; +this.selectedItem = item; +this.linkPaths('selected', 'items.' + key); +this.linkPaths('selectedItem', 'items.' + key); +} +} +} +}); +Polymer({ +is: 'dom-if', +extends: 'template', +_template: null, +properties: { +'if': { +type: Boolean, +value: false, +observer: '_queueRender' +}, +restamp: { +type: Boolean, +value: false, +observer: '_queueRender' +} +}, +behaviors: [Polymer.Templatizer], +_queueRender: function () { +this._debounceTemplate(this._render); +}, +detached: function () { +if (!this.parentNode || this.parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(this.parentNode instanceof ShadowRoot))) { +this._teardownInstance(); +} +}, +attached: function () { +if (this.if && this.ctor) { +this.async(this._ensureInstance); +} +}, +render: function () { +this._flushTemplates(); +}, +_render: function () { +if (this.if) { +if (!this.ctor) { +this.templatize(this); +} +this._ensureInstance(); +this._showHideChildren(); +} else if (this.restamp) { +this._teardownInstance(); +} +if (!this.restamp && this._instance) { +this._showHideChildren(); +} +if (this.if != this._lastIf) { +this.fire('dom-change'); +this._lastIf = this.if; +} +}, +_ensureInstance: function () { +var parentNode = Polymer.dom(this).parentNode; +if (parentNode) { +var parent = Polymer.dom(parentNode); +if (!this._instance) { +this._instance = this.stamp(); +var root = this._instance.root; +parent.insertBefore(root, this); +} else { +var c$ = this._instance._children; +if (c$ && c$.length) { +var lastChild = Polymer.dom(this).previousSibling; +if (lastChild !== c$[c$.length - 1]) { +for (var i = 0, n; i < c$.length && (n = c$[i]); i++) { +parent.insertBefore(n, this); +} +} +} +} +} +}, +_teardownInstance: function () { +if (this._instance) { +var c$ = this._instance._children; +if (c$ && c$.length) { +var parent = Polymer.dom(Polymer.dom(c$[0]).parentNode); +for (var i = 0, n; i < c$.length && (n = c$[i]); i++) { +parent.removeChild(n); +} +} +this._instance = null; +} +}, +_showHideChildren: function () { +var hidden = this.__hideTemplateChildren__ || !this.if; +if (this._instance) { +this._instance._showHideChildren(hidden); +} +}, +_forwardParentProp: function (prop, value) { +if (this._instance) { +this._instance[prop] = value; +} +}, +_forwardParentPath: function (path, value) { +if (this._instance) { +this._instance._notifyPath(path, value, true); +} +} +}); +Polymer({ +is: 'dom-bind', +extends: 'template', +_template: null, +created: function () { +var self = this; +Polymer.RenderStatus.whenReady(function () { +self._markImportsReady(); +}); +}, +_ensureReady: function () { +if (!this._readied) { +this._readySelf(); +} +}, +_markImportsReady: function () { +this._importsReady = true; +this._ensureReady(); +}, +_registerFeatures: function () { +this._prepConstructor(); +}, +_insertChildren: function () { +var parentDom = Polymer.dom(Polymer.dom(this).parentNode); +parentDom.insertBefore(this.root, this); +}, +_removeChildren: function () { +if (this._children) { +for (var i = 0; i < this._children.length; i++) { +this.root.appendChild(this._children[i]); +} +} +}, +_initFeatures: function () { +}, +_scopeElementClass: function (element, selector) { +if (this.dataHost) { +return this.dataHost._scopeElementClass(element, selector); +} else { +return selector; +} +}, +_prepConfigure: function () { +var config = {}; +for (var prop in this._propertyEffects) { +config[prop] = this[prop]; +} +var setupConfigure = this._setupConfigure; +this._setupConfigure = function () { +setupConfigure.call(this, config); +}; +}, +attached: function () { +if (this._importsReady) { +this.render(); +} +}, +detached: function () { +this._removeChildren(); +}, +render: function () { +this._ensureReady(); +if (!this._children) { +this._template = this; +this._prepAnnotations(); +this._prepEffects(); +this._prepBehaviors(); +this._prepConfigure(); +this._prepBindings(); +this._prepPropertyInfo(); +Polymer.Base._initFeatures.call(this); +this._children = Polymer.TreeApi.arrayCopyChildNodes(this.root); +} +this._insertChildren(); +this.fire('dom-change'); +} +});</script> diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e index e7bb11c06..1a981f34a 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e @@ -1,536 +1,599 @@ -<link rel="import" href="../../components/polymer/polymer.html"> -<link rel="import" href="../../components/paper-radio-group/paper-radio-group.html"> -<link rel="import" href="../../components/paper-radio-button/paper-radio-button.html"> -<link rel="import" href="../../components/paper-dropdown-menu/paper-dropdown-menu.html"> -<link rel="import" href="../../components/paper-button/paper-button.html"> -<link rel="import" href="../../components/paper-dialog/paper-dialog.html"> -<link rel="import" href="../../components/paper-checkbox/paper-checkbox.html"> -<link rel="import" href="../../components/iron-flex-layout/iron-flex-layout.html"> -<link rel="import" href="../../components/iron-fit-behavior/iron-fit-behavior.html"> -<link rel="import" href="../../components/paper-styles/paper-styles.html"> +<!-- +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> -<dom-module id="ti-rov-table"> +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> +<link rel="import" href="../paper-styles/color.html"> +<link rel="import" href="../paper-styles/default-theme.html"> +<link rel="import" href="../paper-styles/typography.html"> + +<!-- +`<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or +`<iron-autogrow-textarea>` and optional add-on elements such as an error message or character +counter, used to implement Material Design text fields. + +For example: + + <paper-input-container> + <label>Your name</label> + <input is="iron-input"> + </paper-input-container> + +### Listening for input changes + +By default, it listens for changes on the `bind-value` attribute on its children nodes and perform +tasks such as auto-validating and label styling when the `bind-value` changes. You can configure +the attribute it listens to with the `attr-for-value` attribute. + +### Using a custom input element + +You can use a custom input element in a `<paper-input-container>`, for example to implement a +compound input field like a social security number input. The custom input element should have the +`paper-input-input` class, have a `notify:true` value property and optionally implements +`Polymer.IronValidatableBehavior` if it is validatable. + + <paper-input-container attr-for-value="ssn-value"> + <label>Social security number</label> + <ssn-input class="paper-input-input"></ssn-input> + </paper-input-container> + +### Validation + +If the `auto-validate` attribute is set, the input container will validate the input and update +the container styling when the input value changes. + +### Add-ons + +Add-ons are child elements of a `<paper-input-container>` with the `add-on` attribute and +implements the `Polymer.PaperInputAddonBehavior` behavior. They are notified when the input value +or validity changes, and may implement functionality such as error messages or character counters. +They appear at the bottom of the input. + +### Prefixes and suffixes +These are child elements of a `<paper-input-container>` with the `prefix` +or `suffix` attribute, and are displayed inline with the input, before or after. + + <paper-input-container> + <div prefix>$</div> + <label>Total</label> + <input is="iron-input"> + <paper-icon-button suffix icon="clear"></paper-icon-button> + </paper-input-container> + +### Styling + +The following custom properties and mixins are available for styling: + +Custom property | Description | Default +----------------|-------------|---------- +`--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color` +`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--default-primary-color` +`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--google-red-500` +`--paper-input-container-input-color` | Input foreground color | `--primary-text-color` +`--paper-input-container` | Mixin applied to the container | `{}` +`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}` +`--paper-input-container-label` | Mixin applied to the label | `{}` +`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}` +`--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}` +`--paper-input-container-input` | Mixin applied to the input | `{}` +`--paper-input-container-underline` | Mixin applied to the underline | `{}` +`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}` +`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}` +`--paper-input-prefix` | Mixin applied to the input prefix | `{}` +`--paper-input-suffix` | Mixin applied to the input suffix | `{}` + +This element is `display:block` by default, but you can set the `inline` attribute to make it +`display:inline-block`. +--> + +<dom-module id="paper-input-container"> <template> - <!-- include global rov styles --> - <style include="ti-rov-styles"></style> - <style is="custom-style"> + <style> :host { - display:block; + display: block; + padding: 8px 0; + + @apply(--paper-input-container); } - paper-checkbox { - --paper-checkbox-unchecked-background-color: white; - --paper-checkbox-unchecked-color: white; - --paper-checkbox-unchecked-ink-color: white; - --paper-checkbox-checked-color: white; - --paper-checkbox-checked-ink-color: white; - --paper-checkbox-checkmark-color: black; - --paper-checkbox-label-color: white; + + :host[inline] { + display: inline-block; } - #messageLabel { - margin-left: 15px; - margin-right: 15px; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); + + :host([disabled]) { + pointer-events: none; + opacity: 0.33; + + @apply(--paper-input-container-disabled); } - .rawNode { - display: table-cell; - padding: 3px 25px 0px 2px; - font-weight: normal; - cursor: pointer; - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovTableFontFamily); - font-size: var(--rovContentFontSize); + + .floated-label-placeholder { + @apply(--paper-font-caption); } - .treeTableNode { - padding: 3px 50px 0px 2px; - font-weight: normal; - background-color: rgb(0, 0, 0); - color: #ffffff; - cursor: pointer; + + .underline { + position: relative; } - .treeNodeIcon { - padding-right:8px; + + .focused-line { + @apply(--layout-fit); + + background: var(--paper-input-container-focus-color, --default-primary-color); + height: 2px; + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: scale3d(0,1,1); + transform: scale3d(0,1,1); + + @apply(--paper-input-container-underline-focus); } - .treeCell { - padding: 3px 50px 2px 7px; + + .underline.is-highlighted .focused-line { + -webkit-transform: none; + transform: none; + -webkit-transition: -webkit-transform 0.25s; + transition: transform 0.25s; + + @apply(--paper-transition-easing); } - .rawNodeIcon { - width: 18px; - height: 18px; - padding-right:8px; + + .underline.is-invalid .focused-line { + background: var(--paper-input-container-invalid-color, --google-red-500); + -webkit-transform: none; + transform: none; + -webkit-transition: -webkit-transform 0.25s; + transition: transform 0.25s; + + @apply(--paper-transition-easing); } - .rawCell { - padding: 3px 50px 2px 7px; + + .unfocused-line { + @apply(--layout-fit); + + height: 1px; + background: var(--paper-input-container-color, --secondary-text-color); + + @apply(--paper-input-container-underline); } - .ttChildCell { - padding-left: 35px; + + :host([disabled]) .unfocused-line { + border-bottom: 1px dashed; + border-color: var(--paper-input-container-color, --secondary-text-color); + background: transparent; + + @apply(--paper-input-container-underline-disabled); } - .childCell { - padding-left: 35px; - display: table-cell; - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovTableFontFamily); - font-size: var(--rovContentFontSize); + + .label-and-input-container { + @apply(--layout-flex); + @apply(--layout-relative); } - .rovTableStyleCell { - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovTableFontFamily); - font-size: var(--rovContentFontSize); + + .input-content { + @apply(--layout-horizontal); + @apply(--layout-center); + + position: relative; } - #columnsSelector { - font-family: var(--rovFontFamily); - font-size: var(--rovColumnsSelectorFontSize); - position: fixed; - @apply(--layout-vertical); - @apply(--layout-self-stretch); - background-color: var(--rovTitleToolbarBackground); - overflow-y: auto; - margin: 0; + + .input-content ::content label, + .input-content ::content .paper-input-label { + position: absolute; + top: 0; + right: 0; + left: 0; + font: inherit; + color: var(--paper-input-container-color, --secondary-text-color); + + @apply(--paper-font-common-nowrap); + @apply(--paper-font-subhead); + @apply(--paper-input-container-label); } - .columnSelectCheckbox { - --paper-checkbox-size: 14px; - --paper-checkbox-unchecked-color: var(--rovTitleToolbarColor); - --paper-checkbox-unchecked-ink-color: transparent; - --paper-checkbox-checked-color: var(--rovTitleToolbarColor); - --paper-checkbox-checked-ink-color: transparent; - --paper-checkbox-checkmark-color: var(--rovTitleToolbarBackground); - --paper-checkbox-label-color: var(--rovTitleToolbarColor); + + .input-content.label-is-floating ::content label, + .input-content.label-is-floating ::content .paper-input-label { + -webkit-transform: translateY(-75%) scale(0.75); + transform: translateY(-75%) scale(0.75); + -webkit-transition: -webkit-transform 0.25s; + transition: transform 0.25s; + -webkit-transform-origin: left top; + transform-origin: left top; + + /* Since we scale to 75/100 of the size, we actually have 100/75 of the + original space now available */ + width: 133%; + + @apply(--paper-transition-easing); + @apply(--paper-input-container-label-floating); } - .columnSortIcon { - width: 16px; - height: 16px; - background-color: var(--rovTableHeaderBackground); - color: var(--rovTableHeaderColor); - float: right; + + :host-context([dir="rtl"]) .input-content.label-is-floating ::content label, + :host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label { + /* TODO(noms): Figure out why leaving the width at 133% before the animation + * actually makes + * it wider on the right side, not left side, as you would expect in RTL */ + width: 100%; + -webkit-transform-origin: right top; + transform-origin: right top; } - .cellList { - display: none; - margin-top: -18px; - margin-left: -4px; - padding: 0px; - border-width: 2px; - border-style: solid; - position: fixed; - list-style-type: none; - padding-bottom: 3px; - z-index: 9000; - background-color: var(--rovTableBackgroundColor); + + .input-content.label-is-highlighted ::content label, + .input-content.label-is-highlighted ::content .paper-input-label { + color: var(--paper-input-container-focus-color, --default-primary-color); + + @apply(--paper-input-container-label-focus); } - .cellListItem { - margin-left: 2px; - margin-right: 5px; - margin-bottom: 3px; - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovTableFontFamily); - font-size: var(--rovContentFontSize); + + .input-content.is-invalid ::content label, + .input-content.is-invalid ::content .paper-input-label { + color: var(--paper-input-container-invalid-color, --google-red-500); } - .cellDropIcon { - width: 16px; - height: 16px; - float: right; - color: lightslategray; + + .input-content.label-is-hidden ::content label, + .input-content.label-is-hidden ::content .paper-input-label { + visibility: hidden; } - .columnSelectTd { - display: table-cell; - padding-left: 10px; - padding-top: 4px; + + .input-content ::content input, + .input-content ::content textarea, + .input-content ::content iron-autogrow-textarea, + .input-content ::content .paper-input-input { + position: relative; /* to make a stacking context */ + outline: none; + box-shadow: none; + padding: 0; + width: 100%; + background: transparent; + border: none; + color: var(--paper-input-container-input-color, --primary-text-color); + -webkit-appearance: none; + text-align: inherit; + + @apply(--paper-font-subhead); + @apply(--paper-input-container-input); } - .columnSelectTh { - display: table-cell; - color: var(--rovTitleToolbarColor); - font-weight: normal; - text-align: center; - padding-top: 0px; + + ::content [prefix] { + @apply(--paper-font-subhead); + @apply(--paper-input-prefix); } - #columnConfigTable { - margin-top: 2px; - margin-bottom: 2px; - padding-left: 0px; - padding-right: 12px; + + ::content [suffix] { + @apply(--paper-font-subhead); + @apply(--paper-input-suffix); } - .instSelectIcon { - width: 24px; - height: 24px; - background-color: transparent; - color: black; - cursor: pointer; + + /* Firefox sets a min-width on the input, which can cause layout issues */ + .input-content ::content input { + min-width: 0; } - #instSelectDiv { - margin-left: 14px; - margin-top: 0px; - margin-bottom: 5px; - white-space: nowrap; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); + + .input-content ::content textarea { + resize: none; } - #selectInstanceDialog { - position: fixed; - margin-top: 0px; - --paper-dialog-background-color: white; - --paper-dialog-color: black; - @apply(--layout-vertical); - @apply(--layout-self-stretch); + + .add-on-content { + position: relative; } - #selectInstanceMenu { - padding-left: 0px; - margin-top: 2px; - margin-bottom: 2px; + + .add-on-content.is-invalid ::content * { + color: var(--paper-input-container-invalid-color, --google-red-500); } - .selectInstanceMenuItem { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - --paper-item-min-height: 24px; - cursor: pointer; - padding-left: 8px; - padding-right: 8px; + + .add-on-content.is-highlighted ::content * { + color: var(--paper-input-container-focus-color, --default-primary-color); } - .rovTh { - display: table-cell; - border-right: 1px solid var(--rovTableBackgroundColor); - border-top: 1px solid var(--rovTableBackgroundColor); - border-bottom: 1px solid var(--rovTableBackgroundColor); - border-left: 1px solid var(--rovTableBackgroundColor); - padding: 2px 5px 3px 3px; - text-align: left; - background-color: var(--rovTableHeaderBackground); - color: var(--rovTableHeaderColor); - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - font-weight: normal; + </style> + + <template is="dom-if" if="[[!noLabelFloat]]"> + <div class="floated-label-placeholder"> </div> + </template> + + <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"> + <content select="[prefix]" id="prefix"></content> + + <div class="label-and-input-container" id="labelAndInputContainer"> + <content select=":not([add-on]):not([prefix]):not([suffix])"></content> + </div> + + <content select="[suffix]"></content> + </div> + + <div class$="[[_computeUnderlineClass(focused,invalid)]]"> + <div class="unfocused-line"></div> + <div class="focused-line"></div> + </div> + + <div class$="[[_computeAddOnContentClass(focused,invalid)]]"> + <content id="addOnContent" select="[add-on]"></content> + </div> + </template> +</dom-module> + +<script> + Polymer({ + is: 'paper-input-container', + + properties: { + /** + * Set to true to disable the floating label. The label disappears when the input value is + * not null. + */ + noLabelFloat: { + type: Boolean, + value: false + }, + + /** + * Set to true to always float the floating label. + */ + alwaysFloatLabel: { + type: Boolean, + value: false + }, + + /** + * The attribute to listen for value changes on. + */ + attrForValue: { + type: String, + value: 'bind-value' + }, + + /** + * Set to true to auto-validate the input value when it changes. + */ + autoValidate: { + type: Boolean, + value: false + }, + + /** + * True if the input is invalid. This property is set automatically when the input value + * changes if auto-validating, or when the `iron-input-validate` event is heard from a child. + */ + invalid: { + observer: '_invalidChanged', + type: Boolean, + value: false + }, + + /** + * True if the input has focus. + */ + focused: { + readOnly: true, + type: Boolean, + value: false, + notify: true + }, + + _addons: { + type: Array + // do not set a default value here intentionally - it will be initialized lazily when a + // distributed child is attached, which may occur before configuration for this element + // in polyfill. + }, + + _inputHasContent: { + type: Boolean, + value: false + }, + + _inputSelector: { + type: String, + value: 'input,textarea,.paper-input-input' + }, + + _boundOnFocus: { + type: Function, + value: function() { + return this._onFocus.bind(this); + } + }, + + _boundOnBlur: { + type: Function, + value: function() { + return this._onBlur.bind(this); + } + }, + + _boundOnInput: { + type: Function, + value: function() { + return this._onInput.bind(this); + } + }, + + _boundValueChanged: { + type: Function, + value: function() { + return this._onValueChanged.bind(this); + } } - .rovTbody { - display: table-row-group; + }, + + listeners: { + 'addon-attached': '_onAddonAttached', + 'iron-input-validate': '_onIronInputValidate' + }, + + get _valueChangedEvent() { + return this.attrForValue + '-changed'; + }, + + get _propertyForValue() { + return Polymer.CaseMap.dashToCamelCase(this.attrForValue); + }, + + get _inputElement() { + return Polymer.dom(this).querySelector(this._inputSelector); + }, + + get _inputElementValue() { + return this._inputElement[this._propertyForValue] || this._inputElement.value; + }, + + ready: function() { + if (!this._addons) { + this._addons = []; } - .rovTd { - display: table-cell; - text-align:left; - padding-left: 4px; - padding-right: 5px; - white-space: nowrap; - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); + this.addEventListener('focus', this._boundOnFocus, true); + this.addEventListener('blur', this._boundOnBlur, true); + if (this.attrForValue) { + this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged); + } else { + this.addEventListener('input', this._onInput); } - .treeNode { - display: table-cell; - padding: 3px 50px 0px 2px; - font-weight: normal; - cursor: pointer; - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovTableFontFamily); - font-size: var(--rovContentFontSize); + }, + + attached: function() { + // Only validate when attached if the input already has a value. + if (this._inputElementValue != '') { + this._handleValueAndAutoValidate(this._inputElement); + } else { + this._handleValue(this._inputElement); } - .rovThead { - display: table-header-group; + }, + + _onAddonAttached: function(event) { + if (!this._addons) { + this._addons = []; } - .rovTr { - display:table-row; + var target = event.target; + if (this._addons.indexOf(target) === -1) { + this._addons.push(target); + if (this.isAttached) { + this._handleValue(this._inputElement); + } } - .rovTdDropdownCell { - background-color: var(--rovTableBackgroundColor); - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); + }, + + _onFocus: function() { + this._setFocused(true); + }, + + _onBlur: function() { + this._setFocused(false); + this._handleValueAndAutoValidate(this._inputElement); + }, + + _onInput: function(event) { + this._handleValueAndAutoValidate(event.target); + }, + + _onValueChanged: function(event) { + this._handleValueAndAutoValidate(event.target); + }, + + _handleValue: function(inputElement) { + var value = this._inputElementValue; + + // type="number" hack needed because this.value is empty until it's valid + if (value || value === 0 || (inputElement.type === 'number' && !inputElement.checkValidity())) { + this._inputHasContent = true; + } else { + this._inputHasContent = false; } - .rovTdDropdownCell:hover .cellList { - display: block; + + this.updateAddons({ + inputElement: inputElement, + value: value, + invalid: this.invalid + }); + }, + + _handleValueAndAutoValidate: function(inputElement) { + if (this.autoValidate) { + var valid; + if (inputElement.validate) { + valid = inputElement.validate(this._inputElementValue); + } else { + valid = inputElement.checkValidity(); + } + this.invalid = !valid; } - .formatMenu { - margin-left: 0px; - margin-top: 0px; - --paper-menu-button: { - padding-top: 0px; - padding-bottom: 4px; - }; - --paper-input-container: { - padding-top: 0px; - padding-bottom: 0px; - }; - --paper-input-container-input: { - font-family: var(--rovFontFamily); - font-size: var(--rovColumnsSelectorFontSize); - color: var(--rovTitleToolbarColor); - }; - --paper-input-container-label: { - font-family: var(--rovFontFamily); - font-size: var(--rovColumnsSelectorFontSize); - color: var(--rovTitleToolbarColor); - }; + + // Call this last to notify the add-ons. + this._handleValue(inputElement); + }, + + _onIronInputValidate: function(event) { + this.invalid = this._inputElement.invalid; + }, + + _invalidChanged: function() { + if (this._addons) { + this.updateAddons({invalid: this.invalid}); } - #formatListbox { - background-color: white; - padding-top: 4px; - padding-bottom: 2px; + }, + + /** + * Call this to update the state of add-ons. + * @param {Object} state Add-on state. + */ + updateAddons: function(state) { + for (var addon, index = 0; addon = this._addons[index]; index++) { + addon.update(state); } - .formatItem { - --paper-item-min-height: 20px; - height: 20px; - font-family: var(--rovFontFamily); - font-size: var(--rovColumnsSelectorFontSize); - color: black; - background-color: white; + }, + + _computeInputContentClass: function(noLabelFloat, alwaysFloatLabel, focused, invalid, _inputHasContent) { + var cls = 'input-content'; + if (!noLabelFloat) { + var label = this.querySelector('label'); + + if (alwaysFloatLabel || _inputHasContent) { + cls += ' label-is-floating'; + // If the label is floating, ignore any offsets that may have been + // applied from a prefix element. + this.$.labelAndInputContainer.style.position = 'static'; + + if (invalid) { + cls += ' is-invalid'; + } else if (focused) { + cls += " label-is-highlighted"; + } + } else { + // When the label is not floating, it should overlap the input element. + if (label) { + this.$.labelAndInputContainer.style.position = 'relative'; + } + } + } else { + if (_inputHasContent) { + cls += ' label-is-hidden'; + } } - #closeColumnsButton { - width: 18px; - height: 18px; - position: absolute; - right: 4px; - top: 4px; - padding: 0; - color: var(--rovTitleToolbarColor); + return cls; + }, + + _computeUnderlineClass: function(focused, invalid) { + var cls = 'underline'; + if (invalid) { + cls += ' is-invalid'; + } else if (focused) { + cls += ' is-highlighted' } - </style> - <span> - <paper-dialog id="columnsSelector" on-iron-overlay-closed="columnsSelectorClosed" on-keypress="columnsSelectorKeyPress"> - <div><paper-icon-button id="closeColumnsButton" title="Close" on-click="closeColumnsSelector" icon="close" role="button" tabindex="0"></paper-icon-button></div> - <div style="display:table" id="columnConfigTable"> - <div class="rovThead"> - <div class="columnSelectTh">Columns</div> - <template is="dom-if" if="{{hasFormats}}"> - <div class="columnSelectTh">Format</div> - </template> - </div> - <div class="rovTbody"> - <template is="dom-repeat" items="{{columnStates}}" as="col"> - <div class="rovTr"> - <div class="columnSelectTd"><paper-checkbox class="columnSelectCheckbox" id$="{{col.name}}" on-click="colsChanged" checked$="{{col.checked}}">{{col.name}}</paper-checkbox></div> - <template is="dom-if" if="{{hasFormats}}" restamp="true"> - <template is="dom-if" if="{{col.hasFormat}}"> - <div class="columnSelectTd"> - <paper-dropdown-menu class="formatMenu" label="{{col.format}}" no-label-float no-animations on-iron-select="colFormatChanged" disabled="{{!col.checked}}"> - <paper-listbox id="formatListbox" class="dropdown-content" selected="{{col.format}}"> - <paper-item class="formatItem">Decimal</paper-item> - <paper-item class="formatItem">Hex</paper-item> - <paper-item class="formatItem">Scientific</paper-item> - </paper-listbox> - </paper-dropdown-menu> - </div> - </template> - <template is="dom-if" if="{{!col.hasFormat}}" restamp="true"> - <div style="display:table-cell;"></div> - </template> - </template> - </div> - </template> - </div> - </div> - </paper-dialog> - <paper-dialog id="selectInstanceDialog" alwaysOnTop> - <paper-menu id="selectInstanceMenu" on-iron-select="instanceSelected" class="attachedMenu"> - <template is="dom-repeat" items="{{instanceDataTable.instNames}}" as="inst"> - <paper-item class="selectInstanceMenuItem" role="menuitem">{{inst}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - </span> - <template is="dom-if" if="{{showDataMessage}}"> - <div style="margin-top:20px;margin-bottom:20px;"><label id="messageLabel">{{dataMessage}}</label></div> - </template> - <div style="display:table" id="rovInstanceTable" hidden$="{{!isInstanceView}}"> - <div class="rovThead"> - <div class="rovTr"> - <template is="dom-repeat" items="{{instanceTable.displayColumns}}" as="colObj"> - <template is="dom-if" if="{{colObj.isSortCol}}" restamp="true"> - <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}<iron-icon class="columnSortIcon" icon$="{{colObj.icon}}"></iron-icon></div> - </template> - <template is="dom-if" if="{{!colObj.isSortCol}}" restamp="true"> - <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}</div> - </template> - </template> - </div> - </div> - <div class="rovTbody"> - <template id="rovInstanceTemplate" is="dom-repeat" items="{{instanceTable.rows}}" as="row"> - <div class="rovTr"> - <template is="dom-repeat" items="{{row}}" as="rowObj"> - <template is="dom-if" if="{{rowObj.isArray}}" restamp="true"> - <div class="rovTdDropdownCell" style$="{{rowObj.style}}" title$="{{rowObj.title}}" on-mouseover="cellDropMouseOver">{{rowObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> - <ul class="cellList"> - <template is="dom-repeat" items="{{rowObj.arrVals}}" as="arrVal"> - <li class="cellListItem">{{arrVal}}</li> - </template> - </ul> - </div> - </template> - <template is="dom-if" if="{{!rowObj.isArray}}" restamp="true"> - <div class="rovTd" style$="{{rowObj.style}}" title$="{{rowObj.title}}">{{rowObj.val}}</div> - </template> - </template> - </div> - </template> - </div> - </div> - <span hidden$="{{!isInstanceDataView}}"> - <template is="dom-if" if="{{instanceDataTable.showInstSelect}}" restamp="true"> - <div id="instSelectDiv">{{instanceDataTable.currentInst}}<iron-icon class="instSelectIcon" icon="arrow-drop-down" on-click="selectInstanceDialog"></iron-icon></div> - </template> - <div style="display:table" id="rovInstanceDataTable"> - <div class="rovThead"> - <div class="rovTr"> - <template is="dom-repeat" items="{{instanceDataTable.displayColumns}}" as="colObj"> - <template is="dom-if" if="{{colObj.isSortCol}}" restamp="true"> - <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}<iron-icon class="columnSortIcon" icon$="{{colObj.icon}}"></iron-icon></div> - </template> - <template is="dom-if" if="{{!colObj.isSortCol}}" restamp="true"> - <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}</div> - </template> - </template> - </div> - </div> - <div class="rovTbody"> - <template id="rovInstanceDataTemplate" is="dom-repeat" items="{{instanceDataTable.rows}}" as="rowItem"> - <template is="dom-if" if="{{rowItem.expanded}}" restamp="true"> - <template is="dom-repeat" items="{{rowItem.rowVals}}" as="rowVals"> - <div class="rovTr" style="padding-bottom:10px;"> - <template is="dom-repeat" items="{{rowVals}}" as="rowValObj"> - <template is="dom-if" if="{{rowValObj.isArray}}" restamp="true"> - <div class="rovTdDropdownCell" style$="{{rowValObj.style}}" title$="{{rowValObj.title}}" on-mouseover="cellDropMouseOver">{{rowValObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> - <ul class="cellList"> - <template is="dom-repeat" items="{{rowValObj.arrVals}}" as="arrVal"> - <li class="cellListItem">{{arrVal}}</li> - </template> - </ul> - </div> - </template> - <template is="dom-if" if="{{!rowValObj.isArray}}" restamp="true"> - <div class="rovTableStyleCell" style$="{{rowValObj.style}}" title$="{{rowValObj.title}}">{{rowValObj.val}}</div> - </template> - </template> - </div> - </template> - </template> - </template> - </div> - </div> - </span> - <div style="display:table" id="rovTreeTable" hidden$="{{!isTreeView}}"> - <div class="rovThead"> - <div class="rovTr"> - <template is="dom-repeat" items="{{treeTable.columns}}"> - <div class="rovTh">{{item}}</div> - </template> - </div> - </div> - <div style="display:table-row-group;"> - <template id="rovTreeTemplate" is="dom-repeat" items="{{treeTable}}" as="treeItem"> - <template is="dom-if" if="{{treeItem.expanded}}"> - <div class="rovTr"> - <div class="treeNode" style$="{{treeItem.style}}" id$="{{treeItem.parentNode}}" on-tap="treeNodeTapped"><iron-icon class="treeNodeIcon" icon="remove"></iron-icon>{{treeItem.parentNode}}</div> - <div class="rovTd"></div> - </div> - <template is="dom-repeat" items="{{treeItem.childRows}}" as="row"> - <div class="rovTr"> - <div class="childCell" style$="{{row.0.style}}">{{row.0.val}}</div> - <div class="rovTd" style$="{{row.1.style}}">{{row.1.val}}</div> - </div> - </template> - </template> - <template is="dom-if" if="{{!treeItem.expanded}}"> - <div class="rovTr"> - <div class="treeNode" style$="{{treeItem.style}}" id$="{{treeItem.parentNode}}" on-tap="treeNodeTapped"><iron-icon class="treeNodeIcon" icon="add"></iron-icon>{{treeItem.parentNode}}</div> - <div class="rovTd"></div> - </div> - </template> - </template> - </div> - </div> - <div style="display:table" id="rovTreeTableTable" hidden$="{{!isTreeTableView}}"> - <div class="rovThead"> - <div class="rovTr"> - <div class="rovTh"></div> - <template is="dom-repeat" items="{{treeTableTable.columns}}"> - <div class="rovTh" draggable="{{colsDraggable}}" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{item}}</div> - </template> - </div> - </div> - <div style="display:table-row-group;"> - <template id="rovTreeTableTemplate" is="dom-repeat" items="{{treeTableTable}}" as="ttItem"> - <template is="dom-if" if="{{ttItem.expanded}}" restamp="true"> - <div class="rovTr"> - <div class="rawNode" id$="{{ttItem.parentNode}}" on-tap="ttNodeTapped"><iron-icon class="rawNodeIcon" icon="remove"></iron-icon>{{ttItem.parentNode}}</div> - </div> - <template is="dom-repeat" items="{{ttItem.childRows}}" as="row"> - <template is="dom-if" if="{{row.hasIcon}}" restamp="true"> - <div class="rovTr"> - <div class="rovTableStyleCell" style$="{{row.style}}" id$="{{row.id}}" on-tap="chttNodeTapped"><iron-icon class="rawNodeIcon" icon$="{{row.icon}}"></iron-icon>{{row.name}}</div> - </div> - </template> - <template is="dom-if" if="{{!row.hasIcon}}" restamp="true"> - <template is="dom-if" if="{{row.atMax}}"> - <div class="rovTr"> - <div class="rovTableStyleCell" style$="{{row.style}}">{{row.name}}</div> - <div class="rovTd">Max depth</div> - </div> - </template> - <template is="dom-if" if="{{!row.atMax}}"> - <div class="rovTr"> - <div class="rovTableStyleCell" style$="{{row.style}}"></div> - <template is="dom-repeat" items="{{row.cells}}" as="cellObj"> - <template is="dom-if" if="{{cellObj.isArray}}" restamp="true"> - <div class="rovTdDropdownCell" style$="{{cellObj.style}}" title$="{{cellObj.title}}" on-mouseover="cellDropMouseOver">{{cellObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> - <ul class="cellList"> - <template is="dom-repeat" items="{{cellObj.arrVals}}" as="arrVal"> - <li class="cellListItem">{{arrVal}}</li> - </template> - </ul> - </div> - </template> - <template is="dom-if" if="{{!cellObj.isArray}}" restamp="true"> - <div class="rovTd" style$="{{cellObj.style}}" title$="{{cellObj.title}}">{{cellObj.val}}</div> - </template> - </template> - </div> - </template> - </template> - </template> - </template> - <template is="dom-if" if="{{!ttItem.expanded}}"> - <div class="rovTr"> - <div class="rawNode" id$="{{ttItem.parentNode}}" on-tap="ttNodeTapped"><iron-icon class="rawNodeIcon" icon="add"></iron-icon>{{ttItem.parentNode}}</div> - </div> - </template> - </template> - </div> - </div> - <div style="display:table" id="rovRawTable" hidden$="{{!isRawView}}"> - <div class="rovThead"> - <div class="rovTr"> - <template is="dom-repeat" items="{{rawTable.columns}}"> - <div class="rovTh">{{item}}</div> - </template> - </div> - </div> - <div style="display:table-row-group;"> - <template id="rovRawTemplate" is="dom-repeat" items="{{rawTable}}" as="rawItem"> - <template is="dom-if" if="{{rawItem.expanded}}" restamp="true"> - <div class="rovTr"> - <div class="rawNode" id$="{{rawItem.parentNode}}" style$="{{rawItem.style}}" on-tap="rawNodeTapped"><iron-icon class="rawNodeIcon" icon="remove"></iron-icon>{{rawItem.parentNode}}</div> - <div class="rovTd"></div> - </div> - <template is="dom-repeat" items="{{rawItem.childRows}}" as="row"> - <template is="dom-if" if="{{row.hasIcon}}"> - <div class="rovTr"> - <div class="rovTableStyleCell" style$="{{row.style}}" id$="{{row.id}}" on-tap="chRawNodeTapped"><iron-icon class="rawNodeIcon" icon$="{{row.icon}}"></iron-icon>{{row.property}}</div> - <div class="rovTd"></div> - </div> - </template> - <template is="dom-if" if="{{!row.hasIcon}}"> - <div class="rovTr"> - <div class="rovTableStyleCell" style$="{{row.style}}">{{row.property}}</div> - <div class="rovTableStyleCell" style$="{{row.valStyle}}" title$="{{row.valTitle}}">{{row.value}}</div> - </div> - </template> - </template> - </template> - <template is="dom-if" if="{{!rawItem.expanded}}"> - <div class="rovTr"> - <div class="rawNode" id$="{{rawItem.parentNode}}" style$="{{rawItem.style}}" on-tap="rawNodeTapped"><iron-icon class="rawNodeIcon" icon="add"></iron-icon>{{rawItem.parentNode}}</div> - <div class="rovTd"></div> - </div> - </template> - </template> - </div> - </div> - </template> - <script src="ti-rov-table.js"></script> -</dom-module> + return cls; + }, + _computeAddOnContentClass: function(focused, invalid) { + var cls = 'add-on-content'; + if (invalid) { + cls += ' is-invalid'; + } else if (focused) { + cls += ' is-highlighted' + } + return cls; + } + }); +</script> diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f index 1a981f34a..e7bb11c06 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f @@ -1,599 +1,536 @@ -<!-- -@license -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt ---> +<link rel="import" href="../../components/polymer/polymer.html"> +<link rel="import" href="../../components/paper-radio-group/paper-radio-group.html"> +<link rel="import" href="../../components/paper-radio-button/paper-radio-button.html"> +<link rel="import" href="../../components/paper-dropdown-menu/paper-dropdown-menu.html"> +<link rel="import" href="../../components/paper-button/paper-button.html"> +<link rel="import" href="../../components/paper-dialog/paper-dialog.html"> +<link rel="import" href="../../components/paper-checkbox/paper-checkbox.html"> +<link rel="import" href="../../components/iron-flex-layout/iron-flex-layout.html"> +<link rel="import" href="../../components/iron-fit-behavior/iron-fit-behavior.html"> +<link rel="import" href="../../components/paper-styles/paper-styles.html"> -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> -<link rel="import" href="../paper-styles/color.html"> -<link rel="import" href="../paper-styles/default-theme.html"> -<link rel="import" href="../paper-styles/typography.html"> - -<!-- -`<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or -`<iron-autogrow-textarea>` and optional add-on elements such as an error message or character -counter, used to implement Material Design text fields. - -For example: - - <paper-input-container> - <label>Your name</label> - <input is="iron-input"> - </paper-input-container> - -### Listening for input changes - -By default, it listens for changes on the `bind-value` attribute on its children nodes and perform -tasks such as auto-validating and label styling when the `bind-value` changes. You can configure -the attribute it listens to with the `attr-for-value` attribute. - -### Using a custom input element - -You can use a custom input element in a `<paper-input-container>`, for example to implement a -compound input field like a social security number input. The custom input element should have the -`paper-input-input` class, have a `notify:true` value property and optionally implements -`Polymer.IronValidatableBehavior` if it is validatable. - - <paper-input-container attr-for-value="ssn-value"> - <label>Social security number</label> - <ssn-input class="paper-input-input"></ssn-input> - </paper-input-container> - -### Validation - -If the `auto-validate` attribute is set, the input container will validate the input and update -the container styling when the input value changes. - -### Add-ons - -Add-ons are child elements of a `<paper-input-container>` with the `add-on` attribute and -implements the `Polymer.PaperInputAddonBehavior` behavior. They are notified when the input value -or validity changes, and may implement functionality such as error messages or character counters. -They appear at the bottom of the input. - -### Prefixes and suffixes -These are child elements of a `<paper-input-container>` with the `prefix` -or `suffix` attribute, and are displayed inline with the input, before or after. - - <paper-input-container> - <div prefix>$</div> - <label>Total</label> - <input is="iron-input"> - <paper-icon-button suffix icon="clear"></paper-icon-button> - </paper-input-container> - -### Styling - -The following custom properties and mixins are available for styling: - -Custom property | Description | Default -----------------|-------------|---------- -`--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color` -`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--default-primary-color` -`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--google-red-500` -`--paper-input-container-input-color` | Input foreground color | `--primary-text-color` -`--paper-input-container` | Mixin applied to the container | `{}` -`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}` -`--paper-input-container-label` | Mixin applied to the label | `{}` -`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}` -`--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}` -`--paper-input-container-input` | Mixin applied to the input | `{}` -`--paper-input-container-underline` | Mixin applied to the underline | `{}` -`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}` -`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}` -`--paper-input-prefix` | Mixin applied to the input prefix | `{}` -`--paper-input-suffix` | Mixin applied to the input suffix | `{}` - -This element is `display:block` by default, but you can set the `inline` attribute to make it -`display:inline-block`. ---> - -<dom-module id="paper-input-container"> +<dom-module id="ti-rov-table"> <template> - <style> + <!-- include global rov styles --> + <style include="ti-rov-styles"></style> + <style is="custom-style"> :host { - display: block; - padding: 8px 0; - - @apply(--paper-input-container); + display:block; } - - :host[inline] { - display: inline-block; + paper-checkbox { + --paper-checkbox-unchecked-background-color: white; + --paper-checkbox-unchecked-color: white; + --paper-checkbox-unchecked-ink-color: white; + --paper-checkbox-checked-color: white; + --paper-checkbox-checked-ink-color: white; + --paper-checkbox-checkmark-color: black; + --paper-checkbox-label-color: white; } - - :host([disabled]) { - pointer-events: none; - opacity: 0.33; - - @apply(--paper-input-container-disabled); + #messageLabel { + margin-left: 15px; + margin-right: 15px; + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); } - - .floated-label-placeholder { - @apply(--paper-font-caption); + .rawNode { + display: table-cell; + padding: 3px 25px 0px 2px; + font-weight: normal; + cursor: pointer; + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovTableFontFamily); + font-size: var(--rovContentFontSize); } - - .underline { - position: relative; + .treeTableNode { + padding: 3px 50px 0px 2px; + font-weight: normal; + background-color: rgb(0, 0, 0); + color: #ffffff; + cursor: pointer; } - - .focused-line { - @apply(--layout-fit); - - background: var(--paper-input-container-focus-color, --default-primary-color); - height: 2px; - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: scale3d(0,1,1); - transform: scale3d(0,1,1); - - @apply(--paper-input-container-underline-focus); + .treeNodeIcon { + padding-right:8px; } - - .underline.is-highlighted .focused-line { - -webkit-transform: none; - transform: none; - -webkit-transition: -webkit-transform 0.25s; - transition: transform 0.25s; - - @apply(--paper-transition-easing); + .treeCell { + padding: 3px 50px 2px 7px; } - - .underline.is-invalid .focused-line { - background: var(--paper-input-container-invalid-color, --google-red-500); - -webkit-transform: none; - transform: none; - -webkit-transition: -webkit-transform 0.25s; - transition: transform 0.25s; - - @apply(--paper-transition-easing); + .rawNodeIcon { + width: 18px; + height: 18px; + padding-right:8px; } - - .unfocused-line { - @apply(--layout-fit); - - height: 1px; - background: var(--paper-input-container-color, --secondary-text-color); - - @apply(--paper-input-container-underline); + .rawCell { + padding: 3px 50px 2px 7px; } - - :host([disabled]) .unfocused-line { - border-bottom: 1px dashed; - border-color: var(--paper-input-container-color, --secondary-text-color); - background: transparent; - - @apply(--paper-input-container-underline-disabled); + .ttChildCell { + padding-left: 35px; } - - .label-and-input-container { - @apply(--layout-flex); - @apply(--layout-relative); + .childCell { + padding-left: 35px; + display: table-cell; + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovTableFontFamily); + font-size: var(--rovContentFontSize); } - - .input-content { - @apply(--layout-horizontal); - @apply(--layout-center); - - position: relative; + .rovTableStyleCell { + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovTableFontFamily); + font-size: var(--rovContentFontSize); } - - .input-content ::content label, - .input-content ::content .paper-input-label { - position: absolute; - top: 0; - right: 0; - left: 0; - font: inherit; - color: var(--paper-input-container-color, --secondary-text-color); - - @apply(--paper-font-common-nowrap); - @apply(--paper-font-subhead); - @apply(--paper-input-container-label); + #columnsSelector { + font-family: var(--rovFontFamily); + font-size: var(--rovColumnsSelectorFontSize); + position: fixed; + @apply(--layout-vertical); + @apply(--layout-self-stretch); + background-color: var(--rovTitleToolbarBackground); + overflow-y: auto; + margin: 0; } - - .input-content.label-is-floating ::content label, - .input-content.label-is-floating ::content .paper-input-label { - -webkit-transform: translateY(-75%) scale(0.75); - transform: translateY(-75%) scale(0.75); - -webkit-transition: -webkit-transform 0.25s; - transition: transform 0.25s; - -webkit-transform-origin: left top; - transform-origin: left top; - - /* Since we scale to 75/100 of the size, we actually have 100/75 of the - original space now available */ - width: 133%; - - @apply(--paper-transition-easing); - @apply(--paper-input-container-label-floating); + .columnSelectCheckbox { + --paper-checkbox-size: 14px; + --paper-checkbox-unchecked-color: var(--rovTitleToolbarColor); + --paper-checkbox-unchecked-ink-color: transparent; + --paper-checkbox-checked-color: var(--rovTitleToolbarColor); + --paper-checkbox-checked-ink-color: transparent; + --paper-checkbox-checkmark-color: var(--rovTitleToolbarBackground); + --paper-checkbox-label-color: var(--rovTitleToolbarColor); } - - :host-context([dir="rtl"]) .input-content.label-is-floating ::content label, - :host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label { - /* TODO(noms): Figure out why leaving the width at 133% before the animation - * actually makes - * it wider on the right side, not left side, as you would expect in RTL */ - width: 100%; - -webkit-transform-origin: right top; - transform-origin: right top; + .columnSortIcon { + width: 16px; + height: 16px; + background-color: var(--rovTableHeaderBackground); + color: var(--rovTableHeaderColor); + float: right; } - - .input-content.label-is-highlighted ::content label, - .input-content.label-is-highlighted ::content .paper-input-label { - color: var(--paper-input-container-focus-color, --default-primary-color); - - @apply(--paper-input-container-label-focus); + .cellList { + display: none; + margin-top: -18px; + margin-left: -4px; + padding: 0px; + border-width: 2px; + border-style: solid; + position: fixed; + list-style-type: none; + padding-bottom: 3px; + z-index: 9000; + background-color: var(--rovTableBackgroundColor); } - - .input-content.is-invalid ::content label, - .input-content.is-invalid ::content .paper-input-label { - color: var(--paper-input-container-invalid-color, --google-red-500); + .cellListItem { + margin-left: 2px; + margin-right: 5px; + margin-bottom: 3px; + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovTableFontFamily); + font-size: var(--rovContentFontSize); } - - .input-content.label-is-hidden ::content label, - .input-content.label-is-hidden ::content .paper-input-label { - visibility: hidden; + .cellDropIcon { + width: 16px; + height: 16px; + float: right; + color: lightslategray; } - - .input-content ::content input, - .input-content ::content textarea, - .input-content ::content iron-autogrow-textarea, - .input-content ::content .paper-input-input { - position: relative; /* to make a stacking context */ - outline: none; - box-shadow: none; - padding: 0; - width: 100%; - background: transparent; - border: none; - color: var(--paper-input-container-input-color, --primary-text-color); - -webkit-appearance: none; - text-align: inherit; - - @apply(--paper-font-subhead); - @apply(--paper-input-container-input); + .columnSelectTd { + display: table-cell; + padding-left: 10px; + padding-top: 4px; } - - ::content [prefix] { - @apply(--paper-font-subhead); - @apply(--paper-input-prefix); + .columnSelectTh { + display: table-cell; + color: var(--rovTitleToolbarColor); + font-weight: normal; + text-align: center; + padding-top: 0px; } - - ::content [suffix] { - @apply(--paper-font-subhead); - @apply(--paper-input-suffix); + #columnConfigTable { + margin-top: 2px; + margin-bottom: 2px; + padding-left: 0px; + padding-right: 12px; } - - /* Firefox sets a min-width on the input, which can cause layout issues */ - .input-content ::content input { - min-width: 0; + .instSelectIcon { + width: 24px; + height: 24px; + background-color: transparent; + color: black; + cursor: pointer; } - - .input-content ::content textarea { - resize: none; + #instSelectDiv { + margin-left: 14px; + margin-top: 0px; + margin-bottom: 5px; + white-space: nowrap; + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); } - - .add-on-content { - position: relative; + #selectInstanceDialog { + position: fixed; + margin-top: 0px; + --paper-dialog-background-color: white; + --paper-dialog-color: black; + @apply(--layout-vertical); + @apply(--layout-self-stretch); } - - .add-on-content.is-invalid ::content * { - color: var(--paper-input-container-invalid-color, --google-red-500); + #selectInstanceMenu { + padding-left: 0px; + margin-top: 2px; + margin-bottom: 2px; } - - .add-on-content.is-highlighted ::content * { - color: var(--paper-input-container-focus-color, --default-primary-color); + .selectInstanceMenuItem { + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); + --paper-item-min-height: 24px; + cursor: pointer; + padding-left: 8px; + padding-right: 8px; } - </style> - - <template is="dom-if" if="[[!noLabelFloat]]"> - <div class="floated-label-placeholder"> </div> - </template> - - <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"> - <content select="[prefix]" id="prefix"></content> - - <div class="label-and-input-container" id="labelAndInputContainer"> - <content select=":not([add-on]):not([prefix]):not([suffix])"></content> - </div> - - <content select="[suffix]"></content> - </div> - - <div class$="[[_computeUnderlineClass(focused,invalid)]]"> - <div class="unfocused-line"></div> - <div class="focused-line"></div> - </div> - - <div class$="[[_computeAddOnContentClass(focused,invalid)]]"> - <content id="addOnContent" select="[add-on]"></content> - </div> - </template> -</dom-module> - -<script> - Polymer({ - is: 'paper-input-container', - - properties: { - /** - * Set to true to disable the floating label. The label disappears when the input value is - * not null. - */ - noLabelFloat: { - type: Boolean, - value: false - }, - - /** - * Set to true to always float the floating label. - */ - alwaysFloatLabel: { - type: Boolean, - value: false - }, - - /** - * The attribute to listen for value changes on. - */ - attrForValue: { - type: String, - value: 'bind-value' - }, - - /** - * Set to true to auto-validate the input value when it changes. - */ - autoValidate: { - type: Boolean, - value: false - }, - - /** - * True if the input is invalid. This property is set automatically when the input value - * changes if auto-validating, or when the `iron-input-validate` event is heard from a child. - */ - invalid: { - observer: '_invalidChanged', - type: Boolean, - value: false - }, - - /** - * True if the input has focus. - */ - focused: { - readOnly: true, - type: Boolean, - value: false, - notify: true - }, - - _addons: { - type: Array - // do not set a default value here intentionally - it will be initialized lazily when a - // distributed child is attached, which may occur before configuration for this element - // in polyfill. - }, - - _inputHasContent: { - type: Boolean, - value: false - }, - - _inputSelector: { - type: String, - value: 'input,textarea,.paper-input-input' - }, - - _boundOnFocus: { - type: Function, - value: function() { - return this._onFocus.bind(this); - } - }, - - _boundOnBlur: { - type: Function, - value: function() { - return this._onBlur.bind(this); - } - }, - - _boundOnInput: { - type: Function, - value: function() { - return this._onInput.bind(this); - } - }, - - _boundValueChanged: { - type: Function, - value: function() { - return this._onValueChanged.bind(this); - } + .rovTh { + display: table-cell; + border-right: 1px solid var(--rovTableBackgroundColor); + border-top: 1px solid var(--rovTableBackgroundColor); + border-bottom: 1px solid var(--rovTableBackgroundColor); + border-left: 1px solid var(--rovTableBackgroundColor); + padding: 2px 5px 3px 3px; + text-align: left; + background-color: var(--rovTableHeaderBackground); + color: var(--rovTableHeaderColor); + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); + font-weight: normal; } - }, - - listeners: { - 'addon-attached': '_onAddonAttached', - 'iron-input-validate': '_onIronInputValidate' - }, - - get _valueChangedEvent() { - return this.attrForValue + '-changed'; - }, - - get _propertyForValue() { - return Polymer.CaseMap.dashToCamelCase(this.attrForValue); - }, - - get _inputElement() { - return Polymer.dom(this).querySelector(this._inputSelector); - }, - - get _inputElementValue() { - return this._inputElement[this._propertyForValue] || this._inputElement.value; - }, - - ready: function() { - if (!this._addons) { - this._addons = []; + .rovTbody { + display: table-row-group; } - this.addEventListener('focus', this._boundOnFocus, true); - this.addEventListener('blur', this._boundOnBlur, true); - if (this.attrForValue) { - this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged); - } else { - this.addEventListener('input', this._onInput); + .rovTd { + display: table-cell; + text-align:left; + padding-left: 4px; + padding-right: 5px; + white-space: nowrap; + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); } - }, - - attached: function() { - // Only validate when attached if the input already has a value. - if (this._inputElementValue != '') { - this._handleValueAndAutoValidate(this._inputElement); - } else { - this._handleValue(this._inputElement); + .treeNode { + display: table-cell; + padding: 3px 50px 0px 2px; + font-weight: normal; + cursor: pointer; + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovTableFontFamily); + font-size: var(--rovContentFontSize); } - }, - - _onAddonAttached: function(event) { - if (!this._addons) { - this._addons = []; + .rovThead { + display: table-header-group; } - var target = event.target; - if (this._addons.indexOf(target) === -1) { - this._addons.push(target); - if (this.isAttached) { - this._handleValue(this._inputElement); - } + .rovTr { + display:table-row; } - }, - - _onFocus: function() { - this._setFocused(true); - }, - - _onBlur: function() { - this._setFocused(false); - this._handleValueAndAutoValidate(this._inputElement); - }, - - _onInput: function(event) { - this._handleValueAndAutoValidate(event.target); - }, - - _onValueChanged: function(event) { - this._handleValueAndAutoValidate(event.target); - }, - - _handleValue: function(inputElement) { - var value = this._inputElementValue; - - // type="number" hack needed because this.value is empty until it's valid - if (value || value === 0 || (inputElement.type === 'number' && !inputElement.checkValidity())) { - this._inputHasContent = true; - } else { - this._inputHasContent = false; + .rovTdDropdownCell { + background-color: var(--rovTableBackgroundColor); + font-family: var(--rovFontFamily); + font-size: var(--rovContentFontSize); } - - this.updateAddons({ - inputElement: inputElement, - value: value, - invalid: this.invalid - }); - }, - - _handleValueAndAutoValidate: function(inputElement) { - if (this.autoValidate) { - var valid; - if (inputElement.validate) { - valid = inputElement.validate(this._inputElementValue); - } else { - valid = inputElement.checkValidity(); - } - this.invalid = !valid; + .rovTdDropdownCell:hover .cellList { + display: block; } - - // Call this last to notify the add-ons. - this._handleValue(inputElement); - }, - - _onIronInputValidate: function(event) { - this.invalid = this._inputElement.invalid; - }, - - _invalidChanged: function() { - if (this._addons) { - this.updateAddons({invalid: this.invalid}); + .formatMenu { + margin-left: 0px; + margin-top: 0px; + --paper-menu-button: { + padding-top: 0px; + padding-bottom: 4px; + }; + --paper-input-container: { + padding-top: 0px; + padding-bottom: 0px; + }; + --paper-input-container-input: { + font-family: var(--rovFontFamily); + font-size: var(--rovColumnsSelectorFontSize); + color: var(--rovTitleToolbarColor); + }; + --paper-input-container-label: { + font-family: var(--rovFontFamily); + font-size: var(--rovColumnsSelectorFontSize); + color: var(--rovTitleToolbarColor); + }; } - }, - - /** - * Call this to update the state of add-ons. - * @param {Object} state Add-on state. - */ - updateAddons: function(state) { - for (var addon, index = 0; addon = this._addons[index]; index++) { - addon.update(state); + #formatListbox { + background-color: white; + padding-top: 4px; + padding-bottom: 2px; } - }, - - _computeInputContentClass: function(noLabelFloat, alwaysFloatLabel, focused, invalid, _inputHasContent) { - var cls = 'input-content'; - if (!noLabelFloat) { - var label = this.querySelector('label'); - - if (alwaysFloatLabel || _inputHasContent) { - cls += ' label-is-floating'; - // If the label is floating, ignore any offsets that may have been - // applied from a prefix element. - this.$.labelAndInputContainer.style.position = 'static'; - - if (invalid) { - cls += ' is-invalid'; - } else if (focused) { - cls += " label-is-highlighted"; - } - } else { - // When the label is not floating, it should overlap the input element. - if (label) { - this.$.labelAndInputContainer.style.position = 'relative'; - } - } - } else { - if (_inputHasContent) { - cls += ' label-is-hidden'; - } + .formatItem { + --paper-item-min-height: 20px; + height: 20px; + font-family: var(--rovFontFamily); + font-size: var(--rovColumnsSelectorFontSize); + color: black; + background-color: white; } - return cls; - }, - - _computeUnderlineClass: function(focused, invalid) { - var cls = 'underline'; - if (invalid) { - cls += ' is-invalid'; - } else if (focused) { - cls += ' is-highlighted' + #closeColumnsButton { + width: 18px; + height: 18px; + position: absolute; + right: 4px; + top: 4px; + padding: 0; + color: var(--rovTitleToolbarColor); } - return cls; - }, + </style> + <span> + <paper-dialog id="columnsSelector" on-iron-overlay-closed="columnsSelectorClosed" on-keypress="columnsSelectorKeyPress"> + <div><paper-icon-button id="closeColumnsButton" title="Close" on-click="closeColumnsSelector" icon="close" role="button" tabindex="0"></paper-icon-button></div> + <div style="display:table" id="columnConfigTable"> + <div class="rovThead"> + <div class="columnSelectTh">Columns</div> + <template is="dom-if" if="{{hasFormats}}"> + <div class="columnSelectTh">Format</div> + </template> + </div> + <div class="rovTbody"> + <template is="dom-repeat" items="{{columnStates}}" as="col"> + <div class="rovTr"> + <div class="columnSelectTd"><paper-checkbox class="columnSelectCheckbox" id$="{{col.name}}" on-click="colsChanged" checked$="{{col.checked}}">{{col.name}}</paper-checkbox></div> + <template is="dom-if" if="{{hasFormats}}" restamp="true"> + <template is="dom-if" if="{{col.hasFormat}}"> + <div class="columnSelectTd"> + <paper-dropdown-menu class="formatMenu" label="{{col.format}}" no-label-float no-animations on-iron-select="colFormatChanged" disabled="{{!col.checked}}"> + <paper-listbox id="formatListbox" class="dropdown-content" selected="{{col.format}}"> + <paper-item class="formatItem">Decimal</paper-item> + <paper-item class="formatItem">Hex</paper-item> + <paper-item class="formatItem">Scientific</paper-item> + </paper-listbox> + </paper-dropdown-menu> + </div> + </template> + <template is="dom-if" if="{{!col.hasFormat}}" restamp="true"> + <div style="display:table-cell;"></div> + </template> + </template> + </div> + </template> + </div> + </div> + </paper-dialog> + <paper-dialog id="selectInstanceDialog" alwaysOnTop> + <paper-menu id="selectInstanceMenu" on-iron-select="instanceSelected" class="attachedMenu"> + <template is="dom-repeat" items="{{instanceDataTable.instNames}}" as="inst"> + <paper-item class="selectInstanceMenuItem" role="menuitem">{{inst}}</paper-item> + </template> + </paper-menu> + </paper-dialog> + </span> + <template is="dom-if" if="{{showDataMessage}}"> + <div style="margin-top:20px;margin-bottom:20px;"><label id="messageLabel">{{dataMessage}}</label></div> + </template> + <div style="display:table" id="rovInstanceTable" hidden$="{{!isInstanceView}}"> + <div class="rovThead"> + <div class="rovTr"> + <template is="dom-repeat" items="{{instanceTable.displayColumns}}" as="colObj"> + <template is="dom-if" if="{{colObj.isSortCol}}" restamp="true"> + <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}<iron-icon class="columnSortIcon" icon$="{{colObj.icon}}"></iron-icon></div> + </template> + <template is="dom-if" if="{{!colObj.isSortCol}}" restamp="true"> + <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}</div> + </template> + </template> + </div> + </div> + <div class="rovTbody"> + <template id="rovInstanceTemplate" is="dom-repeat" items="{{instanceTable.rows}}" as="row"> + <div class="rovTr"> + <template is="dom-repeat" items="{{row}}" as="rowObj"> + <template is="dom-if" if="{{rowObj.isArray}}" restamp="true"> + <div class="rovTdDropdownCell" style$="{{rowObj.style}}" title$="{{rowObj.title}}" on-mouseover="cellDropMouseOver">{{rowObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> + <ul class="cellList"> + <template is="dom-repeat" items="{{rowObj.arrVals}}" as="arrVal"> + <li class="cellListItem">{{arrVal}}</li> + </template> + </ul> + </div> + </template> + <template is="dom-if" if="{{!rowObj.isArray}}" restamp="true"> + <div class="rovTd" style$="{{rowObj.style}}" title$="{{rowObj.title}}">{{rowObj.val}}</div> + </template> + </template> + </div> + </template> + </div> + </div> + <span hidden$="{{!isInstanceDataView}}"> + <template is="dom-if" if="{{instanceDataTable.showInstSelect}}" restamp="true"> + <div id="instSelectDiv">{{instanceDataTable.currentInst}}<iron-icon class="instSelectIcon" icon="arrow-drop-down" on-click="selectInstanceDialog"></iron-icon></div> + </template> + <div style="display:table" id="rovInstanceDataTable"> + <div class="rovThead"> + <div class="rovTr"> + <template is="dom-repeat" items="{{instanceDataTable.displayColumns}}" as="colObj"> + <template is="dom-if" if="{{colObj.isSortCol}}" restamp="true"> + <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}<iron-icon class="columnSortIcon" icon$="{{colObj.icon}}"></iron-icon></div> + </template> + <template is="dom-if" if="{{!colObj.isSortCol}}" restamp="true"> + <div class="rovTh" draggable="{{colsDraggable}}" on-click="onColumnClick" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{colObj.name}}</div> + </template> + </template> + </div> + </div> + <div class="rovTbody"> + <template id="rovInstanceDataTemplate" is="dom-repeat" items="{{instanceDataTable.rows}}" as="rowItem"> + <template is="dom-if" if="{{rowItem.expanded}}" restamp="true"> + <template is="dom-repeat" items="{{rowItem.rowVals}}" as="rowVals"> + <div class="rovTr" style="padding-bottom:10px;"> + <template is="dom-repeat" items="{{rowVals}}" as="rowValObj"> + <template is="dom-if" if="{{rowValObj.isArray}}" restamp="true"> + <div class="rovTdDropdownCell" style$="{{rowValObj.style}}" title$="{{rowValObj.title}}" on-mouseover="cellDropMouseOver">{{rowValObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> + <ul class="cellList"> + <template is="dom-repeat" items="{{rowValObj.arrVals}}" as="arrVal"> + <li class="cellListItem">{{arrVal}}</li> + </template> + </ul> + </div> + </template> + <template is="dom-if" if="{{!rowValObj.isArray}}" restamp="true"> + <div class="rovTableStyleCell" style$="{{rowValObj.style}}" title$="{{rowValObj.title}}">{{rowValObj.val}}</div> + </template> + </template> + </div> + </template> + </template> + </template> + </div> + </div> + </span> + <div style="display:table" id="rovTreeTable" hidden$="{{!isTreeView}}"> + <div class="rovThead"> + <div class="rovTr"> + <template is="dom-repeat" items="{{treeTable.columns}}"> + <div class="rovTh">{{item}}</div> + </template> + </div> + </div> + <div style="display:table-row-group;"> + <template id="rovTreeTemplate" is="dom-repeat" items="{{treeTable}}" as="treeItem"> + <template is="dom-if" if="{{treeItem.expanded}}"> + <div class="rovTr"> + <div class="treeNode" style$="{{treeItem.style}}" id$="{{treeItem.parentNode}}" on-tap="treeNodeTapped"><iron-icon class="treeNodeIcon" icon="remove"></iron-icon>{{treeItem.parentNode}}</div> + <div class="rovTd"></div> + </div> + <template is="dom-repeat" items="{{treeItem.childRows}}" as="row"> + <div class="rovTr"> + <div class="childCell" style$="{{row.0.style}}">{{row.0.val}}</div> + <div class="rovTd" style$="{{row.1.style}}">{{row.1.val}}</div> + </div> + </template> + </template> + <template is="dom-if" if="{{!treeItem.expanded}}"> + <div class="rovTr"> + <div class="treeNode" style$="{{treeItem.style}}" id$="{{treeItem.parentNode}}" on-tap="treeNodeTapped"><iron-icon class="treeNodeIcon" icon="add"></iron-icon>{{treeItem.parentNode}}</div> + <div class="rovTd"></div> + </div> + </template> + </template> + </div> + </div> + <div style="display:table" id="rovTreeTableTable" hidden$="{{!isTreeTableView}}"> + <div class="rovThead"> + <div class="rovTr"> + <div class="rovTh"></div> + <template is="dom-repeat" items="{{treeTableTable.columns}}"> + <div class="rovTh" draggable="{{colsDraggable}}" on-dragstart="columnDragStart" on-dragover="columnDragOver" on-drop="columnDrop">{{item}}</div> + </template> + </div> + </div> + <div style="display:table-row-group;"> + <template id="rovTreeTableTemplate" is="dom-repeat" items="{{treeTableTable}}" as="ttItem"> + <template is="dom-if" if="{{ttItem.expanded}}" restamp="true"> + <div class="rovTr"> + <div class="rawNode" id$="{{ttItem.parentNode}}" on-tap="ttNodeTapped"><iron-icon class="rawNodeIcon" icon="remove"></iron-icon>{{ttItem.parentNode}}</div> + </div> + <template is="dom-repeat" items="{{ttItem.childRows}}" as="row"> + <template is="dom-if" if="{{row.hasIcon}}" restamp="true"> + <div class="rovTr"> + <div class="rovTableStyleCell" style$="{{row.style}}" id$="{{row.id}}" on-tap="chttNodeTapped"><iron-icon class="rawNodeIcon" icon$="{{row.icon}}"></iron-icon>{{row.name}}</div> + </div> + </template> + <template is="dom-if" if="{{!row.hasIcon}}" restamp="true"> + <template is="dom-if" if="{{row.atMax}}"> + <div class="rovTr"> + <div class="rovTableStyleCell" style$="{{row.style}}">{{row.name}}</div> + <div class="rovTd">Max depth</div> + </div> + </template> + <template is="dom-if" if="{{!row.atMax}}"> + <div class="rovTr"> + <div class="rovTableStyleCell" style$="{{row.style}}"></div> + <template is="dom-repeat" items="{{row.cells}}" as="cellObj"> + <template is="dom-if" if="{{cellObj.isArray}}" restamp="true"> + <div class="rovTdDropdownCell" style$="{{cellObj.style}}" title$="{{cellObj.title}}" on-mouseover="cellDropMouseOver">{{cellObj.val}}<iron-icon class="cellDropIcon" icon="more-vert"></iron-icon> + <ul class="cellList"> + <template is="dom-repeat" items="{{cellObj.arrVals}}" as="arrVal"> + <li class="cellListItem">{{arrVal}}</li> + </template> + </ul> + </div> + </template> + <template is="dom-if" if="{{!cellObj.isArray}}" restamp="true"> + <div class="rovTd" style$="{{cellObj.style}}" title$="{{cellObj.title}}">{{cellObj.val}}</div> + </template> + </template> + </div> + </template> + </template> + </template> + </template> + <template is="dom-if" if="{{!ttItem.expanded}}"> + <div class="rovTr"> + <div class="rawNode" id$="{{ttItem.parentNode}}" on-tap="ttNodeTapped"><iron-icon class="rawNodeIcon" icon="add"></iron-icon>{{ttItem.parentNode}}</div> + </div> + </template> + </template> + </div> + </div> + <div style="display:table" id="rovRawTable" hidden$="{{!isRawView}}"> + <div class="rovThead"> + <div class="rovTr"> + <template is="dom-repeat" items="{{rawTable.columns}}"> + <div class="rovTh">{{item}}</div> + </template> + </div> + </div> + <div style="display:table-row-group;"> + <template id="rovRawTemplate" is="dom-repeat" items="{{rawTable}}" as="rawItem"> + <template is="dom-if" if="{{rawItem.expanded}}" restamp="true"> + <div class="rovTr"> + <div class="rawNode" id$="{{rawItem.parentNode}}" style$="{{rawItem.style}}" on-tap="rawNodeTapped"><iron-icon class="rawNodeIcon" icon="remove"></iron-icon>{{rawItem.parentNode}}</div> + <div class="rovTd"></div> + </div> + <template is="dom-repeat" items="{{rawItem.childRows}}" as="row"> + <template is="dom-if" if="{{row.hasIcon}}"> + <div class="rovTr"> + <div class="rovTableStyleCell" style$="{{row.style}}" id$="{{row.id}}" on-tap="chRawNodeTapped"><iron-icon class="rawNodeIcon" icon$="{{row.icon}}"></iron-icon>{{row.property}}</div> + <div class="rovTd"></div> + </div> + </template> + <template is="dom-if" if="{{!row.hasIcon}}"> + <div class="rovTr"> + <div class="rovTableStyleCell" style$="{{row.style}}">{{row.property}}</div> + <div class="rovTableStyleCell" style$="{{row.valStyle}}" title$="{{row.valTitle}}">{{row.value}}</div> + </div> + </template> + </template> + </template> + <template is="dom-if" if="{{!rawItem.expanded}}"> + <div class="rovTr"> + <div class="rawNode" id$="{{rawItem.parentNode}}" style$="{{rawItem.style}}" on-tap="rawNodeTapped"><iron-icon class="rawNodeIcon" icon="add"></iron-icon>{{rawItem.parentNode}}</div> + <div class="rovTd"></div> + </div> + </template> + </template> + </div> + </div> + </template> + <script src="ti-rov-table.js"></script> +</dom-module> - _computeAddOnContentClass: function(focused, invalid) { - var cls = 'add-on-content'; - if (invalid) { - cls += ' is-invalid'; - } else if (focused) { - cls += ' is-highlighted' - } - return cls; - } - }); -</script> diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 deleted file mode 100644 index d9405fdcf..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 +++ /dev/null @@ -1,1986 +0,0 @@ -// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a <script> tag, or a module - // using CommonJS and NodeJS or RequireJS module formats. In - // Common/Node/RequireJS, the module exports the Q API and when - // executed as a simple <script>, it creates a Q global instead. - - // Montage Require - if (typeof bootstrap === "function") { - bootstrap("promise", definition); - - // CommonJS - } else if (typeof exports === "object" && typeof module === "object") { - module.exports = definition(); - - // RequireJS - } else if (typeof define === "function" && define.amd) { - define(definition); - - // SES (Secure EcmaScript) - } else if (typeof ses !== "undefined") { - if (!ses.ok()) { - return; - } else { - ses.makeQ = definition; - } - - // <script> - } else if (typeof self !== "undefined") { - self.Q = definition(); - - } else { - throw new Error("This environment was not anticipated by Q. Please file a bug."); - } - -})(function () { -"use strict"; - -var hasStacks = false; -try { - throw new Error(); -} catch (e) { - hasStacks = !!e.stack; -} - -// All code after this point will be filtered from stack traces reported -// by Q. -var qStartingLine = captureLine(); -var qFileName; - -// shims - -// used for fallback in "allResolved" -var noop = function () {}; - -// Use the fastest possible means to execute a task in a future turn -// of the event loop. -var nextTick =(function () { - // linked list of tasks (single, with head node) - var head = {task: void 0, next: null}; - var tail = head; - var flushing = false; - var requestTick = void 0; - var isNodeJS = false; - - function flush() { - /* jshint loopfunc: true */ - - while (head.next) { - head = head.next; - var task = head.task; - head.task = void 0; - var domain = head.domain; - - if (domain) { - head.domain = void 0; - domain.enter(); - } - - try { - task(); - - } catch (e) { - if (isNodeJS) { - // In node, uncaught exceptions are considered fatal errors. - // Re-throw them synchronously to interrupt flushing! - - // Ensure continuation if the uncaught exception is suppressed - // listening "uncaughtException" events (as domains does). - // Continue in next event to avoid tick recursion. - if (domain) { - domain.exit(); - } - setTimeout(flush, 0); - if (domain) { - domain.enter(); - } - - throw e; - - } else { - // In browsers, uncaught exceptions are not fatal. - // Re-throw them asynchronously to avoid slow-downs. - setTimeout(function() { - throw e; - }, 0); - } - } - - if (domain) { - domain.exit(); - } - } - - flushing = false; - } - - nextTick = function (task) { - tail = tail.next = { - task: task, - domain: isNodeJS && process.domain, - next: null - }; - - if (!flushing) { - flushing = true; - requestTick(); - } - }; - - if (typeof process !== "undefined" && process.nextTick) { - // Node.js before 0.9. Note that some fake-Node environments, like the - // Mocha test runner, introduce a `process` global without a `nextTick`. - isNodeJS = true; - - requestTick = function () { - process.nextTick(flush); - }; - - } else if (typeof setImmediate === "function") { - // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate - if (typeof window !== "undefined") { - requestTick = setImmediate.bind(window, flush); - } else { - requestTick = function () { - setImmediate(flush); - }; - } - - } else if (typeof MessageChannel !== "undefined") { - // modern browsers - // http://www.nonblocking.io/2011/06/windownexttick.html - var channel = new MessageChannel(); - // At least Safari Version 6.0.5 (8536.30.1) intermittently cannot create - // working message ports the first time a page loads. - channel.port1.onmessage = function () { - requestTick = requestPortTick; - channel.port1.onmessage = flush; - flush(); - }; - var requestPortTick = function () { - // Opera requires us to provide a message payload, regardless of - // whether we use it. - channel.port2.postMessage(0); - }; - requestTick = function () { - setTimeout(flush, 0); - requestPortTick(); - }; - - } else { - // old browsers - requestTick = function () { - setTimeout(flush, 0); - }; - } - - return nextTick; -})(); - -// Attempt to make generics safe in the face of downstream -// modifications. -// There is no situation where this is necessary. -// If you need a security guarantee, these primordials need to be -// deeply frozen anyway, and if you don’t need a security guarantee, -// this is just plain paranoid. -// However, this **might** have the nice side-effect of reducing the size of -// the minified code by reducing x.call() to merely x() -// See Mark Miller’s explanation of what this does. -// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming -var call = Function.call; -function uncurryThis(f) { - return function () { - return call.apply(f, arguments); - }; -} -// This is equivalent, but slower: -// uncurryThis = Function_bind.bind(Function_bind.call); -// http://jsperf.com/uncurrythis - -var array_slice = uncurryThis(Array.prototype.slice); - -var array_reduce = uncurryThis( - Array.prototype.reduce || function (callback, basis) { - var index = 0, - length = this.length; - // concerning the initial value, if one is not provided - if (arguments.length === 1) { - // seek to the first value in the array, accounting - // for the possibility that is is a sparse array - do { - if (index in this) { - basis = this[index++]; - break; - } - if (++index >= length) { - throw new TypeError(); - } - } while (1); - } - // reduce - for (; index < length; index++) { - // account for the possibility that the array is sparse - if (index in this) { - basis = callback(basis, this[index], index); - } - } - return basis; - } -); - -var array_indexOf = uncurryThis( - Array.prototype.indexOf || function (value) { - // not a very good shim, but good enough for our one use of it - for (var i = 0; i < this.length; i++) { - if (this[i] === value) { - return i; - } - } - return -1; - } -); - -var array_map = uncurryThis( - Array.prototype.map || function (callback, thisp) { - var self = this; - var collect = []; - array_reduce(self, function (undefined, value, index) { - collect.push(callback.call(thisp, value, index, self)); - }, void 0); - return collect; - } -); - -var object_create = Object.create || function (prototype) { - function Type() { } - Type.prototype = prototype; - return new Type(); -}; - -var object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty); - -var object_keys = Object.keys || function (object) { - var keys = []; - for (var key in object) { - if (object_hasOwnProperty(object, key)) { - keys.push(key); - } - } - return keys; -}; - -var object_toString = uncurryThis(Object.prototype.toString); - -function isObject(value) { - return value === Object(value); -} - -// generator related shims - -// FIXME: Remove this function once ES6 generators are in SpiderMonkey. -function isStopIteration(exception) { - return ( - object_toString(exception) === "[object StopIteration]" || - exception instanceof QReturnValue - ); -} - -// FIXME: Remove this helper and Q.return once ES6 generators are in -// SpiderMonkey. -var QReturnValue; -if (typeof ReturnValue !== "undefined") { - QReturnValue = ReturnValue; -} else { - QReturnValue = function (value) { - this.value = value; - }; -} - -// long stack traces - -var STACK_JUMP_SEPARATOR = "From previous event:"; - -function makeStackTraceLong(error, promise) { - // If possible, transform the error stack trace by removing Node and Q - // cruft, then concatenating with the stack trace of `promise`. See #57. - if (hasStacks && - promise.stack && - typeof error === "object" && - error !== null && - error.stack && - error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 - ) { - var stacks = []; - for (var p = promise; !!p; p = p.source) { - if (p.stack) { - stacks.unshift(p.stack); - } - } - stacks.unshift(error.stack); - - var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n"); - error.stack = filterStackString(concatedStacks); - } -} - -function filterStackString(stackString) { - var lines = stackString.split("\n"); - var desiredLines = []; - for (var i = 0; i < lines.length; ++i) { - var line = lines[i]; - - if (!isInternalFrame(line) && !isNodeFrame(line) && line) { - desiredLines.push(line); - } - } - return desiredLines.join("\n"); -} - -function isNodeFrame(stackLine) { - return stackLine.indexOf("(module.js:") !== -1 || - stackLine.indexOf("(node.js:") !== -1; -} - -function getFileNameAndLineNumber(stackLine) { - // Named functions: "at functionName (filename:lineNumber:columnNumber)" - // In IE10 function name can have spaces ("Anonymous function") O_o - var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); - if (attempt1) { - return [attempt1[1], Number(attempt1[2])]; - } - - // Anonymous functions: "at filename:lineNumber:columnNumber" - var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); - if (attempt2) { - return [attempt2[1], Number(attempt2[2])]; - } - - // Firefox style: "function@filename:lineNumber or @filename:lineNumber" - var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); - if (attempt3) { - return [attempt3[1], Number(attempt3[2])]; - } -} - -function isInternalFrame(stackLine) { - var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine); - - if (!fileNameAndLineNumber) { - return false; - } - - var fileName = fileNameAndLineNumber[0]; - var lineNumber = fileNameAndLineNumber[1]; - - return fileName === qFileName && - lineNumber >= qStartingLine && - lineNumber <= qEndingLine; -} - -// discover own file name and line number range for filtering stack -// traces -function captureLine() { - if (!hasStacks) { - return; - } - - try { - throw new Error(); - } catch (e) { - var lines = e.stack.split("\n"); - var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2]; - var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); - if (!fileNameAndLineNumber) { - return; - } - - qFileName = fileNameAndLineNumber[0]; - return fileNameAndLineNumber[1]; - } -} - -function deprecate(callback, name, alternative) { - return function () { - if (typeof console !== "undefined" && - typeof console.warn === "function") { - console.warn(name + " is deprecated, use " + alternative + - " instead.", new Error("").stack); - } - return callback.apply(callback, arguments); - }; -} - -// end of shims -// beginning of real work - -/** - * Constructs a promise for an immediate reference, passes promises through, or - * coerces promises from different systems. - * @param value immediate reference or promise - */ -function Q(value) { - // If the object is already a Promise, return it directly. This enables - // the resolve function to both be used to created references from objects, - // but to tolerably coerce non-promises to promises. - if (value instanceof Promise) { - return value; - } - - // assimilate thenables - if (isPromiseAlike(value)) { - return coerce(value); - } else { - return fulfill(value); - } -} -Q.resolve = Q; - -/** - * Performs a task in a future turn of the event loop. - * @param {Function} task - */ -Q.nextTick = nextTick; - -/** - * Controls whether or not long stack traces will be on - */ -Q.longStackSupport = false; - -// enable long stacks if Q_DEBUG is set -if (typeof process === "object" && process && process.env && process.env.Q_DEBUG) { - Q.longStackSupport = true; -} - -/** - * Constructs a {promise, resolve, reject} object. - * - * `resolve` is a callback to invoke with a more resolved value for the - * promise. To fulfill the promise, invoke `resolve` with any value that is - * not a thenable. To reject the promise, invoke `resolve` with a rejected - * thenable, or invoke `reject` with the reason directly. To resolve the - * promise to another thenable, thus putting it in the same state, invoke - * `resolve` with that other thenable. - */ -Q.defer = defer; -function defer() { - // if "messages" is an "Array", that indicates that the promise has not yet - // been resolved. If it is "undefined", it has been resolved. Each - // element of the messages array is itself an array of complete arguments to - // forward to the resolved promise. We coerce the resolution value to a - // promise using the `resolve` function because it handles both fully - // non-thenable values and other thenables gracefully. - var messages = [], progressListeners = [], resolvedPromise; - - var deferred = object_create(defer.prototype); - var promise = object_create(Promise.prototype); - - promise.promiseDispatch = function (resolve, op, operands) { - var args = array_slice(arguments); - if (messages) { - messages.push(args); - if (op === "when" && operands[1]) { // progress operand - progressListeners.push(operands[1]); - } - } else { - Q.nextTick(function () { - resolvedPromise.promiseDispatch.apply(resolvedPromise, args); - }); - } - }; - - // XXX deprecated - promise.valueOf = function () { - if (messages) { - return promise; - } - var nearerValue = nearer(resolvedPromise); - if (isPromise(nearerValue)) { - resolvedPromise = nearerValue; // shorten chain - } - return nearerValue; - }; - - promise.inspect = function () { - if (!resolvedPromise) { - return { state: "pending" }; - } - return resolvedPromise.inspect(); - }; - - if (Q.longStackSupport && hasStacks) { - try { - throw new Error(); - } catch (e) { - // NOTE: don't try to use `Error.captureStackTrace` or transfer the - // accessor around; that causes memory leaks as per GH-111. Just - // reify the stack trace as a string ASAP. - // - // At the same time, cut off the first line; it's always just - // "[object Promise]\n", as per the `toString`. - promise.stack = e.stack.substring(e.stack.indexOf("\n") + 1); - } - } - - // NOTE: we do the checks for `resolvedPromise` in each method, instead of - // consolidating them into `become`, since otherwise we'd create new - // promises with the lines `become(whatever(value))`. See e.g. GH-252. - - function become(newPromise) { - resolvedPromise = newPromise; - promise.source = newPromise; - - array_reduce(messages, function (undefined, message) { - Q.nextTick(function () { - newPromise.promiseDispatch.apply(newPromise, message); - }); - }, void 0); - - messages = void 0; - progressListeners = void 0; - } - - deferred.promise = promise; - deferred.resolve = function (value) { - if (resolvedPromise) { - return; - } - - become(Q(value)); - }; - - deferred.fulfill = function (value) { - if (resolvedPromise) { - return; - } - - become(fulfill(value)); - }; - deferred.reject = function (reason) { - if (resolvedPromise) { - return; - } - - become(reject(reason)); - }; - deferred.notify = function (progress) { - if (resolvedPromise) { - return; - } - - array_reduce(progressListeners, function (undefined, progressListener) { - Q.nextTick(function () { - progressListener(progress); - }); - }, void 0); - }; - - return deferred; -} - -/** - * Creates a Node-style callback that will resolve or reject the deferred - * promise. - * @returns a nodeback - */ -defer.prototype.makeNodeResolver = function () { - var self = this; - return function (error, value) { - if (error) { - self.reject(error); - } else if (arguments.length > 2) { - self.resolve(array_slice(arguments, 1)); - } else { - self.resolve(value); - } - }; -}; - -/** - * @param resolver {Function} a function that returns nothing and accepts - * the resolve, reject, and notify functions for a deferred. - * @returns a promise that may be resolved with the given resolve and reject - * functions, or rejected by a thrown exception in resolver - */ -Q.Promise = promise; // ES6 -Q.promise = promise; -function promise(resolver) { - if (typeof resolver !== "function") { - throw new TypeError("resolver must be a function."); - } - var deferred = defer(); - try { - resolver(deferred.resolve, deferred.reject, deferred.notify); - } catch (reason) { - deferred.reject(reason); - } - return deferred.promise; -} - -promise.race = race; // ES6 -promise.all = all; // ES6 -promise.reject = reject; // ES6 -promise.resolve = Q; // ES6 - -// XXX experimental. This method is a way to denote that a local value is -// serializable and should be immediately dispatched to a remote upon request, -// instead of passing a reference. -Q.passByCopy = function (object) { - //freeze(object); - //passByCopies.set(object, true); - return object; -}; - -Promise.prototype.passByCopy = function () { - //freeze(object); - //passByCopies.set(object, true); - return this; -}; - -/** - * If two promises eventually fulfill to the same value, promises that value, - * but otherwise rejects. - * @param x {Any*} - * @param y {Any*} - * @returns {Any*} a promise for x and y if they are the same, but a rejection - * otherwise. - * - */ -Q.join = function (x, y) { - return Q(x).join(y); -}; - -Promise.prototype.join = function (that) { - return Q([this, that]).spread(function (x, y) { - if (x === y) { - // TODO: "===" should be Object.is or equiv - return x; - } else { - throw new Error("Can't join: not the same: " + x + " " + y); - } - }); -}; - -/** - * Returns a promise for the first of an array of promises to become settled. - * @param answers {Array[Any*]} promises to race - * @returns {Any*} the first promise to be settled - */ -Q.race = race; -function race(answerPs) { - return promise(function(resolve, reject) { - // Switch to this once we can assume at least ES5 - // answerPs.forEach(function(answerP) { - // Q(answerP).then(resolve, reject); - // }); - // Use this in the meantime - for (var i = 0, len = answerPs.length; i < len; i++) { - Q(answerPs[i]).then(resolve, reject); - } - }); -} - -Promise.prototype.race = function () { - return this.then(Q.race); -}; - -/** - * Constructs a Promise with a promise descriptor object and optional fallback - * function. The descriptor contains methods like when(rejected), get(name), - * set(name, value), post(name, args), and delete(name), which all - * return either a value, a promise for a value, or a rejection. The fallback - * accepts the operation name, a resolver, and any further arguments that would - * have been forwarded to the appropriate method above had a method been - * provided with the proper name. The API makes no guarantees about the nature - * of the returned object, apart from that it is usable whereever promises are - * bought and sold. - */ -Q.makePromise = Promise; -function Promise(descriptor, fallback, inspect) { - if (fallback === void 0) { - fallback = function (op) { - return reject(new Error( - "Promise does not support operation: " + op - )); - }; - } - if (inspect === void 0) { - inspect = function () { - return {state: "unknown"}; - }; - } - - var promise = object_create(Promise.prototype); - - promise.promiseDispatch = function (resolve, op, args) { - var result; - try { - if (descriptor[op]) { - result = descriptor[op].apply(promise, args); - } else { - result = fallback.call(promise, op, args); - } - } catch (exception) { - result = reject(exception); - } - if (resolve) { - resolve(result); - } - }; - - promise.inspect = inspect; - - // XXX deprecated `valueOf` and `exception` support - if (inspect) { - var inspected = inspect(); - if (inspected.state === "rejected") { - promise.exception = inspected.reason; - } - - promise.valueOf = function () { - var inspected = inspect(); - if (inspected.state === "pending" || - inspected.state === "rejected") { - return promise; - } - return inspected.value; - }; - } - - return promise; -} - -Promise.prototype.toString = function () { - return "[object Promise]"; -}; - -Promise.prototype.then = function (fulfilled, rejected, progressed) { - var self = this; - var deferred = defer(); - var done = false; // ensure the untrusted promise makes at most a - // single call to one of the callbacks - - function _fulfilled(value) { - try { - return typeof fulfilled === "function" ? fulfilled(value) : value; - } catch (exception) { - return reject(exception); - } - } - - function _rejected(exception) { - if (typeof rejected === "function") { - makeStackTraceLong(exception, self); - try { - return rejected(exception); - } catch (newException) { - return reject(newException); - } - } - return reject(exception); - } - - function _progressed(value) { - return typeof progressed === "function" ? progressed(value) : value; - } - - Q.nextTick(function () { - self.promiseDispatch(function (value) { - if (done) { - return; - } - done = true; - - deferred.resolve(_fulfilled(value)); - }, "when", [function (exception) { - if (done) { - return; - } - done = true; - - deferred.resolve(_rejected(exception)); - }]); - }); - - // Progress propagator need to be attached in the current tick. - self.promiseDispatch(void 0, "when", [void 0, function (value) { - var newValue; - var threw = false; - try { - newValue = _progressed(value); - } catch (e) { - threw = true; - if (Q.onerror) { - Q.onerror(e); - } else { - throw e; - } - } - - if (!threw) { - deferred.notify(newValue); - } - }]); - - return deferred.promise; -}; - -Q.tap = function (promise, callback) { - return Q(promise).tap(callback); -}; - -/** - * Works almost like "finally", but not called for rejections. - * Original resolution value is passed through callback unaffected. - * Callback may return a promise that will be awaited for. - * @param {Function} callback - * @returns {Q.Promise} - * @example - * doSomething() - * .then(...) - * .tap(console.log) - * .then(...); - */ -Promise.prototype.tap = function (callback) { - callback = Q(callback); - - return this.then(function (value) { - return callback.fcall(value).thenResolve(value); - }); -}; - -/** - * Registers an observer on a promise. - * - * Guarantees: - * - * 1. that fulfilled and rejected will be called only once. - * 2. that either the fulfilled callback or the rejected callback will be - * called, but not both. - * 3. that fulfilled and rejected will not be called in this turn. - * - * @param value promise or immediate reference to observe - * @param fulfilled function to be called with the fulfilled value - * @param rejected function to be called with the rejection exception - * @param progressed function to be called on any progress notifications - * @return promise for the return value from the invoked callback - */ -Q.when = when; -function when(value, fulfilled, rejected, progressed) { - return Q(value).then(fulfilled, rejected, progressed); -} - -Promise.prototype.thenResolve = function (value) { - return this.then(function () { return value; }); -}; - -Q.thenResolve = function (promise, value) { - return Q(promise).thenResolve(value); -}; - -Promise.prototype.thenReject = function (reason) { - return this.then(function () { throw reason; }); -}; - -Q.thenReject = function (promise, reason) { - return Q(promise).thenReject(reason); -}; - -/** - * If an object is not a promise, it is as "near" as possible. - * If a promise is rejected, it is as "near" as possible too. - * If it’s a fulfilled promise, the fulfillment value is nearer. - * If it’s a deferred promise and the deferred has been resolved, the - * resolution is "nearer". - * @param object - * @returns most resolved (nearest) form of the object - */ - -// XXX should we re-do this? -Q.nearer = nearer; -function nearer(value) { - if (isPromise(value)) { - var inspected = value.inspect(); - if (inspected.state === "fulfilled") { - return inspected.value; - } - } - return value; -} - -/** - * @returns whether the given object is a promise. - * Otherwise it is a fulfilled value. - */ -Q.isPromise = isPromise; -function isPromise(object) { - return object instanceof Promise; -} - -Q.isPromiseAlike = isPromiseAlike; -function isPromiseAlike(object) { - return isObject(object) && typeof object.then === "function"; -} - -/** - * @returns whether the given object is a pending promise, meaning not - * fulfilled or rejected. - */ -Q.isPending = isPending; -function isPending(object) { - return isPromise(object) && object.inspect().state === "pending"; -} - -Promise.prototype.isPending = function () { - return this.inspect().state === "pending"; -}; - -/** - * @returns whether the given object is a value or fulfilled - * promise. - */ -Q.isFulfilled = isFulfilled; -function isFulfilled(object) { - return !isPromise(object) || object.inspect().state === "fulfilled"; -} - -Promise.prototype.isFulfilled = function () { - return this.inspect().state === "fulfilled"; -}; - -/** - * @returns whether the given object is a rejected promise. - */ -Q.isRejected = isRejected; -function isRejected(object) { - return isPromise(object) && object.inspect().state === "rejected"; -} - -Promise.prototype.isRejected = function () { - return this.inspect().state === "rejected"; -}; - -//// BEGIN UNHANDLED REJECTION TRACKING - -// This promise library consumes exceptions thrown in handlers so they can be -// handled by a subsequent promise. The exceptions get added to this array when -// they are created, and removed when they are handled. Note that in ES6 or -// shimmed environments, this would naturally be a `Set`. -var unhandledReasons = []; -var unhandledRejections = []; -var trackUnhandledRejections = true; - -function resetUnhandledRejections() { - unhandledReasons.length = 0; - unhandledRejections.length = 0; - - if (!trackUnhandledRejections) { - trackUnhandledRejections = true; - } -} - -function trackRejection(promise, reason) { - if (!trackUnhandledRejections) { - return; - } - - unhandledRejections.push(promise); - if (reason && typeof reason.stack !== "undefined") { - unhandledReasons.push(reason.stack); - } else { - unhandledReasons.push("(no stack) " + reason); - } -} - -function untrackRejection(promise) { - if (!trackUnhandledRejections) { - return; - } - - var at = array_indexOf(unhandledRejections, promise); - if (at !== -1) { - unhandledRejections.splice(at, 1); - unhandledReasons.splice(at, 1); - } -} - -Q.resetUnhandledRejections = resetUnhandledRejections; - -Q.getUnhandledReasons = function () { - // Make a copy so that consumers can't interfere with our internal state. - return unhandledReasons.slice(); -}; - -Q.stopUnhandledRejectionTracking = function () { - resetUnhandledRejections(); - trackUnhandledRejections = false; -}; - -resetUnhandledRejections(); - -//// END UNHANDLED REJECTION TRACKING - -/** - * Constructs a rejected promise. - * @param reason value describing the failure - */ -Q.reject = reject; -function reject(reason) { - var rejection = Promise({ - "when": function (rejected) { - // note that the error has been handled - if (rejected) { - untrackRejection(this); - } - return rejected ? rejected(reason) : this; - } - }, function fallback() { - return this; - }, function inspect() { - return { state: "rejected", reason: reason }; - }); - - // Note that the reason has not been handled. - trackRejection(rejection, reason); - - return rejection; -} - -/** - * Constructs a fulfilled promise for an immediate reference. - * @param value immediate reference - */ -Q.fulfill = fulfill; -function fulfill(value) { - return Promise({ - "when": function () { - return value; - }, - "get": function (name) { - return value[name]; - }, - "set": function (name, rhs) { - value[name] = rhs; - }, - "delete": function (name) { - delete value[name]; - }, - "post": function (name, args) { - // Mark Miller proposes that post with no name should apply a - // promised function. - if (name === null || name === void 0) { - return value.apply(void 0, args); - } else { - return value[name].apply(value, args); - } - }, - "apply": function (thisp, args) { - return value.apply(thisp, args); - }, - "keys": function () { - return object_keys(value); - } - }, void 0, function inspect() { - return { state: "fulfilled", value: value }; - }); -} - -/** - * Converts thenables to Q promises. - * @param promise thenable promise - * @returns a Q promise - */ -function coerce(promise) { - var deferred = defer(); - Q.nextTick(function () { - try { - promise.then(deferred.resolve, deferred.reject, deferred.notify); - } catch (exception) { - deferred.reject(exception); - } - }); - return deferred.promise; -} - -/** - * Annotates an object such that it will never be - * transferred away from this process over any promise - * communication channel. - * @param object - * @returns promise a wrapping of that object that - * additionally responds to the "isDef" message - * without a rejection. - */ -Q.master = master; -function master(object) { - return Promise({ - "isDef": function () {} - }, function fallback(op, args) { - return dispatch(object, op, args); - }, function () { - return Q(object).inspect(); - }); -} - -/** - * Spreads the values of a promised array of arguments into the - * fulfillment callback. - * @param fulfilled callback that receives variadic arguments from the - * promised array - * @param rejected callback that receives the exception if the promise - * is rejected. - * @returns a promise for the return value or thrown exception of - * either callback. - */ -Q.spread = spread; -function spread(value, fulfilled, rejected) { - return Q(value).spread(fulfilled, rejected); -} - -Promise.prototype.spread = function (fulfilled, rejected) { - return this.all().then(function (array) { - return fulfilled.apply(void 0, array); - }, rejected); -}; - -/** - * The async function is a decorator for generator functions, turning - * them into asynchronous generators. Although generators are only part - * of the newest ECMAScript 6 drafts, this code does not cause syntax - * errors in older engines. This code should continue to work and will - * in fact improve over time as the language improves. - * - * ES6 generators are currently part of V8 version 3.19 with the - * --harmony-generators runtime flag enabled. SpiderMonkey has had them - * for longer, but under an older Python-inspired form. This function - * works on both kinds of generators. - * - * Decorates a generator function such that: - * - it may yield promises - * - execution will continue when that promise is fulfilled - * - the value of the yield expression will be the fulfilled value - * - it returns a promise for the return value (when the generator - * stops iterating) - * - the decorated function returns a promise for the return value - * of the generator or the first rejected promise among those - * yielded. - * - if an error is thrown in the generator, it propagates through - * every following yield until it is caught, or until it escapes - * the generator function altogether, and is translated into a - * rejection for the promise returned by the decorated generator. - */ -Q.async = async; -function async(makeGenerator) { - return function () { - // when verb is "send", arg is a value - // when verb is "throw", arg is an exception - function continuer(verb, arg) { - var result; - - // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only - // engine that has a deployed base of browsers that support generators. - // However, SM's generators use the Python-inspired semantics of - // outdated ES6 drafts. We would like to support ES6, but we'd also - // like to make it possible to use generators in deployed browsers, so - // we also support Python-style generators. At some point we can remove - // this block. - - if (typeof StopIteration === "undefined") { - // ES6 Generators - try { - result = generator[verb](arg); - } catch (exception) { - return reject(exception); - } - if (result.done) { - return Q(result.value); - } else { - return when(result.value, callback, errback); - } - } else { - // SpiderMonkey Generators - // FIXME: Remove this case when SM does ES6 generators. - try { - result = generator[verb](arg); - } catch (exception) { - if (isStopIteration(exception)) { - return Q(exception.value); - } else { - return reject(exception); - } - } - return when(result, callback, errback); - } - } - var generator = makeGenerator.apply(this, arguments); - var callback = continuer.bind(continuer, "next"); - var errback = continuer.bind(continuer, "throw"); - return callback(); - }; -} - -/** - * The spawn function is a small wrapper around async that immediately - * calls the generator and also ends the promise chain, so that any - * unhandled errors are thrown instead of forwarded to the error - * handler. This is useful because it's extremely common to run - * generators at the top-level to work with libraries. - */ -Q.spawn = spawn; -function spawn(makeGenerator) { - Q.done(Q.async(makeGenerator)()); -} - -// FIXME: Remove this interface once ES6 generators are in SpiderMonkey. -/** - * Throws a ReturnValue exception to stop an asynchronous generator. - * - * This interface is a stop-gap measure to support generator return - * values in older Firefox/SpiderMonkey. In browsers that support ES6 - * generators like Chromium 29, just use "return" in your generator - * functions. - * - * @param value the return value for the surrounding generator - * @throws ReturnValue exception with the value. - * @example - * // ES6 style - * Q.async(function* () { - * var foo = yield getFooPromise(); - * var bar = yield getBarPromise(); - * return foo + bar; - * }) - * // Older SpiderMonkey style - * Q.async(function () { - * var foo = yield getFooPromise(); - * var bar = yield getBarPromise(); - * Q.return(foo + bar); - * }) - */ -Q["return"] = _return; -function _return(value) { - throw new QReturnValue(value); -} - -/** - * The promised function decorator ensures that any promise arguments - * are settled and passed as values (`this` is also settled and passed - * as a value). It will also ensure that the result of a function is - * always a promise. - * - * @example - * var add = Q.promised(function (a, b) { - * return a + b; - * }); - * add(Q(a), Q(B)); - * - * @param {function} callback The function to decorate - * @returns {function} a function that has been decorated. - */ -Q.promised = promised; -function promised(callback) { - return function () { - return spread([this, all(arguments)], function (self, args) { - return callback.apply(self, args); - }); - }; -} - -/** - * sends a message to a value in a future turn - * @param object* the recipient - * @param op the name of the message operation, e.g., "when", - * @param args further arguments to be forwarded to the operation - * @returns result {Promise} a promise for the result of the operation - */ -Q.dispatch = dispatch; -function dispatch(object, op, args) { - return Q(object).dispatch(op, args); -} - -Promise.prototype.dispatch = function (op, args) { - var self = this; - var deferred = defer(); - Q.nextTick(function () { - self.promiseDispatch(deferred.resolve, op, args); - }); - return deferred.promise; -}; - -/** - * Gets the value of a property in a future turn. - * @param object promise or immediate reference for target object - * @param name name of property to get - * @return promise for the property value - */ -Q.get = function (object, key) { - return Q(object).dispatch("get", [key]); -}; - -Promise.prototype.get = function (key) { - return this.dispatch("get", [key]); -}; - -/** - * Sets the value of a property in a future turn. - * @param object promise or immediate reference for object object - * @param name name of property to set - * @param value new value of property - * @return promise for the return value - */ -Q.set = function (object, key, value) { - return Q(object).dispatch("set", [key, value]); -}; - -Promise.prototype.set = function (key, value) { - return this.dispatch("set", [key, value]); -}; - -/** - * Deletes a property in a future turn. - * @param object promise or immediate reference for target object - * @param name name of property to delete - * @return promise for the return value - */ -Q.del = // XXX legacy -Q["delete"] = function (object, key) { - return Q(object).dispatch("delete", [key]); -}; - -Promise.prototype.del = // XXX legacy -Promise.prototype["delete"] = function (key) { - return this.dispatch("delete", [key]); -}; - -/** - * Invokes a method in a future turn. - * @param object promise or immediate reference for target object - * @param name name of method to invoke - * @param value a value to post, typically an array of - * invocation arguments for promises that - * are ultimately backed with `resolve` values, - * as opposed to those backed with URLs - * wherein the posted value can be any - * JSON serializable object. - * @return promise for the return value - */ -// bound locally because it is used by other methods -Q.mapply = // XXX As proposed by "Redsandro" -Q.post = function (object, name, args) { - return Q(object).dispatch("post", [name, args]); -}; - -Promise.prototype.mapply = // XXX As proposed by "Redsandro" -Promise.prototype.post = function (name, args) { - return this.dispatch("post", [name, args]); -}; - -/** - * Invokes a method in a future turn. - * @param object promise or immediate reference for target object - * @param name name of method to invoke - * @param ...args array of invocation arguments - * @return promise for the return value - */ -Q.send = // XXX Mark Miller's proposed parlance -Q.mcall = // XXX As proposed by "Redsandro" -Q.invoke = function (object, name /*...args*/) { - return Q(object).dispatch("post", [name, array_slice(arguments, 2)]); -}; - -Promise.prototype.send = // XXX Mark Miller's proposed parlance -Promise.prototype.mcall = // XXX As proposed by "Redsandro" -Promise.prototype.invoke = function (name /*...args*/) { - return this.dispatch("post", [name, array_slice(arguments, 1)]); -}; - -/** - * Applies the promised function in a future turn. - * @param object promise or immediate reference for target function - * @param args array of application arguments - */ -Q.fapply = function (object, args) { - return Q(object).dispatch("apply", [void 0, args]); -}; - -Promise.prototype.fapply = function (args) { - return this.dispatch("apply", [void 0, args]); -}; - -/** - * Calls the promised function in a future turn. - * @param object promise or immediate reference for target function - * @param ...args array of application arguments - */ -Q["try"] = -Q.fcall = function (object /* ...args*/) { - return Q(object).dispatch("apply", [void 0, array_slice(arguments, 1)]); -}; - -Promise.prototype.fcall = function (/*...args*/) { - return this.dispatch("apply", [void 0, array_slice(arguments)]); -}; - -/** - * Binds the promised function, transforming return values into a fulfilled - * promise and thrown errors into a rejected one. - * @param object promise or immediate reference for target function - * @param ...args array of application arguments - */ -Q.fbind = function (object /*...args*/) { - var promise = Q(object); - var args = array_slice(arguments, 1); - return function fbound() { - return promise.dispatch("apply", [ - this, - args.concat(array_slice(arguments)) - ]); - }; -}; -Promise.prototype.fbind = function (/*...args*/) { - var promise = this; - var args = array_slice(arguments); - return function fbound() { - return promise.dispatch("apply", [ - this, - args.concat(array_slice(arguments)) - ]); - }; -}; - -/** - * Requests the names of the owned properties of a promised - * object in a future turn. - * @param object promise or immediate reference for target object - * @return promise for the keys of the eventually settled object - */ -Q.keys = function (object) { - return Q(object).dispatch("keys", []); -}; - -Promise.prototype.keys = function () { - return this.dispatch("keys", []); -}; - -/** - * Turns an array of promises into a promise for an array. If any of - * the promises gets rejected, the whole array is rejected immediately. - * @param {Array*} an array (or promise for an array) of values (or - * promises for values) - * @returns a promise for an array of the corresponding values - */ -// By Mark Miller -// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled -Q.all = all; -function all(promises) { - return when(promises, function (promises) { - var pendingCount = 0; - var deferred = defer(); - array_reduce(promises, function (undefined, promise, index) { - var snapshot; - if ( - isPromise(promise) && - (snapshot = promise.inspect()).state === "fulfilled" - ) { - promises[index] = snapshot.value; - } else { - ++pendingCount; - when( - promise, - function (value) { - promises[index] = value; - if (--pendingCount === 0) { - deferred.resolve(promises); - } - }, - deferred.reject, - function (progress) { - deferred.notify({ index: index, value: progress }); - } - ); - } - }, void 0); - if (pendingCount === 0) { - deferred.resolve(promises); - } - return deferred.promise; - }); -} - -Promise.prototype.all = function () { - return all(this); -}; - -/** - * Returns the first resolved promise of an array. Prior rejected promises are - * ignored. Rejects only if all promises are rejected. - * @param {Array*} an array containing values or promises for values - * @returns a promise fulfilled with the value of the first resolved promise, - * or a rejected promise if all promises are rejected. - */ -Q.any = any; - -function any(promises) { - if (promises.length === 0) { - return Q.resolve(); - } - - var deferred = Q.defer(); - var pendingCount = 0; - array_reduce(promises, function(prev, current, index) { - var promise = promises[index]; - - pendingCount++; - - when(promise, onFulfilled, onRejected, onProgress); - function onFulfilled(result) { - deferred.resolve(result); - } - function onRejected() { - pendingCount--; - if (pendingCount === 0) { - deferred.reject(new Error( - "Can't get fulfillment value from any promise, all " + - "promises were rejected." - )); - } - } - function onProgress(progress) { - deferred.notify({ - index: index, - value: progress - }); - } - }, undefined); - - return deferred.promise; -} - -Promise.prototype.any = function() { - return any(this); -}; - -/** - * Waits for all promises to be settled, either fulfilled or - * rejected. This is distinct from `all` since that would stop - * waiting at the first rejection. The promise returned by - * `allResolved` will never be rejected. - * @param promises a promise for an array (or an array) of promises - * (or values) - * @return a promise for an array of promises - */ -Q.allResolved = deprecate(allResolved, "allResolved", "allSettled"); -function allResolved(promises) { - return when(promises, function (promises) { - promises = array_map(promises, Q); - return when(all(array_map(promises, function (promise) { - return when(promise, noop, noop); - })), function () { - return promises; - }); - }); -} - -Promise.prototype.allResolved = function () { - return allResolved(this); -}; - -/** - * @see Promise#allSettled - */ -Q.allSettled = allSettled; -function allSettled(promises) { - return Q(promises).allSettled(); -} - -/** - * Turns an array of promises into a promise for an array of their states (as - * returned by `inspect`) when they have all settled. - * @param {Array[Any*]} values an array (or promise for an array) of values (or - * promises for values) - * @returns {Array[State]} an array of states for the respective values. - */ -Promise.prototype.allSettled = function () { - return this.then(function (promises) { - return all(array_map(promises, function (promise) { - promise = Q(promise); - function regardless() { - return promise.inspect(); - } - return promise.then(regardless, regardless); - })); - }); -}; - -/** - * Captures the failure of a promise, giving an oportunity to recover - * with a callback. If the given promise is fulfilled, the returned - * promise is fulfilled. - * @param {Any*} promise for something - * @param {Function} callback to fulfill the returned promise if the - * given promise is rejected - * @returns a promise for the return value of the callback - */ -Q.fail = // XXX legacy -Q["catch"] = function (object, rejected) { - return Q(object).then(void 0, rejected); -}; - -Promise.prototype.fail = // XXX legacy -Promise.prototype["catch"] = function (rejected) { - return this.then(void 0, rejected); -}; - -/** - * Attaches a listener that can respond to progress notifications from a - * promise's originating deferred. This listener receives the exact arguments - * passed to ``deferred.notify``. - * @param {Any*} promise for something - * @param {Function} callback to receive any progress notifications - * @returns the given promise, unchanged - */ -Q.progress = progress; -function progress(object, progressed) { - return Q(object).then(void 0, void 0, progressed); -} - -Promise.prototype.progress = function (progressed) { - return this.then(void 0, void 0, progressed); -}; - -/** - * Provides an opportunity to observe the settling of a promise, - * regardless of whether the promise is fulfilled or rejected. Forwards - * the resolution to the returned promise when the callback is done. - * The callback can return a promise to defer completion. - * @param {Any*} promise - * @param {Function} callback to observe the resolution of the given - * promise, takes no arguments. - * @returns a promise for the resolution of the given promise when - * ``fin`` is done. - */ -Q.fin = // XXX legacy -Q["finally"] = function (object, callback) { - return Q(object)["finally"](callback); -}; - -Promise.prototype.fin = // XXX legacy -Promise.prototype["finally"] = function (callback) { - callback = Q(callback); - return this.then(function (value) { - return callback.fcall().then(function () { - return value; - }); - }, function (reason) { - // TODO attempt to recycle the rejection with "this". - return callback.fcall().then(function () { - throw reason; - }); - }); -}; - -/** - * Terminates a chain of promises, forcing rejections to be - * thrown as exceptions. - * @param {Any*} promise at the end of a chain of promises - * @returns nothing - */ -Q.done = function (object, fulfilled, rejected, progress) { - return Q(object).done(fulfilled, rejected, progress); -}; - -Promise.prototype.done = function (fulfilled, rejected, progress) { - var onUnhandledError = function (error) { - // forward to a future turn so that ``when`` - // does not catch it and turn it into a rejection. - Q.nextTick(function () { - makeStackTraceLong(error, promise); - if (Q.onerror) { - Q.onerror(error); - } else { - throw error; - } - }); - }; - - // Avoid unnecessary `nextTick`ing via an unnecessary `when`. - var promise = fulfilled || rejected || progress ? - this.then(fulfilled, rejected, progress) : - this; - - if (typeof process === "object" && process && process.domain) { - onUnhandledError = process.domain.bind(onUnhandledError); - } - - promise.then(void 0, onUnhandledError); -}; - -/** - * Causes a promise to be rejected if it does not get fulfilled before - * some milliseconds time out. - * @param {Any*} promise - * @param {Number} milliseconds timeout - * @param {Any*} custom error message or Error object (optional) - * @returns a promise for the resolution of the given promise if it is - * fulfilled before the timeout, otherwise rejected. - */ -Q.timeout = function (object, ms, error) { - return Q(object).timeout(ms, error); -}; - -Promise.prototype.timeout = function (ms, error) { - var deferred = defer(); - var timeoutId = setTimeout(function () { - if (!error || "string" === typeof error) { - error = new Error(error || "Timed out after " + ms + " ms"); - error.code = "ETIMEDOUT"; - } - deferred.reject(error); - }, ms); - - this.then(function (value) { - clearTimeout(timeoutId); - deferred.resolve(value); - }, function (exception) { - clearTimeout(timeoutId); - deferred.reject(exception); - }, deferred.notify); - - return deferred.promise; -}; - -/** - * Returns a promise for the given value (or promised value), some - * milliseconds after it resolved. Passes rejections immediately. - * @param {Any*} promise - * @param {Number} milliseconds - * @returns a promise for the resolution of the given promise after milliseconds - * time has elapsed since the resolution of the given promise. - * If the given promise rejects, that is passed immediately. - */ -Q.delay = function (object, timeout) { - if (timeout === void 0) { - timeout = object; - object = void 0; - } - return Q(object).delay(timeout); -}; - -Promise.prototype.delay = function (timeout) { - return this.then(function (value) { - var deferred = defer(); - setTimeout(function () { - deferred.resolve(value); - }, timeout); - return deferred.promise; - }); -}; - -/** - * Passes a continuation to a Node function, which is called with the given - * arguments provided as an array, and returns a promise. - * - * Q.nfapply(FS.readFile, [__filename]) - * .then(function (content) { - * }) - * - */ -Q.nfapply = function (callback, args) { - return Q(callback).nfapply(args); -}; - -Promise.prototype.nfapply = function (args) { - var deferred = defer(); - var nodeArgs = array_slice(args); - nodeArgs.push(deferred.makeNodeResolver()); - this.fapply(nodeArgs).fail(deferred.reject); - return deferred.promise; -}; - -/** - * Passes a continuation to a Node function, which is called with the given - * arguments provided individually, and returns a promise. - * @example - * Q.nfcall(FS.readFile, __filename) - * .then(function (content) { - * }) - * - */ -Q.nfcall = function (callback /*...args*/) { - var args = array_slice(arguments, 1); - return Q(callback).nfapply(args); -}; - -Promise.prototype.nfcall = function (/*...args*/) { - var nodeArgs = array_slice(arguments); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - this.fapply(nodeArgs).fail(deferred.reject); - return deferred.promise; -}; - -/** - * Wraps a NodeJS continuation passing function and returns an equivalent - * version that returns a promise. - * @example - * Q.nfbind(FS.readFile, __filename)("utf-8") - * .then(console.log) - * .done() - */ -Q.nfbind = -Q.denodeify = function (callback /*...args*/) { - var baseArgs = array_slice(arguments, 1); - return function () { - var nodeArgs = baseArgs.concat(array_slice(arguments)); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - Q(callback).fapply(nodeArgs).fail(deferred.reject); - return deferred.promise; - }; -}; - -Promise.prototype.nfbind = -Promise.prototype.denodeify = function (/*...args*/) { - var args = array_slice(arguments); - args.unshift(this); - return Q.denodeify.apply(void 0, args); -}; - -Q.nbind = function (callback, thisp /*...args*/) { - var baseArgs = array_slice(arguments, 2); - return function () { - var nodeArgs = baseArgs.concat(array_slice(arguments)); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - function bound() { - return callback.apply(thisp, arguments); - } - Q(bound).fapply(nodeArgs).fail(deferred.reject); - return deferred.promise; - }; -}; - -Promise.prototype.nbind = function (/*thisp, ...args*/) { - var args = array_slice(arguments, 0); - args.unshift(this); - return Q.nbind.apply(void 0, args); -}; - -/** - * Calls a method of a Node-style object that accepts a Node-style - * callback with a given array of arguments, plus a provided callback. - * @param object an object that has the named method - * @param {String} name name of the method of object - * @param {Array} args arguments to pass to the method; the callback - * will be provided by Q and appended to these arguments. - * @returns a promise for the value or error - */ -Q.nmapply = // XXX As proposed by "Redsandro" -Q.npost = function (object, name, args) { - return Q(object).npost(name, args); -}; - -Promise.prototype.nmapply = // XXX As proposed by "Redsandro" -Promise.prototype.npost = function (name, args) { - var nodeArgs = array_slice(args || []); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - this.dispatch("post", [name, nodeArgs]).fail(deferred.reject); - return deferred.promise; -}; - -/** - * Calls a method of a Node-style object that accepts a Node-style - * callback, forwarding the given variadic arguments, plus a provided - * callback argument. - * @param object an object that has the named method - * @param {String} name name of the method of object - * @param ...args arguments to pass to the method; the callback will - * be provided by Q and appended to these arguments. - * @returns a promise for the value or error - */ -Q.nsend = // XXX Based on Mark Miller's proposed "send" -Q.nmcall = // XXX Based on "Redsandro's" proposal -Q.ninvoke = function (object, name /*...args*/) { - var nodeArgs = array_slice(arguments, 2); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - Q(object).dispatch("post", [name, nodeArgs]).fail(deferred.reject); - return deferred.promise; -}; - -Promise.prototype.nsend = // XXX Based on Mark Miller's proposed "send" -Promise.prototype.nmcall = // XXX Based on "Redsandro's" proposal -Promise.prototype.ninvoke = function (name /*...args*/) { - var nodeArgs = array_slice(arguments, 1); - var deferred = defer(); - nodeArgs.push(deferred.makeNodeResolver()); - this.dispatch("post", [name, nodeArgs]).fail(deferred.reject); - return deferred.promise; -}; - -/** - * If a function would like to support both Node continuation-passing-style and - * promise-returning-style, it can end its internal promise chain with - * `nodeify(nodeback)`, forwarding the optional nodeback argument. If the user - * elects to use a nodeback, the result will be sent there. If they do not - * pass a nodeback, they will receive the result promise. - * @param object a result (or a promise for a result) - * @param {Function} nodeback a Node.js-style callback - * @returns either the promise or nothing - */ -Q.nodeify = nodeify; -function nodeify(object, nodeback) { - return Q(object).nodeify(nodeback); -} - -Promise.prototype.nodeify = function (nodeback) { - if (nodeback) { - this.then(function (value) { - Q.nextTick(function () { - nodeback(null, value); - }); - }, function (error) { - Q.nextTick(function () { - nodeback(error); - }); - }); - } else { - return this; - } -}; - -// All code before this point will be filtered from stack traces. -var qEndingLine = captureLine(); - -return Q; - -}); diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000015 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000015 deleted file mode 100644 index 53c131c08..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000015 +++ /dev/null @@ -1,1177 +0,0 @@ -/*global chrome*/ -/*global console*/ -/*global InstallTrigger*/ -/*global process*/ -/*global require*/ -/*global Q*/ -// use jsdoc agent.js to generate documentation -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; -var TICloudAgent; -(function (TICloudAgent) { - // base error - var Error = (function () { - function Error(name, msg) { - if (name === void 0) { name = "Error"; } - if (msg === void 0) { msg = "ERROR"; } - this.name = name; - this.msg = msg; - } - return Error; - }()); - TICloudAgent.Error = Error; - var AlreadyInitialized = (function (_super) { - __extends(AlreadyInitialized, _super); - function AlreadyInitialized() { - return _super.call(this, "AlreadyInitialized", "AGENT_ALREADY_INITIALIZED") || this; - } - return AlreadyInitialized; - }(Error)); - TICloudAgent.AlreadyInitialized = AlreadyInitialized; - // Base for installation related errors. - var InstallError = (function (_super) { - __extends(InstallError, _super); - function InstallError() { - return _super.apply(this, arguments) || this; - } - return InstallError; - }(Error)); - TICloudAgent.InstallError = InstallError; - // Base error type that may require installation - var InvalidAgentVersion = (function (_super) { - __extends(InvalidAgentVersion, _super); - function InvalidAgentVersion() { - return _super.call(this, "InvalidAgentVersion", "Installed version is out of date") || this; - } - return InvalidAgentVersion; - }(Error)); - TICloudAgent.InvalidAgentVersion = InvalidAgentVersion; - var InvalidExtensionVersion = (function (_super) { - __extends(InvalidExtensionVersion, _super); - function InvalidExtensionVersion() { - return _super.call(this, "InvalidExtensionVersion", "Installed browser extension version is out of date") || this; - } - return InvalidExtensionVersion; - }(Error)); - TICloudAgent.InvalidExtensionVersion = InvalidExtensionVersion; - var MissingExtension = (function (_super) { - __extends(MissingExtension, _super); - function MissingExtension() { - return _super.call(this, "MissingExtension", "MISSING_EXTENTSION") || this; - } - return MissingExtension; - }(Error)); - TICloudAgent.MissingExtension = MissingExtension; - var AgentNotStarted = (function (_super) { - __extends(AgentNotStarted, _super); - function AgentNotStarted(msg) { - if (msg === void 0) { msg = "AGENT_NOT_STARTED"; } - return _super.call(this, "AgentNotStarted", msg) || this; - } - return AgentNotStarted; - }(Error)); - TICloudAgent.AgentNotStarted = AgentNotStarted; - // OS Enum - TICloudAgent.OS = { - WIN: "win", - LINUX: "linux", - OSX: "osx", - }; - // Browser Enum - TICloudAgent.BROWSER = { - CHROME: "chrome", - SAFARI: "safari", - FIREFOX: "firefox", - IE: "ie", - }; - function dynamicLink(url, newWindow) { - if (newWindow === void 0) { newWindow = false; } - var browser = getBrowser(); - var appendChild = browser === TICloudAgent.BROWSER.FIREFOX || browser === TICloudAgent.BROWSER.IE; - var a = document.createElement("a"); - a.href = url; - if (newWindow) { - a.target = "_blank"; - } - if (appendChild) { - document.body.appendChild(a); - } - a.click(); - } - // utility function to figure out the browser - function getBrowser() { - var browser = TICloudAgent.BROWSER.CHROME; - // chrome claims to be safari and chrome.. so special care is needed - if (navigator.userAgent.indexOf("Safari") !== -1 && navigator.userAgent.indexOf("Chrome") === -1) { - browser = TICloudAgent.BROWSER.SAFARI; - } - else if (navigator.userAgent.indexOf("Firefox") !== -1) { - browser = TICloudAgent.BROWSER.FIREFOX; - } - else if (!!navigator.userAgent.match(/Trident.*rv\:11\./)) { - browser = TICloudAgent.BROWSER.IE; - } - return browser; - } - TICloudAgent.getBrowser = getBrowser; - // utility function to figure out OS - function getOS() { - // default to linux because it is not always possible to tell it from - // the - // appVersion - var os = TICloudAgent.OS.LINUX; - if (navigator.appVersion.indexOf("Mac") !== -1) { - os = TICloudAgent.OS.OSX; - } - if (navigator.appVersion.indexOf("Win") !== -1) { - os = TICloudAgent.OS.WIN; - } - return os; - } - TICloudAgent.getOS = getOS; - ; - function assertNever(x) { - throw new Error("Unexpected object: " + x); - } - function getOSFolderName() { - var os = getOS(); - switch (os) { - case "win": return "win32"; - case "osx": return "mac"; - case "linux": return "linux"; - default: return assertNever(os); - } - } - var hostInfo; - (function (hostInfo) { - // Host and port of the server - var protocol = window.location.protocol; - var host = window.location.hostname; - var port = window.location.port ? ":" + window.location.port : ""; - // override - may be useful for testing - // explicitly check for undefined, empty strings are valid overrides - var hackOfWindowForTesting = window; - if (typeof hackOfWindowForTesting.TI_CLOUD_AGENT_HOST !== "undefined") { - host = hackOfWindowForTesting.TI_CLOUD_AGENT_HOST; - } - if (typeof hackOfWindowForTesting.TI_CLOUD_AGENT_PORT !== "undefined") { - port = hackOfWindowForTesting.TI_CLOUD_AGENT_PORT; - } - function tiCloudAgentServer() { - return protocol + "//" + host + port + "/ticloudagent"; - } - hostInfo.tiCloudAgentServer = tiCloudAgentServer; - function isProduction() { - return (host === "dev.ti.com"); - } - hostInfo.isProduction = isProduction; - })(hostInfo || (hostInfo = {})); - function isOfflineConfig(agentConfig) { - return undefined !== agentConfig.offline; - } - function isDesktopConfig(agentConfig) { - return undefined !== agentConfig.agentPort; - } - var loadAgentConfig; - if (typeof process === "undefined") { - loadAgentConfig = function () { - var deferred = Q.defer(); - var xmlhttp = new XMLHttpRequest(); - var url = hostInfo.tiCloudAgentServer() + "/agent_config.json"; - xmlhttp.onreadystatechange = function () { - if (xmlhttp.readyState === 4) { - if (xmlhttp.status === 200) { - deferred.resolve(JSON.parse(xmlhttp.responseText)); - } - else { - deferred.reject(xmlhttp.statusText); - } - } - }; - xmlhttp.open("GET", url); // sync - xmlhttp.send(); - return deferred.promise; - }; - } - else { - loadAgentConfig = function () { - var deferred = Q.defer(); - try { - // In the node case, agent_config.json contains the path to - // ticloudagent, and not version information - var path = require("path"); - var agentConfigData = require(path.resolve("../ticloudagent/server/public/agent_config.json")); - deferred.resolve(agentConfigData); - } - catch (e) { - console.warn("No agent_config.json found, switching to default config"); - deferred.resolve(); - } - return deferred.promise; - }; - } - var Extension = (function () { - function Extension() { - } - Extension.prototype.isInstalled = function () { - var extDomItem = document.getElementById("com.ti.TICloudAgent.Bridge"); - return extDomItem ? true : false; - }; - Extension.prototype.getVersion = function () { - var extDomItem = document.getElementById("com.ti.TICloudAgent.Bridge"); - return extDomItem.title; - }; - return Extension; - }()); - // chrome ext specific - var ChromeExt = (function (_super) { - __extends(ChromeExt, _super); - function ChromeExt() { - var _this = _super.apply(this, arguments) || this; - _this.ID = "pfillhniocmjcapelhjcianojmoidjdk"; - _this.port = null; - _this.lastRegLisenter = null; - return _this; - } - ChromeExt.prototype.init = function () { - var _this = this; - // connect to app if possible - if (chrome.runtime && chrome.runtime.connect) { - this.port = chrome.runtime.connect(this.ID); - this.port.onDisconnect.addListener(function () { - _this.port = null; - }); - } - }; - ChromeExt.prototype.postMessage = function (msgObj) { - this.port.postMessage(msgObj); - }; - ChromeExt.prototype.regOnMessage = function (listener) { - this.lastRegLisenter = listener; - this.port.onMessage.addListener(this.lastRegLisenter); - }; - ChromeExt.prototype.removeLastOnMessage = function () { - this.port.onMessage.removeListener(this.lastRegLisenter); - }; - ChromeExt.prototype.install = function () { - var failure = function (msg) { - console.error("Extension Installation Failed: " + msg); - }; - var url = "https://chrome.google.com/webstore/detail/" + this.ID; - // scheme is very delicate make sure to test all the use cases if you make changes - if (hostInfo.isProduction()) { - try { - // inline- install only works for production - chrome.webstore.install(url, function () { }, failure); - } - catch (e) { - dynamicLink(url, true); // do non inline install instead - } - } - else { - dynamicLink(url, true); // do non inline install instead - } - }; - return ChromeExt; - }(Extension)); - var DOMEventExt = (function (_super) { - __extends(DOMEventExt, _super); - function DOMEventExt() { - var _this = _super.apply(this, arguments) || this; - _this.TO_APP_MSG_STR = "ti-cloud-agent-msg-app"; - _this.TO_EXT_MSG_STR = "ti-cloud-agent-msg-ext"; - _this.lastRegListener = null; - return _this; - } - DOMEventExt.prototype.postMessage = function (msgObj) { - var event = window.document.createEvent("CustomEvent"); - event.initCustomEvent(this.TO_EXT_MSG_STR, true, true, msgObj); - window.dispatchEvent(event); - }; - DOMEventExt.prototype.regOnMessage = function (listener) { - this.lastRegListener = function (event) { - listener(event.detail); - }; - window.addEventListener(this.TO_APP_MSG_STR, this.lastRegListener, false); - }; - DOMEventExt.prototype.removeLastOnMessage = function () { - window.removeEventListener(this.TO_APP_MSG_STR, this.lastRegListener, false); - }; - return DOMEventExt; - }(Extension)); - var FirefoxExt = (function (_super) { - __extends(FirefoxExt, _super); - function FirefoxExt() { - return _super.apply(this, arguments) || this; - } - FirefoxExt.prototype.init = function (newconfig) { - this.config = newconfig; - }; - FirefoxExt.prototype.install = function () { - var extUrl = hostInfo.tiCloudAgentServer() + "/getFile/" + getOS() + "/ticloudagent/extensions/"; - extUrl += "firefox/ticloudagentbridge.xpi/LATEST"; - var params = { - TICloudAgentXPI: { - URL: extUrl, - Hash: this.config.hash, - toString: function () { - return extUrl; - }, - }, - }; - InstallTrigger.install(params); - }; - return FirefoxExt; - }(DOMEventExt)); - var SafariExt = (function (_super) { - __extends(SafariExt, _super); - function SafariExt() { - return _super.apply(this, arguments) || this; - } - SafariExt.prototype.init = function () { - }; - SafariExt.prototype.install = function () { - var extUrl = hostInfo.tiCloudAgentServer() + "/getFile/" + getOS() + "/ticloudagent/extensions/"; - extUrl += "safari/ticloudagentbridge.safariextz/LATEST"; - dynamicLink(extUrl, false); - }; - return SafariExt; - }(DOMEventExt)); - function createExtension(browser) { - switch (browser) { - case "chrome": return new ChromeExt(); - case "firefox": return new FirefoxExt(); - case "safari": return new SafariExt(); - default: return null; - } - } - // for firefox and safari use the firefoxExt object. - var browserExt = createExtension(getBrowser()); - // The socket abstraction for communicating with the host agent - // tslint:disable-next-line variable-name - it's a class - var Socket = WebSocket; - function launchHostApp(agentConfig) { - // abstraction for interfacting with the host app - function initExtensionBased(extAgentConfig, browser) { - // message types for the init TI cloud agent - var EXT_MSG_TYPES = { - INIT: "INIT_EXTENTION", - INIT_COMPLETE: "INIT_EXTENTION_COMPLETE", - }; - var POST_MESSAGE_TYPES = { - CREATE: "CREATE", - CLOSE: "CLOSE", - SEND: "SEND", - }; - var ON_MESSAGE_TYPES = { - ON_ERROR: "ON_ERROR", - ON_CLOSE: "ON_CLOSE", - ON_MESSAGE: "ON_MESSAGE", - ON_OPEN: "ON_OPEN", - }; - var typeToFunc = { - ON_ERROR: "onerror", - ON_CLOSE: "onclose", - ON_MESSAGE: "onmessage", - ON_OPEN: "onopen", - }; - var SocketToExtension = (function () { - function SocketToExtension(url, subProtocol) { - this.url = url; - this.subProtocol = subProtocol; - this.key = SocketToExtension.id++; - SocketToExtension.socketCache[this.key] = this; - browserExt.postMessage({ - key: this.key, - url: this.url, - subProtocol: this.subProtocol, - type: POST_MESSAGE_TYPES.CREATE, - }); - } - SocketToExtension.dispatchSocketEvent = function (msgObj) { - var funcName = typeToFunc[msgObj.type]; - var key = msgObj.key; - var socket = SocketToExtension.socketCache[key]; - if (socket && socket[funcName]) { - var func = socket[funcName]; - func.apply(socket, [msgObj.msgEvt]); - } - if (msgObj.type === ON_MESSAGE_TYPES.ON_CLOSE) { - if (SocketToExtension.socketCache[key]) { - delete SocketToExtension.socketCache[key]; - } - } - }; - SocketToExtension.prototype.close = function () { - // Do not rely on the extension sending us a close event. Instead, - // ignore all future events by removing ourself from the cache, and - // then send our own close event. - // See TICLD-1664 - delete SocketToExtension.socketCache[this.key]; - browserExt.postMessage({ - key: this.key, - type: POST_MESSAGE_TYPES.CLOSE, - }); - if (this.onclose) { - this.onclose(); - } - }; - SocketToExtension.prototype.send = function (data) { - browserExt.postMessage({ - key: this.key, - data: data, - type: POST_MESSAGE_TYPES.SEND, - }); - }; - return SocketToExtension; - }()); - SocketToExtension.id = 0; - SocketToExtension.socketCache = {}; - var deferred = Q.defer(); - try { - Socket = SocketToExtension; - var errors_1 = []; // list of issues while starting up - browserExt.init(extAgentConfig[browser]); - // browser ext is not installed return error - // we can't do anything else - if (!browserExt.isInstalled()) { - errors_1.push(new MissingExtension()); - deferred.reject(errors_1); - return deferred.promise; - } - var EXT_VERSION = extAgentConfig[browser].version; - // if the browser ext verision does not match, we can still try to start the agent - if (browserExt.getVersion() !== EXT_VERSION) { - errors_1.push(new InvalidExtensionVersion()); - } - function initEventListener(msgObj) { - if (msgObj.type === EXT_MSG_TYPES.INIT_COMPLETE) { - var cleanup = null; - browserExt.removeLastOnMessage(); // stop listening to the init event - if (msgObj.data.error) { - // there was an issues starting the agent - errors_1.push(new AgentNotStarted(msgObj.data.error)); - } - else if (msgObj.data.version !== extAgentConfig.installer.version) { - // we started fine, but the version was invalid - errors_1.push(new InvalidAgentVersion()); - // The agent will remain running until something - // connects to it. To prevent that, we'll connect - // but immediately close the agent - browserExt.regOnMessage(SocketToExtension.dispatchSocketEvent); - cleanup = createClientModule(msgObj.data.port) - .then(function (agent) { return agent.close(); }); - } - if (errors_1.length === 0) { - // expect all other messages to be for the - // socket interface - browserExt.regOnMessage(SocketToExtension.dispatchSocketEvent); - deferred.resolve(msgObj.data); - } - else { - if (cleanup) { - cleanup.finally(function () { return deferred.reject(errors_1); }); - } - else { - deferred.reject(errors_1); - } - } - } - else { - console.error("UNEXPECTED MESSAGE TYPE: " + msgObj.type); - } - } - // set up listeners - browserExt.regOnMessage(initEventListener); - // send message to init - browserExt.postMessage({ type: EXT_MSG_TYPES.INIT }); - } - catch (e) { - deferred.reject(e); - } - return deferred.promise; - } - function initIE() { - var deferred = Q.defer(); - var plugin = window.TICloudAgent_HACK.plugin; - var errors = []; - if (plugin && plugin.start) { - var initParamsRaw = plugin.start(); - var initParams = JSON.parse(initParamsRaw); - if (initParams.error) { - errors.push(new AgentNotStarted(initParams.error)); - deferred.reject(errors); - } - else { - deferred.resolve(initParams); - } - } - else { - errors.push(new MissingExtension()); - deferred.reject(errors); - } - return deferred.promise; - } - function initGUIComposer() { - var osFolderName = getOSFolderName(); - var isWin = /^win/.test(process.platform); - var ext = isWin ? ".bat" : ".sh"; - var spawn = require("child_process").spawn; - var fileToExec = "ticloudagent" + ext; - var pathObj = require("path"); - var fs = require("fs"); - var workingDir = pathObj.dirname(process.cwd()); - // folder structure is <install directory>/.../<app name> - // need <install directory>/win32/TICloudAgent - // start by going up to parent folder - var subdirectoryLimit = 3; - workingDir = pathObj.join(workingDir, osFolderName); - do { - workingDir = pathObj.join(workingDir, "../.."); - var dirName = "" + workingDir.toLowerCase(); - // if current folder name doesn't already end in the OS name, add it - if ((dirName.indexOf(osFolderName, dirName.length - osFolderName.length) === -1)) { - workingDir = pathObj.join(workingDir, osFolderName); - } - } while (!fs.existsSync(workingDir) && subdirectoryLimit-- > 0); - workingDir = pathObj.join(workingDir, "TICloudAgent"); - fileToExec = pathObj.join(workingDir, fileToExec); - var initParams = null; - var errors = []; - var deferred = Q.defer(); - var lp = spawn(fileToExec, ["not_chrome"], { cwd: workingDir }); - lp.stdout.on("data", function (data) { - if (initParams) { - throw new Error("AREADY INITIALIZED"); - } - initParams = JSON.parse(data.toString()); - deferred.resolve(initParams); - }); - lp.stderr.on("data", function (data) { - errors.push(new AgentNotStarted(data.toString())); - deferred.reject(errors); - }); - return deferred.promise; - } - function initGenericNW(configFile) { - var path = require("path"); - var hostAgentStart = require(path.resolve(configFile.offline.hostAgentPath)).start; - return hostAgentStart(); - } - if (!agentConfig) { - return initGUIComposer(); - } - else if (isOfflineConfig(agentConfig)) { - return initGenericNW(agentConfig); - } - else { - // Running in a browser of some kind - if (isDesktopConfig(agentConfig)) { - // Agent already launched, check for error, then return port - if (agentConfig.error) { - return Q.reject(agentConfig.error); - } - return Q({ port: agentConfig.agentPort }); - } - else { - var browser = getBrowser(); - switch (browser) { - case "ie": return initIE(); - case "chrome": - case "firefox": - case "safari": return initExtensionBased(agentConfig, browser); - default: return assertNever(browser); - } - } - } - } - var InstallWizard = (function () { - function InstallWizard(errors, connectionID) { - this.title = "TI Cloud Agent Setup"; - this.detailsLink = { - text: "What's this?", - url: "http://processors.wiki.ti.com/index.php/TI_Cloud_Agent#What_is_it.3F", - }; - this.helpLink = { - text: "Help. I already did this", - url: "http://processors.wiki.ti.com/index.php/TI_Cloud_Agent#Troubleshooting", - }; - this.finishStep = { - description: "Refresh the current browser page", - action: { - text: "$Refresh$ Page", - handler: function () { - window.location.reload(); - }, - }, - }; - this.initialMessage = { - description: "Install TI Cloud Agent to enable flashing.", - action: { - text: "Install TI Cloud Agent to enable flashing.", - }, - }; - this.description = InstallWizard.getDescriptionText(errors); - this.steps = InstallWizard.getSteps(errors, connectionID); - } - InstallWizard.getDescriptionText = function (errors) { - var wizardDesc = "Obsolete TI Cloud Agent installation found. An update is required."; - for (var _i = 0, errors_2 = errors; _i < errors_2.length; _i++) { - var error = errors_2[_i]; - if (error instanceof MissingExtension) { - wizardDesc = "Hardware interaction requires additional one time set up."; - break; - } - if (error instanceof AgentNotStarted) { - wizardDesc = "Could not launch TI Cloud Agent : " + error.msg + " ."; - } - } - wizardDesc += " Please perform the actions listed below and try your operation again."; - return wizardDesc; - }; - InstallWizard.createInstallAgentStep = function (connectionID, error) { - var actionText = "$Download$ and install the TI Cloud Agent Application"; - if (error instanceof InvalidAgentVersion) { - actionText = "$Download$ and install a new version of the TI Cloud Agent Application"; - } - var step = { - description: "Download and install the TI Cloud Agent host application.", - action: { - text: actionText, - handler: function () { - var url = hostInfo.tiCloudAgentServer() + "/getInstaller" + "?os=" + getOS(); - if (undefined !== connectionID) { - url += "&connectionID=" + connectionID; - } - dynamicLink(url); - }, - }, - }; - return step; - }; - InstallWizard.getSteps = function (errors, connectionID) { - var stepInstallExt = { - description: "Install the TI Cloud Agent browser extension.", - action: { - text: "$Install$ browser extension", - handler: function () { browserExt.install(); }, - }, - }; - var steps = []; - var browser = getBrowser(); - for (var _i = 0, errors_3 = errors; _i < errors_3.length; _i++) { - var error = errors_3[_i]; - // on I.E there is no inline extension install.. its all done by the host app installer - if (browser === TICloudAgent.BROWSER.IE && error instanceof MissingExtension) { - steps.push(InstallWizard.createInstallAgentStep(connectionID)); - } - else if (error instanceof MissingExtension) { - steps.push(stepInstallExt); - steps.push(InstallWizard.createInstallAgentStep(connectionID)); - } - else if (error instanceof AgentNotStarted || error instanceof InvalidAgentVersion) { - steps.push(InstallWizard.createInstallAgentStep(connectionID, error)); - } - else if (error instanceof InvalidExtensionVersion) { - steps.push(stepInstallExt); - } - } - // safari. we also need to restart the browser - if (browser === TICloudAgent.BROWSER.SAFARI) { - steps.push({ - description: "Restart the browser", - action: { - text: "Restart the browser", - }, - }); - } - return steps; - }; - return InstallWizard; - }()); - // make it async, to be consistent with all other API's - // We have to keep this poor name for now due to it's use throughout - // tslint:disable-next-line variable-name - TICloudAgent.Install = { - getInstallWizard: function (params) { - var deferred = Q.defer(); - deferred.resolve(new InstallWizard(params.errors, params.connectionID)); - return deferred.promise; - }, - }; - // create the client side module - function createClientModule(port, subProtocol) { - // add events related functions - var eventListeners = {}; - var moduleObj = { - addListener: function (type, listener) { - if (!eventListeners[type]) { - eventListeners[type] = []; - } - eventListeners[type].push(listener); - }, - removeListener: function (type, listener) { - if (eventListeners[type]) { - var typeListeners = eventListeners[type]; - // tslint:disable-next-line prefer-for-of - index is needed - for (var i = 0; i < typeListeners.length; i++) { - if (typeListeners[i] === listener) { - // don't remove it, just null it out - // if we remove it and the remove was called from a dispatch - // it could impact the dispatch because the length of eventsListeners will change - typeListeners[i] = null; - break; - } - } - } - }, - getSubModule: null, - close: null, - }; - var internalModuleObj = { - createSubModule: null, - listCommands: null, - }; - // command dispatch module - function createCommandDispatch() { - var commandID = 1; // start from 1 ( 0 could be mistaken for false, in certain places) - var pendingCommands = {}; - var rejectMsg = { message: "Module Closed" }; - var commandDispatchObj = { - exec: function (ws, commandName, data) { - var defCommand = Q.defer(); - var obj = { - command: commandName, - id: commandID++, - data: data, - }; - pendingCommands[obj.id] = defCommand; - var message = JSON.stringify(obj); - try { - ws.send(message); - } - catch (e) { - defCommand.reject(rejectMsg); - } - return defCommand.promise; - }, - ret: function (retObj) { - var response = retObj.response; - var error = retObj.error; - var data = retObj.data; - // it's should only be one of these - var id = response || error; - var defCommand = pendingCommands[id]; - if (defCommand) { - if (response) { - defCommand.resolve(data); - } - else { - defCommand.reject(data); - } - // delete it instaed of nulling so the map doesn't grow too large over time - delete pendingCommands[id]; - } - else { - console.error("commandDispatch : ret , Error, no promise found corresponding to id : " + id); - } - }, - }; - function cleanUp() { - // reject all outstanding requests - for (var key in pendingCommands) { - if (pendingCommands.hasOwnProperty(key)) { - var commandPromise = pendingCommands[key]; - commandPromise.reject(rejectMsg); - } - } - pendingCommands = {}; - // replace exec and ret to reject and ignore incoming requests - commandDispatchObj.exec = function () { - var defCommand = Q.defer(); - defCommand.reject(rejectMsg); - return defCommand.promise; - }; - commandDispatchObj.ret = function () { - // do nothing - return; - }; - } - moduleObj.addListener("close", cleanUp); - return commandDispatchObj; - } - var commandDispatch = createCommandDispatch(); - var eventsDispatch = { - dispatch: function (listeners, retObj) { - var typeListeners = listeners[retObj.event]; - if (typeListeners) { - for (var _i = 0, typeListeners_1 = typeListeners; _i < typeListeners_1.length; _i++) { - var listener = typeListeners_1[_i]; - if (listener) { - listener(retObj.data); - } - } - } - }, - }; - function socketUrl() { - return "ws://127.0.0.1:" + port; - } - var subModulePromises = {}; - moduleObj.getSubModule = function (subModuleName) { - var subModulePromise = subModulePromises[subModuleName]; - if (!subModulePromise) { - subModulePromise = internalModuleObj.createSubModule(subModuleName) - .then(function (data) { - return createClientModule(data.port, data.subProtocol); - }) - .then(function (subModule) { - // lets register for an onclose and onerror events to clean ourselves up - function cleanUp() { - subModulePromises[subModuleName] = null; - } - subModule.addListener("close", cleanUp); - return subModule; // pass the module down the chain - }) - .catch(function (err) { - subModulePromises[subModuleName] = null; - throw err; - }); - subModulePromises[subModuleName] = subModulePromise; - } - return subModulePromise; - }; - function createCommand(ws, fullCommandName) { - // add namespace - var commandNameParts = fullCommandName.split("."); - // everything up to the last part is part of the namespace - var parentObj = moduleObj; - // keep track of nested namespaces - var parentNamespace = ""; - function createAddListener(eventTypePrefix) { - return function (type, listener) { - // add name spaces - type = eventTypePrefix + type; - moduleObj.addListener(type, listener); - }; - } - function createRemoveListener(eventTypePrefix) { - return function (type, listener) { - // add name spaces - type = eventTypePrefix + type; - moduleObj.removeListener(type, listener); - }; - } - for (var i = 0; i < commandNameParts.length - 1; i++) { - var currentNamespacePart = commandNameParts[i]; - parentNamespace += commandNameParts[i]; - var newObj = parentObj[currentNamespacePart]; - if (!newObj) { - // lets create it - var eventTypePrefix = parentNamespace + "."; - newObj = { - addListener: createAddListener(eventTypePrefix), - removeListener: createRemoveListener(eventTypePrefix), - }; - } - // it becomes the new parent - parentObj[currentNamespacePart] = newObj; - parentObj = newObj; - parentNamespace = parentNamespace + "."; - } - var commandName = commandNameParts[commandNameParts.length - 1]; - if ("createSubModule" === fullCommandName || "listCommands" === fullCommandName) { - parentObj = internalModuleObj; - } - function theCommand() { - var data = Array.prototype.slice.call(arguments); - return commandDispatch.exec(ws, fullCommandName, data); - } - parentObj[commandName] = theCommand; - } - var setUpDef = Q.defer(); - var ws = subProtocol ? new Socket(socketUrl(), subProtocol) : new Socket(socketUrl()); - function pageUnloadHandler() { - ws.close(); - } - ws.onclose = function () { - setUpDef.reject("socket closed"); - eventsDispatch.dispatch(eventListeners, { - event: "close", - data: { - message: "socket closed", - }, - }); - // remove the listener - window.removeEventListener("unload", pageUnloadHandler); - }; - ws.onerror = function () { - setUpDef.reject("socket error"); - eventsDispatch.dispatch(eventListeners, { - event: "error", - data: { - message: "socket error", - }, - }); - }; - ws.onopen = function () { - try { - // close the socket before unloading to clean up agent - window.addEventListener("unload", pageUnloadHandler); - // set up command and event return messages - ws.onmessage = function (msgEvt) { - var retObj = JSON.parse(msgEvt.data); - if (retObj.event) { - eventsDispatch.dispatch(eventListeners, retObj); - } - else { - commandDispatch.ret(retObj); - } - }; - moduleObj.close = function () { - ws.close(); - return Q.when(); - }; - createCommand(ws, "listCommands"); // everymodule should have a listCommands command - internalModuleObj.listCommands() - .then(function (dataObj) { - // create commands - for (var _i = 0, _a = dataObj.commands; _i < _a.length; _i++) { - var command = _a[_i]; - if (command !== "listCommands") { - createCommand(ws, command); - } - } - setUpDef.resolve(moduleObj); - }) - .catch(function (err) { return setUpDef.reject(err); }); - } - catch (err) { - setUpDef.reject(err); - } - }; - return setUpDef.promise; - } - var cachedInit; - function Init() { - if (!cachedInit) { - cachedInit = loadAgentConfig() - .then(function (agentConfig) { - return launchHostApp(agentConfig); - }) - .then(function (initParams) { - return createClientModule(initParams.port); - }) - .then(function (agent) { - // Post creation configuration - return agent.addConfigProperty("cloudAgentInstallerServerURL", hostInfo.tiCloudAgentServer()) - .then(function () { - return agent; - }); - }); - } - return cachedInit; - } - TICloudAgent.Init = Init; - // hack API to figure out weather a target only supports flashing. - // it is the only sync api we have - function isFlashOnly(targetName) { - return targetName.match(".*MSP430.*G2.*") && getOS() !== TICloudAgent.OS.WIN; - } - TICloudAgent.isFlashOnly = isFlashOnly; - var Util; - (function (Util) { - function encodeAsBase64(data) { - var def = Q.defer(); - if (data instanceof Blob) { - // encode data as base 64string - var reader_1 = new FileReader(); - reader_1.readAsDataURL(data); - reader_1.onloadend = function () { - def.resolve(reader_1.result.split(",")[1]); - }; - } - else { - def.resolve(btoa(data)); - } - return def.promise; - } - Util.encodeAsBase64 = encodeAsBase64; - var keywords = ["Texas Instruments", "Texas_Instruments", "MSP", "FTDI"]; - // iterate over all ports and find the ones with matching key words - function findInterestingPorts(ports) { - var foundPorts = []; - for (var _i = 0, ports_1 = ports; _i < ports_1.length; _i++) { - var port = ports_1[_i]; - for (var _a = 0, keywords_1 = keywords; _a < keywords_1.length; _a++) { - var keyword = keywords_1[_a]; - if (port.displayName.indexOf(keyword) !== -1) { - foundPorts.push(port); - break; - } - } - } - return foundPorts; - } - ; - // select the port with match pnpId suffix - function selectWithMatchingPnpSuffixWinAndLinux(ports, suffix) { - var foundPorts = findInterestingPorts(ports); - var found = false; - // no interesting ports found - if (foundPorts.length === 0 && ports.length > 0) { - ports[0].selected = true; - } - else { - // try to find one with the matching suffix - for (var _i = 0, foundPorts_1 = foundPorts; _i < foundPorts_1.length; _i++) { - var port = foundPorts_1[_i]; - if (port.pnpId.indexOf(suffix, port.pnpId.length - suffix.length) !== -1) { - port.selected = true; - found = true; - break; - } - } - // we still haven't found one, default to the first found port - if (!found) { - foundPorts[0].selected = true; - found = true; - } - } - return found; - } - function selectDefaultWinAndLinux(ports) { - return selectWithMatchingPnpSuffixWinAndLinux(ports, "02"); - } - function selectMSP432WinAndLinux(ports) { - return selectWithMatchingPnpSuffixWinAndLinux(ports, "00"); - } - function selectMSP432OSX(ports) { - var foundPorts = findInterestingPorts(ports); - var found = false; - if (foundPorts.length > 0) { - foundPorts[0].selected = true; - found = true; - } - return found; - } - function selectDefaultOSX(ports) { - var found = false; - for (var _i = 0, ports_2 = ports; _i < ports_2.length; _i++) { - var port = ports_2[_i]; - if (port.comName.indexOf("/dev/cu.usb") !== -1 && port.manufacturer === "") { - found = true; - port.selected = found; - } - if (found) { - break; - } - } - if (!found && ports.length > 0) { - ports[0].selected = true; - } - return found; - } - function selectDefaultPort(params) { - var ports = params.ports; - var targetName = params.targetName ? params.targetName : ""; - var selectFunc = (getOS() === TICloudAgent.OS.OSX) ? selectDefaultOSX : selectDefaultWinAndLinux; - // 432 and f128 follow the same rules - if (targetName.indexOf("432") !== -1 || targetName.indexOf("cc2650f128") !== -1) { - selectFunc = (getOS() === TICloudAgent.OS.OSX) ? selectMSP432OSX : selectMSP432WinAndLinux; - } - if (targetName.indexOf("MSP430G2") !== -1 && getOS() === TICloudAgent.OS.OSX) { - selectFunc = selectMSP432OSX; - } - var found = selectFunc(ports); - return Q(found); - } - Util.selectDefaultPort = selectDefaultPort; - var baudRates = [{ - rate: "50", - selected: false, - }, { - rate: "75", - selected: false, - }, { - rate: "110", - selected: false, - }, { - rate: "134", - selected: false, - }, { - rate: "150", - selected: false, - }, { - rate: "300", - selected: false, - }, { - rate: "600", - selected: false, - }, { - rate: "1200", - selected: false, - }, { - rate: "1800", - selected: false, - }, { - rate: "2400", - selected: false, - }, { - rate: "4800", - selected: false, - }, { - rate: "7200", - selected: false, - }, { - rate: "9600", - selected: true, - }, { - rate: "14400", - selected: false, - }, { - rate: "19200", - selected: false, - }, { - rate: "28800", - selected: false, - }, { - rate: "38400", - selected: false, - }, { - rate: "56000", - selected: false, - }, { - rate: "57600", - selected: false, - }, { - rate: "115200", - selected: false, - }, { - rate: "128000", - selected: false, - }, { - rate: "153600", - selected: false, - }, { - rate: "230400", - selected: false, - }, { - rate: "256000", - selected: false, - }, { - rate: "460800", - selected: false, - }, { - rate: "921600", - selected: false, - }]; - function getBaudRates() { - return Q(baudRates); - } - Util.getBaudRates = getBaudRates; - })(Util = TICloudAgent.Util || (TICloudAgent.Util = {})); -})(TICloudAgent || (TICloudAgent = {})); diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000016 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000016 deleted file mode 100644 index 44059a5b7..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000016 +++ /dev/null @@ -1,2505 +0,0 @@ -/** - * @license - * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ -// @version 0.7.22 -(function() { - window.WebComponents = window.WebComponents || { - flags: {} - }; - var file = "webcomponents-lite.js"; - var script = document.querySelector('script[src*="' + file + '"]'); - var flags = {}; - if (!flags.noOpts) { - location.search.slice(1).split("&").forEach(function(option) { - var parts = option.split("="); - var match; - if (parts[0] && (match = parts[0].match(/wc-(.+)/))) { - flags[match[1]] = parts[1] || true; - } - }); - if (script) { - for (var i = 0, a; a = script.attributes[i]; i++) { - if (a.name !== "src") { - flags[a.name] = a.value || true; - } - } - } - if (flags.log && flags.log.split) { - var parts = flags.log.split(","); - flags.log = {}; - parts.forEach(function(f) { - flags.log[f] = true; - }); - } else { - flags.log = {}; - } - } - if (flags.register) { - window.CustomElements = window.CustomElements || { - flags: {} - }; - window.CustomElements.flags.register = flags.register; - } - WebComponents.flags = flags; -})(); - -(function(scope) { - "use strict"; - var hasWorkingUrl = false; - if (!scope.forceJURL) { - try { - var u = new URL("b", "http://a"); - u.pathname = "c%20d"; - hasWorkingUrl = u.href === "http://a/c%20d"; - } catch (e) {} - } - if (hasWorkingUrl) return; - var relative = Object.create(null); - relative["ftp"] = 21; - relative["file"] = 0; - relative["gopher"] = 70; - relative["http"] = 80; - relative["https"] = 443; - relative["ws"] = 80; - relative["wss"] = 443; - var relativePathDotMapping = Object.create(null); - relativePathDotMapping["%2e"] = "."; - relativePathDotMapping[".%2e"] = ".."; - relativePathDotMapping["%2e."] = ".."; - relativePathDotMapping["%2e%2e"] = ".."; - function isRelativeScheme(scheme) { - return relative[scheme] !== undefined; - } - function invalid() { - clear.call(this); - this._isInvalid = true; - } - function IDNAToASCII(h) { - if ("" == h) { - invalid.call(this); - } - return h.toLowerCase(); - } - function percentEscape(c) { - var unicode = c.charCodeAt(0); - if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) { - return c; - } - return encodeURIComponent(c); - } - function percentEscapeQuery(c) { - var unicode = c.charCodeAt(0); - if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) { - return c; - } - return encodeURIComponent(c); - } - var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; - function parse(input, stateOverride, base) { - function err(message) { - errors.push(message); - } - var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = []; - loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) { - var c = input[cursor]; - switch (state) { - case "scheme start": - if (c && ALPHA.test(c)) { - buffer += c.toLowerCase(); - state = "scheme"; - } else if (!stateOverride) { - buffer = ""; - state = "no scheme"; - continue; - } else { - err("Invalid scheme."); - break loop; - } - break; - - case "scheme": - if (c && ALPHANUMERIC.test(c)) { - buffer += c.toLowerCase(); - } else if (":" == c) { - this._scheme = buffer; - buffer = ""; - if (stateOverride) { - break loop; - } - if (isRelativeScheme(this._scheme)) { - this._isRelative = true; - } - if ("file" == this._scheme) { - state = "relative"; - } else if (this._isRelative && base && base._scheme == this._scheme) { - state = "relative or authority"; - } else if (this._isRelative) { - state = "authority first slash"; - } else { - state = "scheme data"; - } - } else if (!stateOverride) { - buffer = ""; - cursor = 0; - state = "no scheme"; - continue; - } else if (EOF == c) { - break loop; - } else { - err("Code point not allowed in scheme: " + c); - break loop; - } - break; - - case "scheme data": - if ("?" == c) { - this._query = "?"; - state = "query"; - } else if ("#" == c) { - this._fragment = "#"; - state = "fragment"; - } else { - if (EOF != c && " " != c && "\n" != c && "\r" != c) { - this._schemeData += percentEscape(c); - } - } - break; - - case "no scheme": - if (!base || !isRelativeScheme(base._scheme)) { - err("Missing scheme."); - invalid.call(this); - } else { - state = "relative"; - continue; - } - break; - - case "relative or authority": - if ("/" == c && "/" == input[cursor + 1]) { - state = "authority ignore slashes"; - } else { - err("Expected /, got: " + c); - state = "relative"; - continue; - } - break; - - case "relative": - this._isRelative = true; - if ("file" != this._scheme) this._scheme = base._scheme; - if (EOF == c) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._username = base._username; - this._password = base._password; - break loop; - } else if ("/" == c || "\\" == c) { - if ("\\" == c) err("\\ is an invalid code point."); - state = "relative slash"; - } else if ("?" == c) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = "?"; - this._username = base._username; - this._password = base._password; - state = "query"; - } else if ("#" == c) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._fragment = "#"; - this._username = base._username; - this._password = base._password; - state = "fragment"; - } else { - var nextC = input[cursor + 1]; - var nextNextC = input[cursor + 2]; - if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - this._path = base._path.slice(); - this._path.pop(); - } - state = "relative path"; - continue; - } - break; - - case "relative slash": - if ("/" == c || "\\" == c) { - if ("\\" == c) { - err("\\ is an invalid code point."); - } - if ("file" == this._scheme) { - state = "file host"; - } else { - state = "authority ignore slashes"; - } - } else { - if ("file" != this._scheme) { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - } - state = "relative path"; - continue; - } - break; - - case "authority first slash": - if ("/" == c) { - state = "authority second slash"; - } else { - err("Expected '/', got: " + c); - state = "authority ignore slashes"; - continue; - } - break; - - case "authority second slash": - state = "authority ignore slashes"; - if ("/" != c) { - err("Expected '/', got: " + c); - continue; - } - break; - - case "authority ignore slashes": - if ("/" != c && "\\" != c) { - state = "authority"; - continue; - } else { - err("Expected authority, got: " + c); - } - break; - - case "authority": - if ("@" == c) { - if (seenAt) { - err("@ already seen."); - buffer += "%40"; - } - seenAt = true; - for (var i = 0; i < buffer.length; i++) { - var cp = buffer[i]; - if (" " == cp || "\n" == cp || "\r" == cp) { - err("Invalid whitespace in authority."); - continue; - } - if (":" == cp && null === this._password) { - this._password = ""; - continue; - } - var tempC = percentEscape(cp); - null !== this._password ? this._password += tempC : this._username += tempC; - } - buffer = ""; - } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { - cursor -= buffer.length; - buffer = ""; - state = "host"; - continue; - } else { - buffer += c; - } - break; - - case "file host": - if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { - if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) { - state = "relative path"; - } else if (buffer.length == 0) { - state = "relative path start"; - } else { - this._host = IDNAToASCII.call(this, buffer); - buffer = ""; - state = "relative path start"; - } - continue; - } else if (" " == c || "\n" == c || "\r" == c) { - err("Invalid whitespace in file host."); - } else { - buffer += c; - } - break; - - case "host": - case "hostname": - if (":" == c && !seenBracket) { - this._host = IDNAToASCII.call(this, buffer); - buffer = ""; - state = "port"; - if ("hostname" == stateOverride) { - break loop; - } - } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { - this._host = IDNAToASCII.call(this, buffer); - buffer = ""; - state = "relative path start"; - if (stateOverride) { - break loop; - } - continue; - } else if (" " != c && "\n" != c && "\r" != c) { - if ("[" == c) { - seenBracket = true; - } else if ("]" == c) { - seenBracket = false; - } - buffer += c; - } else { - err("Invalid code point in host/hostname: " + c); - } - break; - - case "port": - if (/[0-9]/.test(c)) { - buffer += c; - } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) { - if ("" != buffer) { - var temp = parseInt(buffer, 10); - if (temp != relative[this._scheme]) { - this._port = temp + ""; - } - buffer = ""; - } - if (stateOverride) { - break loop; - } - state = "relative path start"; - continue; - } else if (" " == c || "\n" == c || "\r" == c) { - err("Invalid code point in port: " + c); - } else { - invalid.call(this); - } - break; - - case "relative path start": - if ("\\" == c) err("'\\' not allowed in path."); - state = "relative path"; - if ("/" != c && "\\" != c) { - continue; - } - break; - - case "relative path": - if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) { - if ("\\" == c) { - err("\\ not allowed in relative path."); - } - var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { - buffer = tmp; - } - if (".." == buffer) { - this._path.pop(); - if ("/" != c && "\\" != c) { - this._path.push(""); - } - } else if ("." == buffer && "/" != c && "\\" != c) { - this._path.push(""); - } else if ("." != buffer) { - if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") { - buffer = buffer[0] + ":"; - } - this._path.push(buffer); - } - buffer = ""; - if ("?" == c) { - this._query = "?"; - state = "query"; - } else if ("#" == c) { - this._fragment = "#"; - state = "fragment"; - } - } else if (" " != c && "\n" != c && "\r" != c) { - buffer += percentEscape(c); - } - break; - - case "query": - if (!stateOverride && "#" == c) { - this._fragment = "#"; - state = "fragment"; - } else if (EOF != c && " " != c && "\n" != c && "\r" != c) { - this._query += percentEscapeQuery(c); - } - break; - - case "fragment": - if (EOF != c && " " != c && "\n" != c && "\r" != c) { - this._fragment += c; - } - break; - } - cursor++; - } - } - function clear() { - this._scheme = ""; - this._schemeData = ""; - this._username = ""; - this._password = null; - this._host = ""; - this._port = ""; - this._path = []; - this._query = ""; - this._fragment = ""; - this._isInvalid = false; - this._isRelative = false; - } - function jURL(url, base) { - if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base)); - this._url = url; - clear.call(this); - var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ""); - parse.call(this, input, null, base); - } - jURL.prototype = { - toString: function() { - return this.href; - }, - get href() { - if (this._isInvalid) return this._url; - var authority = ""; - if ("" != this._username || null != this._password) { - authority = this._username + (null != this._password ? ":" + this._password : "") + "@"; - } - return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment; - }, - set href(href) { - clear.call(this); - parse.call(this, href); - }, - get protocol() { - return this._scheme + ":"; - }, - set protocol(protocol) { - if (this._isInvalid) return; - parse.call(this, protocol + ":", "scheme start"); - }, - get host() { - return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host; - }, - set host(host) { - if (this._isInvalid || !this._isRelative) return; - parse.call(this, host, "host"); - }, - get hostname() { - return this._host; - }, - set hostname(hostname) { - if (this._isInvalid || !this._isRelative) return; - parse.call(this, hostname, "hostname"); - }, - get port() { - return this._port; - }, - set port(port) { - if (this._isInvalid || !this._isRelative) return; - parse.call(this, port, "port"); - }, - get pathname() { - return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData; - }, - set pathname(pathname) { - if (this._isInvalid || !this._isRelative) return; - this._path = []; - parse.call(this, pathname, "relative path start"); - }, - get search() { - return this._isInvalid || !this._query || "?" == this._query ? "" : this._query; - }, - set search(search) { - if (this._isInvalid || !this._isRelative) return; - this._query = "?"; - if ("?" == search[0]) search = search.slice(1); - parse.call(this, search, "query"); - }, - get hash() { - return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment; - }, - set hash(hash) { - if (this._isInvalid) return; - this._fragment = "#"; - if ("#" == hash[0]) hash = hash.slice(1); - parse.call(this, hash, "fragment"); - }, - get origin() { - var host; - if (this._isInvalid || !this._scheme) { - return ""; - } - switch (this._scheme) { - case "data": - case "file": - case "javascript": - case "mailto": - return "null"; - } - host = this.host; - if (!host) { - return ""; - } - return this._scheme + "://" + host; - } - }; - var OriginalURL = scope.URL; - if (OriginalURL) { - jURL.createObjectURL = function(blob) { - return OriginalURL.createObjectURL.apply(OriginalURL, arguments); - }; - jURL.revokeObjectURL = function(url) { - OriginalURL.revokeObjectURL(url); - }; - } - scope.URL = jURL; -})(self); - -if (typeof WeakMap === "undefined") { - (function() { - var defineProperty = Object.defineProperty; - var counter = Date.now() % 1e9; - var WeakMap = function() { - this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); - }; - WeakMap.prototype = { - set: function(key, value) { - var entry = key[this.name]; - if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { - value: [ key, value ], - writable: true - }); - return this; - }, - get: function(key) { - var entry; - return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; - }, - "delete": function(key) { - var entry = key[this.name]; - if (!entry || entry[0] !== key) return false; - entry[0] = entry[1] = undefined; - return true; - }, - has: function(key) { - var entry = key[this.name]; - if (!entry) return false; - return entry[0] === key; - } - }; - window.WeakMap = WeakMap; - })(); -} - -(function(global) { - if (global.JsMutationObserver) { - return; - } - var registrationsTable = new WeakMap(); - var setImmediate; - if (/Trident|Edge/.test(navigator.userAgent)) { - setImmediate = setTimeout; - } else if (window.setImmediate) { - setImmediate = window.setImmediate; - } else { - var setImmediateQueue = []; - var sentinel = String(Math.random()); - window.addEventListener("message", function(e) { - if (e.data === sentinel) { - var queue = setImmediateQueue; - setImmediateQueue = []; - queue.forEach(function(func) { - func(); - }); - } - }); - setImmediate = function(func) { - setImmediateQueue.push(func); - window.postMessage(sentinel, "*"); - }; - } - var isScheduled = false; - var scheduledObservers = []; - function scheduleCallback(observer) { - scheduledObservers.push(observer); - if (!isScheduled) { - isScheduled = true; - setImmediate(dispatchCallbacks); - } - } - function wrapIfNeeded(node) { - return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; - } - function dispatchCallbacks() { - isScheduled = false; - var observers = scheduledObservers; - scheduledObservers = []; - observers.sort(function(o1, o2) { - return o1.uid_ - o2.uid_; - }); - var anyNonEmpty = false; - observers.forEach(function(observer) { - var queue = observer.takeRecords(); - removeTransientObserversFor(observer); - if (queue.length) { - observer.callback_(queue, observer); - anyNonEmpty = true; - } - }); - if (anyNonEmpty) dispatchCallbacks(); - } - function removeTransientObserversFor(observer) { - observer.nodes_.forEach(function(node) { - var registrations = registrationsTable.get(node); - if (!registrations) return; - registrations.forEach(function(registration) { - if (registration.observer === observer) registration.removeTransientObservers(); - }); - }); - } - function forEachAncestorAndObserverEnqueueRecord(target, callback) { - for (var node = target; node; node = node.parentNode) { - var registrations = registrationsTable.get(node); - if (registrations) { - for (var j = 0; j < registrations.length; j++) { - var registration = registrations[j]; - var options = registration.options; - if (node !== target && !options.subtree) continue; - var record = callback(options); - if (record) registration.enqueue(record); - } - } - } - } - var uidCounter = 0; - function JsMutationObserver(callback) { - this.callback_ = callback; - this.nodes_ = []; - this.records_ = []; - this.uid_ = ++uidCounter; - } - JsMutationObserver.prototype = { - observe: function(target, options) { - target = wrapIfNeeded(target); - if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { - throw new SyntaxError(); - } - var registrations = registrationsTable.get(target); - if (!registrations) registrationsTable.set(target, registrations = []); - var registration; - for (var i = 0; i < registrations.length; i++) { - if (registrations[i].observer === this) { - registration = registrations[i]; - registration.removeListeners(); - registration.options = options; - break; - } - } - if (!registration) { - registration = new Registration(this, target, options); - registrations.push(registration); - this.nodes_.push(target); - } - registration.addListeners(); - }, - disconnect: function() { - this.nodes_.forEach(function(node) { - var registrations = registrationsTable.get(node); - for (var i = 0; i < registrations.length; i++) { - var registration = registrations[i]; - if (registration.observer === this) { - registration.removeListeners(); - registrations.splice(i, 1); - break; - } - } - }, this); - this.records_ = []; - }, - takeRecords: function() { - var copyOfRecords = this.records_; - this.records_ = []; - return copyOfRecords; - } - }; - function MutationRecord(type, target) { - this.type = type; - this.target = target; - this.addedNodes = []; - this.removedNodes = []; - this.previousSibling = null; - this.nextSibling = null; - this.attributeName = null; - this.attributeNamespace = null; - this.oldValue = null; - } - function copyMutationRecord(original) { - var record = new MutationRecord(original.type, original.target); - record.addedNodes = original.addedNodes.slice(); - record.removedNodes = original.removedNodes.slice(); - record.previousSibling = original.previousSibling; - record.nextSibling = original.nextSibling; - record.attributeName = original.attributeName; - record.attributeNamespace = original.attributeNamespace; - record.oldValue = original.oldValue; - return record; - } - var currentRecord, recordWithOldValue; - function getRecord(type, target) { - return currentRecord = new MutationRecord(type, target); - } - function getRecordWithOldValue(oldValue) { - if (recordWithOldValue) return recordWithOldValue; - recordWithOldValue = copyMutationRecord(currentRecord); - recordWithOldValue.oldValue = oldValue; - return recordWithOldValue; - } - function clearRecords() { - currentRecord = recordWithOldValue = undefined; - } - function recordRepresentsCurrentMutation(record) { - return record === recordWithOldValue || record === currentRecord; - } - function selectRecord(lastRecord, newRecord) { - if (lastRecord === newRecord) return lastRecord; - if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; - return null; - } - function Registration(observer, target, options) { - this.observer = observer; - this.target = target; - this.options = options; - this.transientObservedNodes = []; - } - Registration.prototype = { - enqueue: function(record) { - var records = this.observer.records_; - var length = records.length; - if (records.length > 0) { - var lastRecord = records[length - 1]; - var recordToReplaceLast = selectRecord(lastRecord, record); - if (recordToReplaceLast) { - records[length - 1] = recordToReplaceLast; - return; - } - } else { - scheduleCallback(this.observer); - } - records[length] = record; - }, - addListeners: function() { - this.addListeners_(this.target); - }, - addListeners_: function(node) { - var options = this.options; - if (options.attributes) node.addEventListener("DOMAttrModified", this, true); - if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); - if (options.childList) node.addEventListener("DOMNodeInserted", this, true); - if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); - }, - removeListeners: function() { - this.removeListeners_(this.target); - }, - removeListeners_: function(node) { - var options = this.options; - if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); - if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); - if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); - if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); - }, - addTransientObserver: function(node) { - if (node === this.target) return; - this.addListeners_(node); - this.transientObservedNodes.push(node); - var registrations = registrationsTable.get(node); - if (!registrations) registrationsTable.set(node, registrations = []); - registrations.push(this); - }, - removeTransientObservers: function() { - var transientObservedNodes = this.transientObservedNodes; - this.transientObservedNodes = []; - transientObservedNodes.forEach(function(node) { - this.removeListeners_(node); - var registrations = registrationsTable.get(node); - for (var i = 0; i < registrations.length; i++) { - if (registrations[i] === this) { - registrations.splice(i, 1); - break; - } - } - }, this); - }, - handleEvent: function(e) { - e.stopImmediatePropagation(); - switch (e.type) { - case "DOMAttrModified": - var name = e.attrName; - var namespace = e.relatedNode.namespaceURI; - var target = e.target; - var record = new getRecord("attributes", target); - record.attributeName = name; - record.attributeNamespace = namespace; - var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; - forEachAncestorAndObserverEnqueueRecord(target, function(options) { - if (!options.attributes) return; - if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { - return; - } - if (options.attributeOldValue) return getRecordWithOldValue(oldValue); - return record; - }); - break; - - case "DOMCharacterDataModified": - var target = e.target; - var record = getRecord("characterData", target); - var oldValue = e.prevValue; - forEachAncestorAndObserverEnqueueRecord(target, function(options) { - if (!options.characterData) return; - if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); - return record; - }); - break; - - case "DOMNodeRemoved": - this.addTransientObserver(e.target); - - case "DOMNodeInserted": - var changedNode = e.target; - var addedNodes, removedNodes; - if (e.type === "DOMNodeInserted") { - addedNodes = [ changedNode ]; - removedNodes = []; - } else { - addedNodes = []; - removedNodes = [ changedNode ]; - } - var previousSibling = changedNode.previousSibling; - var nextSibling = changedNode.nextSibling; - var record = getRecord("childList", e.target.parentNode); - record.addedNodes = addedNodes; - record.removedNodes = removedNodes; - record.previousSibling = previousSibling; - record.nextSibling = nextSibling; - forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { - if (!options.childList) return; - return record; - }); - } - clearRecords(); - } - }; - global.JsMutationObserver = JsMutationObserver; - if (!global.MutationObserver) { - global.MutationObserver = JsMutationObserver; - JsMutationObserver._isPolyfilled = true; - } -})(self); - -(function() { - var needsTemplate = typeof HTMLTemplateElement === "undefined"; - if (/Trident/.test(navigator.userAgent)) { - (function() { - var importNode = document.importNode; - document.importNode = function() { - var n = importNode.apply(document, arguments); - if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - var f = document.createDocumentFragment(); - f.appendChild(n); - return f; - } else { - return n; - } - }; - })(); - } - var needsCloning = function() { - if (!needsTemplate) { - var t = document.createElement("template"); - var t2 = document.createElement("template"); - t2.content.appendChild(document.createElement("div")); - t.content.appendChild(t2); - var clone = t.cloneNode(true); - return clone.content.childNodes.length === 0 || clone.content.firstChild.content.childNodes.length === 0; - } - }(); - var TEMPLATE_TAG = "template"; - var TemplateImpl = function() {}; - if (needsTemplate) { - var contentDoc = document.implementation.createHTMLDocument("template"); - var canDecorate = true; - var templateStyle = document.createElement("style"); - templateStyle.textContent = TEMPLATE_TAG + "{display:none;}"; - var head = document.head; - head.insertBefore(templateStyle, head.firstElementChild); - TemplateImpl.prototype = Object.create(HTMLElement.prototype); - TemplateImpl.decorate = function(template) { - if (template.content) { - return; - } - template.content = contentDoc.createDocumentFragment(); - var child; - while (child = template.firstChild) { - template.content.appendChild(child); - } - template.cloneNode = function(deep) { - return TemplateImpl.cloneNode(this, deep); - }; - if (canDecorate) { - try { - Object.defineProperty(template, "innerHTML", { - get: function() { - var o = ""; - for (var e = this.content.firstChild; e; e = e.nextSibling) { - o += e.outerHTML || escapeData(e.data); - } - return o; - }, - set: function(text) { - contentDoc.body.innerHTML = text; - TemplateImpl.bootstrap(contentDoc); - while (this.content.firstChild) { - this.content.removeChild(this.content.firstChild); - } - while (contentDoc.body.firstChild) { - this.content.appendChild(contentDoc.body.firstChild); - } - }, - configurable: true - }); - } catch (err) { - canDecorate = false; - } - } - TemplateImpl.bootstrap(template.content); - }; - TemplateImpl.bootstrap = function(doc) { - var templates = doc.querySelectorAll(TEMPLATE_TAG); - for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) { - TemplateImpl.decorate(t); - } - }; - document.addEventListener("DOMContentLoaded", function() { - TemplateImpl.bootstrap(document); - }); - var createElement = document.createElement; - document.createElement = function() { - "use strict"; - var el = createElement.apply(document, arguments); - if (el.localName === "template") { - TemplateImpl.decorate(el); - } - return el; - }; - var escapeDataRegExp = /[&\u00A0<>]/g; - function escapeReplace(c) { - switch (c) { - case "&": - return "&"; - - case "<": - return "<"; - - case ">": - return ">"; - - case " ": - return " "; - } - } - function escapeData(s) { - return s.replace(escapeDataRegExp, escapeReplace); - } - } - if (needsTemplate || needsCloning) { - var nativeCloneNode = Node.prototype.cloneNode; - TemplateImpl.cloneNode = function(template, deep) { - var clone = nativeCloneNode.call(template, false); - if (this.decorate) { - this.decorate(clone); - } - if (deep) { - clone.content.appendChild(nativeCloneNode.call(template.content, true)); - this.fixClonedDom(clone.content, template.content); - } - return clone; - }; - TemplateImpl.fixClonedDom = function(clone, source) { - if (!source.querySelectorAll) return; - var s$ = source.querySelectorAll(TEMPLATE_TAG); - var t$ = clone.querySelectorAll(TEMPLATE_TAG); - for (var i = 0, l = t$.length, t, s; i < l; i++) { - s = s$[i]; - t = t$[i]; - if (this.decorate) { - this.decorate(s); - } - t.parentNode.replaceChild(s.cloneNode(true), t); - } - }; - var originalImportNode = document.importNode; - Node.prototype.cloneNode = function(deep) { - var dom = nativeCloneNode.call(this, deep); - if (deep) { - TemplateImpl.fixClonedDom(dom, this); - } - return dom; - }; - document.importNode = function(element, deep) { - if (element.localName === TEMPLATE_TAG) { - return TemplateImpl.cloneNode(element, deep); - } else { - var dom = originalImportNode.call(document, element, deep); - if (deep) { - TemplateImpl.fixClonedDom(dom, element); - } - return dom; - } - }; - if (needsCloning) { - HTMLTemplateElement.prototype.cloneNode = function(deep) { - return TemplateImpl.cloneNode(this, deep); - }; - } - } - if (needsTemplate) { - window.HTMLTemplateElement = TemplateImpl; - } -})(); - -(function(scope) { - "use strict"; - if (!window.performance) { - var start = Date.now(); - window.performance = { - now: function() { - return Date.now() - start; - } - }; - } - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = function() { - var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; - return nativeRaf ? function(callback) { - return nativeRaf(function() { - callback(performance.now()); - }); - } : function(callback) { - return window.setTimeout(callback, 1e3 / 60); - }; - }(); - } - if (!window.cancelAnimationFrame) { - window.cancelAnimationFrame = function() { - return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) { - clearTimeout(id); - }; - }(); - } - var workingDefaultPrevented = function() { - var e = document.createEvent("Event"); - e.initEvent("foo", true, true); - e.preventDefault(); - return e.defaultPrevented; - }(); - if (!workingDefaultPrevented) { - var origPreventDefault = Event.prototype.preventDefault; - Event.prototype.preventDefault = function() { - if (!this.cancelable) { - return; - } - origPreventDefault.call(this); - Object.defineProperty(this, "defaultPrevented", { - get: function() { - return true; - }, - configurable: true - }); - }; - } - var isIE = /Trident/.test(navigator.userAgent); - if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") { - window.CustomEvent = function(inType, params) { - params = params || {}; - var e = document.createEvent("CustomEvent"); - e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); - return e; - }; - window.CustomEvent.prototype = window.Event.prototype; - } - if (!window.Event || isIE && typeof window.Event !== "function") { - var origEvent = window.Event; - window.Event = function(inType, params) { - params = params || {}; - var e = document.createEvent("Event"); - e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable)); - return e; - }; - window.Event.prototype = origEvent.prototype; - } -})(window.WebComponents); - -window.HTMLImports = window.HTMLImports || { - flags: {} -}; - -(function(scope) { - var IMPORT_LINK_TYPE = "import"; - var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link")); - var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill); - var wrap = function(node) { - return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node; - }; - var rootDocument = wrap(document); - var currentScriptDescriptor = { - get: function() { - var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null); - return wrap(script); - }, - configurable: true - }; - Object.defineProperty(document, "_currentScript", currentScriptDescriptor); - Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor); - var isIE = /Trident/.test(navigator.userAgent); - function whenReady(callback, doc) { - doc = doc || rootDocument; - whenDocumentReady(function() { - watchImportsLoad(callback, doc); - }, doc); - } - var requiredReadyState = isIE ? "complete" : "interactive"; - var READY_EVENT = "readystatechange"; - function isDocumentReady(doc) { - return doc.readyState === "complete" || doc.readyState === requiredReadyState; - } - function whenDocumentReady(callback, doc) { - if (!isDocumentReady(doc)) { - var checkReady = function() { - if (doc.readyState === "complete" || doc.readyState === requiredReadyState) { - doc.removeEventListener(READY_EVENT, checkReady); - whenDocumentReady(callback, doc); - } - }; - doc.addEventListener(READY_EVENT, checkReady); - } else if (callback) { - callback(); - } - } - function markTargetLoaded(event) { - event.target.__loaded = true; - } - function watchImportsLoad(callback, doc) { - var imports = doc.querySelectorAll("link[rel=import]"); - var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = []; - function checkDone() { - if (parsedCount == importCount && callback) { - callback({ - allImports: imports, - loadedImports: newImports, - errorImports: errorImports - }); - } - } - function loadedImport(e) { - markTargetLoaded(e); - newImports.push(this); - parsedCount++; - checkDone(); - } - function errorLoadingImport(e) { - errorImports.push(this); - parsedCount++; - checkDone(); - } - if (importCount) { - for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) { - if (isImportLoaded(imp)) { - newImports.push(this); - parsedCount++; - checkDone(); - } else { - imp.addEventListener("load", loadedImport); - imp.addEventListener("error", errorLoadingImport); - } - } - } else { - checkDone(); - } - } - function isImportLoaded(link) { - return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed; - } - if (useNative) { - new MutationObserver(function(mxns) { - for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) { - if (m.addedNodes) { - handleImports(m.addedNodes); - } - } - }).observe(document.head, { - childList: true - }); - function handleImports(nodes) { - for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { - if (isImport(n)) { - handleImport(n); - } - } - } - function isImport(element) { - return element.localName === "link" && element.rel === "import"; - } - function handleImport(element) { - var loaded = element.import; - if (loaded) { - markTargetLoaded({ - target: element - }); - } else { - element.addEventListener("load", markTargetLoaded); - element.addEventListener("error", markTargetLoaded); - } - } - (function() { - if (document.readyState === "loading") { - var imports = document.querySelectorAll("link[rel=import]"); - for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) { - handleImport(imp); - } - } - })(); - } - whenReady(function(detail) { - window.HTMLImports.ready = true; - window.HTMLImports.readyTime = new Date().getTime(); - var evt = rootDocument.createEvent("CustomEvent"); - evt.initCustomEvent("HTMLImportsLoaded", true, true, detail); - rootDocument.dispatchEvent(evt); - }); - scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE; - scope.useNative = useNative; - scope.rootDocument = rootDocument; - scope.whenReady = whenReady; - scope.isIE = isIE; -})(window.HTMLImports); - -(function(scope) { - var modules = []; - var addModule = function(module) { - modules.push(module); - }; - var initializeModules = function() { - modules.forEach(function(module) { - module(scope); - }); - }; - scope.addModule = addModule; - scope.initializeModules = initializeModules; -})(window.HTMLImports); - -window.HTMLImports.addModule(function(scope) { - var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g; - var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g; - var path = { - resolveUrlsInStyle: function(style, linkUrl) { - var doc = style.ownerDocument; - var resolver = doc.createElement("a"); - style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver); - return style; - }, - resolveUrlsInCssText: function(cssText, linkUrl, urlObj) { - var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP); - r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP); - return r; - }, - replaceUrls: function(text, urlObj, linkUrl, regexp) { - return text.replace(regexp, function(m, pre, url, post) { - var urlPath = url.replace(/["']/g, ""); - if (linkUrl) { - urlPath = new URL(urlPath, linkUrl).href; - } - urlObj.href = urlPath; - urlPath = urlObj.href; - return pre + "'" + urlPath + "'" + post; - }); - } - }; - scope.path = path; -}); - -window.HTMLImports.addModule(function(scope) { - var xhr = { - async: true, - ok: function(request) { - return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0; - }, - load: function(url, next, nextContext) { - var request = new XMLHttpRequest(); - if (scope.flags.debug || scope.flags.bust) { - url += "?" + Math.random(); - } - request.open("GET", url, xhr.async); - request.addEventListener("readystatechange", function(e) { - if (request.readyState === 4) { - var redirectedUrl = null; - try { - var locationHeader = request.getResponseHeader("Location"); - if (locationHeader) { - redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader; - } - } catch (e) { - console.error(e.message); - } - next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl); - } - }); - request.send(); - return request; - }, - loadDocument: function(url, next, nextContext) { - this.load(url, next, nextContext).responseType = "document"; - } - }; - scope.xhr = xhr; -}); - -window.HTMLImports.addModule(function(scope) { - var xhr = scope.xhr; - var flags = scope.flags; - var Loader = function(onLoad, onComplete) { - this.cache = {}; - this.onload = onLoad; - this.oncomplete = onComplete; - this.inflight = 0; - this.pending = {}; - }; - Loader.prototype = { - addNodes: function(nodes) { - this.inflight += nodes.length; - for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { - this.require(n); - } - this.checkDone(); - }, - addNode: function(node) { - this.inflight++; - this.require(node); - this.checkDone(); - }, - require: function(elt) { - var url = elt.src || elt.href; - elt.__nodeUrl = url; - if (!this.dedupe(url, elt)) { - this.fetch(url, elt); - } - }, - dedupe: function(url, elt) { - if (this.pending[url]) { - this.pending[url].push(elt); - return true; - } - var resource; - if (this.cache[url]) { - this.onload(url, elt, this.cache[url]); - this.tail(); - return true; - } - this.pending[url] = [ elt ]; - return false; - }, - fetch: function(url, elt) { - flags.load && console.log("fetch", url, elt); - if (!url) { - setTimeout(function() { - this.receive(url, elt, { - error: "href must be specified" - }, null); - }.bind(this), 0); - } else if (url.match(/^data:/)) { - var pieces = url.split(","); - var header = pieces[0]; - var body = pieces[1]; - if (header.indexOf(";base64") > -1) { - body = atob(body); - } else { - body = decodeURIComponent(body); - } - setTimeout(function() { - this.receive(url, elt, null, body); - }.bind(this), 0); - } else { - var receiveXhr = function(err, resource, redirectedUrl) { - this.receive(url, elt, err, resource, redirectedUrl); - }.bind(this); - xhr.load(url, receiveXhr); - } - }, - receive: function(url, elt, err, resource, redirectedUrl) { - this.cache[url] = resource; - var $p = this.pending[url]; - for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { - this.onload(url, p, resource, err, redirectedUrl); - this.tail(); - } - this.pending[url] = null; - }, - tail: function() { - --this.inflight; - this.checkDone(); - }, - checkDone: function() { - if (!this.inflight) { - this.oncomplete(); - } - } - }; - scope.Loader = Loader; -}); - -window.HTMLImports.addModule(function(scope) { - var Observer = function(addCallback) { - this.addCallback = addCallback; - this.mo = new MutationObserver(this.handler.bind(this)); - }; - Observer.prototype = { - handler: function(mutations) { - for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) { - if (m.type === "childList" && m.addedNodes.length) { - this.addedNodes(m.addedNodes); - } - } - }, - addedNodes: function(nodes) { - if (this.addCallback) { - this.addCallback(nodes); - } - for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) { - if (n.children && n.children.length) { - this.addedNodes(n.children); - } - } - }, - observe: function(root) { - this.mo.observe(root, { - childList: true, - subtree: true - }); - } - }; - scope.Observer = Observer; -}); - -window.HTMLImports.addModule(function(scope) { - var path = scope.path; - var rootDocument = scope.rootDocument; - var flags = scope.flags; - var isIE = scope.isIE; - var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; - var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]"; - var importParser = { - documentSelectors: IMPORT_SELECTOR, - importsSelectors: [ IMPORT_SELECTOR, "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 next = this.nextToParse(); - if (next) { - this.parse(next); - } - }, - parse: function(elt) { - if (this.isParsed(elt)) { - flags.parse && console.log("[%s] is already parsed", elt.localName); - return; - } - var fn = this[this.map[elt.localName]]; - if (fn) { - this.markParsing(elt); - fn.call(this, elt); - } - }, - parseDynamic: function(elt, quiet) { - this.dynamicElements.push(elt); - if (!quiet) { - this.parseNext(); - } - }, - markParsing: function(elt) { - flags.parse && console.log("parsing", elt); - this.parsingElement = elt; - }, - markParsingComplete: function(elt) { - elt.__importParsed = true; - this.markDynamicParsingComplete(elt); - if (elt.__importElement) { - elt.__importElement.__importParsed = true; - this.markDynamicParsingComplete(elt.__importElement); - } - this.parsingElement = null; - flags.parse && console.log("completed", elt); - }, - markDynamicParsingComplete: function(elt) { - var i = this.dynamicElements.indexOf(elt); - if (i >= 0) { - this.dynamicElements.splice(i, 1); - } - }, - parseImport: function(elt) { - elt.import = elt.__doc; - if (window.HTMLImports.__importsParsingHook) { - window.HTMLImports.__importsParsingHook(elt); - } - if (elt.import) { - elt.import.__importParsed = true; - } - this.markParsingComplete(elt); - if (elt.__resource && !elt.__error) { - elt.dispatchEvent(new CustomEvent("load", { - bubbles: false - })); - } else { - elt.dispatchEvent(new CustomEvent("error", { - bubbles: false - })); - } - if (elt.__pending) { - var fn; - while (elt.__pending.length) { - fn = elt.__pending.shift(); - if (fn) { - fn({ - target: elt - }); - } - } - } - this.parseNext(); - }, - parseLink: function(linkElt) { - if (nodeIsImport(linkElt)) { - this.parseImport(linkElt); - } else { - linkElt.href = linkElt.href; - this.parseGeneric(linkElt); - } - }, - parseStyle: function(elt) { - var src = elt; - elt = cloneStyle(elt); - src.__appliedElement = elt; - elt.__importElement = src; - this.parseGeneric(elt); - }, - parseGeneric: function(elt) { - this.trackElement(elt); - this.addElementToDocument(elt); - }, - rootImportForElement: function(elt) { - var n = elt; - while (n.ownerDocument.__importLink) { - n = n.ownerDocument.__importLink; - } - return n; - }, - addElementToDocument: function(elt) { - var port = this.rootImportForElement(elt.__importElement || elt); - port.parentNode.insertBefore(elt, port); - }, - trackElement: function(elt, callback) { - var self = this; - var done = function(e) { - elt.removeEventListener("load", done); - elt.removeEventListener("error", done); - if (callback) { - callback(e); - } - self.markParsingComplete(elt); - self.parseNext(); - }; - elt.addEventListener("load", done); - elt.addEventListener("error", done); - if (isIE && elt.localName === "style") { - var fakeLoad = false; - if (elt.textContent.indexOf("@import") == -1) { - fakeLoad = true; - } else if (elt.sheet) { - fakeLoad = true; - var csr = elt.sheet.cssRules; - var len = csr ? csr.length : 0; - for (var i = 0, r; i < len && (r = csr[i]); i++) { - if (r.type === CSSRule.IMPORT_RULE) { - fakeLoad = fakeLoad && Boolean(r.styleSheet); - } - } - } - if (fakeLoad) { - setTimeout(function() { - elt.dispatchEvent(new CustomEvent("load", { - bubbles: false - })); - }); - } - } - }, - parseScript: function(scriptElt) { - var script = document.createElement("script"); - script.__importElement = scriptElt; - script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt); - scope.currentScript = scriptElt; - this.trackElement(script, function(e) { - if (script.parentNode) { - script.parentNode.removeChild(script); - } - scope.currentScript = null; - }); - this.addElementToDocument(script); - }, - nextToParse: function() { - this._mayParse = []; - return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic()); - }, - nextToParseInDoc: function(doc, link) { - if (doc && this._mayParse.indexOf(doc) < 0) { - this._mayParse.push(doc); - var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); - for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { - if (!this.isParsed(n)) { - if (this.hasResource(n)) { - return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n; - } else { - return; - } - } - } - } - return link; - }, - nextToParseDynamic: function() { - return this.dynamicElements[0]; - }, - parseSelectorsForNode: function(node) { - var doc = node.ownerDocument || node; - return doc === rootDocument ? this.documentSelectors : this.importsSelectors; - }, - isParsed: function(node) { - return node.__importParsed; - }, - needsDynamicParsing: function(elt) { - return this.dynamicElements.indexOf(elt) >= 0; - }, - hasResource: function(node) { - if (nodeIsImport(node) && node.__doc === undefined) { - return false; - } - return true; - } - }; - function nodeIsImport(elt) { - return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE; - } - function generateScriptDataUrl(script) { - var scriptContent = generateScriptContent(script); - return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent); - } - function generateScriptContent(script) { - return script.textContent + generateSourceMapHint(script); - } - function generateSourceMapHint(script) { - var owner = script.ownerDocument; - owner.__importedScripts = owner.__importedScripts || 0; - var moniker = script.ownerDocument.baseURI; - var num = owner.__importedScripts ? "-" + owner.__importedScripts : ""; - owner.__importedScripts++; - return "\n//# sourceURL=" + moniker + num + ".js\n"; - } - function cloneStyle(style) { - var clone = style.ownerDocument.createElement("style"); - clone.textContent = style.textContent; - path.resolveUrlsInStyle(clone); - return clone; - } - scope.parser = importParser; - scope.IMPORT_SELECTOR = IMPORT_SELECTOR; -}); - -window.HTMLImports.addModule(function(scope) { - var flags = scope.flags; - var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; - var IMPORT_SELECTOR = scope.IMPORT_SELECTOR; - var rootDocument = scope.rootDocument; - var Loader = scope.Loader; - var Observer = scope.Observer; - var parser = scope.parser; - var importer = { - documents: {}, - documentPreloadSelectors: IMPORT_SELECTOR, - importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","), - loadNode: function(node) { - importLoader.addNode(node); - }, - loadSubtree: function(parent) { - var nodes = this.marshalNodes(parent); - importLoader.addNodes(nodes); - }, - marshalNodes: function(parent) { - return parent.querySelectorAll(this.loadSelectorsForNode(parent)); - }, - loadSelectorsForNode: function(node) { - var doc = node.ownerDocument || node; - return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors; - }, - loaded: function(url, elt, resource, err, redirectedUrl) { - flags.load && console.log("loaded", url, elt); - elt.__resource = resource; - elt.__error = err; - if (isImportLink(elt)) { - var doc = this.documents[url]; - if (doc === undefined) { - doc = err ? null : makeDocument(resource, redirectedUrl || url); - if (doc) { - doc.__importLink = elt; - this.bootDocument(doc); - } - this.documents[url] = doc; - } - elt.__doc = doc; - } - parser.parseNext(); - }, - bootDocument: function(doc) { - this.loadSubtree(doc); - this.observer.observe(doc); - parser.parseNext(); - }, - loadedAll: function() { - parser.parseNext(); - } - }; - var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer)); - importer.observer = new Observer(); - function isImportLink(elt) { - return isLinkRel(elt, IMPORT_LINK_TYPE); - } - function isLinkRel(elt, rel) { - return elt.localName === "link" && elt.getAttribute("rel") === rel; - } - function hasBaseURIAccessor(doc) { - return !!Object.getOwnPropertyDescriptor(doc, "baseURI"); - } - function makeDocument(resource, url) { - var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE); - doc._URL = url; - var base = doc.createElement("base"); - base.setAttribute("href", url); - if (!doc.baseURI && !hasBaseURIAccessor(doc)) { - Object.defineProperty(doc, "baseURI", { - value: url - }); - } - var meta = doc.createElement("meta"); - meta.setAttribute("charset", "utf-8"); - doc.head.appendChild(meta); - doc.head.appendChild(base); - doc.body.innerHTML = resource; - if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) { - HTMLTemplateElement.bootstrap(doc); - } - return doc; - } - if (!document.baseURI) { - var baseURIDescriptor = { - get: function() { - var base = document.querySelector("base"); - return base ? base.href : window.location.href; - }, - configurable: true - }; - Object.defineProperty(document, "baseURI", baseURIDescriptor); - Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor); - } - scope.importer = importer; - scope.importLoader = importLoader; -}); - -window.HTMLImports.addModule(function(scope) { - var parser = scope.parser; - var importer = scope.importer; - var dynamic = { - added: function(nodes) { - var owner, parsed, loading; - for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { - if (!owner) { - owner = n.ownerDocument; - parsed = parser.isParsed(owner); - } - loading = this.shouldLoadNode(n); - if (loading) { - importer.loadNode(n); - } - if (this.shouldParseNode(n) && parsed) { - parser.parseDynamic(n, loading); - } - } - }, - shouldLoadNode: function(node) { - return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node)); - }, - shouldParseNode: function(node) { - return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node)); - } - }; - importer.observer.addCallback = dynamic.added.bind(dynamic); - var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; -}); - -(function(scope) { - var initializeModules = scope.initializeModules; - var isIE = scope.isIE; - if (scope.useNative) { - return; - } - initializeModules(); - var rootDocument = scope.rootDocument; - function bootstrap() { - window.HTMLImports.importer.bootDocument(rootDocument); - } - if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) { - bootstrap(); - } else { - document.addEventListener("DOMContentLoaded", bootstrap); - } -})(window.HTMLImports); - -window.CustomElements = window.CustomElements || { - flags: {} -}; - -(function(scope) { - var flags = scope.flags; - var modules = []; - var addModule = function(module) { - modules.push(module); - }; - var initializeModules = function() { - modules.forEach(function(module) { - module(scope); - }); - }; - scope.addModule = addModule; - scope.initializeModules = initializeModules; - scope.hasNative = Boolean(document.registerElement); - scope.isIE = /Trident/.test(navigator.userAgent); - scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative); -})(window.CustomElements); - -window.CustomElements.addModule(function(scope) { - var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none"; - function forSubtree(node, cb) { - findAllElements(node, function(e) { - if (cb(e)) { - return true; - } - forRoots(e, cb); - }); - forRoots(node, cb); - } - function findAllElements(node, find, data) { - var e = node.firstElementChild; - if (!e) { - e = node.firstChild; - while (e && e.nodeType !== Node.ELEMENT_NODE) { - e = e.nextSibling; - } - } - while (e) { - if (find(e, data) !== true) { - findAllElements(e, find, data); - } - e = e.nextElementSibling; - } - return null; - } - function forRoots(node, cb) { - var root = node.shadowRoot; - while (root) { - forSubtree(root, cb); - root = root.olderShadowRoot; - } - } - function forDocumentTree(doc, cb) { - _forDocumentTree(doc, cb, []); - } - function _forDocumentTree(doc, cb, processingDocuments) { - doc = window.wrap(doc); - if (processingDocuments.indexOf(doc) >= 0) { - return; - } - processingDocuments.push(doc); - var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]"); - for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) { - if (n.import) { - _forDocumentTree(n.import, cb, processingDocuments); - } - } - cb(doc); - } - scope.forDocumentTree = forDocumentTree; - scope.forSubtree = forSubtree; -}); - -window.CustomElements.addModule(function(scope) { - var flags = scope.flags; - var forSubtree = scope.forSubtree; - var forDocumentTree = scope.forDocumentTree; - function addedNode(node, isAttached) { - return added(node, isAttached) || addedSubtree(node, isAttached); - } - function added(node, isAttached) { - if (scope.upgrade(node, isAttached)) { - return true; - } - if (isAttached) { - attached(node); - } - } - function addedSubtree(node, isAttached) { - forSubtree(node, function(e) { - if (added(e, isAttached)) { - return true; - } - }); - } - var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"]; - scope.hasPolyfillMutations = hasThrottledAttached; - scope.hasThrottledAttached = hasThrottledAttached; - var isPendingMutations = false; - var pendingMutations = []; - function deferMutation(fn) { - pendingMutations.push(fn); - if (!isPendingMutations) { - isPendingMutations = true; - setTimeout(takeMutations); - } - } - function takeMutations() { - isPendingMutations = false; - var $p = pendingMutations; - for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { - p(); - } - pendingMutations = []; - } - function attached(element) { - if (hasThrottledAttached) { - deferMutation(function() { - _attached(element); - }); - } else { - _attached(element); - } - } - function _attached(element) { - if (element.__upgraded__ && !element.__attached) { - element.__attached = true; - if (element.attachedCallback) { - element.attachedCallback(); - } - } - } - function detachedNode(node) { - detached(node); - forSubtree(node, function(e) { - detached(e); - }); - } - function detached(element) { - if (hasThrottledAttached) { - deferMutation(function() { - _detached(element); - }); - } else { - _detached(element); - } - } - function _detached(element) { - if (element.__upgraded__ && element.__attached) { - element.__attached = false; - if (element.detachedCallback) { - element.detachedCallback(); - } - } - } - function inDocument(element) { - var p = element; - var doc = window.wrap(document); - while (p) { - if (p == doc) { - return true; - } - p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host; - } - } - function watchShadow(node) { - if (node.shadowRoot && !node.shadowRoot.__watched) { - flags.dom && console.log("watching shadow-root for: ", node.localName); - var root = node.shadowRoot; - while (root) { - observe(root); - root = root.olderShadowRoot; - } - } - } - function handler(root, mutations) { - if (flags.dom) { - var mx = mutations[0]; - if (mx && mx.type === "childList" && mx.addedNodes) { - if (mx.addedNodes) { - var d = mx.addedNodes[0]; - while (d && d !== document && !d.host) { - d = d.parentNode; - } - var u = d && (d.URL || d._URL || d.host && d.host.localName) || ""; - u = u.split("/?").shift().split("/").pop(); - } - } - console.group("mutations (%d) [%s]", mutations.length, u || ""); - } - var isAttached = inDocument(root); - mutations.forEach(function(mx) { - if (mx.type === "childList") { - forEach(mx.addedNodes, function(n) { - if (!n.localName) { - return; - } - addedNode(n, isAttached); - }); - forEach(mx.removedNodes, function(n) { - if (!n.localName) { - return; - } - detachedNode(n); - }); - } - }); - flags.dom && console.groupEnd(); - } - function takeRecords(node) { - node = window.wrap(node); - if (!node) { - node = window.wrap(document); - } - while (node.parentNode) { - node = node.parentNode; - } - var observer = node.__observer; - if (observer) { - handler(node, observer.takeRecords()); - takeMutations(); - } - } - var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach); - function observe(inRoot) { - if (inRoot.__observer) { - return; - } - var observer = new MutationObserver(handler.bind(this, inRoot)); - observer.observe(inRoot, { - childList: true, - subtree: true - }); - inRoot.__observer = observer; - } - function upgradeDocument(doc) { - doc = window.wrap(doc); - flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop()); - var isMainDocument = doc === window.wrap(document); - addedNode(doc, isMainDocument); - observe(doc); - flags.dom && console.groupEnd(); - } - function upgradeDocumentTree(doc) { - forDocumentTree(doc, upgradeDocument); - } - var originalCreateShadowRoot = Element.prototype.createShadowRoot; - if (originalCreateShadowRoot) { - Element.prototype.createShadowRoot = function() { - var root = originalCreateShadowRoot.call(this); - window.CustomElements.watchShadow(this); - return root; - }; - } - scope.watchShadow = watchShadow; - scope.upgradeDocumentTree = upgradeDocumentTree; - scope.upgradeDocument = upgradeDocument; - scope.upgradeSubtree = addedSubtree; - scope.upgradeAll = addedNode; - scope.attached = attached; - scope.takeRecords = takeRecords; -}); - -window.CustomElements.addModule(function(scope) { - var flags = scope.flags; - function upgrade(node, isAttached) { - if (node.localName === "template") { - if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) { - HTMLTemplateElement.decorate(node); - } - } - if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { - var is = node.getAttribute("is"); - var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is); - if (definition) { - if (is && definition.tag == node.localName || !is && !definition.extends) { - return upgradeWithDefinition(node, definition, isAttached); - } - } - } - } - function upgradeWithDefinition(element, definition, isAttached) { - flags.upgrade && console.group("upgrade:", element.localName); - if (definition.is) { - element.setAttribute("is", definition.is); - } - implementPrototype(element, definition); - element.__upgraded__ = true; - created(element); - if (isAttached) { - scope.attached(element); - } - scope.upgradeSubtree(element, isAttached); - flags.upgrade && console.groupEnd(); - return element; - } - function implementPrototype(element, definition) { - if (Object.__proto__) { - element.__proto__ = definition.prototype; - } else { - customMixin(element, definition.prototype, definition.native); - element.__proto__ = definition.prototype; - } - } - function customMixin(inTarget, inSrc, inNative) { - var used = {}; - var p = inSrc; - while (p !== inNative && p !== HTMLElement.prototype) { - var keys = Object.getOwnPropertyNames(p); - for (var i = 0, k; k = keys[i]; i++) { - if (!used[k]) { - Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k)); - used[k] = 1; - } - } - p = Object.getPrototypeOf(p); - } - } - function created(element) { - if (element.createdCallback) { - element.createdCallback(); - } - } - scope.upgrade = upgrade; - scope.upgradeWithDefinition = upgradeWithDefinition; - scope.implementPrototype = implementPrototype; -}); - -window.CustomElements.addModule(function(scope) { - var isIE = scope.isIE; - var upgradeDocumentTree = scope.upgradeDocumentTree; - var upgradeAll = scope.upgradeAll; - var upgradeWithDefinition = scope.upgradeWithDefinition; - var implementPrototype = scope.implementPrototype; - var useNative = scope.useNative; - function register(name, options) { - var definition = options || {}; - if (!name) { - throw new Error("document.registerElement: first argument `name` must not be empty"); - } - if (name.indexOf("-") < 0) { - throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'."); - } - if (isReservedTag(name)) { - throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid."); - } - if (getRegisteredDefinition(name)) { - throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered"); - } - if (!definition.prototype) { - definition.prototype = Object.create(HTMLElement.prototype); - } - definition.__name = name.toLowerCase(); - if (definition.extends) { - definition.extends = definition.extends.toLowerCase(); - } - definition.lifecycle = definition.lifecycle || {}; - definition.ancestry = ancestry(definition.extends); - resolveTagName(definition); - resolvePrototypeChain(definition); - overrideAttributeApi(definition.prototype); - registerDefinition(definition.__name, definition); - definition.ctor = generateConstructor(definition); - definition.ctor.prototype = definition.prototype; - definition.prototype.constructor = definition.ctor; - if (scope.ready) { - upgradeDocumentTree(document); - } - return definition.ctor; - } - function overrideAttributeApi(prototype) { - if (prototype.setAttribute._polyfilled) { - return; - } - var setAttribute = prototype.setAttribute; - prototype.setAttribute = function(name, value) { - changeAttribute.call(this, name, value, setAttribute); - }; - var removeAttribute = prototype.removeAttribute; - prototype.removeAttribute = function(name) { - changeAttribute.call(this, name, null, removeAttribute); - }; - prototype.setAttribute._polyfilled = true; - } - function changeAttribute(name, value, operation) { - name = name.toLowerCase(); - var oldValue = this.getAttribute(name); - operation.apply(this, arguments); - var newValue = this.getAttribute(name); - if (this.attributeChangedCallback && newValue !== oldValue) { - this.attributeChangedCallback(name, oldValue, newValue); - } - } - function isReservedTag(name) { - for (var i = 0; i < reservedTagList.length; i++) { - if (name === reservedTagList[i]) { - return true; - } - } - } - var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]; - function ancestry(extnds) { - var extendee = getRegisteredDefinition(extnds); - if (extendee) { - return ancestry(extendee.extends).concat([ extendee ]); - } - return []; - } - function resolveTagName(definition) { - var baseTag = definition.extends; - for (var i = 0, a; a = definition.ancestry[i]; i++) { - baseTag = a.is && a.tag; - } - definition.tag = baseTag || definition.__name; - if (baseTag) { - definition.is = definition.__name; - } - } - function resolvePrototypeChain(definition) { - if (!Object.__proto__) { - var nativePrototype = HTMLElement.prototype; - if (definition.is) { - var inst = document.createElement(definition.tag); - nativePrototype = Object.getPrototypeOf(inst); - } - var proto = definition.prototype, ancestor; - var foundPrototype = false; - while (proto) { - if (proto == nativePrototype) { - foundPrototype = true; - } - ancestor = Object.getPrototypeOf(proto); - if (ancestor) { - proto.__proto__ = ancestor; - } - proto = ancestor; - } - if (!foundPrototype) { - console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is); - } - definition.native = nativePrototype; - } - } - function instantiate(definition) { - return upgradeWithDefinition(domCreateElement(definition.tag), definition); - } - var registry = {}; - function getRegisteredDefinition(name) { - if (name) { - return registry[name.toLowerCase()]; - } - } - function registerDefinition(name, definition) { - registry[name] = definition; - } - function generateConstructor(definition) { - return function() { - return instantiate(definition); - }; - } - var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; - function createElementNS(namespace, tag, typeExtension) { - if (namespace === HTML_NAMESPACE) { - return createElement(tag, typeExtension); - } else { - return domCreateElementNS(namespace, tag); - } - } - function createElement(tag, typeExtension) { - if (tag) { - tag = tag.toLowerCase(); - } - if (typeExtension) { - typeExtension = typeExtension.toLowerCase(); - } - var definition = getRegisteredDefinition(typeExtension || tag); - if (definition) { - if (tag == definition.tag && typeExtension == definition.is) { - return new definition.ctor(); - } - if (!typeExtension && !definition.is) { - return new definition.ctor(); - } - } - var element; - if (typeExtension) { - element = createElement(tag); - element.setAttribute("is", typeExtension); - return element; - } - element = domCreateElement(tag); - if (tag.indexOf("-") >= 0) { - implementPrototype(element, HTMLElement); - } - return element; - } - var domCreateElement = document.createElement.bind(document); - var domCreateElementNS = document.createElementNS.bind(document); - var isInstance; - if (!Object.__proto__ && !useNative) { - isInstance = function(obj, ctor) { - if (obj instanceof ctor) { - return true; - } - var p = obj; - while (p) { - if (p === ctor.prototype) { - return true; - } - p = p.__proto__; - } - return false; - }; - } else { - isInstance = function(obj, base) { - return obj instanceof base; - }; - } - function wrapDomMethodToForceUpgrade(obj, methodName) { - var orig = obj[methodName]; - obj[methodName] = function() { - var n = orig.apply(this, arguments); - upgradeAll(n); - return n; - }; - } - wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); - wrapDomMethodToForceUpgrade(document, "importNode"); - document.registerElement = register; - document.createElement = createElement; - document.createElementNS = createElementNS; - scope.registry = registry; - scope.instanceof = isInstance; - scope.reservedTagList = reservedTagList; - scope.getRegisteredDefinition = getRegisteredDefinition; - document.register = document.registerElement; -}); - -(function(scope) { - var useNative = scope.useNative; - var initializeModules = scope.initializeModules; - var isIE = scope.isIE; - if (useNative) { - var nop = function() {}; - scope.watchShadow = nop; - scope.upgrade = nop; - scope.upgradeAll = nop; - scope.upgradeDocumentTree = nop; - scope.upgradeSubtree = nop; - scope.takeRecords = nop; - scope.instanceof = function(obj, base) { - return obj instanceof base; - }; - } else { - initializeModules(); - } - var upgradeDocumentTree = scope.upgradeDocumentTree; - var upgradeDocument = scope.upgradeDocument; - if (!window.wrap) { - if (window.ShadowDOMPolyfill) { - window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded; - window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded; - } else { - window.wrap = window.unwrap = function(node) { - return node; - }; - } - } - if (window.HTMLImports) { - window.HTMLImports.__importsParsingHook = function(elt) { - if (elt.import) { - upgradeDocument(wrap(elt.import)); - } - }; - } - function bootstrap() { - upgradeDocumentTree(window.wrap(document)); - window.CustomElements.ready = true; - var requestAnimationFrame = window.requestAnimationFrame || function(f) { - setTimeout(f, 16); - }; - requestAnimationFrame(function() { - setTimeout(function() { - window.CustomElements.readyTime = Date.now(); - if (window.HTMLImports) { - window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime; - } - document.dispatchEvent(new CustomEvent("WebComponentsReady", { - bubbles: true - })); - }); - }); - } - if (document.readyState === "complete" || scope.flags.eager) { - bootstrap(); - } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) { - bootstrap(); - } else { - var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; - window.addEventListener(loadEvent, bootstrap); - } -})(window.CustomElements); - -(function(scope) { - var style = document.createElement("style"); - style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n"; - var head = document.querySelector("head"); - head.insertBefore(style, head.firstChild); -})(window.WebComponents);
\ No newline at end of file diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000017 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000017 deleted file mode 100644 index fd6212c0e..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000017 +++ /dev/null @@ -1,1308 +0,0 @@ -<link rel="import" href="../../components/polymer/polymer.html"> -<link rel="import" href="../../elements/ti-rov-styles/ti-rov-viewStyles.html"> -<link rel="import" href="../../elements/ti-rov-behaviors/ti-rov-behaviors.html"> -<link rel="import" href="../../components/paper-styles/paper-styles.html"> -<link rel="stylesheet" href="../../components/paper-styles/demo.css"> -<link rel="import" href="../../components/iron-icons/iron-icons.html"> -<link rel="import" href="../../components/iron-icons/av-icons.html"> -<link rel="import" href="../../components/iron-icons/hardware-icons.html"> -<link rel="import" href="../../components/iron-icons/device-icons.html"> -<link rel="import" href="../../components/paper-drawer-panel/paper-drawer-panel.html"> -<link rel="import" href="../../components/paper-header-panel/paper-header-panel.html"> -<link rel="import" href="../../components/paper-toolbar/paper-toolbar.html"> -<link rel="import" href="../../components/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="../../components/paper-button/paper-button.html"> -<link rel="import" href="../../components/paper-item/paper-item.html"> -<link rel="import" href="../../components/iron-collapse/iron-collapse.html"> -<link rel="import" href="../../components/paper-menu/paper-menu.html"> -<link rel="import" href="../../components/paper-material/paper-material.html"> -<link rel="import" href="../../components/paper-card/paper-card.html"> -<link rel="import" href="../../components/paper-input/paper-input.html"> -<link rel="import" href="../../components/paper-listbox/paper-listbox.html"> -<link rel="import" href="../../components/paper-dialog/paper-dialog.html"> -<link rel="import" href="../../components/paper-progress/paper-progress.html"> -<link rel="import" href="../../components/paper-toast/paper-toast.html"> -<link rel="import" href="../../components/iron-flex-layout/iron-flex-layout.html"> -<link rel="import" href="../../elements/ti-rov-view/ti-rov-view.html"> - -<!-- This overrides default paper-header-panel style - paper-header-panel::shadow .paper-header-panel { - overflow-x: auto !important; - } - - Example of using a style mixin: --paper-menu-selected-item - #modulesMenu { - font-family: arial; - font-size: 14px; - margin-left: 15px; - margin-bottom: 10px; - --paper-menu-selected-item : { - font-style: italic; - }; - ---> - -<dom-module id="ti-rov-panel"> - <template> - <!-- include global rov styles --> - <style include="ti-rov-styles"></style> - <style is="custom-style"> - paper-drawer-panel { - font-family: var(--rovFontFamily); - --paper-drawer-panel-main-container: { - background-color: var(--rovMainBackground); - }; - } - paper-header-panel::shadow .paper-header-panel { - overflow-x: auto !important; - } - paper-item { - cursor: pointer; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - } - #modulesMenu, #favoritesMenu { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - margin-left: 5px; - padding-left: 0px; - margin-bottom: 10px; - } - #filterToolbar { - display:block; - height: 48px; - min-width: 184px; - background-color: var(--rovFilterToolbarBackground); - box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.24); - margin-bottom: 5px; - } - #rovTitleToolbar{ - color: var(--rovTitleToolbarColor); - background-color: var(--rovTitleToolbarBackground); - height: 48px; - } - #filterModulesInput { - margin-top: 12px; - margin-left: 10px; - background-color: rgb(255, 255, 255); - width: 130px; - } - #filterButtonLeft{ - margin-top: 12px; - width: 36px; - height: 36px; - color: var(--rovTitleToolbarColor); - padding-left: 0px; - background-color: transparent; - } - #modulesMaterial { - position: relative; - overflow-y: auto; - width: 100%; - height: calc(100% - 48px); - background-color: var(--rovMainBackground); - min-width: 184px; - box-shadow: 0px -1px 10px 2px rgba(0, 0, 0, 0.14) !important; - } - #filterButtonRight{ - margin-left: 0px; - margin-top: 12px; - padding-left: 4px; - color: var(--rovTitleToolbarColor); - background-color: transparent; - width: 36px; - height: 36px; - } - #modsLabel { - margin-top: 20px; - margin-left: -1px; - color: var(--rovTitleToolbarColor); - } - #favModsLabel { - display: inline-block; - margin-top: 18px; - margin-left: -1px; - color: var(--rovTitleToolbarColor); - } - #listDashboardsDialog, #listViewsDialog, #otherViewsDialog, #rovOptionsMenuDialog { - position: fixed; - top: 24px; - --paper-dialog-background-color: var(--rovTitleToolbarBackground); - --paper-dialog-color: var(--rovTitleToolbarColor); - @apply(--layout-vertical); - @apply(--layout-self-stretch); - } - #listViewsDialog, #otherViewsDialog { - margin-left: 0px; - } - #rovOptionsMenuDialog { - margin-right: 0px; - right:0px; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - } - .attachedMenu { - --paper-menu-background-color: var(--rovTitleToolbarBackground); - --paper-menu-color: var(--rovTitleToolbarColor); - } - #toggleDrawerBtn { - position: absolute; - top: 1px; - left: 2px; - padding: 2px 2px 2px 2px; - width: 26px; - height: 26px; - --paper-button-ink-color: transparent; - color: var(--rovTitleToolbarColor); - background-color: transparent; - } - #openDashboardButton, #saveDashboardButton, #deleteDashboardButton, #rovOptionsButton, - #openDashboardFileButton, .toolbarOverflowDialogButton { - padding-top: 0px; - margin-top: 0px; - width: 36px; - height: 36px; - } - #rovOptionsButton { - position: absolute; - top: 12px; - margin-left: 0px; - right: 12px; - } - #openDashboardButton { - color: var(--rovTitleToolbarDisabledColor); - margin-right: 0px; - } - #deleteDashboardButton { - margin-left: 0px; - } - #openDashboardFileButton { - margin-right: 0px; - } - #dashboardDiv { - position: absolute; - top: 0px; - right: 66px; - height: 48px; - display: inline-block; - margin-left:0px; - } - #saveDashboardInput, #exportDashboardsInput { - display: inline-block; - padding-left: 0px; - --paper-input-container-color: #118899; - --paper-input-container-focus-color: black; - --paper-input-container-input: { - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - color: black; - }; - } - #saveDashboardInput { - margin: 0px 0px 0px 0px; - } - #exportDashboardsInput { - /* margin: 0px 0px 10px 0px; */ - margin: 0px 0px 10px 16px; - --paper-input-container: { - padding-top: 0px; - padding-bottom: 4px; - }; - } - #showSavedDashboardsButton, #showExportedDashboardsButton { - box-sizing: content-box !important; - width: 24px; - height: 24px; - margin-top: 0px; - padding-right: 0px; - padding-left: 5px; - } - #listSavedDashboardsDialog, #introListDashboardsDialog { - position: fixed; - --paper-dialog-background-color: white; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - margin: 0px 0px 0px 0px; - } - .topitem { - display: flex; - padding-top: 0px; - margin-top: 1px; - margin-left: 5px; - padding-left: 12px; - cursor: pointer; - } - .subitem { - cursor: default; - display: flex; - padding-top: 0px; - margin-top: 1px; - margin-left: 0px; - } - .subcontent { - display: flex; - margin-left: 28px; - cursor: pointer; - } - .subcontentmenu { - padding-top: 0px; - padding-bottom: 0px; - } - .subicon { - --iron-icon-width: 18px; - --iron-icon-height: var(--rovSubiconHeight); - cursor: pointer; - } - .topitem::-moz-selection, .subitem::-moz-selection, .subcontent::-moz-selection { - background: white; - } - .topitem::selection, .subitem::selection, .subcontent::selection { - background: white; - } - #stopRepeatRefreshButton, #repeatRefreshButton, #refreshAllButton, #closeAllButton, #saveAllButton, #viewToTopButton, #otherViewsButton { - width: 36px; - height: 36px; - } - #refreshAllButton, #otherViewsButton { - margin-right: -8px; - } - #stopRepeatRefreshButton, #overflowStopRepeatRefreshButton { - color: red; - } - .settingsRow { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - padding-top: 5px; - padding-bottom: 5px; - margin-left: 15px; - } - .settingsH { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - font-weight: bold !important; - margin-bottom: 1px !important; - margin-top: 1px !important; - margin-left: 15px; - } - #rovTitle { - position: absolute; - top: 19px; - left: 45px; - font-size: var(--rovTitleFontSize); - white-space:nowrap; - overflow: hidden; - } - .erroricon { - width: 20px; - height: 20px; - color: rgb(204, 0, 0); - --iron-icon-stroke-color: white; - } - #exportDashboardCheckbox { - margin-left: 16px; - margin-top: 10px; - padding-left: 0px; - --paper-checkbox-unchecked-color: #118899; - --paper-checkbox-unchecked-ink-color: transparent; - --paper-checkbox-checked-color: #118899; - --paper-checkbox-checked-ink-color: #118899; - --paper-checkbox-checkmark-color: white; - --paper-checkbox-label-color: #333333; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - } - #modContextDialog,#listDashboardsDialog > *:last-child { - margin-bottom: 2px; - } - #modContextDialog,#listDashboardsDialog > *:first-child { - margin-top: 2px; - } - #modContextMenu { - margin-top: 0px !important; - margin-bottom: 0px !important; - padding: 0px; - white-space:nowrap - } - #modContextItem { - display:flex; - padding-left: 20px; - padding-right: 20px; - margin-top: 2px; - margin-bottom: 2px; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - } - #modContextItem:hover { - background-color: white; - cursor:pointer; - } - #statusConsole { - z-index: 9000; - display: inline-block; - position: fixed; - box-shadow: 0px -1px 3px 1px rgba(0, 0, 0, 0.4); - bottom: 0; - right: 0; - background: whitesmoke; - } - #closeStatusButton { - width: 18px; - height: 18px; - position: absolute; - right: 10px; - top: 4px; - color: darkslategray; - padding: 0; - background-color: whitesmoke; - } - .statusItem { - display: flex; - padding-top: 0px; - margin-top: 1px; - margin-left: 5px; - margin-bottom: 5px; - padding-left: 2px; - } - .consoleStatusIcon { - --iron-icon-width: 18px; - --iron-icon-height: 18px; - min-width: 18px; - min-height: 18px; - padding-right: 5px; - } - .consoleErrorIcon { - --iron-icon-width: 18px; - --iron-icon-height: 18px; - --iron-icon-stroke-color: white; - min-width: 18px; - min-height: 18px; - padding-right: 5px; - } - .consoleWarningIcon { - --iron-icon-width: 18px; - --iron-icon-height: 18px; - --iron-icon-stroke-color: black; - min-width: 18px; - min-height: 18px; - padding-right: 5px; - } - #statusList { - padding: 0; - } - #connectDialog { - z-index: 9000; - display: inline-block; - margin: 0; - position: fixed; - left: 10px !important; - top: 52px !important; - width: 460px !important; - max-width: 460px !important; - min-height: 195px !important; - background-color: white; - outline-style: solid !important; - outline-width: 1px !important; - outline-color: gray !important; - - } - #exesMruButton { - padding: 0; - width: 24px; - height: 24px; - } - #exeInput { - margin-top: 0px; - margin-left: 0px; - width: 400px; - display: inline-block; - font-size: var(--rovContentFontSize); - --paper-input-container-color: #118899; - --paper-input-container-focus-color: black; - --paper-input-container-input: { - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - color: black; - }; - --paper-input-container: { - padding-top: 0px; - padding-bottom: 4px; - }; - } - #commLinkInput { - margin-top: 8px; - margin-left: 0px; - width: 200px; - display: inline-block; - font-size: var(--rovContentFontSize); - --paper-input-container-color: #118899; - --paper-input-container-focus-color: black; - --paper-input-container-input: { - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - color: black; - }; - --paper-input-container: { - padding-top: 4px; - padding-bottom: 4px; - }; - } - #connectButton { - margin-left: 30px; - margin-top: 10px; - background: white; - } - #autoConnectCheckbox { - margin-left: 140px; - } - #connectMessageDiv, #autoConnectStatusDiv { - margin-top: 10px; - margin-bottom: 10px; - margin-right: 5px; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - word-wrap: break-word; - } - #connectMessageDiv { - margin-left: 38px; - } - #autoConnectStatusDiv { - margin-left: 30px; - padding: 0; - } - #currentDashboardDiv { - height:11px; - margin:1px 0px 0px 16px; - padding:0px; - font-size: 11px; - line-height: 11px; - cursor: default; - } - #connectProgress, #autoConnectProgress { - display: inline-block; - --paper-progress-active-color: #115566; - --paper-progress-height: 4px; - margin-left: 4px; - width: 378px; - } - #viewToTopMenu, #dashboardNamesMenu, #matchedModulesMenu, #selectModulesViewMenu, #otherViewsMenu { - margin-top: 0px; - margin-bottom: 10px !important; - padding-left: 8px; - padding-right: 12px; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - } - #listSavedDashboardsMenu, #introDashboardNamesMenu { - margin-top:0px; - margin-bottom:8px; - padding-left:0px; - padding-right:8px; - background-color: white; - font-size: var(--rovContentFontSize); - } - .modulesSelectIcon { - width: 24px; - height: 24px; - background-color: transparent; - color: var(--rovTitleToolbarColor); - cursor: pointer; - } - #selectModulesViewDialog { - position: fixed; - top: 43px; - margin-top: 5px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - --paper-dialog-background-color: var(--rovFilterToolbarBackground); - --paper-dialog-color: var(--rovTitleToolbarColor); - @apply(--layout-vertical); - @apply(--layout-self-stretch); - } - #selectModulesViewMenu { - font-family: var(--rovFontFamily); - background-color: var(--rovFilterToolbarBackground); - } - #discoveredAddOnsList { - position: absolute; - text-align: right; - right: 20px; - } - #loadAddOnButton { - margin-top: 0px; - margin-left: 4px; - margin-right: 0px; - padding: 0px; - text-align: left; - } - #removeAddOnButton, #rediscoverAddOnButton, #addDiscoveredAddOnButton { - position: absolute; - margin-top: 0px; - padding-top: 0px; - } - #removeAddOnButton { - text-align: left; - left: 16px; - } - #rediscoverAddOnButton { - text-align: right; - right: 9px; - } - #addDiscoveredAddOnButton { - text-align: left; - left: 290px; - } - #addOnInput { - --paper-input-container-color: #118899; - --paper-input-container-focus-color: black; - --paper-input-container-input: { - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - color: black; - }; - --paper-input-container: { - padding-top: 0px; - padding-bottom: 4px; - }; - margin-left: 0px; - margin-right: 0px; - margin-top: 22px; - padding: 0px; - width: 360px; - display: inline-block; - } - #curAddOnsList, #discoveredAddOnsList { - display: inline-block; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - --paper-listbox-background-color: whitesmoke; - width: 210px; - height: 110px; - margin-top:0px; - margin-right: 0px; - margin-left:20px; - padding: 4px 0px 0px 0px; - overflow-y: auto; - } - #discoveredAddOnsList { - position: absolute; - right: 20px; - } - #dataOptionsDialog { - top: 52px; - width: 200px; - min-width: 200px; - height: 240px; - min-height: 240px; - } - #manageAddOnsDialog { - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - line-height: var(--rovTitleLineHeight); - position: fixed; - width: 525px; - min-width: 525px; - min-height: 240px; - max-width: 525px; - max-height: 276px; - left: 10px !important; - top: 52px; - margin: 0; - } - #addOnMruButton, #exeMruButton, #commLinkMruButton { - box-sizing: content-box !important; - padding: 0; - width: 24px; - height: 24px; - } - #showAddOnInput, #hideAddOnInput { - box-sizing: content-box !important; - padding: 0px; - } - #showAddOnInput { - position: absolute; - width: 18px; - height: 18px; - left: 364px; - } - #hideAddOnInput { - margin-left: 25px; - width: 16px; - height: 16px; - } - #addOnMruDialog, #exeMruDialog, #commLinkMruDialog { - position: fixed; - margin: 0px 0px 0px 12px; - padding: 0; - } - #exeMruButton, #commLinkMruButton { - margin-left:10px; - } - #addOnMruMenu, #exeMruMenu, #commLinkMruMenu { - margin-top:0px; - margin-bottom:0px; - padding-bottom:4px; - padding-left:4px; - padding-right:8px; - background-color: transparent; - } - .addOnMruMenuItem, .exeMruMenuItem, .commLinkMruMenuItem { - --paper-item-min-height: 24px; - font-size: var(--rovContentFontSize); - font-family: var(--rovFontFamily); - margin-top:0px; - margin-bottom:0px; - padding-left:0px; - padding-right:8px; - background-color: transparent; - } - #manageStorageDialog { - position: fixed; - top: 52px; - height: 350px; - min-height: 350px; - } - #viewsStorageList { - --paper-listbox-background-color: whitesmoke; - padding-top: 0px; - height: 215px; - min-height: 215px; - max-height: 230px; - min-width: 290px; - overflow-y: auto; - overflow-x: hidden; - } - #overwriteDashboardsDialog { - margin: 0; - top: 52px; - height: 270px; - min-height: 270px; - } - #exportDashboardsDialog { - margin: 0; - top: 52px; - height: 280px; - min-height: 280px; - } - #overwriteDashboardsList, #exportDashboardsList { - --paper-listbox-background-color: whitesmoke; - height: 140px; - min-height: 140px; - max-height: 140px; - max-width: 260px; - width: 260px; - margin: 0; - padding-top: 0px; - padding-bottom: 0px; - overflow-y: auto; - overflow-x: hidden; - } - #rovOptionsMenu { - margin: 0px; - padding: 10px 0px 10px 0px; - } - #clearViewStorageButton, #clearViewStorageDone, #overwriteDashboardsButton, - #overwriteDashboardsDone, #exportDashboardsButton, #exportDashboardsDone { - padding-top: 0px; - padding-bottom: 0px; - } - #clearViewStorageDone { - padding-right: 0px; - } - .rovOptionsItem { - padding-left: 0px; - font-family: var(--rovFontFamily) !important; - font-size: var(--rovContentFontSize) !important; - --paper-item-min-height: 24px; - } - .rovOptionsMenuButtonIcon { - height: 20px; - width: 20px; - } - .rovOptionsMenuButton { - padding-top: 0px; - padding-bottom: 0px; - margin-top: 3px; - margin-bottom: 3px; - text-transform: none; - } - .rovPanelDropdownItem { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - --paper-item-min-height: 24px; - cursor: pointer; - padding-left: 8px; - padding-right: 8px; - } - #showConnectDialogCheckbox { - padding-top: 0px; - padding-bottom: 0px; - padding-left: 8px; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 6px; - --paper-checkbox-unchecked-color: var(--rovTitleToolbarColor); - --paper-checkbox-unchecked-ink-color: transparent; - --paper-checkbox-checked-color: var(--rovTitleToolbarColor); - --paper-checkbox-checked-ink-color: transparent; - --paper-checkbox-checkmark-color: var(--rovTitleToolbarBackground); - --paper-checkbox-label-color: var(--rovTitleToolbarColor); - --paper-checkbox-size: 16px; - font-weight: normal; - } - #autoConnectProgressDialog { - position: fixed; - left: 10px !important; - top: 52px !important; - margin: 0; - width: 460px !important; - max-width: 460px !important; - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - line-height: 16px; - } - .addOnListItem, .viewsStorageListItem, .selectModulesViewMenuItem, .dashboardsChecklistItem { - --paper-item-min-height: 22px; - height: 22px; - font-family: var(--rovFontFamily); - cursor: pointer; - padding-left: 8px; - padding-right: 8px; - } - .addOnListItem, .viewsStorageListItem, .dashboardsChecklistItem { - font-size: var(--rovContentFontSize); - } - .selectModulesViewMenuItem { - font-size: var(--rovTitleFontSize); - } - #overwriteDashboardsLabel { - font-family: var(--rovFontFamily); - font-size:var(--rovContentFontSize); - font-weight:normal; - white-space:normal; - } - .rovOptionsMenuLabel { - cursor: pointer; - } - #addOnErrorToast { - position: absolute; - --paper-toast-background-color: #CC0000; - --paper-toast-color: white; - word-wrap: break-word; - max-height: 300px; - } - #addOnErrorClose { - width: 20px; - height: 20px; - background-color: transparent; - color: white; - position: absolute; - padding: 0; - right: 4px; - top: 2px; - } - #saveDashboardDialog { - top: 52px; - } - #confirmDialog { - top: 78px; - } - #saveDashboardComment { - font-family: var(--rovFontFamily); - font-size: var(--rovContentFontSize); - resize: none; - width: 88%; - } - .rovDialogInput:focus { - outline: none !important; - border-color: #118899; - } - #saveDashboardComment:focus { - outline: none !important; - border-color: #118899; - box-shadow: 0 0 1px #118899; - } - #dashboardOverflowDialog, #titleOverflowDialog { - position: fixed; - top: 28px; - --paper-dialog-background-color: var(--rovTitleToolbarBackground); - --paper-dialog-color: var(--rovTitleToolbarColor); - @apply(--layout-vertical); - @apply(--layout-self-stretch); - margin-top: 20px; - margin-right: 0px; - margin-left: 0px; - margin-bottom: 0px; - padding-top: 12px; - } - #dashboardOverflowDialog { - right: 36px; - } - #dashboardOverflowDialogButton, #titleOverflowDialogButton { - position: absolute; - top: 20px; - right: 40px; - margin-top: 0px; - margin-left: 0px; - padding-left: 4px; - padding-top: 0px; - padding-right: 4px; - width: 28px; - height: 28px; - } - #dashboardOverflowDialogButton { - right: 40px; - } - #titleOverflowDialogButton { - left: 14px; - } - .toolbarOverflowDialogButton { - padding-left: 8px; - padding-right: 8px; - padding-bottom: 8px; - margin-bottom: 0px; - } - #introDialog { - position: fixed; - left: 184px !important; - top: 48px !important; - min-width: 364px; - } - .introDashboardItem { - color: #118899; - } - .introDashboardItem:hover { - text-decoration: underline; - } - #noIntroCheckbox { - margin-left: 80px; - } - #introDashboardsButton { - margin-left: 40px; - } - </style> - <div id="connectDialog" hidden> - <h2 class="rovDialogTitle">Connect Target</h2> - <div> - <paper-icon-button id="exeMruButton" icon="arrow-drop-down" on-click="mruClicked" role="button"></paper-icon-button> - <paper-input autofocus label="Executable path" id="exeInput" type="text" placeholder=" " on-keypress="connectKeyPress" on-click="exeInputClicked"></paper-input> - <iron-icon id="exeInputInvalid" class="erroricon" title="Invalid exe" icon="error" hidden></iron-icon> - </div> - <div> - <paper-icon-button id="commLinkMruButton" icon="arrow-drop-down" on-click="mruClicked" role="button"></paper-icon-button> - <paper-input label="Target communication link" id="commLinkInput" type="text" placeholder=" " on-keypress="connectKeyPress"></paper-input> - <iron-icon id="commLinkInputInvalid" class="erroricon" title="Invalid COM port" icon="error" hidden></iron-icon> - </div> - <paper-button tabindex="0" id="connectButton" class="rovDialogButton" on-click="connectClicked">Connect</paper-button> - <paper-checkbox class="rovCheckbox" id="autoConnectCheckbox">Do not show this again</paper-checkbox> - <div id="connectMessageDiv" hidden> - <iron-icon id="connectErrorIcon" class="erroricon" icon="error" hidden></iron-icon> - <label>{{connectMessage}}</label> - <paper-progress id="connectProgress"></paper-progress> - </div> - <paper-dialog id="commLinkMruDialog"> - <paper-menu id="commLinkMruMenu" on-iron-select="mruSelected"> - <template is="dom-repeat" items="{{commLinkMrus}}" as="mruItem"> - <paper-item class="commLinkMruMenuItem" role="menuitem">{{mruItem}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="exeMruDialog"> - <paper-menu id="exeMruMenu" on-iron-select="mruSelected"> - <template is="dom-repeat" items="{{exeMrus}}" as="mruItem"> - <paper-item class="exeMruMenuItem" role="menuitem">{{mruItem}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - </div> - <paper-dialog id="autoConnectProgressDialog" no-cancel-on-outside-click alwaysOnTop> - <h2 class="rovDialogTitle">Connect Target</h2> - <div style="width:100%;text-align:center;margin:0px 0px 16px 0px;padding:0;"> - <label class="rovDialogLabel">{{autoConnectMessage}}</label> - </div> - <div id="autoConnectStatusDiv"> - <label>{{connectMessage}}</label> - <paper-progress id="autoConnectProgress"></paper-progress> - </div> - </paper-dialog> - <paper-dialog id="manageAddOnsDialog" on-click="dlgClicked" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h2 class="rovDialogTitle"><iron-icon style="height:20px;width:20px;margin-right:8px;" icon="hardware:devices-other"></iron-icon>ROV Add-on Views<iron-icon id="manageAddOnsDialogClose" class="rovDialogCloseIcon" icon="close" on-click="addOnDoneClicked"></iron-icon></h2> - <div style="margin-top:20px;padding:0px;margin-left:24px;margin-right:0px;"> - <paper-checkbox id="selectAllCurrentAddOnsCheckbox" class="rovCheckbox" style="margin:0px 0px 2px 4px;" on-click="selectAllCurrentAddOnsClicked" title="Select all"></paper-checkbox> - <label class="rovDialogLabel" style="position:absolute;right:300px;">Imported add-ons</label> - <paper-checkbox id="selectAllDiscoveredAddOnsCheckbox" class="rovCheckbox" style="position:absolute;left:299px;margin:0px 0px 2px 4px;" on-click="selectAllDiscoveredAddOnsClicked" title="Select all"></paper-checkbox> - <label class="rovDialogLabel" - style="position:absolute;right:26px;">Available add-ons</label> - </div> - <paper-listbox id="curAddOnsList" role="listbox"> - <template id="curAddOnsTemplate" is="dom-repeat" items="{{dlgOtherViews}}" as="view"> - <paper-item class="addOnListItem"> - <paper-checkbox class="rovCheckbox" on-click="curAddOnClicked" title$="{{view.path}}">{{view.name}}</paper-checkbox> - </paper-item> - </template> - </paper-listbox> - <paper-listbox id="discoveredAddOnsList" role="listbox"> - <template id="discoveredAddOnsTemplate" is="dom-repeat" items="{{dlgDiscoveredAddOns}}" as="addOn"> - <paper-item class="addOnListItem"> - <paper-checkbox class="rovCheckbox" on-click="discoveredAddOnClicked" title$="{{addOn.path}}">{{addOn.name}}</paper-checkbox> - </paper-item> - </template> - </paper-listbox> - <div class="buttons" style="margin-top:4px;padding-top:0px;padding-bottom:0px;"> - <paper-button class="rovDialogButton" id="removeAddOnButton" on-click="removeAddOnClicked" disabled>Remove</paper-button> - <paper-button class="rovDialogButton" id="addDiscoveredAddOnButton" on-click="addDiscoveredAddOnClicked" disabled>Import</paper-button> - <paper-icon-button class="rovDialogButton" id="showAddOnInput" icon="create" on-click="showAddOnInputClicked" title="Enter add-on location" role="button"></paper-icon-button> - <paper-button class="rovDialogButton" id="rediscoverAddOnButton" on-click="rediscoverAddOnsClicked">Rediscover</paper-button> - </div> - <paper-icon-button id="hideAddOnInput" class="rovDialogButton" icon="close" on-click="showAddOnInputClicked" title="Hide enter add-on location" role="button" hidden></paper-icon-button> - <paper-icon-button id="addOnMruButton" icon="arrow-drop-down" on-click="mruClicked" role="button" hidden></paper-icon-button> - <paper-input id="addOnInput" type="text" placeholder="Enter add-on location" no-label-float no-animations autofocus on-input="addOnOnInput" on-keypress="addOnKeyPress" hidden></paper-input> - <paper-button class="rovDialogButton" id="loadAddOnButton" on-click="loadAddOnClicked" disabled hidden>Import</paper-button> - <paper-button id="closeManageAddOnsDialogButton" class="rovDialogButton" style="position:absolute;bottom:8px;left:211px;margin-top:0px;padding-top:0px;" on-click="addOnDoneClicked">Close</paper-button> - <paper-toast id="addOnErrorToast" duration="0" style="margin-left:10px;margin-bottom:40px"> - <paper-icon-button id="addOnErrorClose" icon="close" on-click="addOnErrorCloseClicked" role="button"></paper-icon-button><br> - </paper-toast> - <paper-dialog id="addOnMruDialog"> - <paper-menu id="addOnMruMenu" on-iron-select="addOnMruSelected"> - <template is="dom-repeat" items="{{addOnMrus}}" as="mruItem"> - <paper-item class="addOnMruMenuItem" role="menuitem">{{mruItem}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - </paper-dialog> - <paper-dialog id="introDialog" class="rovDialog" no-cancel-on-outside-click alwaysOnTop on-iron-overlay-opened="dialogOpened" on-iron-overlay-closed="introDialogClosed"> - <h2 class="rovDialogTitle">Gettting Started<iron-icon id="introDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h2> - <div style="width:100%;text-align:center;margin:0px 0px 12px 0px;padding:0;"> - <label class="rovDialogLabel">{{introMessage}}</label> - </div> - <div style="padding:0px;margin-top:0px;"> - <iron-icon icon="hardware:keyboard-backspace"></iron-icon> - <label class="rovDialogLabel">{{introModulesMessage}}</label> - <label class="rovDialogLabel" id="introOr" style="margin-left:38px;">or</label> - <paper-button class="rovDialogButton" id="introDashboardsButton" on-click="introDashboardsClicked">Open a dashboard</paper-button> - </div> - <paper-button class="rovDialogButton" id="introClose" dialog-dismiss>Close</paper-button> - <paper-checkbox class="rovCheckbox" id="noIntroCheckbox" style="margin-bottom:14px;">Do not show this again</paper-checkbox> - </paper-dialog> - <paper-dialog id="introListDashboardsDialog" class="rovDialog"> - <paper-menu id="introDashboardNamesMenu" on-iron-select="dashboardSelected"> - <template is="dom-repeat" items="{{dashboardNames}}" as="dash"> - <paper-item class="rovPanelDropdownItem introDashboardItem" role="menuitem" title$="{{dash.comment}}">{{dash.name}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="selectModulesViewDialog"> - <paper-menu id="selectModulesViewMenu" on-iron-select="modulesViewItemSelected" class="attachedMenu"> - <template is="dom-repeat" items="{{otherModsLabels}}" as="label"> - <paper-item class="selectModulesViewMenuItem" role="menuitem" id="all">{{label}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-drawer-panel id="rovDrawerPanel" style="min-width:184px" drawer-width="184px" responsive-width="0px"> - <div drawer> - <span id="filterToolbar"> - <template is="dom-if" if="{{allModulesVisible}}"> - <template is="dom-if" if="{{showFilterButtonRight}}"> - <span id="modsLabel"><iron-icon class="modulesSelectIcon" icon="arrow-drop-down" on-click="selectModulesViewDialogClicked" title="Select modules list"></iron-icon>{{curModsLabel}}</span> - <paper-icon-button id="filterButtonRight" icon="filter-list" on-click="filterRightClicked" title="Filter modules" role="button" tabindex="0"></paper-icon-button> - </template> - <template is="dom-if" if="{{showFilterButtonLeft}}"> - <input id="filterModulesInput" type="search" placeholder="Filter Modules" on-input="filterModulesChanged" tabindex="1" autofocus></input> - <paper-icon-button id="filterButtonLeft" icon="close" on-click="filterLeftClicked" title="Close filter modules" role="button" tabindex="0"></paper-icon-button> - </template> - </template> - <template is="dom-if" if="{{!allModulesVisible}}"> - <span id="favModsLabel"><iron-icon class="modulesSelectIcon" icon="arrow-drop-down" on-click="selectModulesViewDialogClicked" title="Select modules list"></iron-icon>{{curModsLabel}}</span> - </template> - </span> - <paper-material id="modulesMaterial" elevation="4"> - <template is="dom-if" if="{{allModulesVisible}}"> - <ul id="modulesMenu"> - <template is="dom-repeat" items="{{tocItems}}" as="item"> - <template is="dom-if" if="{{!item.hasDups}}"> - <li id$="{{item.id}}" title$="{{item.id}}" class="topitem" on-click="modClicked" on-contextmenu="modContextMenu">{{item.name}}</li> - </template> - <template is="dom-if" if="{{item.hasDups}}" restamp="true"> - <template is="dom-if" if="{{item.expanded}}"> - <li id$="{{item.id}}" class="subitem" on-click="subMenuClicked"><iron-icon class="subicon" icon="expand-less"></iron-icon>{{item.name}}</li> - <template is="dom-repeat" items="{{item.dups}}" as="dupItem"> - <li id$="{{dupItem.id}}" title$="{{item.id}}" class="subcontent" on-click="modClicked" on-contextmenu="modContextMenu">{{dupItem.name}}</li> - </template> - </template> - <template is="dom-if" if="{{!item.expanded}}"> - <li id$="{{item.id}}" class="subitem" on-click="subMenuClicked"><iron-icon class="subicon" icon="expand-more"></iron-icon>{{item.name}}</li> - </template> - </template> - </template> - </ul> - </template> - <template is="dom-if" if="{{!allModulesVisible}}"> - <ul id="favoritesMenu"> - <template is="dom-repeat" items="{{favoriteTocItems}}" as="item"> - <template is="dom-if" if="{{!item.hasDups}}"> - <li id$="{{item.id}}" title$="{{item.id}}" class="topitem" on-click="modClicked" on-contextmenu="modContextMenu">{{item.name}}</li> - </template> - <template is="dom-if" if="{{item.hasDups}}" restamp="true"> - <template is="dom-if" if="{{item.expanded}}"> - <li id$="{{item.id}}" class="subitem" on-click="subMenuClicked"><iron-icon class="subicon" icon="expand-less"></iron-icon>{{item.name}}</li> - <template is="dom-repeat" items="{{item.dups}}" as="dupItem"> - <li id$="{{dupItem.id}}" title$="{{item.id}}" class="subcontent" on-click="modClicked" on-contextmenu="modContextMenu">{{dupItem.name}}</li> - </template> - </template> - <template is="dom-if" if="{{!item.expanded}}"> - <li id$="{{item.id}}" class="subitem" on-click="subMenuClicked"><iron-icon class="subicon" icon="expand-more"></iron-icon>{{item.name}}</li> - </template> - </template> - </template> - </ul> - </template> - <paper-dialog id="modContextDialog" style="position:fixed;margin:0px !important" alwaysOnTop> - <ul id="modContextMenu" > - <li id="modContextItem" on-click="modContextMenuItemClicked">{{favoriteMenuItem}}</li> - </ul> - </paper-dialog> - </paper-material> - </div> - <div main on-dragstart="viewDragStart" on-dragover="viewDragOver" on-dragenter="viewDragEnter" on-drop="viewDrop" on-dragend="viewDragEnd"> - <paper-header-panel id="rovHeaderPanel" class="main" mode="standard"> - <!-- Main Toolbar --> - <paper-toolbar id="rovTitleToolbar" on-dragenter="toolbarDragEnter" on-dragover="toolbarDragOver"> - <span title$="{{toggleTooltip}}" style="margin-left:0px;max-width:30px;"><paper-icon-button id="toggleDrawerBtn" on-click="toggleDrawerClicked" icon={{toggleIcon}} disabled></paper-icon-button></span> - <paper-icon-button id="titleOverflowDialogButton" icon="menu" on-click="overflowToolbarButtonClicked" role="button" title="Open the views toolbar" hidden disabled></paper-icon-button> - <label id="rovTitle">Runtime Object View</label> - <span title id="titleSpan" style="position:absolute;margin-left:0px;left:210px;top:4px;min-width:48px;"> - <paper-icon-button id="otherViewsButton" icon="hardware:devices-other" on-click="otherViewsDialog" title="Open other view" role="button" hidden$="{{!enableOtherViews}}"></paper-icon-button> - <paper-icon-button id="refreshAllButton" icon="refresh" on-click="refreshAllClicked" title="Refresh all" role="button" disabled></paper-icon-button> - <paper-icon-button id="repeatRefreshButton" hidden$="{{inRepeatRefresh}}" icon="autorenew" on-click="repeatRefreshClicked" title="Repeat refresh" role="button" disabled></paper-icon-button> - <paper-icon-button id="stopRepeatRefreshButton" hidden$="{{!inRepeatRefresh}}" icon="av:stop" on-click="stopRepeatRefreshClicked" title="Stop repeat refresh" role="button"></paper-icon-button> - <paper-icon-button id="saveAllButton" icon="file-download" on-click="saveAllViews" title="Save data displayed in all current views" role="button" disabled></paper-icon-button> - <paper-icon-button id="viewToTopButton" icon="flip-to-front" on-click="viewToTopDialog" title="Bring a view to the top" role="button" disabled></paper-icon-button> - <paper-icon-button id="closeAllButton" icon="close" on-click="closeAllClicked" title="Close all views" role="button" disabled></paper-icon-button> - </span> - <div id="dashboardDiv" on-dragenter="dashboardDragEnter" on-dragover="dashboardDragOver" title=""> - <div id="currentDashboardDiv" title="">{{currentDashboard}}</div> - <paper-icon-button id="openDashboardButton" icon="dashboard" on-drop="openDashboardDrop" on-click="openDashboardClicked" role="button" title="" disabled></paper-icon-button> - <paper-icon-button id="openDashboardFileButton" icon="folder-open" on-click="openDashboardFileClicked" role="button" title="Import a dashboard" disabled></paper-icon-button> - <input type="file" id="openDashboardFileInput" accept=".rov.json" on-change="openDashboardFileSelected" hidden></input> - <paper-icon-button id="saveDashboardButton" icon="save" on-click="saveDashboardClicked" role="button" title="Save all current views as a dashboard" disabled></paper-icon-button> - <paper-icon-button id="deleteDashboardButton" icon="delete" on-click="deleteDashboardClicked" role="button" title="Delete a dashboard" disabled></paper-icon-button> - </div> - <paper-icon-button id="dashboardOverflowDialogButton" icon="more-vert" on-click="overflowToolbarButtonClicked" role="button" title="Open the dashboard toolbar" hidden disabled></paper-icon-button> - <paper-icon-button id="rovOptionsButton" icon="settings" on-click="rovOptionsClicked" role="button" title="ROV options" disabled></paper-icon-button> - </paper-toolbar> - <span> - <paper-dialog id="saveDashboardDialog" class="rovDialog" on-click="dlgClicked" on-keypress="saveDashboardKeyPress" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">Save Dashboard<iron-icon id="saveDashboardDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <paper-icon-button id="showSavedDashboardsButton" icon="arrow-drop-down" on-click="showSavedDashboardsClicked" role="button"></paper-icon-button> - <paper-input id="saveDashboardInput" type="text" placeholder="Dashboard name" no-label-float no-animations autofocus></paper-input> - <div style="margin-top:10px;margin-left:14px;padding-left:0px;"><label class="rovDialogLabel">Comment</label></div> - <div style="margin-top:0px;margin-left:14px;padding-right:0px;margin-right:0px;padding-left:0px;"> - <textarea id="saveDashboardComment" rows="4"></textarea> - </div> - <paper-checkbox id="exportDashboardCheckbox">Export file</paper-checkbox> - <div style="margin-right:32px;padding-top:0px;padding-bottom:4px;" class="buttons"> - <paper-button class="rovDialogButton" autofocus on-click="saveDashboardOkClicked">OK</paper-button> - <paper-button class="rovDialogButton" dialog-dismiss>Cancel</paper-button> - </div> - </paper-dialog> - <paper-dialog id="listSavedDashboardsDialog"> - <paper-menu id="listSavedDashboardsMenu" on-iron-select="dashboardSelected"> - <template is="dom-repeat" items="{{dashboardNames}}" as="dash"> - <paper-item class="rovPanelDropdownItem" role="menuitem">{{dash.name}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="listDashboardsDialog" style="max-width:500px;" on-iron-overlay-closed="listDashboardsDialogClosed"> - <paper-menu id="dashboardNamesMenu" class="attachedMenu" on-iron-select="dashboardSelected"> - <template is="dom-repeat" items="{{dashboardNames}}" as="dash"> - <paper-item class="rovPanelDropdownItem" role="menuitem" title$="{{dash.comment}}">{{dash.name}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="confirmDialog" class="rovDialog" on-click="dlgClicked" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">{{confirmTitle}}<iron-icon id="confirmDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <div class="rovDialogLabel">{{confirmLabel}}</div> - <div class="buttons"> - <paper-button class="rovDialogButton" autofocus on-click="confirmOkClicked">OK</paper-button> - <paper-button class="rovDialogButton" dialog-dismiss>Cancel</paper-button> - </div> - </paper-dialog> - <paper-dialog id="listViewsDialog"> - <paper-menu id="viewToTopMenu" on-iron-select="viewToTopMenuItemSelected" class="attachedMenu"> - <template is="dom-repeat" items="{{viewToTopList}}" as="view"> - <paper-item class="rovPanelDropdownItem" role="menuitem" id$="{{view.id}}" title$="{{view.fullName}}">{{view.name}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="otherViewsDialog" on-iron-overlay-closed="otherViewsDialogClosed"> - <paper-menu id="otherViewsMenu" on-iron-select="otherViewSelected" class="attachedMenu"> - <template is="dom-repeat" items="{{dlgOtherViews}}" as="view"> - <paper-item class="rovPanelDropdownItem" role="menuitem" id$="{{view.element}}" title$="{{view.path}}">{{view.name}}</paper-item> - </template> - </paper-menu> - </paper-dialog> - <paper-dialog id="dataOptionsDialog" class="rovDialog" on-click="dlgClicked" on-keypress="dataOptionsKeyPress" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">Data retrieval settings<iron-icon id="dataOptionsDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <section id="repeatRefreshSection" style="margin-top:0px;padding-top:0px;padding-bottom:0px;"> - <h4 class="settingsH">Repeat Refresh</h4> - <div class="settingsRow"> - <label> - <span id="repeatRefreshLabel" style="margin-right:2px">Interval:</span> - <input id="repeatRefreshInput" class="rovDialogInput" type="text" size="5"> - <span>ms</span> - <iron-icon id="repeatRefreshInputInvalid" class="erroricon" title="Invalid interval" icon="error" hidden></iron-icon> - </label> - </div> - </section> - <section id="dataTimeoutSection" style="margin-top:5px;padding-top:0px;padding-bottom:0px;"> - <h4 class="settingsH">Read Data Timeout</h4> - <div class="settingsRow"> - <label> - <span id="dataTimeoutLabel" style="margin-right:2px">Period:</span> - <input id="dataTimeoutInput" class="rovDialogInput" type="text" size="5"> - <span>ms</span> - <iron-icon id="dataTimeoutInputInvalid" class="erroricon" title="Invalid timeout period" icon="error" hidden></iron-icon> - </label> - </div> - </section> - <section id="connectTimeoutSection" style="margin-top:5px;padding-top:0px;padding-bottom:0px;"> - <h4 class="settingsH">Connect Target Timeout</h4> - <div class="settingsRow"> - <label> - <span id="connectTimeoutLabel" style="margin-right:2px">Period:</span> - <input id="connectTimeoutInput" class="rovDialogInput" type="text" size="5"> - <span>ms</span> - <iron-icon id="connectTimeoutInputInvalid" class="erroricon" title="Invalid timeout period" icon="error" hidden></iron-icon> - </label> - </div> - </section> - <div class="buttons" style="padding-top:0px;padding-bottom:0px;"> - <paper-button class="rovDialogButton" autofocus on-click="saveDataOptionsOkClicked">Save</paper-button> - <paper-button class="rovDialogButton" dialog-dismiss>Cancel</paper-button> - </div> - </paper-dialog> - <paper-dialog id="manageStorageDialog" class="rovDialog" on-click="dlgClicked" on-keypress="manageStorageKeyPress" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">Delete a view's local storage<iron-icon id="manageStorageDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <div style="margin:0px 16px 0px 16px;padding:0px;"> - <paper-checkbox id="selectAllViewsStorageCheckbox" class="rovCheckbox" style="margin:0px 0px 4px 8px;" on-click="selectAllViewStorageClicked">Select all</paper-checkbox> - <paper-listbox id="viewsStorageList" role="listbox"> - <template is="dom-repeat" items="{{viewsStorageItems}}" as="view"> - <paper-item class="viewsStorageListItem"><paper-checkbox class="rovCheckbox" on-change="clearAViewChecked">{{view}}</paper-checkbox></paper-item> - </template> - </paper-listbox> - <div style="margin-top:5px;padding-right:0px" class="buttons"> - <paper-button class="rovDialogButton" id="clearViewStorageButton" on-click="clearViewStorageClicked" disabled>Delete selected</paper-button> - <paper-button class="rovDialogButton" id="clearViewStorageDone" dialog-dismiss>Close</paper-button> - </div> - <div style="margin:0;padding:0;" class="buttons"> - <paper-button class="rovDialogButton" id="clearAllStorageButton" on-click="clearAllStorageClicked" style="position:absolute;margin:5px 0px 0px 0px;right:11px;padding:0;">Clear All ROV Storage</paper-button> - </div> - </div> - </paper-dialog> - <paper-dialog id="rovOptionsMenuDialog"> - <paper-menu id="rovOptionsMenu" class="attachedMenu" on-iron-select="rovOptionsItemSelected"> - <paper-item class="rovOptionsItem" id="addOnViewsClicked"> - <paper-button class="rovOptionsMenuButton"> - <iron-icon class="rovOptionsMenuButtonIcon" icon="hardware:devices-other"></iron-icon> - <label class="rovOptionsMenuLabel">Add-on views</label> - </paper-button> - </paper-item> - <paper-item class="rovOptionsItem" id="dataOptionsClicked"> - <paper-button class="rovOptionsMenuButton"> - <iron-icon class="rovOptionsMenuButtonIcon" icon="swap-vert"></iron-icon> - <label class="rovOptionsMenuLabel">Data retrieval settings</label> - </paper-button> - </paper-item> - <paper-item class="rovOptionsItem" id="storageOptionsDialog"> - <paper-button class="rovOptionsMenuButton"> - <iron-icon class="rovOptionsMenuButtonIcon" icon="device:storage"></iron-icon> - <label class="rovOptionsMenuLabel">Local storage options</label> - </paper-button> - </paper-item> - <paper-item class="rovOptionsItem" id="exportDashboardsClicked" hidden> - <paper-button class="rovOptionsMenuButton"> - <iron-icon class="rovOptionsMenuButtonIcon" icon="archive"></iron-icon> - <label class="rovOptionsMenuLabel">Export dashboards to file</label> - </paper-button> - </paper-item> - <paper-item class="rovOptionsItem" id="showConnectDialogItem"> - <paper-checkbox id="showConnectDialogCheckbox" on-change="showConnectDialogChecked">Show connect dialog</paper-checkbox> - </paper-item> - </paper-menu> - </paper-dialog> - <paper-dialog id="overwriteDashboardsDialog" class="rovDialog" on-click="dlgClicked" on-keypress="overwriteDashboardsKeyPress" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">Save Dashboards<iron-icon id="overwriteDashboardsDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <div style="margin-top:10px;padding:0px;margin-left:16px;margin-right:16px;width:260px;height:50px;"> - <label id="overwriteDashboardsLabel">The following dashboards already exist in ROV local memory:</label> - </div> - <div style="margin-top:0px;padding:0px;margin-left:16px;margin-right:16px;"> - <paper-listbox id="overwriteDashboardsList" role="listbox"> - <template is="dom-repeat" items="{{overwriteDashboardsItems}}" as="dashboard"> - <paper-item class="dashboardsChecklistItem"> - <paper-checkbox class="rovCheckbox" on-click="overwriteADashboardChecked" checked>{{dashboard}}</paper-checkbox> - </paper-item> - </template> - </paper-listbox> - <div style="margin-top:5px;padding-left:0px;padding-right:0px" class="buttons"> - <paper-button class="rovDialogButton" id="overwriteDashboardsButton" on-click="overwriteDashboardsClicked">Overwrite selected</paper-button> - <paper-button class="rovDialogButton" id="overwriteDashboardsDone" dialog-dismiss>Close</paper-button> - </div> - </div> - </paper-dialog> - <paper-dialog id="exportDashboardsDialog" class="rovDialog" on-click="dlgClicked" on-keypress="exportDashboardsKeyPress" on-iron-overlay-closed="dialogClosed" on-iron-overlay-opened="dialogOpened" no-cancel-on-outside-click alwaysOnTop> - <h3 class="rovDialogTitle">Export Dashboards to File<iron-icon id="exportDashboardsDialogClose" class="rovDialogCloseIcon" icon="close" on-click="dialogCloseClicked"></iron-icon></h3> - <div style="margin-top:0px;padding:0px;margin-left:8px;margin-right:16px;width:260px;height:40px;"> - <paper-input id="exportDashboardsInput" type="text" placeholder="Enter filename" no-label-float no-animations autofocus on-input="exportDashboardsOnInput"></paper-input><br> - </div> - <div style="margin-top:0px;padding:0px;margin-left:16px;margin-right:16px;"> - <paper-checkbox id="selectAllExportDashboardsCheckbox" class="rovCheckbox" style="margin:0px 0px 4px 8px;" on-click="selectAllExportDashboardsClicked" checked>Select all dashboards</paper-checkbox> - <paper-listbox id="exportDashboardsList" role="listbox"> - <template is="dom-repeat" items="{{dashboardNames}}" as="dash"> - <paper-item class="dashboardsChecklistItem"> - <paper-checkbox class="rovCheckbox" on-click="exportADashboardChecked" checked title$="{{dash.comment}}">{{dash.name}}</paper-checkbox> - </paper-item> - </template> - </paper-listbox> - <div style="margin-top:5px;padding-left:0px;padding-right:0px" class="buttons"> - <paper-button class="rovDialogButton" id="exportDashboardsButton" on-click="exportDashboardsButtonClicked">Export selected</paper-button> - <paper-button class="rovDialogButton" id="exportDashboardsDone" dialog-dismiss>Cancel</paper-button> - </div> - </div> - </paper-dialog> - - <paper-dialog id="titleOverflowDialog"> - <paper-icon-button id="overflowRefreshAllButton" class="toolbarOverflowDialogButton" icon="refresh" on-click="refreshAllClicked" title="Refresh all" role="button" disabled></paper-icon-button> - <paper-icon-button id="overflowRepeatRefreshButton" class="toolbarOverflowDialogButton" hidden$="{{inRepeatRefresh}}" icon="autorenew" on-click="repeatRefreshClicked" title="Repeat refresh" role="button" disabled></paper-icon-button> - <paper-icon-button id="overflowStopRepeatRefreshButton" class="toolbarOverflowDialogButton" hidden$="{{!inRepeatRefresh}}" icon="av:stop" on-click="stopRepeatRefreshClicked" title="Stop repeat refresh" role="button"></paper-icon-button> - <paper-icon-button id="overflowCloseAllButton" class="toolbarOverflowDialogButton" icon="close" on-click="closeAllClicked" title="Close all views" role="button" disabled></paper-icon-button> - </paper-dialog> - - <paper-dialog id="dashboardOverflowDialog" on-dragenter="dashboardDragEnter" on-dragover="dashboardDragOver"> - <paper-icon-button id="overflowOpenDashboardButton" class="toolbarOverflowDialogButton" icon="dashboard" on-click="openDashboardClicked" on-drop="openDashboardDrop" role="button" title="" disabled></paper-icon-button> - <paper-icon-button id="overflowOpenDashboardFileButton" class="toolbarOverflowDialogButton" icon="folder-open" on-click="openDashboardFileClicked" role="button" title="Import a dashboard" disabled></paper-icon-button> - <input type="file" id="overflowOpenDashboardFileInput" accept=".rov.json" on-change="openDashboardFileSelected" hidden></input> - <paper-icon-button id="overflowSaveDashboardButton" class="toolbarOverflowDialogButton" icon="save" on-click="saveDashboardClicked" role="button" title="Save all current views as a dashboard" disabled></paper-icon-button> - <paper-icon-button id="overflowDeleteDashboardButton" class="toolbarOverflowDialogButton" icon="delete" on-click="deleteDashboardClicked" role="button" title="Delete a dashboard" disabled></paper-icon-button> - </paper-dialog> - - </span> - - <!-- Main Content --> - <div id="contentDiv" class="content"> - <div id="statusConsole" hidden> - <paper-icon-button id="closeStatusButton" title="Close" on-click="hideStatus" icon="close" role="button" tabindex="0"></paper-icon-button> - <ul id="statusList"> - <template is="dom-repeat" items="{{statusItems}}" as="item"> - <li class="statusItem" style$="{{item.style}}"><iron-icon icon$="{{item.icon}}" hidden$="{{item.iconHidden}}" style$="{{item.iconStyle}}" class$="{{item.iconClass}}"></iron-icon>{{item.message}}</li> - </template> - </ul> - </div> - </div> - </paper-header-panel> - </div> - </paper-drawer-panel> - <ti-rov-data id="rovData"></ti-rov-data> - </template> - <script src="ti-rov-panel.js"></script> -</dom-module> - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 deleted file mode 100644 index 3c991af21..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 +++ /dev/null @@ -1,1132 +0,0 @@ -/* - * ======== rovapi.js ======== - * Browser-side ROVServer API - */ - -var rov; /* TICloudAgent ROVServer sub module */ - -var packagePath; /* package path array from the environment, CCS, or ... */ - -var wssPort = 8888; /* standalone nodeserver's WebSocket server port */ -var sock; /* standalone WebSocket server socket */ - -/* ccs7 is true when we are running in the context of the CCS cloud */ -var ccs7 = false; - -var ds; /* DebugServer module: agent.getSubModule("DS") */ -var dsFlag = false; /* true if we're told to connect via DSLite */ -var dsActiveCoreName = null; - -var deferedSymbols = null; -var exeSet = null; /* exeSet != null => ROV connected to the exe exeSet */ - -/* - * ======== debuggerStatus ======== - * Current debugger state - * - * null - unknown or disconnected - * "Disconnected" - - * "TargetHalt" - - * "Running" - - * "Connected" - - * - * TODO: connected/disconnected should be orthogonal to - * running/halted so what's up with the states above?!?! - */ -var debuggerStatus = null; - -/* - * ======== init ======== - */ -function init() -{ - ccs7 = (typeof TICloudAgent) == "undefined" ? false : true; - - /* parse URL for setup parameters */ - var tokens = location.href.split(/[?&]/); - tokens.shift(); - for (var i = 0; i < tokens.length; i++) { - var param = tokens.shift(); - var pair = param.split('='); - switch (pair[0]) { - case "wsPort": { - if (pair[1]) { - wssPort = pair[1]; - console.log("set wssPort to: " + wssPort); - } - break; - } - } - } -} - -/* - * ======== setExecutable ======== - * Specify the executable to decode - * - * This function initializes ROV and must be called before any other calls. - * - * During the operation, progress() is called with a progress string that - * may be useful to an impatient user. - * - * On completion, callback() is called with a response of the form: - * {resStr: "...", exeName: "...", connType: "...", connArgs: ["...", ...]} - * where, - * exeName - full path of the executable - * connType - connection type: "DSLite", "Serial", "Net", ... - * connArgs - array of String values needed by the connection - * or, in the event that none are supplied, [] - * coreName - name of core to which we're connected (if unknown, null) - * resStr - final status result string from this operation: - * "OK" - success - * any other string - failure and the string is a printable - * message explaining the cause - * - * Events coming from the target after a connection is estabilished - * but possibly _before_ and after the executable has been set are - * returned by calling targetEvents(). - * - * path is a string of the form: - * <exe_path>?comm=<comm_type>[:<comm_arg>]*[&<name=value>]* - * where, - * <exe_path> is the full path to the executable - * <comm_type> is "DSLite", "Serial", "Net", ... - * <comm_arg> is a communication-specific value - * <name=value> is an arbitrary name-value pair that is - * specified by the client - */ -function setExecutable(path, reqObj, callback, progress, targetEvents) -{ - init(); - - /* standalone (for now we need TICloudAgent to use DSLite, blech!) */ - if (!ccs7 && path.indexOf("DSLite") == -1) { - var old = sock; - sock = new WebSocket("ws://localhost:" + wssPort); - sock.onopen = function() { - sock.send(JSON.stringify("exec:" + path + "\r\n")); - if (old != null) { - old.close(); - } - }; - - sock.onmessage = function (ret) { - console.log("setExec response: " + ret.data); - if (ret.data != null && ret.data.indexOf("Working:") == 0) { - if (progress != null) progress(ret.data, reqObj); - } - else { - var result = _parseExePath(path); - - /* add resStr to result to form callback value */ - result.resStr = ret.data; - result.exeName = ""; /* safe, but is this needed??? */ - result.coreName = ""; - callback(result, reqObj); - } - }; - } - /* TI Cloud */ - else { - var dev = ""; - var k = path.indexOf("DSLite"); - if (k != -1) { - dsFlag = true; - - /* check path for a device name (default is "") */ - var tmp = path.substr(k + 7).split(':')[0]; - if (tmp != null && tmp != "" && tmp != "undefined") { - dev = tmp; - } - } - - /* connect to the ROV module and DS (if requested) */ - _connect().then( - /* connect to active core's module */ - function(obj) { - /* save ROVServer module for subsequent use */ - rov = obj; - - /* use ds to get debug core */ - if (ds == null || dsFlag == false) { - var promContainer = Q.defer(); - var prom = promContainer.promise; - promContainer.resolve(); - return (prom); /* return undefined */ - } - - /* if ds != null, get all core names */ - return ds.listCores().then( - function(cores) { - return _setupCore(cores, dev, targetEvents, reqObj); - } - ).then( - function(core0) { - console.log("dstatus: " + debuggerStatus); - if (debuggerStatus == null - || debuggerStatus == "Disconnected") { - console.log("debugger is not connected"); - /* don't fail if connection is, say, Serial. - * (does this make sense?) - */ - if (dsFlag) { - throw new Error("The debugger is not connected"); - } - } - return (core0); /* return core's module */ - } - ); - } - ) - .then( - /* use debug core to get exe name */ - function(core0) { - if (core0 != null) { - /* ask debugger for files loaded on specified core */ - return _getSymbols(core0); - } - console.log("no debugger => no symbol file list"); - return ({symbolFiles: []}); - } - ) - .then( - /* get package path for the specified exe */ - function(files) { - console.log("core files: " - + JSON.stringify(files, null, 3)); - var exe = _validateExe(path, files).split('?')[0]; - return _getProject(exe).then( - function (proj) { - console.log("exe project: " - + JSON.stringify(proj, null, 3)); - if (proj.location && rov_setFileDefaults) { - rov_setFileDefaults(proj.location, proj.location); - } - return (_getPackagePath(proj.name)); - } - ) - .then( - function (path) { - packagePath = path; - console.log("exe package path: " + path); - return (files); - } - ) - .fail( - function(msg) { - throw new Error(msg); - } - ); - } - ) - .then( - /* start ROV model with an exe specified by path or debugger */ - function(files) { - console.log("core files: " - + JSON.stringify(files, null, 3)); - var newPath = _validateExe(path, files); - var obj = _parsePackagePath(packagePath); - - console.log("rov.setExec(" + newPath + ", " + obj.xdcroot - + ", " + obj.xdcpath + ")"); - return rov.setExec(newPath, obj.xdcroot, obj.xdcpath).then( - function detectProgress(res) { - console.log("setExec response: " + res); - if (res != null && res.indexOf("Working:") == 0) { - rov.getProgress().then(detectProgress); - if (progress != null) { - progress(res, reqObj); - } - } - else { - /* parse newPath for the UI */ - var result = _parseExePath(newPath); - result.coreName = _getCoreName(dsActiveCoreName); - - /* add resStr to result to form callback value */ - result.resStr = res; - - /* save just the exe name */ - exeSet = result.exeName; - - callback(result, reqObj); - } - } - ); - } - ) - .fail( - function(err) { - var msg = err.message ? err.message : err; - console.log("Error: setExecutable() failed: " + msg); - var result = _parseExePath(path); - result.resStr = String(msg); - result.exeName = ""; - result.coreName = ""; - callback(result, reqObj); - } - ); - } - - return (true); -} - -/* - * ======== discoverAddons ======== - */ -function discoverAddons(reqObj, callback) -{ - /* standalone */ - if (sock != null) { - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - }; - sock.send(JSON.stringify("addons\r\n")); - } - /* TI Cloud */ - else { - rov.discoverAddons().then( - function(list) { - console.log("addons: " + list); - var parsed = null; - var err = null; - try { - parsed = JSON.parse(list); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log( - "Error: Unexpected Exception from discoverAddons callback:" - + msg); - } - ); - } - - return (true); -} - -/* - * ======== getViewList ======== - * Get list of all modules and their supported views - * - * The view list is a map of arrays, where keys are module names and values - * are arrays of the objects with 'name' and 'type' properties. - * [{name:"view1", type:"view1_type"}, ... ,{name:"viewN", type:"viewN_type"}] - * - * Returns the view list or an error by calling callback(err, list, reqObj), - * where, - * err - error string (or null for no error) - * list - the view list (or null if err is non-null - * reqObj - the passed in context object - */ -function getViewList(reqObj, callback) -{ - /* standalone */ - if (sock != null) { - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - }; - sock.send(JSON.stringify("list\r\n")); - } - /* TI Cloud */ - else { - rov.getViews().then( - function(list) { - console.log("list: " + list); - var parsed = null; - var err = null; - try { - parsed = JSON.parse(list); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log( - "Error: Unexpected Exception from getViewList callback:" - + msg); - } - ); - } - - return (true); -} - -/* - * ======== getView ======== - * Get specified view from a module - * - * Returns the view list or an error by calling - * callback(err, view, module, view,reqObj), - * where, - * err - error string (or null forno error) - * list - the view JSON object (or null if err is non-null - * module - the passed in modeule name - * view - the passed in view name - * reqObj - the passed in context object - */ -var queue = []; -function getView(module, view, reqObj, callback) -{ - /* standalone */ - if (sock != null) { - queue.push({module: module, view: view, reqObj: reqObj}); - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - - if (ret.data.indexOf("Error:") == 0) { - err = ret.data; - } - else { - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' - + e.message + ": " + ret.data; - } - } - var args = queue.shift(); - callback(err, parsed, args.module, args.view, args.reqObj); - }; - - sock.send(JSON.stringify("view:" + module + "," + view + "\r\n")); - } - /* TI Cloud */ - else { - //if (debuggerStatus == "Running") { - // callback("Target is running!", null, module, view, reqObj); - // return; - //} - if (dsFlag && (debuggerStatus == null - || debuggerStatus == "Disconnected")) { - callback("Target is disconnected!", null, module, view, reqObj); - return (false); - } - rov.getView(module, view).then( - function(response) { - if (response.indexOf("Error:") == 0) { - callback(response, null, module, view, reqObj); - } - else { - var parsedRes; - var parseErr = null; - try { - parsedRes = JSON.parse(response); - } - catch (e) { - parseErr = 'Error: JSON.parse exception: ' + e.message; - parsedRes = null; - } - callback(parseErr, parsedRes, module, view, reqObj); - } - console.log(module + ":" + view + ": " + response); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log("Error: Unexpected exception from getView(" - + module + ", " + view + "): " + msg); - } - ); - } - - return (true); -} - -/* - * ======== _configureDebugger ======== - * Configure debugger using the supplied target configuration - * - * devName is the basename of a .ccxml file (minus the .ccxml extension) - * that defines how to setup the debugger - * - * rov is assumed to be non-null (i.e., _connect() returns a promise to get - * the ROVServer module _and_ that promise resolved to rov). - * - * ds is also assumed to be non-null, which is implied by rov != null - * because, ds is initialized by _connect() before creating the promise to - * get rov. - * - * Returns a promise - * resolved to dbg, where dbg.cores == array of cores - * or - * rejected because devName.ccxml is not found or - * configuration with this file failed - * - * (Internal function) - */ -function _configureDebugger(devName) -{ - console.log("_configureDebugger(" + devName + ")"); - return _getProject().then( - /* get the package path from active project (or workspace if none) */ - function(proj) { - console.log("activeProjectContext: " + JSON.stringify(proj, null, 3)); - return _getPackagePath(proj.name); - } - ).then( - /* lookup .ccxml file along package path */ - function (packagePath) { - return rov.find(devName + ".ccxml", packagePath); - } - ).then( - /* configure the debugger */ - function(ccxmlFile) { - console.log("configuring with: " + ccxmlFile); - return ds.configure(ccxmlFile).fail( - function(err) { - var msg = "configuration for '" + devName - + "' failed: " + (err.message ? err.message : err); - console.log(msg); - throw new Error(msg); - } - ); - } - ).fail( - function(err) { - debuggerStatus = null; - - var msg = "can't find " + devName + ".ccxml"; - console.log(msg); - throw new Error(msg); - } - ); -} - -/* - * ======== _connect ======== - * Connect to the ROV module in the TICloudAgent WebSocket server - * - * Called directly by setExecutable() to establish connection with - * the ROVServer module (rov_server.js). - * - * Returns a promise - * resolved to rov = ROVServer submodule (agent.getSubModule("ROVServer")) - * rejected because we can't start agent or the connection is - * DSLite and we failed to get the DS submodule - * - * Throws an exception if TICloudAgent.Init() throws (which it shouldn't) - * - * Side Effects: sets ds to the DebugServer/DSLite module - * - * (Internal function) - */ -function _connect() -{ - var agent; - console.log("_connect: connecting ..."); - - if (rov != null) { - var prom = Q.defer(); - prom.resolve(rov); - console.log("_connect: using cached rov = " + rov); - return (prom.promise); - } - - return TICloudAgent.Init().then( - /* init/configure agent and get EventBroker module */ - function(_agent) { - agent = _agent; - agent.addConfigProperty("cloudAgentInstallerServerURL", - location.origin + "/ticloudagent/"); - return agent.getSubModule("EventBroker"); - } - ).then( - /* add EventBroker listeners and get active project */ - function(broker) { - broker.addListener("ccs.debug.activeContextChangedEvent", - function(data) { - console.log("ccs.debug.activeContextChanged: " - + JSON.stringify(data, null, 3)); - }); - - return broker.fetchData("ccs.debug.activeContext"); - } - ).then( - /* get DS module */ - function(obj) { - console.log("activeDebugContext: " + JSON.stringify(obj, null, 3)); - if (obj.data && obj.data.length > 0) { - dsActiveCoreName = obj.data[0].core; - } - - /* get DS sub-model from agent */ - return agent.getSubModule("DS"); - } - ).then( - /* add DS listeners */ - function(_ds) { - ds = _ds; - console.log("acquired DS sub-module: " + ds); - ds.addListener("close", - function() { - console.log("DS closing"); - debuggerStatus = null; - } - ); - ds.addListener("configChanged", - function(data) { - console.log("DS config changed: " - + JSON.stringify(data, null, 3)); - if (data.cores[0] == undefined) { - debuggerStatus = null; - console.log("DS config changed: debugger terminated"); - if (exeSet != null) { - location.reload(true); - exeSet = null; - } - } - } - ); - } - ).fail( - /* throw exception if we can't start agent or get DS submodule */ - function(err) { - var emsg = err.message ? err.message : err; - if (agent == null) { - var msg = "ROV _connect failed to start agent: " + emsg; - console.log(msg); - throw new Error(msg); - } - else if (ds == null) { - var msg = "ROV _connect failed to acquire DS: " + emsg; - console.log(msg); - if (String(emsg).indexOf("ccs.debug.activeContext") != -1) { - msg = "Unable to obtain package path from CCS. Try " - + "restarting ROV after starting the debugger. " - + emsg; - } - if (dsFlag) { - throw new Error(msg); - } - } - } - ).then( - /* return ROVServer submodule */ - function() { - console.log("_connect: requesting server ROV Module from agent"); - return agent.getSubModule("ROVServer"); - } - ); -} - -/* - * ======== _getCoreName ======== - */ -function _getCoreName(dsName) -{ - var coreName = ""; - if (dsName != null) { - var k = dsName.lastIndexOf('/'); - coreName = dsName.substr(k + 1); - } - - return (coreName); -} - -/* - * ======== _getProject ======== - * Return the "current project" or the project containing exePath - * - * Returns a promise that resolves to an object containing the name of the - * current project and its location. - * - * XMLHttpRequest returns: - * 400 and an error message when a required argument is not present - * in the request. - * 500 and log the error message when there is an unexpected exception - * while servicing a request - * 200 and an empty body when there is nothing to return. Eg, if the - * findContextProject finds nothing - * 200 and a JSON object in body (with contentType header set to - * "application/json"), when there is data to return - * 404, 403, etc. in the cases where server is down for some reason, - * or when request is sent to an unknown route - */ -function _getProject(exePath) -{ - var defer = Q.defer(); - - if (!ccs7) { - defer.resolve(null); - return (defer.promise); - } - - /* get project/workspace information */ - function transferFailed(req) { - /* the request for info failed */ - return function (evt) { - var msg = "An error occurred while getting " - + req + " info: " + evt; - console.log(msg); - defer.reject(msg); - }; - } - - function reqListener(req) { - /* the request for info succeeded (maybe: 404 errors return HTML!) */ - return function() { - console.log(req + " info: " + this.responseText); - var result = {name: null, location: null}; - try { - /* TODO: throw if req.status != 200? */ - if (this.responseText != "") { - result = JSON.parse(this.responseText); - } - } - catch (e) { - /* TODO: use statusText rather than responseText? */ - defer.reject("An error occurred while getting " - + req + " info: IDE server failed: " + this.responseText); - } - defer.resolve(result); - }; - } - - /* request current project from the CCS "ide server" */ - var req = new XMLHttpRequest(); - console.log("getting project ..."); - req.addEventListener("load", reqListener("project")); - req.addEventListener("error", transferFailed("project")); - - var suffix = "/ide/findContextProject"; - if (exePath != null) { - suffix = "/ide/findOwnerProject?resourcePath=" + exePath; - } - - req.open("GET", encodeURI(location.origin + suffix)); - req.send(); - - return (defer.promise); -} - -/* - * ======== _getPackagePath ======== - * Return the package path from the current context (if provided) - * - * Returns an array consisting of the package path components, the last - * being the "./packages" sub-directory of XDCtools. - * - * If running in the context of CCS7, ask CCS, otherwise returns null. - */ -function _getPackagePath(projectName) -{ - var defer = Q.defer(); - - if (!ccs7) { - defer.resolve(null); - return (defer.promise); - } - - /* get project/workspace information */ - function transferFailed(req) { - /* the request for info failed */ - return function (evt) { - var msg = "An error occurred while getting " - + req + " info: " + evt; - console.log(msg); - defer.reject(msg); - }; - } - - function reqListener(req) { - /* the request for info succeeded (maybe: 404 errors return HTML!) */ - return function() { - console.log(req + " info: " + this.responseText); - var result = null; - try { - if (this.responseText != "") { - var obj = JSON.parse(this.responseText); - result = obj.packagePath; - } - } - catch (e) { - defer.reject("An error occurred while getting " - + req + " info: IDE server failed: " + this.responseText); - } - defer.resolve(result); - }; - } - - /* request package path from the CCS "ide server" */ - var req = new XMLHttpRequest(); - if (projectName != null && projectName != "") { - /* get path from project */ - console.log("getting package path from project '" + projectName + "'."); - req.addEventListener("load", reqListener("project")); - req.addEventListener("error", transferFailed("project")); - req.open("GET", location.origin - + "/ide/getProjectProperties?projectName=" + projectName); - } - else { - /* get path from workspace */ - console.log("getting package path from workspace"); - req.addEventListener("load", reqListener("workspace")); - req.addEventListener("error", transferFailed("workspace")); - req.open("GET", location.origin + "/ide/getBuildPreferences"); - } - req.send(); - - return (defer.promise); -} - -/* - * ======== _getSymbols ======== - * Return a non-empty set of symbol files for the specified core - * - * If the current set of symbol files is [], wait up to 5s for that to - * change. If it doesn't, fail by rejecting the returned promise. - */ -function _getSymbols(core) -{ - console.log("_getSymbols: request core's symbol files"); - var defered = Q.defer(); - deferedSymbols = defered; /* request symbol files from symbols listener */ - return (core.symbols.getSymbolFiles().then( - function (syms) { - if (syms.symbolFiles.length != 0) { - console.log("_getSymbols: canceled core.symbols request"); - deferedSymbols = null; /* cancel symbols listener request */ - defered.resolve(syms); - } - return (defered.promise.timeout(5000, - "Can't connect: Program symbols must be loaded to " - + "core '" + dsActiveCoreName + "'")); - } - )); -} - -/* - * ======== _parsePackagePath ======== - */ -function _parsePackagePath(packagePath) -{ - if (packagePath != null && packagePath.length > 0) { - var xdcroot = packagePath[packagePath.length - 1].replace(/packages$/, ""); - var xdcpath = packagePath.slice(0, packagePath.length - 1).join(';'); - return ({ - xdcroot: xdcroot, - xdcpath: xdcpath - }); - } - return ({xdcpath: null, xdcroot:null}); -} - -/* - * ======== _parseExePath ======== - * Return JSON object with path components split out into distinct items - * { - * exeName: non-null String - * connType: non-null String - * connArgs: Array of 0 or more Strings - * } - * where, - * exeName - full path of the executable - * connType - connection type: "DSLite", "Serial", "Net", ... - * connArgs - array of String values needed by the connection - * or, in the event that none are supplied, [] - * - */ -function _parseExePath(path) -{ - var result = {}; - - /* separate exe from path */ - var tokens = path.split('?'); - result.exeName = tokens[0]; - - /* separate connection from name=value pairs */ - var connection = tokens[1].split('&')[0]; - - /* split connection into type and args */ - tokens = connection.split(':'); - result.connType = tokens.shift(); - result.connArgs = tokens; - - return (result); -} - -/* - * ======== _setupCore ======== - * If the debugger is not already configured, we configure it here for the - * specified device - * - * This function is only called when we are connecting via DSLite. - * - * dbg is the a debugger object that has a list of (possibly already) - * configured cores. - * - * devName is either "" or and basename (minus extension) of a .ccxml file - * that should be used to configure the device; if devName is "" - * the debugger should already have been configured. - * - * targetEvents and obj are used to send target events generated by - * dbg.cores[0] up to the caller - * - * Returns a promise - * resolved to core 0 module with debugger connected and target running - * or - * rejected because we can't start agent or the connection is - * DSLite and we failed to get the DS submodule - * - * (Internal function) - */ -function _setupCore(dbg, devName, targetEvents, obj) -{ - var prom; - console.log("configuring one debugger core of " + dbg.cores.length - + " cores"); - if (dbg.cores.length == 0 && devName != "") { - /* if the number of cores is 0, core 0 has not already been configured - * by the user via the debugger or a second instance of ROV; so, we - * try to do it now using the .ccxml file specified by devName. - */ - prom = _configureDebugger(devName); - } - else { - var promContainer = Q.defer(); - prom = promContainer.promise; - - if (dbg.cores.length == 0) { /* and devName == "" */ - promContainer.reject(new Error( - "the debugger has not been configured for any device. " - + "Try reconnecting after connecting to the target with " - + "the debugger.")); - } - else if (devName != "") { /* and dbg.cores.length != 0 */ - /* deconfigure closes websockets connected to all cores; so, to - * properly deconfigure we must restart monserver. For now we - * skip the deconfigure step until we figure out how to manage - * the lifecycle of DSLite cores and monserver instances - */ - promContainer.reject(new Error( - "the debugger has already been configured for the device. " - + "To connect with the existing configuration, don't " - + "specify a device configuration; use just 'Debugger'.")); - } - else { /* devName == "" and dbg.cores.length != 0 */ - /* Assume that the debugger has already started for the - * right configuration. - */ - console.log("debugger is up for core " + dbg.cores[0]); - promContainer.resolve(dbg); - } - } - - /* at this point prom is either resolved as dbg, or rejected */ - return prom.then( - function(dbg) { - /* select the currently active debug core */ - var id = 0; - if (dsActiveCoreName != null) { - for (var i = 0; i < dbg.cores.length; i++) { - if (dbg.cores[i] == dsActiveCoreName) { - id = i; - break; - } - } - } - var cname = dbg.cores[id]; - - console.log("adding listeners to core[" + id + "] = '" + cname + "'"); - return ds.getSubModule(cname).then( - /* add listeners to active core */ - function(debugCore) { - console.log("adding target state halt listener"); - debugCore.targetState.waitForHalt( - function(halted) { - debuggerStatus = "TargetHalt"; - console.log("targetState halted"); - } - ); - - debugCore.addListener("refresh", - function(status) { - console.log("core 'refresh' status: " - + JSON.stringify(status, null, 3)); - debuggerStatus = status.reason; - if (targetEvents) { - targetEvents(debuggerStatus, obj); - } - } - ); - - console.log("adding target state change listener"); - debugCore.targetState.addListener("changed", - function(status) { - console.log("targetState status: " - + JSON.stringify(status, null, 3)); - if (status.description == "Running") { - debuggerStatus = "Running"; - } - else if (status.description.match(/^Disconnected/)) - { - debuggerStatus = "Disconnected"; - } - } - ); - - console.log("adding target symbols change listener"); - debugCore.symbols.addListener("changed", - function(status) { - console.log("core.symbols status: " - + JSON.stringify(status, null, 3)); - - /* resolve non-empty symbol file requests */ - if (deferedSymbols - && status.symbolFiles - && status.symbolFiles.length != 0) { - - deferedSymbols.resolve(status); - deferedSymbols = null; - console.log("core.symbols resolved request"); - } - - /* trigger ROV reloads (if necessary) */ - if (exeSet != null - && status.symbolFiles - && status.symbolFiles.length == 0) { - - exeSet = null; - location.reload(true); - } - } - ); - - return (debugCore); - } - ).then( - /* connect to and start "active" debug core */ - function(debugCore) { - var alreadyConnected = false; - - console.log("connecting to active core"); - return debugCore.targetState.connect().then( - function() { - debuggerStatus = "Connected"; - } - ).fail( - function(err) { - if (err.message != undefined - && err.message == - "Target is already connected") { - /* If we made it here with this error message, - * it means the user already started debugger - * so we are not going to call run(). We - * let the user control ROV via the debugger. - */ - debuggerStatus = "Connected"; - alreadyConnected = true; - } - else { - console.log("connect failed: " - + (err.message ? err.message : err)); - throw (err); - } - } - ).then( - function() { - if (alreadyConnected == false) { - /* try starting the core, but ignore fails */ - console.log("starting: " + debugCore); - debugCore.targetState.run().fail( - function (err) { - var msg = - err.message ? err.message : err; - console.log(debugCore - + " could not be started: " + msg); - } - ); - } - - return (debugCore); - } - ); - } - ); - } - ). - fail( - /* handle the case where original prom was rejected */ - function(err) { - var msg = "Debugger setup failed: " - + (err.message ? err.message : err); - console.log(msg); - throw new Error(msg); - } - ); -} - -/* - * ======== _validateExe ======== - */ -function _validateExe(path, files) -{ - console.log("_validateExe(" + path + ", [" + files.symbolFiles + "])"); - - var tokens = path.split('?'); /* split exe path from the connection */ - var fpath = tokens[0].replace(/\\/g, '/'); - var suffix = '?' + tokens[1]; - - var dpath = ""; - if (files.symbolFiles.length > 0) { - dpath = files.symbolFiles[0].replace(/\\/g, '/'); - } - - /* check for miracles */ - if (dpath == fpath) { - return (dpath + suffix); - } - - /* take debugger's path if it's set and nothing else if specified */ - if (dpath != "" && (fpath == "undefined" || fpath == "")) { - return (dpath + suffix); - } - - /* take specified path if it's set and the debugger is clueless */ - if (dpath == "" && (fpath != "undefined" && fpath != "")) { - return (fpath + suffix); - } - - /* else fail */ - var msg = "can't determine the executable path from input '" - + fpath + "' and debugger's '" + dpath + "'"; - - if (dpath != "" && fpath != "undefined" && fpath != "") { - msg = "debugger loaded " + dpath - + "' but '" + fpath + "' was specified."; - } - else if (dpath == "" && (fpath == "undefined" || fpath == "")) { - msg = "no executable path was specifed. Either specify the path to the executable or, if connected via CCS, load program symbols."; - } - - throw (new Error(msg)); -} diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 deleted file mode 100644 index 010d57dc8..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -!function(a,b){var c={},d={},e={},f=null;!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=x}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&v.indexOf(b[c])==-1)return;if("direction"==c&&w.indexOf(b[c])==-1)return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i<j;){var k=(i+j)/2,l=f(a,c,k);if(Math.abs(e-l)<1e-5)return f(b,d,k);l<e?i=k:j=k}return f(b,d,k)}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function k(a){C||(C=document.createElement("div").style),C.animationTimingFunction="",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");return b}function l(a){if("linear"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);if(c)return j(Number(c[1]),{start:y,middle:z,end:A}[c[2]]);var d=B[a];return d?d:x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return G;var d=c.delay+a+c.endDelay;return b<Math.min(c.delay,d)?H:b>=Math.min(c.delay+a,d)?I:J}function p(a,b,c,d,e){switch(d){case H:return"backwards"==b||"both"==b?0:null;case J:return c-e;case I:return"forwards"==b||"both"==b?a:null;case G:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==H&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==I||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===I&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if("normal"!==a&&"reverse"!==a){var e=b;"alternate-reverse"===a&&(e+=1),d="normal",e!==1/0&&e%2!==0&&(d="reverse")}return"normal"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),x=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,y),"step-middle":j(1,z),"step-end":j(1,A)},C=null,D="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E=new RegExp("cubic-bezier\\("+D+","+D+","+D+","+D+"\\)"),F=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,G=0,H=1,I=2,J=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(c,f),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return"display"===a||0===a.lastIndexOf("animation",0)||0===a.lastIndexOf("transition",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g<f;g++)e={},"offset"in a?e.offset=a.offset:1==f?e.offset=1:e.offset=g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function g(b){function c(){var a=d.length;null==d[a-1].offset&&(d[a-1].offset=1),a>1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e<a;e++){var f=d[e].offset;if(null!=f){for(var g=1;g<e-b;g++)d[b+g].offset=c+(f-c)*g/(e-b);b=e,c=f}}}if(null==b)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||(b=f(b));for(var d=b.map(function(b){var c={};for(var d in b){var f=b[d];if("offset"==d){if(null!=f){if(f=Number(f),!isFinite(f))throw new TypeError("Keyframe offsets must be numbers.");if(f<0||f>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==d){if("add"==f||"accumulate"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=f)throw new TypeError("Invalid composite mode "+f+".")}else f="easing"==d?a.normalizeEasing(f):""+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing="linear"),c}),g=!0,h=-(1/0),i=0;i<d.length;i++){var j=d[i].offset;if(null!=j){if(j<h)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");h=j}else g=!1}return d=d.filter(function(a){return a.offset>=0&&a.offset<=1}),g||c(),d}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},i=document.createElementNS("http://www.w3.org/1999/xhtml","div"),j={thin:"1px",medium:"3px",thick:"5px"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:j,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g<h&&(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,1))},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=g,i=g+1,j=f[h].offset,k=f[i].offset,l=j,m=k;0==g&&(l=-(1/0),0==k&&(i=h)),g==f.length-2&&(m=1/0,1==j&&(h=i)),d.push({applyFrom:l,applyTo:m,startOffset:f[h].offset,endOffset:f[i].offset,easingFunction:a.parseEasingFunction(f[h].easing),property:e,interpolation:b.propertyInterpolation(e,f[h].value,f[i].value)})}return d.sort(function(a,b){return a.startOffset-b.startOffset}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return c>=a.applyFrom&&c<a.applyTo}).forEach(function(d){var e=c-d.startOffset,f=d.endOffset-d.startOffset,g=0==f?0:d.easingFunction(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){var g=c[f];e(a,b,d(g))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(c,d,f),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateIterationProgress(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return h=i(a),null!==h},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._target=c,k._totalDuration=i._totalDuration,k._id=g,k},b.NullEffect=function(a){var b=function(){a&&(a(),a=null)};return b._update=function(){return null},b._totalDuration=0,b._hasSameTarget=function(){return!1},b}}(c,d,f),function(a,b){a.apply=function(b,c,d){b.style[a.propertyName(c)]=d},a.clear=function(b,c){b.style[a.propertyName(c)]=""}}(d,f),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(d),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return d<.5?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(d,f),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();a.indexOf(this)===-1&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);b!==-1&&a.splice(b,1)}}}(c,d,f),function(a,b,c){function d(a){var b=j;j=[],a<q.currentTime&&(a=q.currentTime),q._animations.sort(e),q._animations=h(a,!0,q._animations)[0],b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c,d){p=!0,n=!1;var e=b.timeline;e.currentTime=a,m=!1;var f=[],g=[],h=[],i=[];return d.forEach(function(b){b._tick(a,c),b._inEffect?(g.push(b._effect),b._markTarget()):(f.push(b._effect),b._unmarkTarget()),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;b._inTimeline=d,d?h.push(b):i.push(b)}),o.push.apply(o,f),o.push.apply(o,g),m&&requestAnimationFrame(function(){}),p=!1,[h,i]}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.applyDirtiedAnimation(d),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.applyDirtiedAnimation=function(a){if(!p){a._markTarget();var c=a._targetAnimations();c.sort(e);var d=h(b.timeline.currentTime,!1,c.slice())[1];d.forEach(function(a){var b=q._animations.indexOf(a);b!==-1&&q._animations.splice(b,1)}),g()}};var o=[],p=!1,q=new f;b.timeline=q}(c,d,f),function(a){function b(a,b){var c=a.exec(b);if(c)return c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);if(c)return[c[0],c[1].replace(/^\s*/,"")]}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,c<=0))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}if(""==c)return d}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;k<j;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(d),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);if(c)return d.inset=!0,c;var c=a.consumeLengthOrPercent(b);if(c)return d.lengths.push(c[0]),c;var c=a.consumeColor(b);return c?(d.color=c[0],c):void 0}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);if(e&&e[0].length)return[d,e[1]]}function c(c){var d=a.consumeRepeated(b,/^,/,c);if(d&&""==d[1])return d[0]}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(d),function(a,b){function c(a){return a.toFixed(3).replace(".000","")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a))return Number(a)}function f(a,b){return[a,b,c]}function g(a,b){if(0!=a)return i(0,1/0)(a,b)}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,j,["z-index"]),a.parseNumber=e,a.mergeNumbers=f,a.numberToString=c}(d,f),function(a,b){function c(a,b){if("visible"==a||"visible"==b)return[0,1,function(c){return c<=0?a:c>=1?b:"visible"}]}a.addPropertiesHandler(String,c,["visibility"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(a,b){return e(a,b,!0)}function e(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);if(b&&""==b[1])return b[0]},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(d,f),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r],void 0===p)return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]),g=a.composeMatrix(b[0],b[1],b[2],c,b[4]),h=g.map(f).join(",");return h}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"])}(d,f),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b)})}var d={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1, -this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(c),!function(a,b,c){function d(a){var c=b.timeline;c.currentTime=a,c._discardAnimations(),0==c._animations.length?f=!1:requestAnimationFrame(d)}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(c){b.timeline._updateAnimationsPromises(),a(c),b.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(a){}try{window.document.timeline=g}catch(a){}}(c,e,f),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b<this.effect.children.length;b++)this.effect.children[b]._animation=a,this._childAnimations[b]._setExternalAnimation(a)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var a=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(c){var d=b.timeline._play(c);this._childAnimations.push(d),d.playbackRate=this.playbackRate,this._paused&&d.pause(),c._animation=this.effect._animation,this._arrangeChildren(d,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c))}.bind(this))}},_arrangeChildren:function(a,b){null===this.startTime?a.currentTime=this.currentTime-b/this.playbackRate:a.startTime!==this.startTime+b/this.playbackRate&&(a.startTime=this.startTime+b/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(b.animationsWithPromises.indexOf(this)==-1&&b.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(a,b){this._resolveFinishedPromise=function(){a(this)},this._rejectFinishedPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(b.animationsWithPromises.indexOf(this)==-1&&b.animationsWithPromises.push(this),this._readyPromise=new Promise(function(a,b){this._resolveReadyPromise=function(){a(this)},this._rejectReadyPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(a){"function"==typeof a?this._animation.onfinish=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.onfinish=a},get oncancel(){return this._animation.oncancel},set oncancel(a){"function"==typeof a?this._animation.oncancel=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.oncancel=a},get currentTime(){this._updatePromises();var a=this._animation.currentTime;return this._updatePromises(),a},set currentTime(a){this._updatePromises(),this._animation.currentTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.currentTime=a-c}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(a){this._updatePromises(),this._animation.startTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.startTime=a+c}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(a){this._updatePromises();var b=this.currentTime;this._animation.playbackRate=a,this._forEachChild(function(b){b.playbackRate=a}),null!==b&&(this.currentTime=b),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),this._timeline._animations.indexOf(this)==-1&&this._timeline._animations.push(this),this._register(),b.awaitStartTime(this),this._forEachChild(function(a){var b=a.currentTime;a.play(),a.currentTime=b}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(a){a.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var a=this.currentTime;this._animation.reverse(),this._forEachChild(function(a){a.reverse()}),null!==a&&(this.currentTime=a),this._updatePromises()},addEventListener:function(a,b){var c=b;"function"==typeof b&&(c=function(a){a.target=this,b.call(this,a)}.bind(this),b._wrapper=c),this._animation.addEventListener(a,c)},removeEventListener:function(a,b){this._animation.removeEventListener(a,b&&b._wrapper||b)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(b){var c=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(a){b.call(this,a,c),this.effect instanceof window.SequenceEffect&&(c+=a.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var d=this.effect._timing,e=this.currentTime;null!==e&&(e=a.calculateIterationProgress(a.calculateActiveDuration(d),e,d)),(null==e||isNaN(e))&&this._removeChildAnimations()}}},window.Animation=b.Animation}(c,e,f),function(a,b,c){function d(b){this._frames=a.normalizeKeyframes(b)}function e(){for(var a=!1;i.length;){var b=i.shift();b._updateChildren(),a=!0}return a}var f=function(a){if(a._animation=void 0,a instanceof window.SequenceEffect||a instanceof window.GroupEffect)for(var b=0;b<a.children.length;b++)f(a.children[b])};b.removeMulti=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d._parent?(b.indexOf(d._parent)==-1&&b.push(d._parent),d._parent.children.splice(d._parent.children.indexOf(d),1),d._parent=null,f(d)):d._animation&&d._animation.effect==d&&(d._animation.cancel(),d._animation.effect=new KeyframeEffect(null,[]),d._animation._callback&&(d._animation._callback._animation=null),d._animation._rebuildUnderlyingAnimation(),f(d))}for(c=0;c<b.length;c++)b[c]._rebuild()},b.KeyframeEffect=function(b,c,e,f){return this.target=b,this._parent=null,e=a.numericTimingToObject(e),this._timingInput=a.cloneTimingInput(e),this._timing=a.normalizeTimingInput(e),this.timing=a.makeTiming(e,!1,this),this.timing._effect=this,"function"==typeof c?(a.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=c):this._normalizedKeyframes=new d(c),this._keyframes=c,this.activeDuration=a.calculateActiveDuration(this._timing),this._id=f,this},b.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(a){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=a,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var b=new KeyframeEffect(this.target,[],a.cloneTimingInput(this._timingInput),this._id);return b._normalizedKeyframes=this._normalizedKeyframes,b._keyframes=this._keyframes,b},remove:function(){b.removeMulti([this])}};var g=Element.prototype.animate;Element.prototype.animate=function(a,c){var d="";return c&&c.id&&(d=c.id),b.timeline._play(new b.KeyframeEffect(this,a,c,d))};var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");b.newUnderlyingAnimationForKeyframeEffect=function(a){if(a){var b=a.target||h,c=a._keyframes;"function"==typeof c&&(c=[]);var d=a._timingInput;d.id=a._id}else var b=h,c=[],d=0;return g.apply(b,[c,d])},b.bindAnimationForKeyframeEffect=function(a){a.effect&&"function"==typeof a.effect._normalizedKeyframes&&b.bindAnimationForCustomEffect(a)};var i=[];b.awaitStartTime=function(a){null===a.startTime&&a._isGroup&&(0==i.length&&requestAnimationFrame(e),i.push(a))};var j=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){b.timeline._updateAnimationsPromises();var a=j.apply(this,arguments);return e()&&(a=j.apply(this,arguments)),b.timeline._updateAnimationsPromises(),a}}),window.KeyframeEffect=b.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(a){return null!==a.effect&&a.effect.target==this}.bind(this))}}(c,e,f),function(a,b,c){function d(a){a._registered||(a._registered=!0,g.push(a),h||(h=!0,requestAnimationFrame(e)))}function e(a){var b=g;g=[],b.sort(function(a,b){return a._sequenceNumber-b._sequenceNumber}),b=b.filter(function(a){a();var b=a._animation?a._animation.playState:"idle";return"running"!=b&&"pending"!=b&&(a._registered=!1),a._registered}),g.push.apply(g,b),g.length?(h=!0,requestAnimationFrame(e)):h=!1}var f=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);b.bindAnimationForCustomEffect=function(b){var c,e=b.effect.target,g="function"==typeof b.effect.getFrames();c=g?b.effect.getFrames():b.effect._onsample;var h=b.effect.timing,i=null;h=a.normalizeTimingInput(h);var j=function(){var d=j._animation?j._animation.currentTime:null;null!==d&&(d=a.calculateIterationProgress(a.calculateActiveDuration(h),d,h),isNaN(d)&&(d=null)),d!==i&&(g?c(d,e,b.effect):c(d,b.effect,b.effect._animation)),i=d};j._animation=b,j._registered=!1,j._sequenceNumber=f++,b._callback=j,d(j)};var g=[],h=!1;b.Animation.prototype._register=function(){this._callback&&d(this._callback)}}(c,e,f),function(a,b,c){function d(a){return a._timing.delay+a.activeDuration+a._timing.endDelay}function e(b,c,d){this._id=d,this._parent=null,this.children=b||[],this._reparent(this.children),c=a.numericTimingToObject(c),this._timingInput=a.cloneTimingInput(c),this._timing=a.normalizeTimingInput(c,!0),this.timing=a.makeTiming(c,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){e.apply(this,arguments)},window.GroupEffect=function(){e.apply(this,arguments)},e.prototype={_isAncestor:function(a){for(var b=this;null!==b;){if(b==a)return!0;b=b._parent}return!1},_rebuild:function(){for(var a=this;a;)"auto"===a.timing.duration&&(a._timing.duration=a.activeDuration),a=a._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(a){b.removeMulti(a);for(var c=0;c<a.length;c++)a[c]._parent=this},_putChild:function(a,b){for(var c=b?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",d=0;d<a.length;d++)if(this._isAncestor(a[d]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:c};for(var d=0;d<a.length;d++)b?this.children.push(a[d]):this.children.unshift(a[d]);this._reparent(a),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var b=a.cloneTimingInput(this._timingInput),c=[],d=0;d<this.children.length;d++)c.push(this.children[d].clone());return this instanceof GroupEffect?new GroupEffect(c,b):new SequenceEffect(c,b)},remove:function(){b.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a+=d(b)}),Math.max(a,0)}}),window.GroupEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a=Math.max(a,d(b))}),a}}),b.newUnderlyingAnimationForGroup=function(c){var d,e=null,f=function(b){var c=d._wrapper;if(c&&"pending"!=c.playState&&c.effect)return null==b?void c._removeChildAnimations():0==b&&c.playbackRate<0&&(e||(e=a.normalizeTimingInput(c.effect.timing)),b=a.calculateIterationProgress(a.calculateActiveDuration(e),-1,e),isNaN(b)||null==b)?(c._forEachChild(function(a){a.currentTime=-1}),void c._removeChildAnimations()):void 0},g=new KeyframeEffect(null,[],c._timing,c._id);return g.onsample=f,d=b.timeline._play(g)},b.bindAnimationForGroup=function(a){a._animation._wrapper=a,a._isGroup=!0,b.awaitStartTime(a),a._constructChildAnimations(),a._setExternalAnimation(a)},b.groupChildDuration=d}(c,e,f),b.true=a}({},function(){return this}()); -//# sourceMappingURL=web-animations-next-lite.min.js.map
\ No newline at end of file diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/index b/Software/Embedded_SW/.jxbrowser-data/Cache/index Binary files differindex 3fa0ebf0f..5f65aef8c 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/index +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/index diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 Binary files differindex 33c2cc543..3514501b2 100644 --- a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/History b/Software/Embedded_SW/.jxbrowser-data/History Binary files differindex 56cc9160c..094d1825b 100644 --- a/Software/Embedded_SW/.jxbrowser-data/History +++ b/Software/Embedded_SW/.jxbrowser-data/History diff --git a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage index c7f8a57ab..7bafbe7cd 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage +++ b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage @@ -1,4 +1,4 @@ -#Mon Feb 04 13:00:42 IST 2019 -viewsData-storage={"ti.sysbios.knl.Task.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Task"\:{"defaultViewName"\:"CallStacks"},"ti.sysbios.family.arm.m3.Hwi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi"\:{"defaultViewName"\:"Exception"},"ti.sysbios.knl.Task.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackPeak","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"blockedOn","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"irp","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"status","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"coreId","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"ti.sysbios.heaps.HeapMem.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"buf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"minBlockAlign","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"sectionName","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Event"\:{"defaultViewName"\:"Basic"},"ti.sysbios.knl.Event.Raw"\:{},"ti.catalog.arm.cortexm4.tiva.ce.Boot.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"configureClock","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"xtal","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"oscSrc","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllBypass","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllOutEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"ioscDisable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"moscDisable","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"ti.sysbios.knl.Swi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"state","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"initTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"curTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"xdc.runtime.System.XDCROOT"\:{"columnStates"\:[{"name"\:"entry","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"xdc.runtime.System"\:{"defaultViewName"\:"Raw"},"xdc.runtime.System.Raw"\:{},"ti.sysbios.family.arm.m3.Hwi.Raw"\:{},"xdc.runtime.Startup.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"rtsStartupDone","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startupBegun","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"resetFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"firstFxns","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"lastFxns","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Semaphore.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"event","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"eventId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"count","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"pendedTasks","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.lm4.Timer.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halTimerHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"id","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"device","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"runMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"period","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"periodType","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"tickFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"extFreq","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"hwiHandle","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"xdc.runtime.SysMin.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBuf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBufIndex","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"wrapped","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true}} +#Sun Mar 03 10:14:42 IST 2019 +viewsData-storage={"ti.sysbios.knl.Task.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Task"\:{"defaultViewName"\:"CallStacks"},"ti.sysbios.family.arm.m3.Hwi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi"\:{"defaultViewName"\:"Basic"},"ti.sysbios.knl.Task.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackPeak","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"blockedOn","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"irp","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"status","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"coreId","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"ti.sysbios.heaps.HeapMem.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"buf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"minBlockAlign","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"sectionName","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Event"\:{"defaultViewName"\:"Basic"},"ti.sysbios.knl.Event.Raw"\:{},"ti.catalog.arm.cortexm4.tiva.ce.Boot.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"configureClock","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"xtal","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"oscSrc","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllBypass","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllOutEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"ioscDisable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"moscDisable","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"ti.sysbios.knl.Swi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"state","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"initTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"curTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"xdc.runtime.System.XDCROOT"\:{"columnStates"\:[{"name"\:"entry","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"xdc.runtime.System"\:{"defaultViewName"\:"Raw"},"xdc.runtime.System.Raw"\:{},"ti.sysbios.family.arm.m3.Hwi.Raw"\:{},"xdc.runtime.Startup.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"rtsStartupDone","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startupBegun","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"resetFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"firstFxns","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"lastFxns","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Semaphore.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"event","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"eventId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"count","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"pendedTasks","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.lm4.Timer.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halTimerHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"id","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"device","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"startMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"runMode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"period","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"periodType","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"tickFxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"extFreq","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"hwiHandle","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"xdc.runtime.SysMin.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBuf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"outBufIndex","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"wrapped","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true}} rovSettings-storage={"exeMrus"\:["C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","C\:/Tango/Software/Embedded_SW/Embedded/debug_w_pmr/Embedded.out"]} -rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:21},"autoConnectChecked"\:false,"exe"\:"C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:false,"showIntro"\:true} +rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:22},"autoConnectChecked"\:false,"exe"\:"C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:false,"showIntro"\:true} diff --git a/Software/Embedded_SW/.jxbrowser-data/Login Data b/Software/Embedded_SW/.jxbrowser-data/Login Data Binary files differindex 7684f598d..a930d764b 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Login Data +++ b/Software/Embedded_SW/.jxbrowser-data/Login Data diff --git a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c index 8bd38a698..44a4ff60b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c +++ b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c @@ -107,8 +107,8 @@ void ADCAcquireStop(void) //MillisecStop #define CHAN_LEFT_DANCER_1 ADC_CTL_CH13 #define CHAN_LEFT_DANCER_2 ADC_CTL_CH14 #define CHAN_RIGHT_DANCER ADC_CTL_CH15 -#define CHAN_DRYER_CURRENT_1 ADC_CTL_CH16 -#define CHAN_DRYER_CURRENT_2 ADC_CTL_CH17 +#define CHAN_DRYER_CURRENT_1 ADC_CTL_CH16 //Dryer Heater 2 +#define CHAN_DRYER_CURRENT_2 ADC_CTL_CH17 //Dryer Heater 1 #define CHAN_DRYER_CURRENT_3 ADC_CTL_CH18 #define CHAN_3V3_FPGA ADC_CTL_CH19 /* @@ -547,11 +547,35 @@ uint8_t Calculate_Gas_Power_Consumption() // WHS uint32_t Read_Dryer_Heaters_Current(HEATERS_CURRENT Heater_ID) // { + + /* + * On Dryer have two heaters , 4*220w and 2*220w that work on 220Vac. + + Current transformer convert (thru resistor ) the Current of load to Voltage then convert from RMS to DC and connect to A2D pin of Tiva. + A2D is 12 bits and his reference is 3.3V (VDDA) or 3V(VREFA+) (depend on s/w). + I=A2D bits *K *VREF *N /(4096*R) + Where : K= K factor of transformer (less than 1 ) + VREF 3 or 3.3v depended of s/w + N turns ratio (800 in our case ) + + + + + Heater_No. Heater_SSR Resistor Power Current AIN# + Heater_1 4 SSR_1 50 ohm 880W 8A 17 + Heater_2 2 SSR_2 100 ohm 440W 4A 16 + * + */ uint32_t Status = OK; uint32_t temp; - uint32_t TBD1 = 1;//TODO - uint32_t TBD2 = 1;//TODO + + uint32_t Vref = 3; // External 3V reference using - ADC_REF_EXT_3V + + uint8_t K = 95; //0.95; // + uint32_t N = 800; // + uint8_t R; // + if (Heaters_Current_Read_Enable[Heater_ID] == false) return Heaters_Current[Heater_ID]; @@ -559,22 +583,26 @@ uint32_t Read_Dryer_Heaters_Current(HEATERS_CURRENT Heater_ID) // switch(Heater_ID) { case DRYER_CURRENT_1: - temp = ADC_GetReading(CHAN_DRYER_CURRENT_1); + temp = ADC_GetReading(CHAN_DRYER_CURRENT_2);//ADC_CTL_CH17 + R = 50; + //Expected 8A break; case DRYER_CURRENT_2: - temp = ADC_GetReading(CHAN_DRYER_CURRENT_2); - break; - case DRYER_CURRENT_3: - temp = ADC_GetReading(CHAN_DRYER_CURRENT_3); + temp = ADC_GetReading(CHAN_DRYER_CURRENT_1);//ADC_CTL_CH16 + R = 100; + //Expected 4A break; +// case DRYER_CURRENT_3: +// temp = ADC_GetReading(CHAN_DRYER_CURRENT_3);//Not in use +// break; default: Status = ERROR; break; } Heaters_Current_Bits[Heater_ID] = temp; - #warning after updating the hardware need to add the correct formula - Heaters_Current[Heater_ID] = temp*TBD1/TBD2; + + Heaters_Current[Heater_ID] = (temp * K/100 * Vref * N) / (4096 * R);// [Amper] return Status; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c index dc34cbd2d..06d35772e 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c @@ -580,7 +580,7 @@ bool WHS_GPI_WCONTAINER_WARN()//waste tank empty return F3_GPI_01_Reg.bits.F3_GPI_WCONTAINER_WARN; } -bool WHS_GPI_WASTE_FLOW_SWITCH() +bool WHS_GPI_WASTE_FLOW_SWITCH()// DRyer air { return F2_GPI_Reg.bits.F2_WASTE_FLOW_SW_NO; } diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c index 96e42fc36..f95d0cd83 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c @@ -282,28 +282,28 @@ uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-5 uint32_t Channel; uint32_t VsampleInBits; -/* - * zone Heater No. Shunt Resistor Power Current I2C ID I2C Address I2C - * Dyer_Head zone_2 3 0.025 ohm 45W 1.875A 2 0x40 4 - * Dyer_Head zone_3 3 0.025 ohm 45W 1.875A 2 0x40 5 - * Dyer_Head zone_4 5 0.025 ohm 75W 3.125A 2 0x44 0 - * Dyer_Head zone_5 5 0.025 ohm 75W 3.125A 2 0x44 1 - * Dyer_Head zone_6 3 0.025 ohm 45W 1.875A 2 0x40 3 - * Dyer_Head zone_1 2 0.05 ohm 30W 1.25A 2 - * MixChip 3 0.025 ohm 45W 1.875A 2 0x46 4 - * - */ + /* + * zone Heater No. Power Current Shunt Resistor I2C ID I2C Address I2C + * Dyer_Head zone_1 2 30W 1.25A 0.025 ohm 2 0x40 3 + * Dyer_Head zone_2 3 45W 1.875A 0.025 ohm 2 0x40 4 + * Dyer_Head zone_3 3 45W 1.875A 0.025 ohm 2 0x40 5 + * Dyer_Head zone_4 5 75W 3.125A 0.025 ohm 2 0x44 0 + * Dyer_Head zone_5 5 75W 3.125A 0.020 ohm 2 0x44 1 (5+6 Max 5A) + * Dyer_Head zone_6 3 45W 1.875A + * MixChip 3 45W 1.875A 0.025 ohm 2 0x46 4 + * + */ assert (Heater_ID<NUM_OF_HEATERS); #warning to update all the Resistors to 0.025 Ohm after changing the hardware://there is overflow in Dyer Head zone 4 with resistor 0.05 - const double Resistor[NUM_OF_HEATERS] = {0.025, 0.025, 0.025, 0.05, 0.025, 0.025}; + const double Resistor[NUM_OF_HEATERS] = {0.025, 0.025, 0.025, 0.025, 0.020, 0.025}; if (Heaters_Current_Read_Enable[Heater_ID] == false) return Heaters_Current[Heater_ID]; switch(Heater_ID) { - case HEAD_ZONE_1_6: + case HEAD_ZONE_1: I2C_Slave_Add = 0x40; Channel = 0x08; break; @@ -319,7 +319,7 @@ uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-5 I2C_Slave_Add = 0x44; Channel = 0x01; break; - case HEAD_ZONE_5: + case HEAD_ZONE_5_6: I2C_Slave_Add = 0x44; Channel = 0x02; break; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h index 1c5fb6dbd..8924e7d07 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h @@ -25,11 +25,11 @@ typedef enum typedef enum { - HEAD_ZONE_1_6,//HEAD_ZONE_1, + HEAD_ZONE_1, HEAD_ZONE_2, HEAD_ZONE_3, HEAD_ZONE_4, - HEAD_ZONE_5,//HEAD_ZONE_5_6, + HEAD_ZONE_5_6, MIXCHIP, DRYER_CURRENT_1, DRYER_CURRENT_2, diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index f4da887c7..a6399efbb 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -270,11 +270,11 @@ const AlarmHandlingItemStruc AlarmItem[MAX_SYSTEM_ALARMS]={ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_UNDERVOLTAGE ," MotorDyeingHeadCleaningUnderVoltage " }, /* 5038 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_UNDERVOLTAGE ," MotorDyeingHeadCleaningHeadUnderVoltage " }, /* 5042 */ - { eOneSecond, CurrentAlarm, HEAD_ZONE_1_6 , HEAD_ZONE_1_6 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE ," Head Zone 1 Heater Current Out Of Range " }, /* 5018 */ + { eOneSecond, CurrentAlarm, HEAD_ZONE_1 , HEAD_ZONE_1 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE ," Head Zone 1 Heater Current Out Of Range " }, /* 5018 */ { eOneSecond, CurrentAlarm, HEAD_ZONE_2 , HEAD_ZONE_2 , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE ," Head Zone 2 Heater Current Out Of Range " }, /* 5019 */ { eOneSecond, CurrentAlarm, HEAD_ZONE_3 , HEAD_ZONE_3 , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE ," Head Zone 3 Heater Current Out Of Range " }, /* 5020 */ { eOneSecond, CurrentAlarm, HEAD_ZONE_4 , HEAD_ZONE_4 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE ," Head Zone 4 Heater Current Out Of Range " }, /* 5021 */ - { eOneSecond, CurrentAlarm, HEAD_ZONE_5 , HEAD_ZONE_5 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE ," Head Zone 5-6 Heater Current Out Of Range " }, /* 5022 */ + { eOneSecond, CurrentAlarm, HEAD_ZONE_5_6 , HEAD_ZONE_5_6 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE ," Head Zone 5-6 Heater Current Out Of Range " }, /* 5022 */ { eOneSecond, CurrentAlarm, MIXCHIP , MIXCHIP , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__MIXER_CURRENT_OUT_OF_RANGE ," Mixer Heater Current Out Of Range " }, /* 6004 */ { eOneSecond, CurrentAlarm, DRYER_CURRENT_1, DRYER_CURRENT_1, 1 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE ," Drier Heater 1 Current Out Of Range " }, /* 6004 */ { eOneSecond, CurrentAlarm, DRYER_CURRENT_2, DRYER_CURRENT_2, 1 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE ," Drier Heater 2 Current Out Of Range " }, /* 6004 */ diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index bbf3822f0..0a9210379 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -89,7 +89,7 @@ uint32_t SecondDryerHeaterMaxTempControl = 0xFF; //old uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {DRYER_AIR_PT100,DRYER_MAIN_PT100,DRYER_SECONDARY_PT100,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,TEMP_SENSE_AN_ENCLOSURETEMP3}; uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {DRYER_AIR_PT100,DRYER_MAIN_PT100,DRYER_SECONDARY_PT100,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,HEAD6_PT100,MIXER_PT100}; -HEATERS_CURRENT HeaterId2CurrentId[MAX_HEATERS_NUM] = {NUM_OF_HEATERS,DRYER_CURRENT_1,DRYER_CURRENT_2,HEAD_ZONE_1_6,HEAD_ZONE_2,HEAD_ZONE_3,HEAD_ZONE_4,HEAD_ZONE_5,HEAD_ZONE_1_6,MIXCHIP}; +HEATERS_CURRENT HeaterId2CurrentId[MAX_HEATERS_NUM] = {NUM_OF_HEATERS,DRYER_CURRENT_1,DRYER_CURRENT_2,HEAD_ZONE_1,HEAD_ZONE_2,HEAD_ZONE_3,HEAD_ZONE_4,HEAD_ZONE_5_6,HEAD_ZONE_5_6,MIXCHIP}; uint32_t DryerInternalPT100Id = DRYER_AIR_PT100; bool HeatersRestart = false; |
