From ce68029f25d647c8408bb43a7503b690b88a53c0 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 9 Jul 2016 16:16:39 -0400 Subject: [PATCH] remove unused components --- .../iron-menu-behavior/.bower.json | 46 - .../.github/ISSUE_TEMPLATE.md | 33 - .../iron-menu-behavior/.gitignore | 1 - .../iron-menu-behavior/.travis.yml | 23 - .../iron-menu-behavior/CONTRIBUTING.md | 77 - .../iron-menu-behavior/bower.json | 37 - .../iron-menu-behavior/demo/index.html | 114 - .../iron-menu-behavior/demo/simple-menu.html | 52 - .../demo/simple-menubar.html | 56 - .../iron-menu-behavior/index.html | 30 - .../iron-menu-behavior.html | 336 - .../iron-menubar-behavior.html | 81 - .../iron-menu-behavior/test/index.html | 33 - .../test/iron-menu-behavior.html | 404 - .../test/iron-menubar-behavior.html | 162 - .../iron-menu-behavior/test/test-menu.html | 46 - .../iron-menu-behavior/test/test-menubar.html | 46 - .../bower_components/libjass/.bower.json | 3 +- .../bower_components/libjass/libjass.js | 9650 ----------------- .../bower_components/libjass/libjass.js.map | 1 - .../libjass/libjass.min.js.map | 1 - .../bower_components/paper-button/.bower.json | 50 - .../paper-button/.github/ISSUE_TEMPLATE.md | 33 - .../bower_components/paper-button/.gitignore | 1 - .../bower_components/paper-button/.travis.yml | 23 - .../paper-button/CONTRIBUTING.md | 77 - .../bower_components/paper-button/bower.json | 41 - .../paper-button/demo/index.html | 138 - .../bower_components/paper-button/index.html | 26 - .../paper-button/paper-button.html | 178 - .../paper-button/test/index.html | 24 - .../paper-button/test/paper-button.html | 108 - .../bower_components/paper-menu/.bower.json | 41 - .../bower_components/paper-menu/.gitignore | 1 - .../bower_components/paper-menu/bower.json | 32 - .../paper-menu/demo/index.html | 80 - .../bower_components/paper-menu/hero.svg | 35 - .../bower_components/paper-menu/index.html | 30 - .../paper-menu/paper-menu.html | 140 - .../paper-menu/test/index.html | 34 - .../paper-menu/test/paper-menu.html | 67 - .../paper-spinner/.bower.json | 43 - .../bower_components/paper-spinner/.gitignore | 1 - .../paper-spinner/.travis.yml | 28 - .../paper-spinner/CONTRIBUTING.md | 72 - .../bower_components/paper-spinner/bower.json | 34 - .../paper-spinner/demo/index.html | 97 - .../bower_components/paper-spinner/hero.svg | 27 - .../bower_components/paper-spinner/index.html | 30 - .../paper-spinner/paper-spinner-styles.html | 338 - .../paper-spinner/paper-spinner.html | 191 - .../paper-spinner/test/index.html | 34 - .../paper-spinner/test/paper-spinner.html | 86 - .../bower_components/paper-tabs/.bower.json | 52 - .../bower_components/paper-tabs/.gitignore | 1 - .../bower_components/paper-tabs/.travis.yml | 28 - .../paper-tabs/CONTRIBUTING.md | 72 - .../bower_components/paper-tabs/bower.json | 42 - .../paper-tabs/demo/index.html | 170 - .../demo/paper-tabs-demo-styles.html | 41 - .../demo/tabs-with-content-example.html | 40 - .../bower_components/paper-tabs/hero.svg | 23 - .../bower_components/paper-tabs/index.html | 25 - .../paper-tabs/paper-tab.html | 155 - .../paper-tabs/paper-tabs-icons.html | 18 - .../paper-tabs/paper-tabs.html | 538 - .../paper-tabs/test/attr-for-selected.html | 84 - .../paper-tabs/test/basic.html | 214 - .../paper-tabs/test/index.html | 32 - .../prism-element/.bower.json | 45 - .../prism-element/CONTRIBUTING.md | 77 - .../bower_components/prism-element/bower.json | 36 - .../bower_components/prism-element/index.html | 28 - .../prism-element/prism-highlighter.html | 103 - .../prism-element/prism-import.html | 11 - .../prism-element/prism-theme-default.html | 151 - .../bower_components/prism/.bower.json | 40 - .../bower_components/prism/CHANGELOG.md | 583 - dashboard-ui/bower_components/prism/LICENSE | 21 - .../bower_components/prism/bower.json | 30 - .../bower_components/prism/components.js | 630 -- .../prism/components/prism-abap.js | 48 - .../prism/components/prism-abap.min.js | 1 - .../prism/components/prism-actionscript.js | 17 - .../components/prism-actionscript.min.js | 1 - .../prism/components/prism-apacheconf.js | 47 - .../prism/components/prism-apacheconf.min.js | 1 - .../prism/components/prism-apl.js | 29 - .../prism/components/prism-apl.min.js | 1 - .../prism/components/prism-applescript.js | 20 - .../prism/components/prism-applescript.min.js | 1 - .../prism/components/prism-asciidoc.js | 271 - .../prism/components/prism-asciidoc.min.js | 1 - .../prism/components/prism-aspnet.js | 36 - .../prism/components/prism-aspnet.min.js | 1 - .../prism/components/prism-autohotkey.js | 27 - .../prism/components/prism-autohotkey.min.js | 1 - .../prism/components/prism-autoit.js | 33 - .../prism/components/prism-autoit.min.js | 1 - .../prism/components/prism-bash.js | 80 - .../prism/components/prism-bash.min.js | 1 - .../prism/components/prism-basic.js | 14 - .../prism/components/prism-basic.min.js | 1 - .../prism/components/prism-batch.js | 99 - .../prism/components/prism-batch.min.js | 1 - .../prism/components/prism-bison.js | 39 - .../prism/components/prism-bison.min.js | 1 - .../prism/components/prism-brainfuck.js | 20 - .../prism/components/prism-brainfuck.min.js | 1 - .../prism/components/prism-bro.js | 50 - .../prism/components/prism-bro.min.js | 1 - .../prism/components/prism-c.js | 33 - .../prism/components/prism-c.min.js | 1 - .../prism/components/prism-clike.js | 29 - .../prism/components/prism-clike.min.js | 1 - .../prism/components/prism-coffeescript.js | 91 - .../components/prism-coffeescript.min.js | 1 - .../prism/components/prism-core.js | 501 - .../prism/components/prism-core.min.js | 1 - .../prism/components/prism-cpp.js | 12 - .../prism/components/prism-cpp.min.js | 1 - .../prism/components/prism-crystal.js | 53 - .../prism/components/prism-crystal.min.js | 1 - .../prism/components/prism-csharp.js | 32 - .../prism/components/prism-csharp.min.js | 1 - .../prism/components/prism-css-extras.js | 15 - .../prism/components/prism-css-extras.min.js | 1 - .../prism/components/prism-css.js | 48 - .../prism/components/prism-css.min.js | 1 - .../prism/components/prism-d.js | 64 - .../prism/components/prism-d.min.js | 1 - .../prism/components/prism-dart.js | 18 - .../prism/components/prism-dart.min.js | 1 - .../prism/components/prism-diff.js | 20 - .../prism/components/prism-diff.min.js | 1 - .../prism/components/prism-docker.js | 9 - .../prism/components/prism-docker.min.js | 1 - .../prism/components/prism-eiffel.js | 24 - .../prism/components/prism-eiffel.min.js | 1 - .../prism/components/prism-elixir.js | 90 - .../prism/components/prism-elixir.min.js | 1 - .../prism/components/prism-erlang.js | 41 - .../prism/components/prism-erlang.min.js | 1 - .../prism/components/prism-fortran.js | 37 - .../prism/components/prism-fortran.min.js | 1 - .../prism/components/prism-fsharp.js | 33 - .../prism/components/prism-fsharp.min.js | 1 - .../prism/components/prism-gherkin.js | 78 - .../prism/components/prism-gherkin.min.js | 1 - .../prism/components/prism-git.js | 68 - .../prism/components/prism-git.min.js | 1 - .../prism/components/prism-glsl.js | 16 - .../prism/components/prism-glsl.min.js | 1 - .../prism/components/prism-go.js | 9 - .../prism/components/prism-go.min.js | 1 - .../prism/components/prism-groovy.js | 65 - .../prism/components/prism-groovy.min.js | 1 - .../prism/components/prism-haml.js | 154 - .../prism/components/prism-haml.min.js | 1 - .../prism/components/prism-handlebars.js | 83 - .../prism/components/prism-handlebars.min.js | 1 - .../prism/components/prism-haskell.js | 35 - .../prism/components/prism-haskell.min.js | 1 - .../prism/components/prism-haxe.js | 43 - .../prism/components/prism-haxe.min.js | 1 - .../prism/components/prism-http.js | 50 - .../prism/components/prism-http.min.js | 1 - .../prism/components/prism-icon.js | 17 - .../prism/components/prism-icon.min.js | 1 - .../prism/components/prism-inform7.js | 58 - .../prism/components/prism-inform7.min.js | 1 - .../prism/components/prism-ini.js | 11 - .../prism/components/prism-ini.min.js | 1 - .../prism/components/prism-j.js | 22 - .../prism/components/prism-j.min.js | 1 - .../prism/components/prism-jade.js | 198 - .../prism/components/prism-jade.min.js | 1 - .../prism/components/prism-java.js | 16 - .../prism/components/prism-java.min.js | 1 - .../prism/components/prism-javascript.js | 47 - .../prism/components/prism-javascript.min.js | 1 - .../prism/components/prism-json.js | 11 - .../prism/components/prism-json.min.js | 1 - .../prism/components/prism-jsx.js | 27 - .../prism/components/prism-jsx.min.js | 1 - .../prism/components/prism-julia.js | 12 - .../prism/components/prism-julia.min.js | 1 - .../prism/components/prism-keyman.js | 14 - .../prism/components/prism-keyman.min.js | 1 - .../prism/components/prism-kotlin.js | 62 - .../prism/components/prism-kotlin.min.js | 1 - .../prism/components/prism-latex.js | 61 - .../prism/components/prism-latex.min.js | 1 - .../prism/components/prism-less.js | 60 - .../prism/components/prism-less.min.js | 1 - .../prism/components/prism-lolcode.js | 54 - .../prism/components/prism-lolcode.min.js | 1 - .../prism/components/prism-lua.js | 20 - .../prism/components/prism-lua.min.js | 1 - .../prism/components/prism-makefile.js | 31 - .../prism/components/prism-makefile.min.js | 1 - .../prism/components/prism-markdown.js | 120 - .../prism/components/prism-markdown.min.js | 1 - .../prism/components/prism-markup.js | 46 - .../prism/components/prism-markup.min.js | 1 - .../prism/components/prism-matlab.js | 14 - .../prism/components/prism-matlab.min.js | 1 - .../prism/components/prism-mel.js | 39 - .../prism/components/prism-mel.min.js | 1 - .../prism/components/prism-mizar.js | 12 - .../prism/components/prism-mizar.min.js | 1 - .../prism/components/prism-monkey.js | 25 - .../prism/components/prism-monkey.min.js | 1 - .../prism/components/prism-nasm.js | 24 - .../prism/components/prism-nasm.min.js | 1 - .../prism/components/prism-nginx.js | 11 - .../prism/components/prism-nginx.min.js | 1 - .../prism/components/prism-nim.js | 30 - .../prism/components/prism-nim.min.js | 1 - .../prism/components/prism-nix.js | 39 - .../prism/components/prism-nix.min.js | 1 - .../prism/components/prism-nsis.js | 19 - .../prism/components/prism-nsis.min.js | 1 - .../prism/components/prism-objectivec.js | 5 - .../prism/components/prism-objectivec.min.js | 1 - .../prism/components/prism-ocaml.js | 21 - .../prism/components/prism-ocaml.min.js | 1 - .../prism/components/prism-oz.js | 21 - .../prism/components/prism-oz.min.js | 1 - .../prism/components/prism-parigp.js | 27 - .../prism/components/prism-parigp.min.js | 1 - .../prism/components/prism-parser.js | 66 - .../prism/components/prism-parser.min.js | 1 - .../prism/components/prism-pascal.js | 50 - .../prism/components/prism-pascal.min.js | 1 - .../prism/components/prism-perl.js | 140 - .../prism/components/prism-perl.min.js | 1 - .../prism/components/prism-php-extras.js | 11 - .../prism/components/prism-php-extras.min.js | 1 - .../prism/components/prism-php.js | 110 - .../prism/components/prism-php.min.js | 1 - .../prism/components/prism-powershell.js | 52 - .../prism/components/prism-powershell.min.js | 1 - .../prism/components/prism-processing.js | 18 - .../prism/components/prism-processing.min.js | 1 - .../prism/components/prism-prolog.js | 17 - .../prism/components/prism-prolog.min.js | 1 - .../prism/components/prism-protobuf.js | 8 - .../prism/components/prism-protobuf.min.js | 1 - .../prism/components/prism-puppet.js | 131 - .../prism/components/prism-puppet.min.js | 1 - .../prism/components/prism-pure.js | 77 - .../prism/components/prism-pure.min.js | 1 - .../prism/components/prism-python.js | 27 - .../prism/components/prism-python.min.js | 1 - .../prism/components/prism-q.js | 44 - .../prism/components/prism-q.min.js | 1 - .../prism/components/prism-qore.js | 17 - .../prism/components/prism-qore.min.js | 1 - .../prism/components/prism-r.js | 19 - .../prism/components/prism-r.min.js | 1 - .../prism/components/prism-rest.js | 205 - .../prism/components/prism-rest.min.js | 1 - .../prism/components/prism-rip.js | 28 - .../prism/components/prism-rip.min.js | 1 - .../prism/components/prism-roboconf.js | 27 - .../prism/components/prism-roboconf.min.js | 1 - .../prism/components/prism-ruby.js | 110 - .../prism/components/prism-ruby.min.js | 1 - .../prism/components/prism-rust.js | 53 - .../prism/components/prism-rust.min.js | 1 - .../prism/components/prism-sas.js | 31 - .../prism/components/prism-sas.min.js | 1 - .../prism/components/prism-sass.js | 73 - .../prism/components/prism-sass.min.js | 1 - .../prism/components/prism-scala.js | 18 - .../prism/components/prism-scala.min.js | 1 - .../prism/components/prism-scheme.js | 26 - .../prism/components/prism-scheme.min.js | 1 - .../prism/components/prism-scss.js | 60 - .../prism/components/prism-scss.min.js | 1 - .../prism/components/prism-smalltalk.js | 31 - .../prism/components/prism-smalltalk.min.js | 1 - .../prism/components/prism-smarty.js | 127 - .../prism/components/prism-smarty.min.js | 1 - .../prism/components/prism-sql.js | 17 - .../prism/components/prism-sql.min.js | 1 - .../prism/components/prism-stylus.js | 102 - .../prism/components/prism-stylus.min.js | 1 - .../prism/components/prism-swift.js | 25 - .../prism/components/prism-swift.min.js | 1 - .../prism/components/prism-tcl.js | 43 - .../prism/components/prism-tcl.min.js | 1 - .../prism/components/prism-textile.js | 254 - .../prism/components/prism-textile.min.js | 1 - .../prism/components/prism-twig.js | 46 - .../prism/components/prism-twig.min.js | 1 - .../prism/components/prism-typescript.js | 3 - .../prism/components/prism-typescript.min.js | 1 - .../prism/components/prism-verilog.js | 17 - .../prism/components/prism-verilog.min.js | 1 - .../prism/components/prism-vhdl.js | 23 - .../prism/components/prism-vhdl.min.js | 1 - .../prism/components/prism-vim.js | 10 - .../prism/components/prism-vim.min.js | 1 - .../prism/components/prism-wiki.js | 81 - .../prism/components/prism-wiki.min.js | 1 - .../prism/components/prism-yaml.js | 44 - .../prism/components/prism-yaml.min.js | 1 - .../bower_components/prism/examples.js | 181 - .../bower_components/prism/gulpfile.js | 136 - .../bower_components/prism/package.json | 43 - .../plugins/autolinker/prism-autolinker.css | 3 - .../plugins/autolinker/prism-autolinker.js | 70 - .../autolinker/prism-autolinker.min.js | 1 - .../plugins/autoloader/prism-autoloader.js | 194 - .../autoloader/prism-autoloader.min.js | 1 - .../command-line/prism-command-line.css | 33 - .../command-line/prism-command-line.js | 77 - .../command-line/prism-command-line.min.js | 1 - .../file-highlight/prism-file-highlight.js | 77 - .../prism-file-highlight.min.js | 1 - .../prism-highlight-keywords.js | 17 - .../prism-highlight-keywords.min.js | 1 - .../prism/plugins/ie8/prism-ie8.css | 3 - .../prism/plugins/ie8/prism-ie8.js | 42 - .../prism/plugins/ie8/prism-ie8.min.js | 1 - .../jsonp-highlight/prism-jsonp-highlight.js | 151 - .../prism-jsonp-highlight.min.js | 1 - .../plugins/keep-markup/prism-keep-markup.js | 97 - .../keep-markup/prism-keep-markup.min.js | 1 - .../line-highlight/prism-line-highlight.css | 47 - .../line-highlight/prism-line-highlight.js | 132 - .../prism-line-highlight.min.js | 1 - .../line-numbers/prism-line-numbers.css | 40 - .../line-numbers/prism-line-numbers.js | 56 - .../line-numbers/prism-line-numbers.min.js | 1 - .../prism-normalize-whitespace.js | 172 - .../prism-normalize-whitespace.min.js | 1 - .../previewer-angle/prism-previewer-angle.css | 32 - .../previewer-angle/prism-previewer-angle.js | 118 - .../prism-previewer-angle.min.js | 1 - .../previewer-base/prism-previewer-base.css | 76 - .../previewer-base/prism-previewer-base.js | 201 - .../prism-previewer-base.min.js | 1 - .../previewer-color/prism-previewer-color.css | 9 - .../previewer-color/prism-previewer-color.js | 89 - .../prism-previewer-color.min.js | 1 - .../prism-previewer-easing.css | 29 - .../prism-previewer-easing.js | 117 - .../prism-previewer-easing.min.js | 1 - .../prism-previewer-gradient.css | 27 - .../prism-previewer-gradient.js | 216 - .../prism-previewer-gradient.min.js | 1 - .../previewer-time/prism-previewer-time.css | 90 - .../previewer-time/prism-previewer-time.js | 98 - .../prism-previewer-time.min.js | 1 - .../prism-remove-initial-line-feed.js | 21 - .../prism-remove-initial-line-feed.min.js | 1 - .../show-invisibles/prism-show-invisibles.css | 33 - .../show-invisibles/prism-show-invisibles.js | 19 - .../prism-show-invisibles.min.js | 1 - .../show-language/prism-show-language.css | 29 - .../show-language/prism-show-language.js | 38 - .../show-language/prism-show-language.min.js | 1 - .../prism-unescaped-markup.css | 10 - .../prism-unescaped-markup.js | 40 - .../prism-unescaped-markup.min.js | 1 - .../prism/plugins/wpd/prism-wpd.css | 11 - .../prism/plugins/wpd/prism-wpd.js | 166 - .../prism/plugins/wpd/prism-wpd.min.js | 1 - dashboard-ui/bower_components/prism/prism.js | 781 -- .../prism/themes/prism-coy.css | 235 - .../prism/themes/prism-dark.css | 128 - .../prism/themes/prism-funky.css | 116 - .../prism/themes/prism-okaidia.css | 121 - .../prism/themes/prism-solarizedlight.css | 148 - .../prism/themes/prism-tomorrow.css | 121 - .../prism/themes/prism-twilight.css | 201 - .../bower_components/prism/themes/prism.css | 137 - .../bower_components/prism/vendor/promise.js | 5 - 381 files changed, 1 insertion(+), 27826 deletions(-) delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/.bower.json delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/.github/ISSUE_TEMPLATE.md delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/.gitignore delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/.travis.yml delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/bower.json delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/demo/index.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/index.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/test/index.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/test/iron-menu-behavior.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/test/test-menu.html delete mode 100644 dashboard-ui/bower_components/iron-menu-behavior/test/test-menubar.html delete mode 100644 dashboard-ui/bower_components/libjass/libjass.js delete mode 100644 dashboard-ui/bower_components/libjass/libjass.js.map delete mode 100644 dashboard-ui/bower_components/libjass/libjass.min.js.map delete mode 100644 dashboard-ui/bower_components/paper-button/.bower.json delete mode 100644 dashboard-ui/bower_components/paper-button/.github/ISSUE_TEMPLATE.md delete mode 100644 dashboard-ui/bower_components/paper-button/.gitignore delete mode 100644 dashboard-ui/bower_components/paper-button/.travis.yml delete mode 100644 dashboard-ui/bower_components/paper-button/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/paper-button/bower.json delete mode 100644 dashboard-ui/bower_components/paper-button/demo/index.html delete mode 100644 dashboard-ui/bower_components/paper-button/index.html delete mode 100644 dashboard-ui/bower_components/paper-button/paper-button.html delete mode 100644 dashboard-ui/bower_components/paper-button/test/index.html delete mode 100644 dashboard-ui/bower_components/paper-button/test/paper-button.html delete mode 100644 dashboard-ui/bower_components/paper-menu/.bower.json delete mode 100644 dashboard-ui/bower_components/paper-menu/.gitignore delete mode 100644 dashboard-ui/bower_components/paper-menu/bower.json delete mode 100644 dashboard-ui/bower_components/paper-menu/demo/index.html delete mode 100644 dashboard-ui/bower_components/paper-menu/hero.svg delete mode 100644 dashboard-ui/bower_components/paper-menu/index.html delete mode 100644 dashboard-ui/bower_components/paper-menu/paper-menu.html delete mode 100644 dashboard-ui/bower_components/paper-menu/test/index.html delete mode 100644 dashboard-ui/bower_components/paper-menu/test/paper-menu.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/.bower.json delete mode 100644 dashboard-ui/bower_components/paper-spinner/.gitignore delete mode 100644 dashboard-ui/bower_components/paper-spinner/.travis.yml delete mode 100644 dashboard-ui/bower_components/paper-spinner/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/paper-spinner/bower.json delete mode 100644 dashboard-ui/bower_components/paper-spinner/demo/index.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/hero.svg delete mode 100644 dashboard-ui/bower_components/paper-spinner/index.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/paper-spinner-styles.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/paper-spinner.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/test/index.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/test/paper-spinner.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/.bower.json delete mode 100644 dashboard-ui/bower_components/paper-tabs/.gitignore delete mode 100644 dashboard-ui/bower_components/paper-tabs/.travis.yml delete mode 100644 dashboard-ui/bower_components/paper-tabs/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/paper-tabs/bower.json delete mode 100644 dashboard-ui/bower_components/paper-tabs/demo/index.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/hero.svg delete mode 100644 dashboard-ui/bower_components/paper-tabs/index.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/paper-tab.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/paper-tabs-icons.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/paper-tabs.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/test/attr-for-selected.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/test/basic.html delete mode 100644 dashboard-ui/bower_components/paper-tabs/test/index.html delete mode 100644 dashboard-ui/bower_components/prism-element/.bower.json delete mode 100644 dashboard-ui/bower_components/prism-element/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/prism-element/bower.json delete mode 100644 dashboard-ui/bower_components/prism-element/index.html delete mode 100644 dashboard-ui/bower_components/prism-element/prism-highlighter.html delete mode 100644 dashboard-ui/bower_components/prism-element/prism-import.html delete mode 100644 dashboard-ui/bower_components/prism-element/prism-theme-default.html delete mode 100644 dashboard-ui/bower_components/prism/.bower.json delete mode 100644 dashboard-ui/bower_components/prism/CHANGELOG.md delete mode 100644 dashboard-ui/bower_components/prism/LICENSE delete mode 100644 dashboard-ui/bower_components/prism/bower.json delete mode 100644 dashboard-ui/bower_components/prism/components.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-abap.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-abap.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-actionscript.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-actionscript.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-apacheconf.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-apacheconf.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-apl.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-apl.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-applescript.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-applescript.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-asciidoc.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-asciidoc.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-aspnet.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-aspnet.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-autohotkey.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-autohotkey.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-autoit.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-autoit.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bash.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bash.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-basic.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-basic.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-batch.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-batch.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bison.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bison.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-brainfuck.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-brainfuck.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bro.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-bro.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-c.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-c.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-clike.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-clike.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-coffeescript.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-coffeescript.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-core.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-core.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-cpp.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-cpp.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-crystal.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-crystal.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-csharp.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-csharp.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-css-extras.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-css-extras.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-css.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-css.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-d.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-d.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-dart.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-dart.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-diff.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-diff.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-docker.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-docker.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-eiffel.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-eiffel.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-elixir.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-elixir.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-erlang.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-erlang.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-fortran.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-fortran.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-fsharp.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-fsharp.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-gherkin.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-gherkin.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-git.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-git.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-glsl.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-glsl.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-go.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-go.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-groovy.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-groovy.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haml.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haml.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-handlebars.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-handlebars.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haskell.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haskell.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haxe.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-haxe.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-http.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-http.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-icon.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-icon.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-inform7.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-inform7.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ini.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ini.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-j.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-j.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-jade.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-jade.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-java.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-java.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-javascript.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-javascript.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-json.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-json.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-jsx.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-jsx.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-julia.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-julia.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-keyman.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-keyman.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-kotlin.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-kotlin.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-latex.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-latex.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-less.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-less.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-lolcode.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-lolcode.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-lua.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-lua.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-makefile.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-makefile.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-markdown.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-markdown.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-markup.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-markup.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-matlab.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-matlab.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-mel.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-mel.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-mizar.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-mizar.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-monkey.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-monkey.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nasm.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nasm.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nginx.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nginx.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nim.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nim.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nix.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nix.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nsis.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-nsis.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-objectivec.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-objectivec.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ocaml.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ocaml.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-oz.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-oz.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-parigp.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-parigp.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-parser.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-parser.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-pascal.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-pascal.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-perl.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-perl.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-php-extras.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-php-extras.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-php.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-php.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-powershell.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-powershell.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-processing.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-processing.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-prolog.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-prolog.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-protobuf.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-protobuf.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-puppet.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-puppet.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-pure.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-pure.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-python.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-python.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-q.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-q.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-qore.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-qore.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-r.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-r.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rest.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rest.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rip.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rip.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-roboconf.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-roboconf.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ruby.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-ruby.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rust.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-rust.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sas.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sas.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sass.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sass.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scala.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scala.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scheme.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scheme.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scss.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-scss.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-smalltalk.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-smalltalk.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-smarty.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-smarty.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sql.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-sql.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-stylus.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-stylus.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-swift.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-swift.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-tcl.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-tcl.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-textile.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-textile.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-twig.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-twig.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-typescript.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-typescript.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-verilog.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-verilog.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-vhdl.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-vhdl.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-vim.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-vim.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-wiki.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-wiki.min.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-yaml.js delete mode 100644 dashboard-ui/bower_components/prism/components/prism-yaml.min.js delete mode 100644 dashboard-ui/bower_components/prism/examples.js delete mode 100644 dashboard-ui/bower_components/prism/gulpfile.js delete mode 100644 dashboard-ui/bower_components/prism/package.json delete mode 100644 dashboard-ui/bower_components/prism/plugins/autolinker/prism-autolinker.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/autolinker/prism-autolinker.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/autolinker/prism-autolinker.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/autoloader/prism-autoloader.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/autoloader/prism-autoloader.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/command-line/prism-command-line.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/file-highlight/prism-file-highlight.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/file-highlight/prism-file-highlight.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/highlight-keywords/prism-highlight-keywords.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/highlight-keywords/prism-highlight-keywords.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/ie8/prism-ie8.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/ie8/prism-ie8.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/ie8/prism-ie8.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/jsonp-highlight/prism-jsonp-highlight.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/jsonp-highlight/prism-jsonp-highlight.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/keep-markup/prism-keep-markup.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/keep-markup/prism-keep-markup.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-highlight/prism-line-highlight.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-highlight/prism-line-highlight.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-highlight/prism-line-highlight.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-numbers/prism-line-numbers.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-numbers/prism-line-numbers.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/line-numbers/prism-line-numbers.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/normalize-whitespace/prism-normalize-whitespace.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/normalize-whitespace/prism-normalize-whitespace.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-angle/prism-previewer-angle.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-angle/prism-previewer-angle.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-angle/prism-previewer-angle.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-base/prism-previewer-base.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-base/prism-previewer-base.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-base/prism-previewer-base.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-color/prism-previewer-color.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-color/prism-previewer-color.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-color/prism-previewer-color.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-easing/prism-previewer-easing.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-easing/prism-previewer-easing.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-easing/prism-previewer-easing.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-time/prism-previewer-time.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-time/prism-previewer-time.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/previewer-time/prism-previewer-time.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-invisibles/prism-show-invisibles.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/show-language/prism-show-language.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/unescaped-markup/prism-unescaped-markup.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/unescaped-markup/prism-unescaped-markup.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/unescaped-markup/prism-unescaped-markup.min.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/wpd/prism-wpd.css delete mode 100644 dashboard-ui/bower_components/prism/plugins/wpd/prism-wpd.js delete mode 100644 dashboard-ui/bower_components/prism/plugins/wpd/prism-wpd.min.js delete mode 100644 dashboard-ui/bower_components/prism/prism.js delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-coy.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-dark.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-funky.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-okaidia.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-solarizedlight.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-tomorrow.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism-twilight.css delete mode 100644 dashboard-ui/bower_components/prism/themes/prism.css delete mode 100644 dashboard-ui/bower_components/prism/vendor/promise.js diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json deleted file mode 100644 index 4692d767d2..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "iron-menu-behavior", - "version": "1.1.8", - "description": "Provides accessible menu behavior", - "authors": "The Polymer Authors", - "keywords": [ - "web-components", - "polymer", - "behavior", - "menu" - ], - "main": [ - "iron-menu-behavior.html", - "iron-menubar-behavior.html" - ], - "private": true, - "repository": { - "type": "git", - "url": "git://github.com/PolymerElements/iron-menu-behavior" - }, - "license": "http://polymer.github.io/LICENSE.txt", - "homepage": "https://github.com/PolymerElements/iron-menu-behavior", - "ignore": [], - "dependencies": { - "iron-selector": "PolymerElements/iron-selector#^1.0.0", - "polymer": "Polymer/polymer#^1.2.4", - "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" - }, - "devDependencies": { - "paper-styles": "polymerelements/paper-styles#^1.0.2", - "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", - "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "^4.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - }, - "_release": "1.1.8", - "_resolution": { - "type": "version", - "tag": "v1.1.8", - "commit": "3f6676b93a4592975efa235590b9d8236af6ea1d" - }, - "_source": "git://github.com/polymerelements/iron-menu-behavior.git", - "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-menu-behavior" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.github/ISSUE_TEMPLATE.md b/dashboard-ui/bower_components/iron-menu-behavior/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index da2172d016..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,33 +0,0 @@ - -### Description - - -### Expected outcome - - - -### Actual outcome - - - -### Live Demo - - -### Steps to reproduce - - - -### Browsers Affected - -- [ ] Chrome -- [ ] Firefox -- [ ] Safari 9 -- [ ] Safari 8 -- [ ] Safari 7 -- [ ] Edge -- [ ] IE 11 -- [ ] IE 10 diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.gitignore b/dashboard-ui/bower_components/iron-menu-behavior/.gitignore deleted file mode 100644 index 8d4ae2536a..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bower_components diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml b/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml deleted file mode 100644 index 273c658fd7..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -sudo: required -before_script: -- npm install -g bower polylint web-component-tester -- bower install -- polylint -env: - global: - - secure: CbYi/0VAtpLB+NDHdD/I9q2ldILrmyc3wxKdO5vEtMvRKYgsddQ/hXGovV3c6Hy9sAXD5sKtNi60BBG5E2XuydshjYAZiytfeNjFIvDu5627Xljjt90e/r1hg3tNHRRQihH73nPECfp/X+g+yBNCX3f0+2ExAh0DMs1DXt7Dl7Q= - - secure: kLFlOTh9IjctY7DIJ3KEw5OPrqHNTzoArdabfAtisBMWahuJptKFmYCp/t+zPSL27IVqJakaqPrwGrBUi+4h3wVWredNhfl2lCpMfQfBMcHC5kBVkf2xjJyDa5Y3bP7jPq6YnWYAqEl6pBWYiHU6yWBc6BEdJ6FsTWFbLFTnY7w= -node_js: stable -addons: - firefox: '46.0' - apt: - sources: - - google-chrome - packages: - - google-chrome-stable - sauce_connect: true -script: -- xvfb-run wct -- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi -dist: trusty diff --git a/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md deleted file mode 100644 index 093090d435..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md +++ /dev/null @@ -1,77 +0,0 @@ - - -# Polymer Elements -## Guide for Contributors - -Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: - -### Filing Issues - -**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: - - 1. **Who will use the feature?** _“As someone filling out a form…”_ - 2. **When will they use the feature?** _“When I enter an invalid value…”_ - 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ - -**If you are filing an issue to report a bug**, please provide: - - 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: - - ```markdown - The `paper-foo` element causes the page to turn pink when clicked. - - ## Expected outcome - - The page stays the same color. - - ## Actual outcome - - The page turns pink. - - ## Steps to reproduce - - 1. Put a `paper-foo` element in the page. - 2. Open the page in a web browser. - 3. Click the `paper-foo` element. - ``` - - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). - - 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. - -### Submitting Pull Requests - -**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. - -When submitting pull requests, please provide: - - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: - - ```markdown - (For a single issue) - Fixes #20 - - (For multiple issues) - Fixes #32, fixes #40 - ``` - - 2. **A succinct description of the design** used to fix any related issues. For example: - - ```markdown - This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. - ``` - - 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. - -If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-menu-behavior/bower.json b/dashboard-ui/bower_components/iron-menu-behavior/bower.json deleted file mode 100644 index 0cfc009259..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/bower.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "iron-menu-behavior", - "version": "1.1.8", - "description": "Provides accessible menu behavior", - "authors": "The Polymer Authors", - "keywords": [ - "web-components", - "polymer", - "behavior", - "menu" - ], - "main": [ - "iron-menu-behavior.html", - "iron-menubar-behavior.html" - ], - "private": true, - "repository": { - "type": "git", - "url": "git://github.com/PolymerElements/iron-menu-behavior" - }, - "license": "http://polymer.github.io/LICENSE.txt", - "homepage": "https://github.com/PolymerElements/iron-menu-behavior", - "ignore": [], - "dependencies": { - "iron-selector": "PolymerElements/iron-selector#^1.0.0", - "polymer": "Polymer/polymer#^1.2.4", - "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" - }, - "devDependencies": { - "paper-styles": "polymerelements/paper-styles#^1.0.2", - "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", - "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "^4.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } -} diff --git a/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html b/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html deleted file mode 100644 index 7fbd5e780c..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - iron-menu-behavior demo - - - - - - - - - - - - -
-
-

Simple menu

-
- - Item 0 - Item 1 - Item 2 - Item 3 - -
-
- -
-

Multi-select menu

-
- - Item 0 - Item 1 - Item 2 - Item 3 - -
-
- -
-
-

Simple menubar

-
- - Item 0 - Item 1 - Item 2 - Item 3 - -
-
-
-

Multi-select menubar

-
- - Item 0 - Item 1 - Item 2 - Item 3 - -
-
-
- -
- - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html b/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html deleted file mode 100644 index 748e1d75cc..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html b/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html deleted file mode 100644 index 0f09cdbd2a..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/index.html b/dashboard-ui/bower_components/iron-menu-behavior/index.html deleted file mode 100644 index 2c643c4a03..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - iron-menu-behavior - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html deleted file mode 100644 index 802098b607..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html deleted file mode 100644 index f3b6518610..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menubar-behavior.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/index.html b/dashboard-ui/bower_components/iron-menu-behavior/test/index.html deleted file mode 100644 index 851835ba64..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - iron-menu-behavior tests - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menu-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menu-behavior.html deleted file mode 100644 index f170d7204d..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menu-behavior.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - iron-menu-behavior tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html b/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html deleted file mode 100644 index 78af4ea416..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - iron-menubar-behavior tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/test-menu.html b/dashboard-ui/bower_components/iron-menu-behavior/test/test-menu.html deleted file mode 100644 index aa8eab2881..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/test-menu.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/test-menubar.html b/dashboard-ui/bower_components/iron-menu-behavior/test/test-menubar.html deleted file mode 100644 index 66ce6fdece..0000000000 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/test-menubar.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/libjass/.bower.json b/dashboard-ui/bower_components/libjass/.bower.json index 8cb13bbd70..5107b0c73a 100644 --- a/dashboard-ui/bower_components/libjass/.bower.json +++ b/dashboard-ui/bower_components/libjass/.bower.json @@ -10,6 +10,5 @@ "_release": "e-tag:fa7357706", "_source": "https://github.com/Arnavion/libjass/releases/download/v0.11.0/libjass.zip", "_target": "*", - "_originalSource": "https://github.com/Arnavion/libjass/releases/download/v0.11.0/libjass.zip", - "_direct": true + "_originalSource": "https://github.com/Arnavion/libjass/releases/download/v0.11.0/libjass.zip" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/libjass/libjass.js b/dashboard-ui/bower_components/libjass/libjass.js deleted file mode 100644 index ddea430fd6..0000000000 --- a/dashboard-ui/bower_components/libjass/libjass.js +++ /dev/null @@ -1,9650 +0,0 @@ -/** - * libjass - * - * https://github.com/Arnavion/libjass - * - * Copyright 2013 Arnav Singh - * - * 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 (root, factory) { - var global = this; - if (typeof define === "function" && define.amd) { - define([], function () { - return factory(global); - }); - } else if (typeof exports === "object" && typeof module === "object") { - module.exports = factory(global); - } else if (typeof exports === "object") { - exports.libjass = factory(global); - } else { - root.libjass = factory(global); - } -})(this, function (global) { - "use strict"; - return function (modules) { - var installedModules = Object.create(null); - function require(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId]; - } - var exports = installedModules[moduleId] = Object.create(null); - modules[moduleId](exports, require); - return exports; - } - return require(0); - }([ /* 0 ./index */ function (exports, require) { - var settings = require(23); - var settings_1 = require(23); - exports.debugMode = settings_1.debugMode; - exports.verboseMode = settings_1.verboseMode; - var set = require(33); - var set_1 = require(33); - exports.Set = set_1.Set; - var map = require(30); - var map_1 = require(30); - exports.Map = map_1.Map; - var promise = require(32); - var promise_1 = require(32); - exports.Promise = promise_1.Promise; - exports.DeferredPromise = promise_1.DeferredPromise; - var webworker = require(37); - exports.webworker = webworker; - var parts = require(8); - exports.parts = parts; - var parser = require(1); - exports.parser = parser; - var renderers = require(14); - exports.renderers = renderers; - var ass_1 = require(24); - exports.ASS = ass_1.ASS; - var attachment_1 = require(25); - exports.Attachment = attachment_1.Attachment; - exports.AttachmentType = attachment_1.AttachmentType; - var dialogue_1 = require(26); - exports.Dialogue = dialogue_1.Dialogue; - var script_properties_1 = require(28); - exports.ScriptProperties = script_properties_1.ScriptProperties; - var style_1 = require(29); - exports.Style = style_1.Style; - var misc_1 = require(27); - exports.BorderStyle = misc_1.BorderStyle; - exports.Format = misc_1.Format; - exports.WrappingStyle = misc_1.WrappingStyle; - Object.defineProperties(exports, { - debugMode: { - get: function () { - return settings.debugMode; - }, - set: settings.setDebugMode - }, - verboseMode: { - get: function () { - return settings.verboseMode; - }, - set: settings.setVerboseMode - }, - Set: { - get: function () { - return set.Set; - }, - set: set.setImplementation - }, - Map: { - get: function () { - return map.Map; - }, - set: map.setImplementation - }, - Promise: { - get: function () { - return promise.Promise; - }, - set: promise.setImplementation - } - }); - }, /* 1 ./parser/index */ function (exports, require) { - var parse_1 = require(3); - exports.parse = parse_1.parse; - var streams_1 = require(5); - exports.BrowserReadableStream = streams_1.BrowserReadableStream; - exports.StringStream = streams_1.StringStream; - exports.XhrStream = streams_1.XhrStream; - var stream_parsers_1 = require(4); - exports.StreamParser = stream_parsers_1.StreamParser; - exports.SrtStreamParser = stream_parsers_1.SrtStreamParser; - }, /* 2 ./parser/misc */ function (exports, require) { - var map_1 = require(30); - /** - * Parses a line into a {@link ./types/misc.Property}. - * - * @param {string} line - * @return {!Property} - */ - function parseLineIntoProperty(line) { - var colonPos = line.indexOf(":"); - if (colonPos === -1) { - return null; - } - var name = line.substr(0, colonPos); - var value = line.substr(colonPos + 1).replace(/^\s+/, ""); - return { - name: name, - value: value - }; - } - exports.parseLineIntoProperty = parseLineIntoProperty; - /** - * Parses a line into a {@link ./types/misc.TypedTemplate} according to the given format specifier. - * - * @param {string} line - * @param {!Array.} formatSpecifier - * @return {!TypedTemplate} - */ - function parseLineIntoTypedTemplate(line, formatSpecifier) { - var property = parseLineIntoProperty(line); - if (property === null) { - return null; - } - var value = property.value.split(","); - if (value.length > formatSpecifier.length) { - value[formatSpecifier.length - 1] = value.slice(formatSpecifier.length - 1).join(","); - } - var template = new map_1.Map(); - formatSpecifier.forEach(function (formatKey, index) { - template.set(formatKey, value[index]); - }); - return { - type: property.name, - template: template - }; - } - exports.parseLineIntoTypedTemplate = parseLineIntoTypedTemplate; - }, /* 3 ./parser/parse */ function (exports, require) { - var parts = require(8); - var settings_1 = require(23); - var map_1 = require(30); - var rules = new map_1.Map(); - /** - * Parses a given string with the specified rule. - * - * @param {string} input The string to be parsed. - * @param {string} rule The rule to parse the string with - * @return {*} The value returned depends on the rule used. - * - * @memberOf libjass.parser - */ - function parse(input, rule) { - var run = new ParserRun(input, rule); - if (run.result === null || run.result.end !== input.length) { - if (settings_1.debugMode) { - console.error("Parse failed. %s %s %o", rule, input, run.result); - } - throw new Error("Parse failed."); - } - return run.result.value; - } - exports.parse = parse; - /** - * This class represents a single run of the parser. - * - * @param {string} input - * @param {string} rule - * - * @constructor - * @private - */ - var ParserRun = function () { - function ParserRun(input, rule) { - this._input = input; - this._parseTree = new ParseNode(null); - this._result = rules.get(rule).call(this, this._parseTree); - } - Object.defineProperty(ParserRun.prototype, "result", { - /** - * @type {ParseNode} - */ - get: function () { - return this._result; - }, - enumerable: true, - configurable: true - }); - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_dialogueParts = function (parent) { - var _a; - var current = new ParseNode(parent); - current.value = []; - while (this._haveMore()) { - var enclosedTagsNode = this.parse_enclosedTags(current); - if (enclosedTagsNode !== null) { - (_a = current.value).push.apply(_a, enclosedTagsNode.value); - } else { - var whiteSpaceOrTextNode = this.parse_newline(current) || this.parse_hardspace(current) || this.parse_text(current); - if (whiteSpaceOrTextNode === null) { - parent.pop(); - return null; - } - if (whiteSpaceOrTextNode.value instanceof parts.Text && current.value[current.value.length - 1] instanceof parts.Text) { - // Merge consecutive text parts into one part - var previousTextPart = current.value[current.value.length - 1]; - current.value[current.value.length - 1] = new parts.Text(previousTextPart.value + whiteSpaceOrTextNode.value.value); - } else { - current.value.push(whiteSpaceOrTextNode.value); - } - } - } - var inDrawingMode = false; - current.value.forEach(function (part, i) { - if (part instanceof parts.DrawingMode) { - inDrawingMode = part.scale !== 0; - } else if (part instanceof parts.Text && inDrawingMode) { - current.value[i] = new parts.DrawingInstructions(parse(part.value, "drawingInstructions")); - } - }); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_enclosedTags = function (parent) { - var current = new ParseNode(parent); - current.value = []; - if (this.read(current, "{") === null) { - parent.pop(); - return null; - } - for (var next = this._peek(); this._haveMore() && next !== "}"; next = this._peek()) { - var childNode = null; - if (this.read(current, "\\") !== null) { - childNode = this.parse_tag_alpha(current) || this.parse_tag_iclip(current) || this.parse_tag_xbord(current) || this.parse_tag_ybord(current) || this.parse_tag_xshad(current) || this.parse_tag_yshad(current) || this.parse_tag_blur(current) || this.parse_tag_bord(current) || this.parse_tag_clip(current) || this.parse_tag_fade(current) || this.parse_tag_fscx(current) || this.parse_tag_fscy(current) || this.parse_tag_move(current) || this.parse_tag_shad(current) || this.parse_tag_fad(current) || this.parse_tag_fax(current) || this.parse_tag_fay(current) || this.parse_tag_frx(current) || this.parse_tag_fry(current) || this.parse_tag_frz(current) || this.parse_tag_fsp(current) || this.parse_tag_fsplus(current) || this.parse_tag_fsminus(current) || this.parse_tag_org(current) || this.parse_tag_pbo(current) || this.parse_tag_pos(current) || this.parse_tag_an(current) || this.parse_tag_be(current) || this.parse_tag_fn(current) || this.parse_tag_fr(current) || this.parse_tag_fs(current) || this.parse_tag_kf(current) || this.parse_tag_ko(current) || this.parse_tag_1a(current) || this.parse_tag_1c(current) || this.parse_tag_2a(current) || this.parse_tag_2c(current) || this.parse_tag_3a(current) || this.parse_tag_3c(current) || this.parse_tag_4a(current) || this.parse_tag_4c(current) || this.parse_tag_a(current) || this.parse_tag_b(current) || this.parse_tag_c(current) || this.parse_tag_i(current) || this.parse_tag_k(current) || this.parse_tag_K(current) || this.parse_tag_p(current) || this.parse_tag_q(current) || this.parse_tag_r(current) || this.parse_tag_s(current) || this.parse_tag_t(current) || this.parse_tag_u(current); - if (childNode === null) { - current.pop(); - } - } - if (childNode === null) { - childNode = this.parse_comment(current); - } - if (childNode !== null) { - if (childNode.value instanceof parts.Comment && current.value[current.value.length - 1] instanceof parts.Comment) { - // Merge consecutive comment parts into one part - current.value[current.value.length - 1] = new parts.Comment(current.value[current.value.length - 1].value + childNode.value.value); - } else { - current.value.push(childNode.value); - } - } else { - parent.pop(); - return null; - } - } - if (this.read(current, "}") === null) { - parent.pop(); - return null; - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_newline = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "\\N") === null) { - parent.pop(); - return null; - } - current.value = new parts.NewLine(); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_hardspace = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "\\h") === null) { - parent.pop(); - return null; - } - current.value = new parts.Text(" "); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_text = function (parent) { - var value = this._peek(); - var current = new ParseNode(parent); - var valueNode = new ParseNode(current, value); - current.value = new parts.Text(valueNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_comment = function (parent) { - var value = this._peek(); - var current = new ParseNode(parent); - var valueNode = new ParseNode(current, value); - current.value = new parts.Comment(valueNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_a = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "a") === null) { - parent.pop(); - return null; - } - var next = this._peek(); - switch (next) { - case "1": - var next2 = this._peek(2); - switch (next2) { - case "10": - case "11": - next = next2; - break; - } - break; - - case "2": - case "3": - case "5": - case "6": - case "7": - case "9": - break; - - default: - parent.pop(); - return null; - } - var valueNode = new ParseNode(current, next); - var value = null; - switch (valueNode.value) { - case "1": - value = 1; - break; - - case "2": - value = 2; - break; - - case "3": - value = 3; - break; - - case "5": - value = 7; - break; - - case "6": - value = 8; - break; - - case "7": - value = 9; - break; - - case "9": - value = 4; - break; - - case "10": - value = 5; - break; - - case "11": - value = 6; - break; - } - current.value = new parts.Alignment(value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_alpha = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_an = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "an") === null) { - parent.pop(); - return null; - } - var next = this._peek(); - if (next < "1" || next > "9") { - parent.pop(); - return null; - } - var valueNode = new ParseNode(current, next); - current.value = new parts.Alignment(parseInt(valueNode.value)); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_b = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "b") === null) { - parent.pop(); - return null; - } - var valueNode = null; - var next = this._peek(); - if (next >= "1" && next <= "9") { - next = this._peek(3); - if (next.substr(1) === "00") { - valueNode = new ParseNode(current, next); - valueNode.value = parseInt(valueNode.value); - } - } - if (valueNode === null) { - valueNode = this.parse_enableDisable(current); - } - if (valueNode !== null) { - current.value = new parts.Bold(valueNode.value); - } else { - current.value = new parts.Bold(null); - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_be = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_blur = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_bord = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_c = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_clip = function (parent) { - return this._parse_tag_clip_or_iclip("clip", parent); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fad = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fad") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var startNode = this.parse_decimal(current); - if (startNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var endNode = this.parse_decimal(current); - if (endNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - current.value = new parts.Fade(startNode.value / 1e3, endNode.value / 1e3); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fade = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fade") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var a1Node = this.parse_decimal(current); - if (a1Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var a2Node = this.parse_decimal(current); - if (a2Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var a3Node = this.parse_decimal(current); - if (a3Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var t1Node = this.parse_decimal(current); - if (t1Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var t2Node = this.parse_decimal(current); - if (t2Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var t3Node = this.parse_decimal(current); - if (t3Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var t4Node = this.parse_decimal(current); - if (t4Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - current.value = new parts.ComplexFade(1 - a1Node.value / 255, 1 - a2Node.value / 255, 1 - a3Node.value / 255, t1Node.value / 1e3, t2Node.value / 1e3, t3Node.value / 1e3, t4Node.value / 1e3); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fax = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fay = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fn = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fn") === null) { - parent.pop(); - return null; - } - var valueNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && next !== "\\" && next !== "}"; next = this._peek()) { - valueNode.value += next; - } - if (valueNode.value.length > 0) { - current.value = new parts.FontName(valueNode.value); - } else { - current.value = new parts.FontName(null); - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fr = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_frx = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fry = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_frz = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fs = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fsplus = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fs+") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.FontSizePlus(valueNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fsminus = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fs-") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.FontSizeMinus(valueNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fscx = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fscx") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode !== null) { - current.value = new parts.FontScaleX(valueNode.value / 100); - } else { - current.value = new parts.FontScaleX(null); - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fscy = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "fscy") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode !== null) { - current.value = new parts.FontScaleY(valueNode.value / 100); - } else { - current.value = new parts.FontScaleY(null); - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_fsp = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_i = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_iclip = function (parent) { - return this._parse_tag_clip_or_iclip("iclip", parent); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_k = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "k") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.ColorKaraoke(valueNode.value / 100); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_K = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "K") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.SweepingColorKaraoke(valueNode.value / 100); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_kf = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "kf") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.SweepingColorKaraoke(valueNode.value / 100); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_ko = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "ko") === null) { - parent.pop(); - return null; - } - var valueNode = this.parse_decimal(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = new parts.OutlineKaraoke(valueNode.value / 100); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_move = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "move") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var x1Node = this.parse_decimal(current); - if (x1Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var y1Node = this.parse_decimal(current); - if (y1Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var x2Node = this.parse_decimal(current); - if (x2Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var y2Node = this.parse_decimal(current); - if (y2Node === null) { - parent.pop(); - return null; - } - var t1Node = null; - var t2Node = null; - if (this.read(current, ",") !== null) { - t1Node = this.parse_decimal(current); - if (t1Node === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - t2Node = this.parse_decimal(current); - if (t2Node === null) { - parent.pop(); - return null; - } - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - current.value = new parts.Move(x1Node.value, y1Node.value, x2Node.value, y2Node.value, t1Node !== null ? t1Node.value / 1e3 : null, t2Node !== null ? t2Node.value / 1e3 : null); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_org = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "org") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var xNode = this.parse_decimal(current); - if (xNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var yNode = this.parse_decimal(current); - if (yNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - current.value = new parts.RotationOrigin(xNode.value, yNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_p = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_pbo = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_pos = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "pos") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var xNode = this.parse_decimal(current); - if (xNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var yNode = this.parse_decimal(current); - if (yNode === null) { - parent.pop(); - return null; - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - current.value = new parts.Position(xNode.value, yNode.value); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_q = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "q") === null) { - parent.pop(); - return null; - } - var next = this._peek(); - if (next < "0" || next > "3") { - parent.pop(); - return null; - } - var valueNode = new ParseNode(current, next); - current.value = new parts.WrappingStyle(parseInt(valueNode.value)); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_r = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "r") === null) { - parent.pop(); - return null; - } - var valueNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && next !== "\\" && next !== "}"; next = this._peek()) { - valueNode.value += next; - } - if (valueNode.value.length > 0) { - current.value = new parts.Reset(valueNode.value); - } else { - current.value = new parts.Reset(null); - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_s = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_shad = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_t = function (parent) { - var current = new ParseNode(parent); - if (this.read(current, "t") === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var startNode = null; - var endNode = null; - var accelNode = null; - var firstNode = this.parse_decimal(current); - if (firstNode !== null) { - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var secondNode = this.parse_decimal(current); - if (secondNode !== null) { - startNode = firstNode; - endNode = secondNode; - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var thirdNode = this.parse_decimal(current); - if (thirdNode !== null) { - accelNode = thirdNode; - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - } - } else { - accelNode = firstNode; - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - } - } - var transformTags = []; - for (var next = this._peek(); this._haveMore() && next !== ")" && next !== "}"; next = this._peek()) { - var childNode = null; - if (this.read(current, "\\") !== null) { - childNode = this.parse_tag_alpha(current) || this.parse_tag_iclip(current) || this.parse_tag_xbord(current) || this.parse_tag_ybord(current) || this.parse_tag_xshad(current) || this.parse_tag_yshad(current) || this.parse_tag_blur(current) || this.parse_tag_bord(current) || this.parse_tag_clip(current) || this.parse_tag_fscx(current) || this.parse_tag_fscy(current) || this.parse_tag_shad(current) || this.parse_tag_fax(current) || this.parse_tag_fay(current) || this.parse_tag_frx(current) || this.parse_tag_fry(current) || this.parse_tag_frz(current) || this.parse_tag_fsp(current) || this.parse_tag_fsplus(current) || this.parse_tag_fsminus(current) || this.parse_tag_be(current) || this.parse_tag_fr(current) || this.parse_tag_fs(current) || this.parse_tag_1a(current) || this.parse_tag_1c(current) || this.parse_tag_2a(current) || this.parse_tag_2c(current) || this.parse_tag_3a(current) || this.parse_tag_3c(current) || this.parse_tag_4a(current) || this.parse_tag_4c(current) || this.parse_tag_c(current); - if (childNode === null) { - current.pop(); - } - } - if (childNode === null) { - childNode = this.parse_comment(current); - } - if (childNode !== null) { - if (childNode.value instanceof parts.Comment && transformTags[transformTags.length - 1] instanceof parts.Comment) { - // Merge consecutive comment parts into one part - transformTags[transformTags.length - 1] = new parts.Comment(transformTags[transformTags.length - 1].value + childNode.value.value); - } else { - transformTags.push(childNode.value); - } - } else { - parent.pop(); - return null; - } - } - this.read(current, ")"); - current.value = new parts.Transform(startNode !== null ? startNode.value / 1e3 : null, endNode !== null ? endNode.value / 1e3 : null, accelNode !== null ? accelNode.value / 1e3 : null, transformTags); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_u = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_xbord = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_xshad = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_ybord = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_yshad = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_1a = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_1c = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_2a = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_2c = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_3a = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_3c = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_4a = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_tag_4c = function () { - throw new Error("Method not implemented."); - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_drawingInstructions = function (parent) { - var current = new ParseNode(parent); - var currentType = null; - var numberParts = []; - current.value = []; - while (this._haveMore()) { - while (this.read(current, " ") !== null) {} - if (!this._haveMore()) { - break; - } - if (currentType !== null) { - var numberPart = this.parse_decimal(current); - if (numberPart !== null) { - numberParts.push(numberPart); - if (currentType === "m" && numberParts.length === 2) { - current.value.push(new parts.drawing.MoveInstruction(numberParts[0].value, numberParts[1].value)); - numberParts.splice(0, numberParts.length); - } else if (currentType === "l" && numberParts.length === 2) { - current.value.push(new parts.drawing.LineInstruction(numberParts[0].value, numberParts[1].value)); - numberParts.splice(0, numberParts.length); - } else if (currentType === "b" && numberParts.length === 6) { - current.value.push(new parts.drawing.CubicBezierCurveInstruction(numberParts[0].value, numberParts[1].value, numberParts[2].value, numberParts[3].value, numberParts[4].value, numberParts[5].value)); - numberParts.splice(0, numberParts.length); - } - continue; - } - } - var typePart = this.parse_text(current); - if (typePart === null) { - break; - } - var newType = typePart.value.value; - switch (newType) { - case "m": - case "l": - case "b": - currentType = newType; - numberParts.splice(0, numberParts.length); - break; - } - } - while (this.read(current, " ") !== null) {} - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_decimalInt32 = function (parent) { - var current = new ParseNode(parent); - var isNegative = this.read(current, "-") !== null; - var numberNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && next >= "0" && next <= "9"; next = this._peek()) { - numberNode.value += next; - } - if (numberNode.value.length === 0) { - parent.pop(); - return null; - } - var value = parseInt(numberNode.value); - if (value >= 4294967295) { - value = 4294967295; - } else if (isNegative) { - value = -value; - } - current.value = value; - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_hexInt32 = function (parent) { - var current = new ParseNode(parent); - var isNegative = this.read(current, "-") !== null; - var numberNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && (next >= "0" && next <= "9" || next >= "a" && next <= "f" || next >= "A" && next <= "F"); next = this._peek()) { - numberNode.value += next; - } - if (numberNode.value.length === 0) { - parent.pop(); - return null; - } - var value = parseInt(numberNode.value, 16); - if (value >= 4294967295) { - value = 4294967295; - } else if (isNegative) { - value = -value; - } - current.value = value; - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_decimalOrHexInt32 = function (parent) { - var current = new ParseNode(parent); - var valueNode = this.read(current, "&H") !== null || this.read(current, "&h") !== null ? this.parse_hexInt32(current) : this.parse_decimalInt32(current); - if (valueNode === null) { - parent.pop(); - return null; - } - current.value = valueNode.value; - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_decimal = function (parent) { - var current = new ParseNode(parent); - var negative = this.read(current, "-") !== null; - var numericalPart = this.parse_unsignedDecimal(current); - if (numericalPart === null) { - parent.pop(); - return null; - } - current.value = numericalPart.value; - if (negative) { - current.value = -current.value; - } - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_unsignedDecimal = function (parent) { - var current = new ParseNode(parent); - var characteristicNode = new ParseNode(current, ""); - var mantissaNode = null; - for (var next = this._peek(); this._haveMore() && next >= "0" && next <= "9"; next = this._peek()) { - characteristicNode.value += next; - } - if (characteristicNode.value.length === 0) { - parent.pop(); - return null; - } - if (this.read(current, ".") !== null) { - mantissaNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && next >= "0" && next <= "9"; next = this._peek()) { - mantissaNode.value += next; - } - if (mantissaNode.value.length === 0) { - parent.pop(); - return null; - } - } - current.value = parseFloat(characteristicNode.value + (mantissaNode !== null ? "." + mantissaNode.value : "")); - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_enableDisable = function (parent) { - var next = this._peek(); - if (next === "0" || next === "1") { - var result = new ParseNode(parent, next); - result.value = result.value === "1"; - return result; - } - return null; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_color = function (parent) { - var current = new ParseNode(parent); - while (this.read(current, "&") !== null || this.read(current, "H") !== null) {} - var valueNode = this.parse_hexInt32(current); - if (valueNode === null) { - parent.pop(); - return null; - } - var value = valueNode.value; - current.value = new parts.Color(value & 255, value >> 8 & 255, value >> 16 & 255); - while (this.read(current, "&") !== null || this.read(current, "H") !== null) {} - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_alpha = function (parent) { - var current = new ParseNode(parent); - while (this.read(current, "&") !== null || this.read(current, "H") !== null) {} - var valueNode = this.parse_hexInt32(current); - if (valueNode === null) { - parent.pop(); - return null; - } - var value = valueNode.value; - current.value = 1 - (value & 255) / 255; - while (this.read(current, "&") !== null || this.read(current, "H") !== null) {} - return current; - }; - /** - * @param {!ParseNode} parent - * @return {ParseNode} - */ - ParserRun.prototype.parse_colorWithAlpha = function (parent) { - var current = new ParseNode(parent); - var valueNode = this.parse_decimalOrHexInt32(current); - if (valueNode === null) { - parent.pop(); - return null; - } - var value = valueNode.value; - current.value = new parts.Color(value & 255, value >> 8 & 255, value >> 16 & 255, 1 - (value >> 24 & 255) / 255); - return current; - }; - /** - * @param {!ParseNode} parent - * @param {string} next - * @return {ParseNode} - */ - ParserRun.prototype.read = function (parent, next) { - if (this._peek(next.length) !== next) { - return null; - } - return new ParseNode(parent, next); - }; - /** - * @param {number=1} count - * @return {string} - * - * @private - */ - ParserRun.prototype._peek = function (count) { - if (count === void 0) { - count = 1; - } - // Fastpath for count === 1. http://jsperf.com/substr-vs-indexer - if (count === 1) { - return this._input[this._parseTree.end]; - } - return this._input.substr(this._parseTree.end, count); - }; - /** - * @return {boolean} - * - * @private - */ - ParserRun.prototype._haveMore = function () { - return this._parseTree.end < this._input.length; - }; - /** - * @param {string} tagName One of "clip" and "iclip" - * @param {!ParseNode} parent - * @return {ParseNode} - * - * @private - */ - ParserRun.prototype._parse_tag_clip_or_iclip = function (tagName, parent) { - var current = new ParseNode(parent); - if (this.read(current, tagName) === null) { - parent.pop(); - return null; - } - if (this.read(current, "(") === null) { - parent.pop(); - return null; - } - var x1Node = null; - var x2Node = null; - var y1Node = null; - var y2Node = null; - var scaleNode = null; - var commandsNode = null; - var firstNode = this.parse_decimal(current); - if (firstNode !== null) { - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - var secondNode = this.parse_decimal(current); - if (secondNode !== null) { - x1Node = firstNode; - y1Node = secondNode; - } else { - scaleNode = firstNode; - } - } - if (x1Node !== null && y1Node !== null) { - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - x2Node = this.parse_decimal(current); - if (this.read(current, ",") === null) { - parent.pop(); - return null; - } - y2Node = this.parse_decimal(current); - current.value = new parts.RectangularClip(x1Node.value, y1Node.value, x2Node.value, y2Node.value, tagName === "clip"); - } else { - commandsNode = new ParseNode(current, ""); - for (var next = this._peek(); this._haveMore() && next !== ")" && next !== "}"; next = this._peek()) { - commandsNode.value += next; - } - current.value = new parts.VectorClip(scaleNode !== null ? scaleNode.value : 1, parse(commandsNode.value, "drawingInstructions"), tagName === "clip"); - } - if (this.read(current, ")") === null) { - parent.pop(); - return null; - } - return current; - }; - return ParserRun; - }(); - /** - * Constructs a simple tag parser function and sets it on the prototype of the {@link ./parser/parse.ParserRun} class. - * - * @param {string} tagName The name of the tag to generate the parser function for - * @param {function(new: !libjass.parts.Part, *)} tagConstructor The type of tag to be returned by the generated parser function - * @param {function(!ParseNode): ParseNode} valueParser The parser for the tag's value - * @param {boolean} required Whether the tag's value is required or optional - * - * @private - */ - function makeTagParserFunction(tagName, tagConstructor, valueParser, required) { - ParserRun.prototype["parse_tag_" + tagName] = function (parent) { - var self = this; - var current = new ParseNode(parent); - if (self.read(current, tagName) === null) { - parent.pop(); - return null; - } - var valueNode = valueParser.call(self, current); - if (valueNode !== null) { - current.value = new tagConstructor(valueNode.value); - } else if (!required) { - current.value = new tagConstructor(null); - } else { - parent.pop(); - return null; - } - return current; - }; - } - makeTagParserFunction("alpha", parts.Alpha, ParserRun.prototype.parse_alpha, false); - makeTagParserFunction("be", parts.Blur, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("blur", parts.GaussianBlur, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("bord", parts.Border, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("c", parts.PrimaryColor, ParserRun.prototype.parse_color, false); - makeTagParserFunction("fax", parts.SkewX, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("fay", parts.SkewY, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("fr", parts.RotateZ, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("frx", parts.RotateX, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("fry", parts.RotateY, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("frz", parts.RotateZ, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("fs", parts.FontSize, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("fsp", parts.LetterSpacing, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("i", parts.Italic, ParserRun.prototype.parse_enableDisable, false); - makeTagParserFunction("p", parts.DrawingMode, ParserRun.prototype.parse_decimal, true); - makeTagParserFunction("pbo", parts.DrawingBaselineOffset, ParserRun.prototype.parse_decimal, true); - makeTagParserFunction("s", parts.StrikeThrough, ParserRun.prototype.parse_enableDisable, false); - makeTagParserFunction("shad", parts.Shadow, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("u", parts.Underline, ParserRun.prototype.parse_enableDisable, false); - makeTagParserFunction("xbord", parts.BorderX, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("xshad", parts.ShadowX, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("ybord", parts.BorderY, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("yshad", parts.ShadowY, ParserRun.prototype.parse_decimal, false); - makeTagParserFunction("1a", parts.PrimaryAlpha, ParserRun.prototype.parse_alpha, false); - makeTagParserFunction("1c", parts.PrimaryColor, ParserRun.prototype.parse_color, false); - makeTagParserFunction("2a", parts.SecondaryAlpha, ParserRun.prototype.parse_alpha, false); - makeTagParserFunction("2c", parts.SecondaryColor, ParserRun.prototype.parse_color, false); - makeTagParserFunction("3a", parts.OutlineAlpha, ParserRun.prototype.parse_alpha, false); - makeTagParserFunction("3c", parts.OutlineColor, ParserRun.prototype.parse_color, false); - makeTagParserFunction("4a", parts.ShadowAlpha, ParserRun.prototype.parse_alpha, false); - makeTagParserFunction("4c", parts.ShadowColor, ParserRun.prototype.parse_color, false); - for (var _i = 0, _a = Object.keys(ParserRun.prototype); _i < _a.length; _i++) { - var key = _a[_i]; - if (key.indexOf("parse_") === 0 && typeof ParserRun.prototype[key] === "function") { - rules.set(key.substr("parse_".length), ParserRun.prototype[key]); - } - } - /** - * This class represents a single parse node. It has a start and end position, and an optional value object. - * - * @param {ParseNode} parent The parent of this parse node. - * @param {*=null} value If provided, it is assigned as the value of the node. - * - * @constructor - * @private - */ - var ParseNode = function () { - function ParseNode(parent, value) { - if (value === void 0) { - value = null; - } - this._parent = parent; - this._children = []; - if (parent !== null) { - parent.children.push(this); - } - this._start = parent !== null ? parent.end : 0; - this._end = this._start; - this.value = value; - } - Object.defineProperty(ParseNode.prototype, "start", { - /** - * The start position of this parse node. - * - * @type {number} - */ - get: function () { - return this._start; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParseNode.prototype, "end", { - /** - * The end position of this parse node. - * - * @type {number} - */ - get: function () { - return this._end; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParseNode.prototype, "parent", { - /** - * @type {ParseNode} - */ - get: function () { - return this._parent; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParseNode.prototype, "children", { - /** - * @type {!Array.} - */ - get: function () { - return this._children; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParseNode.prototype, "value", { - /** - * An optional object associated with this parse node. - * - * @type {*} - */ - get: function () { - return this._value; - }, - /** - * An optional object associated with this parse node. - * - * If the value is a string, then the end property is updated to be the length of the string. - * - * @type {*} - */ - set: function (newValue) { - this._value = newValue; - if (this._value !== null && this._value.constructor === String && this._children.length === 0) { - this._setEnd(this._start + this._value.length); - } - }, - enumerable: true, - configurable: true - }); - /** - * Removes the last child of this node and updates the end position to be end position of the new last child. - */ - ParseNode.prototype.pop = function () { - this._children.splice(this._children.length - 1, 1); - if (this._children.length > 0) { - this._setEnd(this._children[this._children.length - 1].end); - } else { - this._setEnd(this.start); - } - }; - /** - * Updates the end property of this node and its parent recursively to the root node. - * - * @param {number} newEnd - * - * @private - */ - ParseNode.prototype._setEnd = function (newEnd) { - this._end = newEnd; - if (this._parent !== null && this._parent.end !== this._end) { - this._parent._setEnd(this._end); - } - }; - return ParseNode; - }(); - var promise_1 = require(32); - var commands_1 = require(36); - var misc_1 = require(38); - misc_1.registerWorkerCommand(commands_1.WorkerCommands.Parse, function (parameters) { - return new promise_1.Promise(function (resolve) { - resolve(parse(parameters.input, parameters.rule)); - }); - }); - }, /* 4 ./parser/stream-parsers */ function (exports, require) { - var settings_1 = require(23); - var ass_1 = require(24); - var style_1 = require(29); - var dialogue_1 = require(26); - var attachment_1 = require(25); - var map_1 = require(30); - var promise_1 = require(32); - var misc_1 = require(2); - var Section; - (function (Section) { - Section[Section["ScriptInfo"] = 0] = "ScriptInfo"; - Section[Section["Styles"] = 1] = "Styles"; - Section[Section["Events"] = 2] = "Events"; - Section[Section["Fonts"] = 3] = "Fonts"; - Section[Section["Graphics"] = 4] = "Graphics"; - Section[Section["Other"] = 5] = "Other"; - Section[Section["EOF"] = 6] = "EOF"; - })(Section || (Section = {})); - /** - * A parser that parses an {@link libjass.ASS} object from a {@link libjass.parser.Stream}. - * - * @param {!libjass.parser.Stream} stream The {@link libjass.parser.Stream} to parse - * - * @constructor - * @memberOf libjass.parser - */ - var StreamParser = function () { - function StreamParser(stream) { - var _this = this; - this._stream = stream; - this._ass = new ass_1.ASS(); - this._minimalDeferred = new promise_1.DeferredPromise(); - this._deferred = new promise_1.DeferredPromise(); - this._shouldSwallowBom = true; - this._currentSection = Section.ScriptInfo; - this._currentAttachment = null; - this._stream.nextLine().then(function (line) { - return _this._onNextLine(line); - }, function (reason) { - _this._minimalDeferred.reject(reason); - _this._deferred.reject(reason); - }); - } - Object.defineProperty(StreamParser.prototype, "minimalASS", { - /** - * @type {!Promise.} A promise that will be resolved when the script properties of the ASS script have been parsed from the stream. Styles and events have not necessarily been - * parsed at the point this promise becomes resolved. - */ - get: function () { - return this._minimalDeferred.promise; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(StreamParser.prototype, "ass", { - /** - * @type {!Promise.} A promise that will be resolved when the entire stream has been parsed. - */ - get: function () { - return this._deferred.promise; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(StreamParser.prototype, "currentSection", { - /** - * @type {number} - */ - get: function () { - return this._currentSection; - }, - /** - * @type {number} - */ - set: function (value) { - if (this._currentAttachment !== null) { - this._ass.addAttachment(this._currentAttachment); - this._currentAttachment = null; - } - if (this._currentSection === Section.ScriptInfo && value !== Section.ScriptInfo) { - // Exiting script info section - this._minimalDeferred.resolve(this._ass); - } - if (value === Section.EOF) { - var scriptProperties = this._ass.properties; - if (scriptProperties.resolutionX === undefined || scriptProperties.resolutionY === undefined) { - // Malformed script. - this._minimalDeferred.reject("Malformed ASS script."); - this._deferred.reject("Malformed ASS script."); - } else { - this._minimalDeferred.resolve(this._ass); - this._deferred.resolve(this._ass); - } - } - this._currentSection = value; - }, - enumerable: true, - configurable: true - }); - /** - * @param {string} line - * - * @private - */ - StreamParser.prototype._onNextLine = function (line) { - var _this = this; - if (line === null) { - this.currentSection = Section.EOF; - return; - } - if (line[line.length - 1] === "\r") { - line = line.substr(0, line.length - 1); - } - if (line.charCodeAt(0) === 65279 && this._shouldSwallowBom) { - line = line.substr(1); - } - this._shouldSwallowBom = false; - if (line === "") {} else if (line[0] === ";" && this._currentAttachment === null) {} else if (line === "[Script Info]") { - this.currentSection = Section.ScriptInfo; - } else if (line === "[V4+ Styles]" || line === "[V4 Styles]") { - this.currentSection = Section.Styles; - } else if (line === "[Events]") { - this.currentSection = Section.Events; - } else if (line === "[Fonts]") { - this.currentSection = Section.Fonts; - } else if (line === "[Graphics]") { - this.currentSection = Section.Graphics; - } else { - if (this._currentAttachment === null && line[0] === "[" && line[line.length - 1] === "]") { - /* This looks like the start of a new section. The section name is unrecognized if it is. - * Since there's no current attachment being parsed it's definitely the start of a new section. - * If an attachment is being parsed, this might be part of the attachment. - */ - this.currentSection = Section.Other; - } - switch (this.currentSection) { - case Section.ScriptInfo: - var property = misc_1.parseLineIntoProperty(line); - if (property !== null) { - switch (property.name) { - case "PlayResX": - this._ass.properties.resolutionX = parseInt(property.value); - break; - - case "PlayResY": - this._ass.properties.resolutionY = parseInt(property.value); - break; - - case "WrapStyle": - this._ass.properties.wrappingStyle = parseInt(property.value); - break; - - case "ScaledBorderAndShadow": - this._ass.properties.scaleBorderAndShadow = property.value === "yes"; - break; - } - } - break; - - case Section.Styles: - if (this._ass.stylesFormatSpecifier === null) { - var property_1 = misc_1.parseLineIntoProperty(line); - if (property_1 !== null && property_1.name === "Format") { - this._ass.stylesFormatSpecifier = property_1.value.split(",").map(function (str) { - return str.trim(); - }); - } else {} - } else { - try { - this._ass.addStyle(line); - } catch (ex) { - if (settings_1.debugMode) { - console.error("Could not parse style from line " + line + " - " + (ex.stack || ex)); - } - } - } - break; - - case Section.Events: - if (this._ass.dialoguesFormatSpecifier === null) { - var property_2 = misc_1.parseLineIntoProperty(line); - if (property_2 !== null && property_2.name === "Format") { - this._ass.dialoguesFormatSpecifier = property_2.value.split(",").map(function (str) { - return str.trim(); - }); - } else {} - } else { - try { - this._ass.addEvent(line); - } catch (ex) { - if (settings_1.debugMode) { - console.error("Could not parse event from line " + line + " - " + (ex.stack || ex)); - } - } - } - break; - - case Section.Fonts: - case Section.Graphics: - var startOfNewAttachmentRegex = this.currentSection === Section.Fonts ? /^fontname:(.+)/ : /^filename:(.+)/; - var startOfNewAttachment = startOfNewAttachmentRegex.exec(line); - if (startOfNewAttachment !== null) { - // Start of new attachment - if (this._currentAttachment !== null) { - this._ass.addAttachment(this._currentAttachment); - this._currentAttachment = null; - } - this._currentAttachment = new attachment_1.Attachment(startOfNewAttachment[1].trim(), this.currentSection === Section.Fonts ? attachment_1.AttachmentType.Font : attachment_1.AttachmentType.Graphic); - } else if (this._currentAttachment !== null) { - try { - this._currentAttachment.contents += uuencodedToBase64(line); - } catch (ex) { - if (settings_1.debugMode) { - console.error("Encountered error while reading font " + this._currentAttachment.filename + ": %o", ex); - } - this._currentAttachment = null; - } - } else {} - break; - - case Section.Other: - // Ignore other sections. - break; - - default: - throw new Error("Unhandled state " + this.currentSection); - } - } - this._stream.nextLine().then(function (line) { - return _this._onNextLine(line); - }, function (reason) { - _this._minimalDeferred.reject(reason); - _this._deferred.reject(reason); - }); - }; - return StreamParser; - }(); - exports.StreamParser = StreamParser; - /** - * A parser that parses an {@link libjass.ASS} object from a {@link libjass.parser.Stream} of an SRT script. - * - * @param {!libjass.parser.Stream} stream The {@link libjass.parser.Stream} to parse - * - * @constructor - * @memberOf libjass.parser - */ - var SrtStreamParser = function () { - function SrtStreamParser(stream) { - var _this = this; - this._stream = stream; - this._ass = new ass_1.ASS(); - this._deferred = new promise_1.DeferredPromise(); - this._shouldSwallowBom = true; - this._currentDialogueNumber = null; - this._currentDialogueStart = null; - this._currentDialogueEnd = null; - this._currentDialogueText = null; - this._stream.nextLine().then(function (line) { - return _this._onNextLine(line); - }, function (reason) { - _this._deferred.reject(reason); - }); - this._ass.properties.resolutionX = 1280; - this._ass.properties.resolutionY = 720; - this._ass.properties.wrappingStyle = 1; - this._ass.properties.scaleBorderAndShadow = true; - var newStyle = new style_1.Style(new map_1.Map([ [ "Name", "Default" ], [ "FontSize", "36" ] ])); - this._ass.styles.set(newStyle.name, newStyle); - } - Object.defineProperty(SrtStreamParser.prototype, "ass", { - /** - * @type {!Promise.} A promise that will be resolved when the entire stream has been parsed. - */ - get: function () { - return this._deferred.promise; - }, - enumerable: true, - configurable: true - }); - /** - * @param {string} line - * - * @private - */ - SrtStreamParser.prototype._onNextLine = function (line) { - var _this = this; - if (line === null) { - if (this._currentDialogueNumber !== null && this._currentDialogueStart !== null && this._currentDialogueEnd !== null && this._currentDialogueText !== null) { - this._ass.dialogues.push(new dialogue_1.Dialogue(new map_1.Map([ [ "Style", "Default" ], [ "Start", this._currentDialogueStart ], [ "End", this._currentDialogueEnd ], [ "Text", this._currentDialogueText ] ]), this._ass)); - } - this._deferred.resolve(this._ass); - return; - } - if (line[line.length - 1] === "\r") { - line = line.substr(0, line.length - 1); - } - if (line.charCodeAt(0) === 65279 && this._shouldSwallowBom) { - line = line.substr(1); - } - this._shouldSwallowBom = false; - if (line === "") { - if (this._currentDialogueNumber !== null && this._currentDialogueStart !== null && this._currentDialogueEnd !== null && this._currentDialogueText !== null) { - this._ass.dialogues.push(new dialogue_1.Dialogue(new map_1.Map([ [ "Style", "Default" ], [ "Start", this._currentDialogueStart ], [ "End", this._currentDialogueEnd ], [ "Text", this._currentDialogueText ] ]), this._ass)); - } - this._currentDialogueNumber = this._currentDialogueStart = this._currentDialogueEnd = this._currentDialogueText = null; - } else { - if (this._currentDialogueNumber === null) { - if (/^\d+$/.test(line)) { - this._currentDialogueNumber = line; - } - } else if (this._currentDialogueStart === null && this._currentDialogueEnd === null) { - var match = /^(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)/.exec(line); - if (match !== null) { - this._currentDialogueStart = match[1].replace(",", "."); - this._currentDialogueEnd = match[2].replace(",", "."); - } - } else { - line = line.replace(//g, "{\\b1}").replace(/\{b\}/g, "{\\b1}").replace(/<\/b>/g, "{\\b0}").replace(/\{\/b\}/g, "{\\b0}").replace(//g, "{\\i1}").replace(/\{i\}/g, "{\\i1}").replace(/<\/i>/g, "{\\i0}").replace(/\{\/i\}/g, "{\\i0}").replace(//g, "{\\u1}").replace(/\{u\}/g, "{\\u1}").replace(/<\/u>/g, "{\\u0}").replace(/\{\/u\}/g, "{\\u0}").replace(//g, function (/* ujs:unreferenced */ substring, red, green, blue) { - return "{c&H" + blue + green + red + "&}"; - }).replace(/<\/font>/g, "{\\c}"); - if (this._currentDialogueText !== null) { - this._currentDialogueText += "\\N" + line; - } else { - this._currentDialogueText = line; - } - } - } - this._stream.nextLine().then(function (line) { - return _this._onNextLine(line); - }, function (reason) { - _this._deferred.reject(reason); - }); - }; - return SrtStreamParser; - }(); - exports.SrtStreamParser = SrtStreamParser; - /** - * Converts a uuencoded string to a base64 string. - * - * @param {string} str - * @return {string} - * - * @private - */ - function uuencodedToBase64(str) { - var result = ""; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i) - 33; - if (charCode < 0 || charCode > 63) { - throw new Error("Out-of-range character code " + charCode + " at index " + i + " in string " + str); - } - if (charCode < 26) { - result += String.fromCharCode("A".charCodeAt(0) + charCode); - } else if (charCode < 52) { - result += String.fromCharCode("a".charCodeAt(0) + charCode - 26); - } else if (charCode < 62) { - result += String.fromCharCode("0".charCodeAt(0) + charCode - 52); - } else if (charCode === 62) { - result += "+"; - } else { - result += "/"; - } - } - return result; - } - }, /* 5 ./parser/streams */ function (exports, require) { - var promise_1 = require(32); - /** - * A {@link libjass.parser.Stream} that reads from a string in memory. - * - * @param {string} str The string - * - * @constructor - * @implements {libjass.parser.Stream} - * @memberOf libjass.parser - */ - var StringStream = function () { - function StringStream(str) { - this._str = str; - this._readTill = 0; - } - /** - * @return {!Promise.} A promise that will be resolved with the next line, or null if the string has been completely read. - */ - StringStream.prototype.nextLine = function () { - var result = null; - if (this._readTill < this._str.length) { - var nextNewLinePos = this._str.indexOf("\n", this._readTill); - if (nextNewLinePos !== -1) { - result = promise_1.Promise.resolve(this._str.substring(this._readTill, nextNewLinePos)); - this._readTill = nextNewLinePos + 1; - } else { - result = promise_1.Promise.resolve(this._str.substr(this._readTill)); - this._readTill = this._str.length; - } - } else { - result = promise_1.Promise.resolve(null); - } - return result; - }; - return StringStream; - }(); - exports.StringStream = StringStream; - /** - * A {@link libjass.parser.Stream} that reads from an XMLHttpRequest object. - * - * @param {!XMLHttpRequest} xhr The XMLHttpRequest object. Make sure to not call .open() on this object before passing it in here, - * since event handlers cannot be registered after open() has been called. - * - * @constructor - * @implements {libjass.parser.Stream} - * @memberOf libjass.parser - */ - var XhrStream = function () { - function XhrStream(xhr) { - var _this = this; - this._xhr = xhr; - this._readTill = 0; - this._pendingDeferred = null; - this._failedError = null; - xhr.addEventListener("progress", function () { - return _this._onXhrProgress(); - }, false); - xhr.addEventListener("load", function () { - return _this._onXhrLoad(); - }, false); - xhr.addEventListener("error", function (event) { - return _this._onXhrError(event); - }, false); - } - /** - * @return {!Promise.} A promise that will be resolved with the next line, or null if the stream is exhausted. - */ - XhrStream.prototype.nextLine = function () { - if (this._pendingDeferred !== null) { - throw new Error("XhrStream only supports one pending unfulfilled read at a time."); - } - var deferred = this._pendingDeferred = new promise_1.DeferredPromise(); - this._tryResolveNextLine(); - return deferred.promise; - }; - /** - * @private - */ - XhrStream.prototype._onXhrProgress = function () { - if (this._pendingDeferred === null) { - return; - } - if (this._xhr.readyState === XMLHttpRequest.DONE) { - /* Suppress resolving next line here. Let the "load" or "error" event handlers do it. - * - * This is required because a failed XHR fires the progress event with readyState === DONE before it fires the error event. - * This would confuse _tryResolveNextLine() into thinking the request succeeded with no data if it was called here. - */ - return; - } - this._tryResolveNextLine(); - }; - /** - * @private - */ - XhrStream.prototype._onXhrLoad = function () { - if (this._pendingDeferred === null) { - return; - } - this._tryResolveNextLine(); - }; - /** - * @param {!ErrorEvent} event - * - * @private - */ - XhrStream.prototype._onXhrError = function (event) { - this._failedError = event; - if (this._pendingDeferred === null) { - return; - } - this._tryResolveNextLine(); - }; - /** - * @private - */ - XhrStream.prototype._tryResolveNextLine = function () { - if (this._failedError !== null) { - this._pendingDeferred.reject(this._failedError); - return; - } - var response = this._xhr.responseText; - var nextNewLinePos = response.indexOf("\n", this._readTill); - if (nextNewLinePos !== -1) { - this._pendingDeferred.resolve(response.substring(this._readTill, nextNewLinePos)); - this._readTill = nextNewLinePos + 1; - this._pendingDeferred = null; - } else if (this._xhr.readyState === XMLHttpRequest.DONE) { - if (this._failedError !== null) { - this._pendingDeferred.reject(this._failedError); - } else if (this._readTill < response.length) { - this._pendingDeferred.resolve(response.substr(this._readTill)); - this._readTill = response.length; - } else { - this._pendingDeferred.resolve(null); - } - this._pendingDeferred = null; - } - }; - return XhrStream; - }(); - exports.XhrStream = XhrStream; - /** - * A {@link libjass.parser.Stream} that reads from a ReadableStream object. - * - * @param {!ReadableStream} stream - * @param {string} encoding - * - * @constructor - * @implements {libjass.parser.Stream} - * @memberOf libjass.parser - */ - var BrowserReadableStream = function () { - function BrowserReadableStream(stream, encoding) { - this._buffer = ""; - this._pendingDeferred = null; - this._reader = stream.getReader(); - this._decoder = new global.TextDecoder(encoding, { - ignoreBOM: true - }); - } - /** - * @return {!Promise.} A promise that will be resolved with the next line, or null if the stream is exhausted. - */ - BrowserReadableStream.prototype.nextLine = function () { - if (this._pendingDeferred !== null) { - throw new Error("BrowserReadableStream only supports one pending unfulfilled read at a time."); - } - var deferred = this._pendingDeferred = new promise_1.DeferredPromise(); - this._tryResolveNextLine(); - return deferred.promise; - }; - /** - * @private - */ - BrowserReadableStream.prototype._tryResolveNextLine = function () { - var _this = this; - var nextNewLinePos = this._buffer.indexOf("\n"); - if (nextNewLinePos !== -1) { - this._pendingDeferred.resolve(this._buffer.substr(0, nextNewLinePos)); - this._buffer = this._buffer.substr(nextNewLinePos + 1); - this._pendingDeferred = null; - } else { - this._reader.read().then(function (next) { - var value = next.value; - var done = next.done; - if (!done) { - _this._buffer += _this._decoder.decode(value, { - stream: true - }); - _this._tryResolveNextLine(); - } else { - // No more data. - if (_this._buffer.length === 0) { - _this._pendingDeferred.resolve(null); - } else { - _this._pendingDeferred.resolve(_this._buffer); - _this._buffer = ""; - } - _this._pendingDeferred = null; - } - }); - } - }; - return BrowserReadableStream; - }(); - exports.BrowserReadableStream = BrowserReadableStream; - }, /* 6 ./parser/ttf */ function (exports, require) { - var __decorate = require(34).__decorate; - var map_1 = require(30); - var set_1 = require(33); - var DataType; - (function (DataType) { - DataType[DataType["Char"] = 0] = "Char"; - DataType[DataType["Uint16"] = 1] = "Uint16"; - DataType[DataType["Uint32"] = 2] = "Uint32"; - })(DataType || (DataType = {})); - var fieldDecorators = new map_1.Map(); - var OffsetTable = function () { - function OffsetTable() {} - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "majorVersion", void 0); - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "minorVersion", void 0); - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "numTables", void 0); - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "searchRange", void 0); - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "entrySelector", void 0); - __decorate([ field(DataType.Uint16) ], OffsetTable.prototype, "rangeShift", void 0); - OffsetTable = __decorate([ struct ], OffsetTable); - return OffsetTable; - }(); - var TableRecord = function () { - function TableRecord() {} - __decorate([ field(DataType.Char) ], TableRecord.prototype, "c1", void 0); - __decorate([ field(DataType.Char) ], TableRecord.prototype, "c2", void 0); - __decorate([ field(DataType.Char) ], TableRecord.prototype, "c3", void 0); - __decorate([ field(DataType.Char) ], TableRecord.prototype, "c4", void 0); - __decorate([ field(DataType.Uint32) ], TableRecord.prototype, "checksum", void 0); - __decorate([ field(DataType.Uint32) ], TableRecord.prototype, "offset", void 0); - __decorate([ field(DataType.Uint32) ], TableRecord.prototype, "length", void 0); - TableRecord = __decorate([ struct ], TableRecord); - return TableRecord; - }(); - var NameTableHeader = function () { - function NameTableHeader() {} - __decorate([ field(DataType.Uint16) ], NameTableHeader.prototype, "formatSelector", void 0); - __decorate([ field(DataType.Uint16) ], NameTableHeader.prototype, "count", void 0); - __decorate([ field(DataType.Uint16) ], NameTableHeader.prototype, "stringOffset", void 0); - NameTableHeader = __decorate([ struct ], NameTableHeader); - return NameTableHeader; - }(); - var NameRecord = function () { - function NameRecord() {} - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "platformId", void 0); - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "encodingId", void 0); - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "languageId", void 0); - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "nameId", void 0); - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "length", void 0); - __decorate([ field(DataType.Uint16) ], NameRecord.prototype, "offset", void 0); - NameRecord = __decorate([ struct ], NameRecord); - return NameRecord; - }(); - /** - * Gets all the font names from the given font attachment. - * - * @param {!libjass.Attachment} attachment - * @return {!libjass.Set.} - */ - function getTtfNames(attachment) { - var decoded = atob(attachment.contents); - var bytes = new Uint8Array(new ArrayBuffer(decoded.length)); - for (var i = 0; i < decoded.length; i++) { - bytes[i] = decoded.charCodeAt(i); - } - var reader = { - dataView: new DataView(bytes.buffer), - position: 0 - }; - var offsetTable = OffsetTable.read(reader); - var nameTableRecord = null; - for (var i = 0; i < offsetTable.numTables; i++) { - var tableRecord = TableRecord.read(reader); - if (tableRecord.c1 + tableRecord.c2 + tableRecord.c3 + tableRecord.c4 === "name") { - nameTableRecord = tableRecord; - break; - } - } - reader.position = nameTableRecord.offset; - var nameTableHeader = NameTableHeader.read(reader); - var result = new set_1.Set(); - for (var i = 0; i < nameTableHeader.count; i++) { - var nameRecord = NameRecord.read(reader); - switch (nameRecord.nameId) { - case 1: - case 4: - case 6: - var recordOffset = nameTableRecord.offset + nameTableHeader.stringOffset + nameRecord.offset; - var nameBytes = bytes.subarray(recordOffset, recordOffset + nameRecord.length); - switch (nameRecord.platformId) { - case 1: - { - var name_1 = ""; - for (var j = 0; j < nameBytes.length; j++) { - name_1 += String.fromCharCode(nameBytes[j]); - } - result.add(name_1); - } - break; - - case 3: - { - var name_2 = ""; - for (var j = 0; j < nameBytes.length; j += 2) { - name_2 += String.fromCharCode((nameBytes[j] << 8) + nameBytes[j + 1]); - } - result.add(name_2); - } - break; - } - break; - - default: - break; - } - } - return result; - } - exports.getTtfNames = getTtfNames; - /** - * @param {!function(new(): T)} clazz - * @return {!function(new(): T)} - * - * @template T - * @private - */ - function struct(clazz) { - var fields = clazz.__fields; - clazz.read = function (reader) { - var result = new clazz(); - for (var _i = 0; _i < fields.length; _i++) { - var field_1 = fields[_i]; - var value = void 0; - switch (field_1.type) { - case DataType.Char: - value = String.fromCharCode(reader.dataView.getInt8(reader.position)); - reader.position += 1; - break; - - case DataType.Uint16: - value = reader.dataView.getUint16(reader.position); - reader.position += 2; - break; - - case DataType.Uint32: - value = reader.dataView.getUint32(reader.position); - reader.position += 4; - break; - } - result[field_1.field] = value; - } - return result; - }; - return clazz; - } - /** - * @param {number} type - * @return {function(T, string)} - * - * @template T - * @private - */ - function field(type) { - var existingDecorator = fieldDecorators.get(type); - if (existingDecorator === undefined) { - existingDecorator = function (proto, field) { - var ctor = proto.constructor; - if (ctor.__fields === undefined) { - ctor.__fields = []; - } - ctor.__fields.push({ - type: type, - field: field - }); - }; - fieldDecorators.set(type, existingDecorator); - } - return existingDecorator; - } - }, /* 7 ./parts/drawing */ function (exports) { - /** - * An instruction to move to a particular position. - * - * @param {number} x - * @param {number} y - * - * @constructor - * @implements {libjass.parts.drawing.Instruction} - * @memberOf libjass.parts.drawing - */ - var MoveInstruction = function () { - function MoveInstruction(x, y) { - this._x = x; - this._y = y; - } - Object.defineProperty(MoveInstruction.prototype, "x", { - /** - * The X position of this move instruction. - * - * @type {number} - */ - get: function () { - return this._x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MoveInstruction.prototype, "y", { - /** - * The Y position of this move instruction. - * - * @type {number} - */ - get: function () { - return this._y; - }, - enumerable: true, - configurable: true - }); - return MoveInstruction; - }(); - exports.MoveInstruction = MoveInstruction; - /** - * An instruction to draw a line to a particular position. - * - * @param {number} x - * @param {number} y - * - * @constructor - * @implements {libjass.parts.drawing.Instruction} - * @memberOf libjass.parts.drawing - */ - var LineInstruction = function () { - function LineInstruction(x, y) { - this._x = x; - this._y = y; - } - Object.defineProperty(LineInstruction.prototype, "x", { - /** - * The X position of this line instruction. - * - * @type {number} - */ - get: function () { - return this._x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LineInstruction.prototype, "y", { - /** - * The Y position of this line instruction. - * - * @type {number} - */ - get: function () { - return this._y; - }, - enumerable: true, - configurable: true - }); - return LineInstruction; - }(); - exports.LineInstruction = LineInstruction; - /** - * An instruction to draw a cubic bezier curve to a particular position, with two given control points. - * - * @param {number} x1 - * @param {number} y1 - * @param {number} x2 - * @param {number} y2 - * @param {number} x3 - * @param {number} y3 - * - * @constructor - * @implements {libjass.parts.drawing.Instruction} - * @memberOf libjass.parts.drawing - */ - var CubicBezierCurveInstruction = function () { - function CubicBezierCurveInstruction(x1, y1, x2, y2, x3, y3) { - this._x1 = x1; - this._y1 = y1; - this._x2 = x2; - this._y2 = y2; - this._x3 = x3; - this._y3 = y3; - } - Object.defineProperty(CubicBezierCurveInstruction.prototype, "x1", { - /** - * The X position of the first control point of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._x1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CubicBezierCurveInstruction.prototype, "y1", { - /** - * The Y position of the first control point of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._y1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CubicBezierCurveInstruction.prototype, "x2", { - /** - * The X position of the second control point of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._x2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CubicBezierCurveInstruction.prototype, "y2", { - /** - * The Y position of the second control point of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._y2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CubicBezierCurveInstruction.prototype, "x3", { - /** - * The ending X position of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._x3; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CubicBezierCurveInstruction.prototype, "y3", { - /** - * The ending Y position of this cubic bezier curve instruction. - * - * @type {number} - */ - get: function () { - return this._y3; - }, - enumerable: true, - configurable: true - }); - return CubicBezierCurveInstruction; - }(); - exports.CubicBezierCurveInstruction = CubicBezierCurveInstruction; - }, /* 8 ./parts/index */ function (exports, require) { - var drawing = require(7); - exports.drawing = drawing; - /** - * Represents a CSS color with red, green, blue and alpha components. - * - * Instances of this class are immutable. - * - * @param {number} red - * @param {number} green - * @param {number} blue - * @param {number=1} alpha - * - * @constructor - * @memberOf libjass.parts - */ - var Color = function () { - function Color(red, green, blue, alpha) { - if (alpha === void 0) { - alpha = 1; - } - this._red = red; - this._green = green; - this._blue = blue; - this._alpha = alpha; - } - Object.defineProperty(Color.prototype, "red", { - /** - * The red component of this color as a number between 0 and 255. - * - * @type {number} - */ - get: function () { - return this._red; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Color.prototype, "green", { - /** - * The green component of this color as a number between 0 and 255. - * - * @type {number} - */ - get: function () { - return this._green; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Color.prototype, "blue", { - /** - * The blue component of this color as a number between 0 and 255. - * - * @type {number} - */ - get: function () { - return this._blue; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Color.prototype, "alpha", { - /** - * The alpha component of this color as a number between 0 and 1, where 0 means transparent and 1 means opaque. - * - * @type {number} - */ - get: function () { - return this._alpha; - }, - enumerable: true, - configurable: true - }); - /** - * @param {?number} value The new alpha. If null, the existing alpha is used. - * @return {!libjass.parts.Color} Returns a new Color instance with the same color but the provided alpha. - */ - Color.prototype.withAlpha = function (value) { - if (value !== null) { - return new Color(this._red, this._green, this._blue, value); - } - return this; - }; - /** - * @return {string} The CSS representation "rgba(...)" of this color. - */ - Color.prototype.toString = function () { - return "rgba(" + this._red + ", " + this._green + ", " + this._blue + ", " + this._alpha.toFixed(3) + ")"; - }; - /** - * Returns a new Color by interpolating the current color to the final color by the given progression. - * - * @param {!libjass.parts.Color} final - * @param {number} progression - * @return {!libjass.parts.Color} - */ - Color.prototype.interpolate = function (final, progression) { - return new Color(this._red + progression * (final.red - this._red), this._green + progression * (final.green - this._green), this._blue + progression * (final.blue - this._blue), this._alpha + progression * (final.alpha - this._alpha)); - }; - return Color; - }(); - exports.Color = Color; - /** - * A comment, i.e., any text enclosed in {} that is not understood as an ASS tag. - * - * @param {string} value The text of this comment - * - * @constructor - * @memberOf libjass.parts - */ - var Comment = function () { - function Comment(value) { - this._value = value; - } - Object.defineProperty(Comment.prototype, "value", { - /** - * The value of this comment. - * - * @type {string} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Comment; - }(); - exports.Comment = Comment; - /** - * A block of text, i.e., any text not enclosed in {}. Also includes \h. - * - * @param {string} value The content of this block of text - * - * @constructor - * @memberOf libjass.parts - */ - var Text = function () { - function Text(value) { - this._value = value; - } - Object.defineProperty(Text.prototype, "value", { - /** - * The value of this text part. - * - * @type {string} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - /** - * @return {string} - */ - Text.prototype.toString = function () { - return "Text { value: " + this._value.replace(/\u00A0/g, "\\h") + " }"; - }; - return Text; - }(); - exports.Text = Text; - /** - * A newline character \N. - * - * @constructor - * @memberOf libjass.parts - */ - var NewLine = function () { - function NewLine() {} - return NewLine; - }(); - exports.NewLine = NewLine; - /** - * An italic tag {\i} - * - * @param {?boolean} value {\i1} -> true, {\i0} -> false, {\i} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Italic = function () { - function Italic(value) { - this._value = value; - } - Object.defineProperty(Italic.prototype, "value", { - /** - * The value of this italic tag. - * - * @type {?boolean} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Italic; - }(); - exports.Italic = Italic; - /** - * A bold tag {\b} - * - * @param {*} value {\b1} -> true, {\b0} -> false, {\b###} -> weight of the bold (number), {\b} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Bold = function () { - function Bold(value) { - this._value = value; - } - Object.defineProperty(Bold.prototype, "value", { - /** - * The value of this bold tag. - * - * @type {?boolean|?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Bold; - }(); - exports.Bold = Bold; - /** - * An underline tag {\u} - * - * @param {?boolean} value {\u1} -> true, {\u0} -> false, {\u} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Underline = function () { - function Underline(value) { - this._value = value; - } - Object.defineProperty(Underline.prototype, "value", { - /** - * The value of this underline tag. - * - * @type {?boolean} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Underline; - }(); - exports.Underline = Underline; - /** - * A strike-through tag {\s} - * - * @param {?boolean} value {\s1} -> true, {\s0} -> false, {\s} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var StrikeThrough = function () { - function StrikeThrough(value) { - this._value = value; - } - Object.defineProperty(StrikeThrough.prototype, "value", { - /** - * The value of this strike-through tag. - * - * @type {?boolean} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return StrikeThrough; - }(); - exports.StrikeThrough = StrikeThrough; - /** - * A border tag {\bord} - * - * @param {?number} value {\bord###} -> width (number), {\bord} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Border = function () { - function Border(value) { - this._value = value; - } - Object.defineProperty(Border.prototype, "value", { - /** - * The value of this border tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Border; - }(); - exports.Border = Border; - /** - * A horizontal border tag {\xbord} - * - * @param {?number} value {\xbord###} -> width (number), {\xbord} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var BorderX = function () { - function BorderX(value) { - this._value = value; - } - Object.defineProperty(BorderX.prototype, "value", { - /** - * The value of this horizontal border tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return BorderX; - }(); - exports.BorderX = BorderX; - /** - * A vertical border tag {\ybord} - * - * @param {?number} value {\ybord###} -> height (number), {\ybord} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var BorderY = function () { - function BorderY(value) { - this._value = value; - } - Object.defineProperty(BorderY.prototype, "value", { - /** - * The value of this vertical border tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return BorderY; - }(); - exports.BorderY = BorderY; - /** - * A shadow tag {\shad} - * - * @param {?number} value {\shad###} -> depth (number), {\shad} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Shadow = function () { - function Shadow(value) { - this._value = value; - } - Object.defineProperty(Shadow.prototype, "value", { - /** - * The value of this shadow tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Shadow; - }(); - exports.Shadow = Shadow; - /** - * A horizontal shadow tag {\xshad} - * - * @param {?number} value {\xshad###} -> depth (number), {\xshad} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var ShadowX = function () { - function ShadowX(value) { - this._value = value; - } - Object.defineProperty(ShadowX.prototype, "value", { - /** - * The value of this horizontal shadow tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return ShadowX; - }(); - exports.ShadowX = ShadowX; - /** - * A vertical shadow tag {\yshad} - * - * @param {?number} value {\yshad###} -> depth (number), {\yshad} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var ShadowY = function () { - function ShadowY(value) { - this._value = value; - } - Object.defineProperty(ShadowY.prototype, "value", { - /** - * The value of this vertical shadow tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return ShadowY; - }(); - exports.ShadowY = ShadowY; - /** - * A blur tag {\be} - * - * @param {?number} value {\be###} -> strength (number), {\be} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Blur = function () { - function Blur(value) { - this._value = value; - } - Object.defineProperty(Blur.prototype, "value", { - /** - * The value of this blur tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Blur; - }(); - exports.Blur = Blur; - /** - * A Gaussian blur tag {\blur} - * - * @param {?number} value {\blur###} -> strength (number), {\blur} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var GaussianBlur = function () { - function GaussianBlur(value) { - this._value = value; - } - Object.defineProperty(GaussianBlur.prototype, "value", { - /** - * The value of this Gaussian blur tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return GaussianBlur; - }(); - exports.GaussianBlur = GaussianBlur; - /** - * A font name tag {\fn} - * - * @param {?string} value {\fn###} -> name (string), {\fn} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var FontName = function () { - function FontName(value) { - this._value = value; - } - Object.defineProperty(FontName.prototype, "value", { - /** - * The value of this font name tag. - * - * @type {?string} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontName; - }(); - exports.FontName = FontName; - /** - * A font size tag {\fs} - * - * @param {?number} value {\fs###} -> size (number), {\fs} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var FontSize = function () { - function FontSize(value) { - this._value = value; - } - Object.defineProperty(FontSize.prototype, "value", { - /** - * The value of this font size tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontSize; - }(); - exports.FontSize = FontSize; - /** - * A font size increase tag {\fs+} - * - * @param {number} value {\fs+###} -> difference (number) - * - * @constructor - * @memberOf libjass.parts - */ - var FontSizePlus = function () { - function FontSizePlus(value) { - this._value = value; - } - Object.defineProperty(FontSizePlus.prototype, "value", { - /** - * The value of this font size increase tag. - * - * @type {number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontSizePlus; - }(); - exports.FontSizePlus = FontSizePlus; - /** - * A font size decrease tag {\fs-} - * - * @param {number} value {\fs-###} -> difference (number) - * - * @constructor - * @memberOf libjass.parts - */ - var FontSizeMinus = function () { - function FontSizeMinus(value) { - this._value = value; - } - Object.defineProperty(FontSizeMinus.prototype, "value", { - /** - * The value of this font size decrease tag. - * - * @type {number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontSizeMinus; - }(); - exports.FontSizeMinus = FontSizeMinus; - /** - * A horizontal font scaling tag {\fscx} - * - * @param {?number} value {\fscx###} -> scale (number), {\fscx} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var FontScaleX = function () { - function FontScaleX(value) { - this._value = value; - } - Object.defineProperty(FontScaleX.prototype, "value", { - /** - * The value of this horizontal font scaling tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontScaleX; - }(); - exports.FontScaleX = FontScaleX; - /** - * A vertical font scaling tag {\fscy} - * - * @param {?number} value {\fscy###} -> scale (number), {\fscy} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var FontScaleY = function () { - function FontScaleY(value) { - this._value = value; - } - Object.defineProperty(FontScaleY.prototype, "value", { - /** - * The value of this vertical font scaling tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return FontScaleY; - }(); - exports.FontScaleY = FontScaleY; - /** - * A letter-spacing tag {\fsp} - * - * @param {?number} value {\fsp###} -> spacing (number), {\fsp} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var LetterSpacing = function () { - function LetterSpacing(value) { - this._value = value; - } - Object.defineProperty(LetterSpacing.prototype, "value", { - /** - * The value of this letter-spacing tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return LetterSpacing; - }(); - exports.LetterSpacing = LetterSpacing; - /** - * An X-axis rotation tag {\frx} - * - * @param {?number} value {\frx###} -> angle (number), {\frx} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var RotateX = function () { - function RotateX(value) { - this._value = value; - } - Object.defineProperty(RotateX.prototype, "value", { - /** - * The value of this X-axis rotation tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return RotateX; - }(); - exports.RotateX = RotateX; - /** - * A Y-axis rotation tag {\fry} - * - * @param {?number} value {\fry###} -> angle (number), {\fry} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var RotateY = function () { - function RotateY(value) { - this._value = value; - } - Object.defineProperty(RotateY.prototype, "value", { - /** - * The value of this Y-axis rotation tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return RotateY; - }(); - exports.RotateY = RotateY; - /** - * A Z-axis rotation tag {\fr} or {\frz} - * - * @param {?number} value {\frz###} -> angle (number), {\frz} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var RotateZ = function () { - function RotateZ(value) { - this._value = value; - } - Object.defineProperty(RotateZ.prototype, "value", { - /** - * The value of this Z-axis rotation tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return RotateZ; - }(); - exports.RotateZ = RotateZ; - /** - * An X-axis shearing tag {\fax} - * - * @param {?number} value {\fax###} -> angle (number), {\fax} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var SkewX = function () { - function SkewX(value) { - this._value = value; - } - Object.defineProperty(SkewX.prototype, "value", { - /** - * The value of this X-axis shearing tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return SkewX; - }(); - exports.SkewX = SkewX; - /** - * A Y-axis shearing tag {\fay} - * - * @param {?number} value {\fay###} -> angle (number), {\fay} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var SkewY = function () { - function SkewY(value) { - this._value = value; - } - Object.defineProperty(SkewY.prototype, "value", { - /** - * The value of this Y-axis shearing tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return SkewY; - }(); - exports.SkewY = SkewY; - /** - * A primary color tag {\c} or {\1c} - * - * @param {libjass.parts.Color} value {\1c###} -> color (Color), {\1c} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var PrimaryColor = function () { - function PrimaryColor(value) { - this._value = value; - } - Object.defineProperty(PrimaryColor.prototype, "value", { - /** - * The value of this primary color tag. - * - * @type {libjass.parts.Color} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return PrimaryColor; - }(); - exports.PrimaryColor = PrimaryColor; - /** - * A secondary color tag {\2c} - * - * @param {libjass.parts.Color} value {\2c###} -> color (Color), {\2c} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var SecondaryColor = function () { - function SecondaryColor(value) { - this._value = value; - } - Object.defineProperty(SecondaryColor.prototype, "value", { - /** - * The value of this secondary color tag. - * - * @type {libjass.parts.Color} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return SecondaryColor; - }(); - exports.SecondaryColor = SecondaryColor; - /** - * An outline color tag {\3c} - * - * @param {libjass.parts.Color} value {\3c###} -> color (Color), {\3c} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var OutlineColor = function () { - function OutlineColor(value) { - this._value = value; - } - Object.defineProperty(OutlineColor.prototype, "value", { - /** - * The value of this outline color tag. - * - * @type {libjass.parts.Color} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return OutlineColor; - }(); - exports.OutlineColor = OutlineColor; - /** - * A shadow color tag {\4c} - * - * @param {libjass.parts.Color} value {\4c###} -> color (Color), {\4c} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var ShadowColor = function () { - function ShadowColor(value) { - this._value = value; - } - Object.defineProperty(ShadowColor.prototype, "value", { - /** - * The value of this shadow color tag. - * - * @type {libjass.parts.Color} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return ShadowColor; - }(); - exports.ShadowColor = ShadowColor; - /** - * An alpha tag {\alpha} - * - * @param {?number} value {\alpha###} -> alpha (number), {\alpha} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Alpha = function () { - function Alpha(value) { - this._value = value; - } - Object.defineProperty(Alpha.prototype, "value", { - /** - * The value of this alpha tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Alpha; - }(); - exports.Alpha = Alpha; - /** - * A primary alpha tag {\1a} - * - * @param {?number} value {\1a###} -> alpha (number), {\1a} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var PrimaryAlpha = function () { - function PrimaryAlpha(value) { - this._value = value; - } - Object.defineProperty(PrimaryAlpha.prototype, "value", { - /** - * The value of this primary alpha tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return PrimaryAlpha; - }(); - exports.PrimaryAlpha = PrimaryAlpha; - /** - * A secondary alpha tag {\2a} - * - * @param {?number} value {\2a###} -> alpha (number), {\2a} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var SecondaryAlpha = function () { - function SecondaryAlpha(value) { - this._value = value; - } - Object.defineProperty(SecondaryAlpha.prototype, "value", { - /** - * The value of this secondary alpha tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return SecondaryAlpha; - }(); - exports.SecondaryAlpha = SecondaryAlpha; - /** - * An outline alpha tag {\3a} - * - * @param {?number} value {\3a###} -> alpha (number), {\3a} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var OutlineAlpha = function () { - function OutlineAlpha(value) { - this._value = value; - } - Object.defineProperty(OutlineAlpha.prototype, "value", { - /** - * The value of this outline alpha tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return OutlineAlpha; - }(); - exports.OutlineAlpha = OutlineAlpha; - /** - * A shadow alpha tag {\4a} - * - * @param {?number} value {\4a###} -> alpha (number), {\4a} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var ShadowAlpha = function () { - function ShadowAlpha(value) { - this._value = value; - } - Object.defineProperty(ShadowAlpha.prototype, "value", { - /** - * The value of this shadow alpha tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return ShadowAlpha; - }(); - exports.ShadowAlpha = ShadowAlpha; - /** - * An alignment tag {\an} or {\a} - * - * @param {number} value {\an###} -> alignment (number) - * - * @constructor - * @memberOf libjass.parts - */ - var Alignment = function () { - function Alignment(value) { - this._value = value; - } - Object.defineProperty(Alignment.prototype, "value", { - /** - * The value of this alignment tag. - * - * @type {?number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Alignment; - }(); - exports.Alignment = Alignment; - /** - * A color karaoke tag {\k} - * - * @param {number} duration {\k###} -> duration (number) - * - * @constructor - * @memberOf libjass.parts - */ - var ColorKaraoke = function () { - function ColorKaraoke(duration) { - this._duration = duration; - } - Object.defineProperty(ColorKaraoke.prototype, "duration", { - /** - * The duration of this color karaoke tag. - * - * @type {number} - */ - get: function () { - return this._duration; - }, - enumerable: true, - configurable: true - }); - return ColorKaraoke; - }(); - exports.ColorKaraoke = ColorKaraoke; - /** - * A sweeping color karaoke tag {\K} or {\kf} - * - * @param {number} duration {\kf###} -> duration (number) - * - * @constructor - * @memberOf libjass.parts - */ - var SweepingColorKaraoke = function () { - function SweepingColorKaraoke(duration) { - this._duration = duration; - } - Object.defineProperty(SweepingColorKaraoke.prototype, "duration", { - /** - * The duration of this sweeping color karaoke tag. - * - * @type {number} - */ - get: function () { - return this._duration; - }, - enumerable: true, - configurable: true - }); - return SweepingColorKaraoke; - }(); - exports.SweepingColorKaraoke = SweepingColorKaraoke; - /** - * An outline karaoke tag {\ko} - * - * @param {number} duration {\ko###} -> duration (number) - * - * @constructor - * @memberOf libjass.parts - */ - var OutlineKaraoke = function () { - function OutlineKaraoke(duration) { - this._duration = duration; - } - Object.defineProperty(OutlineKaraoke.prototype, "duration", { - /** - * The duration of this outline karaoke tag. - * - * @type {number} - */ - get: function () { - return this._duration; - }, - enumerable: true, - configurable: true - }); - return OutlineKaraoke; - }(); - exports.OutlineKaraoke = OutlineKaraoke; - /** - * A wrapping style tag {\q} - * - * @param {number} value {\q###} -> style (number) - * - * @constructor - * @memberOf libjass.parts - */ - var WrappingStyle = function () { - function WrappingStyle(value) { - this._value = value; - } - Object.defineProperty(WrappingStyle.prototype, "value", { - /** - * The value of this wrapping style tag. - * - * @type {number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return WrappingStyle; - }(); - exports.WrappingStyle = WrappingStyle; - /** - * A style reset tag {\r} - * - * @param {?string} value {\r###} -> style name (string), {\r} -> null - * - * @constructor - * @memberOf libjass.parts - */ - var Reset = function () { - function Reset(value) { - this._value = value; - } - Object.defineProperty(Reset.prototype, "value", { - /** - * The value of this style reset tag. - * - * @type {?string} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return Reset; - }(); - exports.Reset = Reset; - /** - * A position tag {\pos} - * - * @param {number} x - * @param {number} y - * - * @constructor - * @memberOf libjass.parts - */ - var Position = function () { - function Position(x, y) { - this._x = x; - this._y = y; - } - Object.defineProperty(Position.prototype, "x", { - /** - * The x value of this position tag. - * - * @type {number} - */ - get: function () { - return this._x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Position.prototype, "y", { - /** - * The y value of this position tag. - * - * @type {number} - */ - get: function () { - return this._y; - }, - enumerable: true, - configurable: true - }); - return Position; - }(); - exports.Position = Position; - /** - * A movement tag {\move} - * - * @param {number} x1 - * @param {number} y1 - * @param {number} x2 - * @param {number} y2 - * @param {number} t1 - * @param {number} t2 - * - * @constructor - * @memberOf libjass.parts - */ - var Move = function () { - function Move(x1, y1, x2, y2, t1, t2) { - this._x1 = x1; - this._y1 = y1; - this._x2 = x2; - this._y2 = y2; - this._t1 = t1; - this._t2 = t2; - } - Object.defineProperty(Move.prototype, "x1", { - /** - * The starting x value of this move tag. - * - * @type {number} - */ - get: function () { - return this._x1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Move.prototype, "y1", { - /** - * The starting y value of this move tag. - * - * @type {number} - */ - get: function () { - return this._y1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Move.prototype, "x2", { - /** - * The ending x value of this move tag. - * - * @type {number} - */ - get: function () { - return this._x2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Move.prototype, "y2", { - /** - * The ending y value of this move tag. - * - * @type {number} - */ - get: function () { - return this._y2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Move.prototype, "t1", { - /** - * The start time of this move tag. - * - * @type {number} - */ - get: function () { - return this._t1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Move.prototype, "t2", { - /** - * The end time value of this move tag. - * - * @type {number} - */ - get: function () { - return this._t2; - }, - enumerable: true, - configurable: true - }); - return Move; - }(); - exports.Move = Move; - /** - * A rotation origin tag {\org} - * - * @param {number} x - * @param {number} y - * - * @constructor - * @memberOf libjass.parts - */ - var RotationOrigin = function () { - function RotationOrigin(x, y) { - this._x = x; - this._y = y; - } - Object.defineProperty(RotationOrigin.prototype, "x", { - /** - * The x value of this rotation origin tag. - * - * @type {number} - */ - get: function () { - return this._x; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(RotationOrigin.prototype, "y", { - /** - * The y value of this rotation origin tag. - * - * @type {number} - */ - get: function () { - return this._y; - }, - enumerable: true, - configurable: true - }); - return RotationOrigin; - }(); - exports.RotationOrigin = RotationOrigin; - /** - * A simple fade tag {\fad} - * - * @param {number} start - * @param {number} end - * - * @constructor - * @memberOf libjass.parts - */ - var Fade = function () { - function Fade(start, end) { - this._start = start; - this._end = end; - } - Object.defineProperty(Fade.prototype, "start", { - /** - * The start time of this fade tag. - * - * @type {number} - */ - get: function () { - return this._start; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Fade.prototype, "end", { - /** - * The end time of this fade tag. - * - * @type {number} - */ - get: function () { - return this._end; - }, - enumerable: true, - configurable: true - }); - return Fade; - }(); - exports.Fade = Fade; - /** - * A complex fade tag {\fade} - * - * @param {number} a1 - * @param {number} a2 - * @param {number} a3 - * @param {number} t1 - * @param {number} t2 - * @param {number} t3 - * @param {number} t4 - * - * @constructor - * @memberOf libjass.parts - */ - var ComplexFade = function () { - function ComplexFade(a1, a2, a3, t1, t2, t3, t4) { - this._a1 = a1; - this._a2 = a2; - this._a3 = a3; - this._t1 = t1; - this._t2 = t2; - this._t3 = t3; - this._t4 = t4; - } - Object.defineProperty(ComplexFade.prototype, "a1", { - /** - * The alpha value of this complex fade tag at time t2. - * - * @type {number} - */ - get: function () { - return this._a1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "a2", { - /** - * The alpha value of this complex fade tag at time t3. - * - * @type {number} - */ - get: function () { - return this._a2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "a3", { - /** - * The alpha value of this complex fade tag at time t4. - * - * @type {number} - */ - get: function () { - return this._a3; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "t1", { - /** - * The starting time of this complex fade tag. - * - * @type {number} - */ - get: function () { - return this._t1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "t2", { - /** - * The first intermediate time of this complex fade tag. - * - * @type {number} - */ - get: function () { - return this._t2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "t3", { - /** - * The second intermediate time of this complex fade tag. - * - * @type {number} - */ - get: function () { - return this._t3; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ComplexFade.prototype, "t4", { - /** - * The ending time of this complex fade tag. - * - * @type {number} - */ - get: function () { - return this._t4; - }, - enumerable: true, - configurable: true - }); - return ComplexFade; - }(); - exports.ComplexFade = ComplexFade; - /** - * A transform tag {\t} - * - * @param {number} start - * @param {number} end - * @param {number} accel - * @param {!Array.} tags - * - * @constructor - * @memberOf libjass.parts - */ - var Transform = function () { - function Transform(start, end, accel, tags) { - this._start = start; - this._end = end; - this._accel = accel; - this._tags = tags; - } - Object.defineProperty(Transform.prototype, "start", { - /** - * The starting time of this transform tag. - * - * @type {?number} - */ - get: function () { - return this._start; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Transform.prototype, "end", { - /** - * The ending time of this transform tag. - * - * @type {?number} - */ - get: function () { - return this._end; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Transform.prototype, "accel", { - /** - * The acceleration of this transform tag. - * - * @type {?number} - */ - get: function () { - return this._accel; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Transform.prototype, "tags", { - /** - * The tags animated by this transform tag. - * - * @type {!Array.} - */ - get: function () { - return this._tags; - }, - enumerable: true, - configurable: true - }); - return Transform; - }(); - exports.Transform = Transform; - /** - * A rectangular clip tag {\clip} or {\iclip} - * - * @param {number} x1 - * @param {number} y1 - * @param {number} x2 - * @param {number} y2 - * @param {boolean} inside - * - * @constructor - * @memberOf libjass.parts - */ - var RectangularClip = function () { - function RectangularClip(x1, y1, x2, y2, inside) { - this._x1 = x1; - this._y1 = y1; - this._x2 = x2; - this._y2 = y2; - this._inside = inside; - } - Object.defineProperty(RectangularClip.prototype, "x1", { - /** - * The X coordinate of the starting position of this rectangular clip tag. - * - * @type {number} - */ - get: function () { - return this._x1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(RectangularClip.prototype, "y1", { - /** - * The Y coordinate of the starting position of this rectangular clip tag. - * - * @type {number} - */ - get: function () { - return this._y1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(RectangularClip.prototype, "x2", { - /** - * The X coordinate of the ending position of this rectangular clip tag. - * - * @type {number} - */ - get: function () { - return this._x2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(RectangularClip.prototype, "y2", { - /** - * The Y coordinate of the ending position of this rectangular clip tag. - * - * @type {number} - */ - get: function () { - return this._y2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(RectangularClip.prototype, "inside", { - /** - * Whether this rectangular clip tag clips the region it encloses or the region it excludes. - * - * @type {boolean} - */ - get: function () { - return this._inside; - }, - enumerable: true, - configurable: true - }); - return RectangularClip; - }(); - exports.RectangularClip = RectangularClip; - /** - * A vector clip tag {\clip} or {\iclip} - * - * @param {number} scale - * @param {!Array.} instructions - * @param {boolean} inside - * - * @constructor - * @memberOf libjass.parts - */ - var VectorClip = function () { - function VectorClip(scale, instructions, inside) { - this._scale = scale; - this._instructions = instructions; - this._inside = inside; - } - Object.defineProperty(VectorClip.prototype, "scale", { - /** - * The scale of this vector clip tag. - * - * @type {number} - */ - get: function () { - return this._scale; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(VectorClip.prototype, "instructions", { - /** - * The clip commands of this vector clip tag. - * - * @type {string} - */ - get: function () { - return this._instructions; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(VectorClip.prototype, "inside", { - /** - * Whether this vector clip tag clips the region it encloses or the region it excludes. - * - * @type {boolean} - */ - get: function () { - return this._inside; - }, - enumerable: true, - configurable: true - }); - return VectorClip; - }(); - exports.VectorClip = VectorClip; - /** - * A drawing mode tag {\p} - * - * @param {number} scale - * - * @constructor - * @memberOf libjass.parts - */ - var DrawingMode = function () { - function DrawingMode(scale) { - this._scale = scale; - } - Object.defineProperty(DrawingMode.prototype, "scale", { - /** - * The scale of this drawing mode tag. - * - * @type {number} - */ - get: function () { - return this._scale; - }, - enumerable: true, - configurable: true - }); - return DrawingMode; - }(); - exports.DrawingMode = DrawingMode; - /** - * A drawing mode baseline offset tag {\pbo} - * - * @param {number} value - * - * @constructor - * @memberOf libjass.parts - */ - var DrawingBaselineOffset = function () { - function DrawingBaselineOffset(value) { - this._value = value; - } - Object.defineProperty(DrawingBaselineOffset.prototype, "value", { - /** - * The value of this drawing mode baseline offset tag. - * - * @type {number} - */ - get: function () { - return this._value; - }, - enumerable: true, - configurable: true - }); - return DrawingBaselineOffset; - }(); - exports.DrawingBaselineOffset = DrawingBaselineOffset; - /** - * A pseudo-part representing text interpreted as drawing instructions - * - * @param {!Array.} instructions - * - * @constructor - * @memberOf libjass.parts - */ - var DrawingInstructions = function () { - function DrawingInstructions(instructions) { - this._instructions = instructions; - } - Object.defineProperty(DrawingInstructions.prototype, "instructions", { - /** - * The instructions contained in this drawing instructions part. - * - * @type {!Array.} - */ - get: function () { - return this._instructions; - }, - enumerable: true, - configurable: true - }); - return DrawingInstructions; - }(); - exports.DrawingInstructions = DrawingInstructions; - var addToString = function (ctor, ctorName) { - if (!ctor.prototype.hasOwnProperty("toString")) { - var propertyNames = Object.getOwnPropertyNames(ctor.prototype).filter(function (property) { - return property !== "constructor"; - }); - ctor.prototype.toString = function () { - var _this = this; - return ctorName + " { " + propertyNames.map(function (name) { - return name + ": " + _this[name]; - }).join(", ") + (propertyNames.length > 0 ? " " : "") + "}"; - }; - } - }; - var misc_1 = require(38); - for (var _i = 0, _a = Object.keys(exports); _i < _a.length; _i++) { - var key = _a[_i]; - var value = exports[key]; - if (value instanceof Function) { - addToString(value, key); - misc_1.registerClassPrototype(value.prototype); - } - } - for (var _b = 0, _c = Object.keys(drawing); _b < _c.length; _b++) { - var key = _c[_b]; - var value = drawing[key]; - if (value instanceof Function) { - addToString(value, "Drawing" + key); - misc_1.registerClassPrototype(value.prototype); - } - } - }, /* 9 ./renderers/clocks/auto */ function (exports, require) { - var settings_1 = require(23); - var manual_1 = require(11); - /** - * An implementation of {@link libjass.renderers.Clock} that automatically ticks and generates {@link libjass.renderers.ClockEvent}s according to the state of an external driver. - * - * For example, if you're using libjass to render subtitles on a canvas with your own video controls, these video controls will function as the driver to this AutoClock. - * It would call {@link libjass.renderers.AutoClock.play}, {@link libjass.renderers.AutoClock.pause}, etc. when the user pressed the corresponding video controls. - * - * The difference from ManualClock is that AutoClock does not require the driver to call something like {@link libjass.renderers.ManualClock.tick}. Instead it keeps its - * own time with a high-resolution requestAnimationFrame-based timer. - * - * If using libjass with a