From 33b01d778ccea3c380168472eb14c5b3aafccbbb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 14 Dec 2015 10:43:03 -0500 Subject: [PATCH] merge from dev --- dashboard-ui/addplugin.html | 4 +- dashboard-ui/advanced.html | 2 +- dashboard-ui/apiclient/ajax.js | 24 - dashboard-ui/apiclient/alt/bean.js | 736 - dashboard-ui/apiclient/alt/deferred.js | 314 - dashboard-ui/apiclient/alt/events.js | 35 - dashboard-ui/apiclient/apiclient.js | 1055 +- dashboard-ui/apiclient/connectionmanager.js | 950 +- dashboard-ui/apiclient/device.js | 35 - dashboard-ui/apiclient/events.js | 81 +- dashboard-ui/apiclient/fileupload.js | 7 +- dashboard-ui/apiclient/localassetmanager.js | 104 +- dashboard-ui/apiclient/serverdiscovery.js | 19 +- dashboard-ui/apiclient/sha1.js | 43 - dashboard-ui/apiclient/store.js | 1 + .../apiclient/sync/contentuploader.js | 16 +- dashboard-ui/apiclient/sync/mediasync.js | 120 +- .../apiclient/sync/multiserversync.js | 4 +- .../apiclient/sync/offlineusersync.js | 16 +- dashboard-ui/apiclient/sync/serversync.js | 16 +- dashboard-ui/apiclient/wakeonlan.js | 13 +- dashboard-ui/autoorganizelog.html | 2 +- dashboard-ui/autoorganizetv.html | 4 +- .../bower_components/cryptojslib/.bower.json | 22 + .../cryptojslib/.gitattributes | 22 + .../bower_components/cryptojslib/.gitignore | 215 + .../bower_components/cryptojslib/bower.json | 14 + .../cryptojslib/components/aes-min.js | 10 + .../cryptojslib/components/aes.js | 213 + .../cryptojslib/components/cipher-core-min.js | 14 + .../cryptojslib/components/cipher-core.js | 863 + .../cryptojslib/components/core-min.js | 13 + .../cryptojslib/components/core.js | 712 + .../cryptojslib/components/enc-base64-min.js | 8 + .../cryptojslib/components/enc-base64.js | 109 + .../cryptojslib/components/enc-utf16-min.js | 8 + .../cryptojslib/components/enc-utf16.js | 135 + .../cryptojslib/components/evpkdf-min.js | 8 + .../cryptojslib/components/evpkdf.js | 118 + .../cryptojslib/components/format-hex-min.js | 7 + .../cryptojslib/components/format-hex.js | 52 + .../cryptojslib/components/hmac-min.js | 8 + .../cryptojslib/components/hmac.js | 131 + .../components/lib-typedarrays-min.js | 8 + .../cryptojslib/components/lib-typedarrays.js | 62 + .../cryptojslib/components/md5-min.js | 12 + .../cryptojslib/components/md5.js | 254 + .../cryptojslib/components/mode-cfb-min.js | 7 + .../cryptojslib/components/mode-cfb.js | 64 + .../components/mode-ctr-gladman-min.js | 14 + .../components/mode-ctr-gladman.js | 102 + .../cryptojslib/components/mode-ctr-min.js | 7 + .../cryptojslib/components/mode-ctr.js | 44 + .../cryptojslib/components/mode-ecb-min.js | 7 + .../cryptojslib/components/mode-ecb.js | 26 + .../cryptojslib/components/mode-ofb-min.js | 7 + .../cryptojslib/components/mode-ofb.js | 40 + .../components/pad-ansix923-min.js | 7 + .../cryptojslib/components/pad-ansix923.js | 35 + .../components/pad-iso10126-min.js | 7 + .../cryptojslib/components/pad-iso10126.js | 30 + .../components/pad-iso97971-min.js | 7 + .../cryptojslib/components/pad-iso97971.js | 26 + .../components/pad-nopadding-min.js | 7 + .../cryptojslib/components/pad-nopadding.js | 16 + .../components/pad-zeropadding-min.js | 7 + .../cryptojslib/components/pad-zeropadding.js | 31 + .../cryptojslib/components/pbkdf2-min.js | 8 + .../cryptojslib/components/pbkdf2.js | 131 + .../components/rabbit-legacy-min.js | 11 + .../cryptojslib/components/rabbit-legacy.js | 176 + .../cryptojslib/components/rabbit-min.js | 11 + .../cryptojslib/components/rabbit.js | 178 + .../cryptojslib/components/rc4-min.js | 8 + .../cryptojslib/components/rc4.js | 125 + .../cryptojslib/components/ripemd160-min.js | 22 + .../cryptojslib/components/ripemd160.js | 253 + .../cryptojslib/components/sha1-min.js | 8 + .../cryptojslib/components/sha1.js | 136 + .../cryptojslib/components/sha224-min.js | 7 + .../cryptojslib/components/sha224.js | 66 + .../cryptojslib/components/sha256-min.js | 9 + .../cryptojslib/components/sha256.js | 185 + .../cryptojslib/components/sha3-min.js | 11 + .../cryptojslib/components/sha3.js | 309 + .../cryptojslib/components/sha384-min.js | 8 + .../cryptojslib/components/sha384.js | 69 + .../cryptojslib/components/sha512-min.js | 15 + .../cryptojslib/components/sha512.js | 309 + .../cryptojslib/components/tripledes-min.js | 26 + .../cryptojslib/components/tripledes.js | 756 + .../cryptojslib/components/x64-core-min.js | 7 + .../cryptojslib/components/x64-core.js | 290 + .../cryptojslib/copyright.txt | 9 + .../bower_components/cryptojslib/push.bat | 5 + .../cryptojslib/rollups/aes.js | 35 + .../cryptojslib/rollups/hmac-md5.js | 21 + .../cryptojslib/rollups/hmac-ripemd160.js | 31 + .../cryptojslib/rollups/hmac-sha1.js | 17 + .../cryptojslib/rollups/hmac-sha224.js | 19 + .../cryptojslib/rollups/hmac-sha256.js | 18 + .../cryptojslib/rollups/hmac-sha3.js | 21 + .../cryptojslib/rollups/hmac-sha384.js | 27 + .../cryptojslib/rollups/hmac-sha512.js | 25 + .../cryptojslib/rollups}/md5.js | 0 .../cryptojslib/rollups/pbkdf2.js | 19 + .../cryptojslib/rollups/rabbit-legacy.js | 36 + .../cryptojslib/rollups/rabbit.js | 36 + .../cryptojslib/rollups/rc4.js | 33 + .../cryptojslib/rollups/ripemd160.js | 29 + .../cryptojslib/rollups/sha1.js | 15 + .../cryptojslib/rollups/sha224.js | 17 + .../cryptojslib/rollups/sha256.js | 16 + .../cryptojslib/rollups/sha3.js | 19 + .../cryptojslib/rollups/sha384.js | 25 + .../cryptojslib/rollups/sha512.js | 23 + .../cryptojslib/rollups/tripledes.js | 51 + .../bower_components/cryptojslib/status.bat | 2 + .../bower_components/doc-ready/.bower.json | 44 - .../bower_components/doc-ready/bower.json | 35 - .../bower_components/doc-ready/doc-ready.js | 80 - .../emby-icons}/emby-icons.html | 6 +- .../bower_components/eventEmitter/.bower.json | 34 - .../eventEmitter/EventEmitter.js | 474 - .../eventEmitter/EventEmitter.min.js | 7 - .../bower_components/eventEmitter/UNLICENSE | 24 - .../bower_components/eventEmitter/bower.json | 24 - .../eventEmitter/component.json | 9 - .../bower_components/eventie/.bower.json | 35 - .../bower_components/eventie/bower.json | 26 - .../bower_components/eventie/eventie.js | 82 - .../bower_components/eventie/package.json | 23 - .../bower_components/fetch/.bower.json | 28 + dashboard-ui/bower_components/fetch/LICENSE | 20 + .../bower_components/fetch/bower.json | 16 + dashboard-ui/bower_components/fetch/fetch.js | 381 + .../fizzy-ui-utils/.bower.json | 41 - .../fizzy-ui-utils/bower.json | 31 - .../bower_components/fizzy-ui-utils/utils.js | 270 - .../bower_components/get-size/.bower.json | 47 - .../bower_components/get-size/bower.json | 38 - .../bower_components/get-size/get-size.js | 250 - .../bower_components/get-size/index.html | 85 - .../get-style-property/.bower.json | 36 - .../get-style-property/bower.json | 27 - .../get-style-property/component.json | 8 - .../get-style-property/get-style-property.js | 55 - .../get-style-property/package.json | 23 - .../bower_components/headroom.js/.bower.json | 41 + .../{promise-polyfill => headroom.js}/LICENSE | 5 +- .../bower_components/headroom.js/bower.json | 27 + .../headroom.js/dist/angular.headroom.js | 43 + .../headroom.js/dist/angular.headroom.min.js | 7 + .../headroom.js/dist/headroom.js | 390 + .../headroom.js/dist/headroom.min.js | 7 + .../headroom.js/dist/jQuery.headroom.js | 45 + .../headroom.js/dist/jQuery.headroom.min.js | 7 + .../bower_components/headroom.js/package.json | 40 + .../bower_components/howler.js/.bower.json | 11 +- .../bower_components/howler.js/CHANGELOG.md | 3 + .../bower_components/howler.js/howler.js | 2 +- .../bower_components/howler.js/howler.min.js | 4 +- .../iron-a11y-announcer/.bower.json | 11 +- .../iron-a11y-announcer/.travis.yml | 22 + .../iron-a11y-announcer/CONTRIBUTING.md | 72 + .../iron-a11y-announcer/bower.json | 7 +- .../iron-a11y-announcer/demo/index.html | 4 +- .../iron-a11y-announcer.html | 2 +- .../test/iron-a11y-announcer.html | 3 - .../iron-a11y-keys-behavior/.bower.json | 17 +- .../iron-a11y-keys-behavior/.travis.yml | 22 + .../iron-a11y-keys-behavior/CONTRIBUTING.md | 72 + .../iron-a11y-keys-behavior/bower.json | 7 +- .../demo/x-key-aware.html | 18 +- .../iron-a11y-keys-behavior.html | 150 +- .../test/basic-test.html | 147 +- .../iron-a11y-keys-behavior/test/index.html | 11 +- .../iron-autogrow-textarea/.bower.json | 14 +- .../iron-autogrow-textarea/.travis.yml | 22 + .../iron-autogrow-textarea/CONTRIBUTING.md | 72 + .../iron-autogrow-textarea/bower.json | 8 +- .../iron-autogrow-textarea/demo/index.html | 2 - .../iron-autogrow-textarea.html | 17 +- .../iron-autogrow-textarea/test/basic.html | 3 - .../iron-behaviors/.bower.json | 14 +- .../iron-behaviors/.travis.yml | 22 + .../iron-behaviors/CONTRIBUTING.md | 72 + .../iron-behaviors/bower.json | 10 +- .../iron-behaviors/demo/index.html | 2 +- .../iron-behaviors/iron-button-state.html | 23 +- .../iron-behaviors/iron-control-state.html | 5 +- .../iron-behaviors/test/active-state.html | 89 +- .../iron-behaviors/test/disabled-state.html | 4 - .../iron-behaviors/test/focused-state.html | 35 +- .../iron-behaviors/test/index.html | 17 +- .../iron-behaviors/test/test-elements.html | 24 + .../iron-checked-element-behavior/.bower.json | 12 +- .../iron-checked-element-behavior/.travis.yml | 28 + .../CONTRIBUTING.md | 72 + .../iron-checked-element-behavior/bower.json | 6 +- .../iron-checked-element-behavior.html | 25 +- .../test/basic.html | 31 +- .../iron-fit-behavior/.bower.json | 15 +- .../iron-fit-behavior/.travis.yml | 22 + .../iron-fit-behavior/CONTRIBUTING.md | 72 + .../iron-fit-behavior/bower.json | 11 +- .../iron-fit-behavior/demo/simple-fit.html | 5 +- .../iron-fit-behavior/iron-fit-behavior.html | 4 + .../test/iron-fit-behavior.html | 24 +- .../iron-flex-layout/.bower.json | 13 +- .../iron-flex-layout/.travis.yml | 22 + .../iron-flex-layout/CONTRIBUTING.md | 72 + .../iron-flex-layout/bower.json | 9 +- .../classes/iron-shadow-flex-layout.html | 4 +- .../iron-flex-layout/demo/demo-snippet.html | 95 + .../iron-flex-layout/demo/index.html | 416 +- .../iron-flex-layout/demo/x-app.html | 118 - .../iron-flex-layout/index.html | 8 +- .../iron-flex-layout/iron-flex-layout.html | 28 +- .../iron-form-element-behavior/.bower.json | 19 +- .../iron-form-element-behavior/.travis.yml | 22 + .../CONTRIBUTING.md | 72 + .../iron-form-element-behavior/bower.json | 15 +- .../demo/index.html | 1 - .../iron-form-element-behavior.html | 4 +- .../test/basic.html | 71 + .../test/index.html | 24 + .../test/simple-element.html | 23 + .../test/simple-form.html | 19 + .../bower_components/iron-icon/.bower.json | 8 +- .../bower_components/iron-icon/bower.json | 2 +- .../bower_components/iron-icon/iron-icon.html | 10 +- .../bower_components/iron-icons/.bower.json | 8 +- .../bower_components/iron-icons/.travis.yml | 22 + .../iron-icons/CONTRIBUTING.md | 72 + .../bower_components/iron-icons/bower.json | 2 +- .../iron-icons/demo/index.html | 25 +- .../iron-iconset-svg/.bower.json | 9 +- .../iron-iconset-svg/.travis.yml | 28 + .../iron-iconset-svg/CONTRIBUTING.md | 72 + .../iron-iconset-svg/bower.json | 5 +- .../iron-iconset-svg/demo/index.html | 5 + .../demo/svg-sample-icons.html | 12 + .../iron-iconset-svg/iron-iconset-svg.html | 25 +- .../test/iron-iconset-svg.html | 12 + .../bower_components/iron-input/.bower.json | 14 +- .../bower_components/iron-input/.travis.yml | 22 + .../iron-input/CONTRIBUTING.md | 72 + .../bower_components/iron-input/bower.json | 8 +- .../iron-input/demo/index.html | 8 +- .../iron-input/iron-input.html | 8 +- .../iron-input/test/iron-input.html | 35 +- .../iron-media-query/.bower.json | 11 +- .../iron-media-query/.travis.yml | 22 + .../iron-media-query/CONTRIBUTING.md | 72 + .../iron-media-query/bower.json | 7 +- .../iron-media-query/demo/index.html | 68 +- .../iron-media-query/index.html | 8 +- .../iron-media-query/iron-media-query.html | 22 +- .../iron-media-query/test/basic.html | 19 +- .../iron-media-query/test/index.html | 18 +- .../iron-menu-behavior/.bower.json | 11 +- .../iron-menu-behavior/.travis.yml | 22 + .../iron-menu-behavior/CONTRIBUTING.md | 72 + .../iron-menu-behavior/bower.json | 5 +- .../iron-menu-behavior/demo/index.html | 6 +- .../iron-menu-behavior/demo/simple-menu.html | 1 + .../demo/simple-menubar.html | 1 + .../iron-menu-behavior.html | 33 +- .../iron-menu-behavior/test/index.html | 18 +- .../test/iron-menu-behavior.html | 49 +- .../test/iron-menubar-behavior.html | 4 - .../bower_components/iron-meta/.bower.json | 9 +- .../bower_components/iron-meta/.travis.yml | 28 + .../iron-meta/CONTRIBUTING.md | 72 + .../bower_components/iron-meta/bower.json | 5 +- .../bower_components/iron-meta/iron-meta.html | 18 +- .../iron-meta/test/iron-meta.html | 9 + .../iron-overlay-behavior/.bower.json | 21 +- .../iron-overlay-behavior/.travis.yml | 22 + .../iron-overlay-behavior/CONTRIBUTING.md | 72 + .../iron-overlay-behavior/bower.json | 11 +- .../iron-overlay-behavior/demo/index.html | 16 +- .../demo/simple-overlay.html | 1 - .../iron-overlay-behavior.html | 30 +- .../iron-overlay-manager.html | 116 +- .../test/iron-overlay-behavior.html | 91 +- .../bower_components/iron-pages/.bower.json | 11 +- .../bower_components/iron-pages/.travis.yml | 22 + .../iron-pages/CONTRIBUTING.md | 72 + .../bower_components/iron-pages/bower.json | 7 +- .../iron-pages/demo/index.html | 13 +- .../iron-pages/test/attr-for-selected.html | 11 +- .../iron-pages/test/basic.html | 5 +- .../iron-pages/test/index.html | 4 +- .../iron-range-behavior/.bower.json | 8 +- .../iron-range-behavior/bower.json | 2 +- .../iron-range-behavior.html | 9 +- .../iron-range-behavior/test/basic.html | 27 +- .../iron-selector/.bower.json | 18 +- .../iron-selector/.travis.yml | 28 + .../bower_components/iron-selector/bower.json | 8 +- .../iron-selector/iron-multi-selectable.html | 5 + .../iron-selector/iron-selectable.html | 73 +- .../iron-selector/test/basic.html | 15 +- .../test/excluded-local-names.html | 7 +- .../iron-selector/test/multi.html | 25 + .../iron-validatable-behavior/.bower.json | 8 +- .../iron-validatable-behavior/bower.json | 2 +- .../iron-validatable-behavior.html | 15 +- .../bower_components/isMobile/.bower.json | 22 + .../bower_components/isMobile/bower.json | 11 + .../bower_components/isMobile/isMobile.js | 126 + .../bower_components/isMobile/isMobile.min.js | 1 + .../bower_components/isMobile/package.json | 28 + .../bower_components/masonry/.bower.json | 54 - .../bower_components/masonry/README.mdown | 76 - .../bower_components/masonry/bower.json | 44 - .../bower_components/masonry/changelog.md | 83 - .../masonry/dist/masonry.pkgd.js | 3187 --- .../masonry/dist/masonry.pkgd.min.js | 9 - .../bower_components/masonry/masonry.js | 203 - .../masonry/sandbox/add-items.html | 110 - .../masonry/sandbox/basic.html | 62 - .../masonry/sandbox/bottom-up.html | 119 - .../masonry/sandbox/browserify/index.html | 42 - .../masonry/sandbox/browserify/main.js | 19 - .../masonry/sandbox/element-sizing.html | 69 - .../masonry/sandbox/fit-width.html | 68 - .../masonry/sandbox/fluid.html | 89 - .../masonry/sandbox/jquery.html | 64 - .../masonry/sandbox/require-js/index.html | 41 - .../masonry/sandbox/require-js/main.js | 69 - .../masonry/sandbox/right-to-left.html | 120 - .../masonry/sandbox/sandbox.css | 33 - .../masonry/sandbox/stamps.html | 124 - .../matches-selector/.bower.json | 43 - .../matches-selector/bower.json | 34 - .../matches-selector/matches-selector.js | 107 - .../native-promise-only/.bower.json | 15 + .../native-promise-only/.gitignore | 2 + .../native-promise-only/.npmignore | 2 + .../native-promise-only/build.js | 34 + .../native-promise-only/lib/npo.src.js | 373 + .../native-promise-only/package.json | 31 + .../native-promise-only/test_adapter.js | 21 + .../neon-animation/.bower.json | 12 +- .../neon-animation/CONTRIBUTING.md | 72 + .../neon-animation/bower.json | 2 +- .../neon-animation/neon-animatable.html | 3 +- .../neon-animation/neon-animated-pages.html | 3 + .../bower_components/outlayer/.bower.json | 57 - .../bower_components/outlayer/bower.json | 48 - .../bower_components/outlayer/item.js | 584 - .../bower_components/outlayer/outlayer.js | 926 - .../paper-behaviors/.bower.json | 18 +- .../paper-behaviors/.travis.yml | 22 + .../paper-behaviors/CONTRIBUTING.md | 72 + .../paper-behaviors/bower.json | 10 +- .../paper-behaviors/index.html | 8 +- .../paper-button-behavior.html | 8 +- .../paper-inky-focus-behavior.html | 2 +- .../paper-ripple-behavior.html | 43 +- .../paper-behaviors/test/index.html | 19 +- .../test/paper-ripple-behavior.html | 257 +- .../paper-behaviors/test/shadowed-ripple.html | 55 + .../bower_components/paper-button/.bower.json | 12 +- .../bower_components/paper-button/.travis.yml | 22 + .../paper-button/CONTRIBUTING.md | 72 + .../bower_components/paper-button/bower.json | 8 +- .../paper-button/demo/index.html | 202 +- .../bower_components/paper-button/index.html | 8 +- .../paper-button/paper-button.html | 19 +- .../paper-button/test/index.html | 15 +- .../paper-button/test/paper-button.html | 20 +- .../paper-checkbox/.bower.json | 12 +- .../paper-checkbox/.travis.yml | 24 + .../paper-checkbox/CONTRIBUTING.md | 72 + .../paper-checkbox/bower.json | 8 +- .../paper-checkbox/demo/index.html | 120 +- .../paper-checkbox/paper-checkbox.html | 54 +- .../paper-checkbox/test/basic.html | 3 - .../paper-checkbox/test/index.html | 15 +- .../paper-collapse-item/.bower.json | 45 + .../paper-collapse-item/LICENSE | 202 + .../paper-collapse-item/bower.json | 36 + .../paper-collapse-item/demo/index.html | 19 + .../paper-collapse-item/doc/screenshot.png | Bin 0 -> 7744 bytes .../paper-collapse-item.html | 84 + .../paper-collapse-item/test/index.html | 13 + .../test/paper-collapse-item.html | 50 + .../paper-dialog-behavior/.bower.json | 14 +- .../paper-dialog-behavior/.travis.yml | 28 + .../paper-dialog-behavior/CONTRIBUTING.md | 72 + .../paper-dialog-behavior/bower.json | 8 +- .../demo/simple-dialog.html | 7 +- .../paper-dialog-behavior.html | 9 +- .../paper-dialog-shared-styles.html | 64 + .../test/test-dialog.html | 7 +- .../bower_components/paper-dialog/.bower.json | 12 +- .../bower_components/paper-dialog/.travis.yml | 22 + .../paper-dialog/CONTRIBUTING.md | 72 + .../bower_components/paper-dialog/bower.json | 6 +- .../paper-dialog/demo/index.html | 2 +- .../paper-dialog/paper-dialog.html | 12 +- .../paper-dialog/test/paper-dialog.html | 4 - .../paper-drawer-panel/.bower.json | 18 +- .../paper-drawer-panel/.travis.yml | 22 + .../paper-drawer-panel/CONTRIBUTING.md | 72 + .../paper-drawer-panel/bower.json | 14 +- .../paper-drawer-panel/paper-drawer-panel.css | 152 - .../paper-drawer-panel.html | 1048 +- .../paper-drawer-panel/test/index.html | 28 + .../paper-drawer-panel/test/positioning.html | 93 + .../test/small-devices.html | 138 + .../paper-dropdown-menu/.bower.json | 12 +- .../paper-dropdown-menu/bower.json | 6 +- .../paper-dropdown-menu.html | 57 +- .../test/paper-dropdown-menu.html | 37 + .../bower_components/paper-fab/.bower.json | 28 +- .../bower_components/paper-fab/bower.json | 22 +- .../bower_components/paper-fab/paper-fab.html | 12 +- .../paper-icon-button/.bower.json | 20 +- .../paper-icon-button/.travis.yml | 22 + .../paper-icon-button/CONTRIBUTING.md | 72 + .../paper-icon-button/bower.json | 8 +- .../paper-icon-button/demo/index.html | 188 +- .../paper-icon-button/index.html | 8 +- .../paper-icon-button/paper-icon-button.html | 20 +- .../paper-icon-button/test/a11y.html | 2 - .../paper-icon-button/test/basic.html | 2 - .../bower_components/paper-input/.bower.json | 20 +- .../bower_components/paper-input/.travis.yml | 22 + .../paper-input/CONTRIBUTING.md | 72 + .../bower_components/paper-input/bower.json | 14 +- .../paper-input/demo/index.html | 174 +- .../paper-input/paper-input-behavior.html | 80 +- .../paper-input/paper-input-char-counter.html | 9 +- .../paper-input/paper-input-container.html | 76 +- .../paper-input/paper-input-error.html | 8 +- .../paper-input/paper-input.html | 32 +- .../paper-input/paper-textarea.html | 11 +- .../paper-input/test/index.html | 19 +- .../test/paper-input-char-counter.html | 3 - .../test/paper-input-container.html | 63 +- .../paper-input/test/paper-input-error.html | 5 +- .../paper-input/test/paper-input.html | 23 +- .../paper-input/test/paper-textarea.html | 25 +- .../bower_components/paper-item/.bower.json | 17 +- .../bower_components/paper-item/.travis.yml | 24 + .../paper-item/CONTRIBUTING.md | 72 + .../bower_components/paper-item/bower.json | 9 +- .../paper-item/demo/index.html | 33 +- .../paper-item/paper-icon-item.html | 35 +- .../paper-item/paper-item-behavior.html | 37 + .../paper-item/paper-item-body.html | 6 +- .../paper-item/paper-item-shared-styles.html | 26 +- .../paper-item/paper-item.html | 31 +- .../paper-item/test/index.html | 17 +- .../paper-item/test/paper-item.html | 144 +- .../paper-material/.bower.json | 22 +- .../paper-material/.travis.yml | 22 + .../paper-material/CONTRIBUTING.md | 72 + .../paper-material/bower.json | 16 +- .../paper-material/demo/index.html | 8 +- .../paper-material/paper-material.html | 64 +- .../paper-material/test/paper-material.html | 4 - .../paper-menu-button/.bower.json | 15 +- .../paper-menu-button/.travis.yml | 22 + .../paper-menu-button/CONTRIBUTING.md | 72 + .../paper-menu-button/bower.json | 11 +- .../paper-menu-button/demo/index.html | 10 +- .../paper-menu-button/paper-menu-button.html | 13 +- .../paper-menu-button/test/index.html | 15 +- .../paper-radio-button/.bower.json | 19 +- .../paper-radio-button/.travis.yml | 28 + .../paper-radio-button/CONTRIBUTING.md | 72 + .../paper-radio-button/bower.json | 15 +- .../paper-radio-button.html | 29 +- .../paper-radio-group/.bower.json | 21 +- .../paper-radio-group/.travis.yml | 22 + .../paper-radio-group/CONTRIBUTING.md | 72 + .../paper-radio-group/bower.json | 17 +- .../paper-radio-group/paper-radio-group.html | 29 +- .../paper-radio-group/test/basic.html | 210 +- .../bower_components/paper-ripple/.bower.json | 11 +- .../bower_components/paper-ripple/.travis.yml | 22 + .../paper-ripple/CONTRIBUTING.md | 72 + .../bower_components/paper-ripple/bower.json | 7 +- .../paper-ripple/demo/index.html | 59 +- .../bower_components/paper-ripple/index.html | 8 +- .../paper-ripple/paper-ripple.html | 18 +- .../paper-ripple/test/paper-ripple.html | 5 +- .../bower_components/paper-slider/.bower.json | 15 +- .../bower_components/paper-slider/.travis.yml | 28 + .../paper-slider/CONTRIBUTING.md | 72 + .../bower_components/paper-slider/bower.json | 9 +- .../paper-slider/demo/index.html | 24 +- .../paper-slider/paper-slider.html | 116 +- .../paper-slider/test/a11y.html | 11 +- .../paper-slider/test/basic.html | 29 +- .../paper-spinner/.bower.json | 13 +- .../paper-spinner/.travis.yml | 28 + .../paper-spinner/CONTRIBUTING.md | 72 + .../bower_components/paper-spinner/bower.json | 9 +- .../paper-spinner/paper-spinner-styles.html | 338 + .../paper-spinner/paper-spinner.css | 330 - .../paper-spinner/paper-spinner.html | 21 +- .../paper-spinner/test/paper-spinner.html | 23 + .../bower_components/paper-styles/.bower.json | 11 +- .../paper-styles/CONTRIBUTING.md | 72 + .../bower_components/paper-styles/bower.json | 5 +- .../paper-styles/classes/shadow-layout.html | 4 +- .../bower_components/paper-styles/color.html | 8 +- .../paper-styles/demo/index.html | 492 +- .../bower_components/paper-styles/index.html | 24 + .../paper-styles/paper-styles.html | 27 + .../paper-styles/typography.html | 27 +- .../bower_components/paper-tabs/.bower.json | 15 +- .../bower_components/paper-tabs/.travis.yml | 28 + .../paper-tabs/CONTRIBUTING.md | 72 + .../bower_components/paper-tabs/bower.json | 9 +- .../paper-tabs/demo/index.html | 71 +- .../demo/paper-tabs-demo-styles.html | 41 + .../demo/tabs-with-content-example.html | 40 + .../paper-tabs/paper-tab.html | 35 +- .../paper-tabs/paper-tabs.html | 34 +- .../paper-tabs/test/attr-for-selected.html | 2 + .../paper-tabs/test/basic.html | 20 + .../bower_components/polymer/.bower.json | 10 +- .../bower_components/polymer/bower.json | 4 +- .../polymer/polymer-micro.html | 226 +- .../polymer/polymer-mini.html | 742 +- .../bower_components/polymer/polymer.html | 1196 +- .../promise-polyfill/.bower.json | 38 - .../promise-polyfill/Gruntfile.js | 23 - .../promise-polyfill/Promise.js | 190 - .../promise-polyfill/Promise.min.js | 2 - .../promise-polyfill/bower.json | 28 - .../promise-polyfill/jasmine.json | 7 - .../promise-polyfill/package.json | 32 - .../bower_components/requirejs/.bower.json | 8 +- .../bower_components/requirejs/bower.json | 2 +- .../bower_components/requirejs/require.js | 78 +- .../webcomponentsjs/.bower.json | 13 +- .../webcomponentsjs/CustomElements.js | 112 +- .../webcomponentsjs/CustomElements.min.js | 4 +- .../webcomponentsjs/HTMLImports.js | 108 +- .../webcomponentsjs/HTMLImports.min.js | 4 +- .../webcomponentsjs/MutationObserver.js | 10 +- .../webcomponentsjs/MutationObserver.min.js | 4 +- .../webcomponentsjs/ShadowDOM.js | 62 +- .../webcomponentsjs/ShadowDOM.min.js | 8 +- .../webcomponentsjs/bower.json | 7 +- .../webcomponentsjs/package.json | 9 +- .../webcomponentsjs/webcomponents-lite.js | 356 +- .../webcomponentsjs/webcomponents-lite.min.js | 6 +- .../webcomponentsjs/webcomponents.js | 242 +- .../webcomponentsjs/webcomponents.min.js | 10 +- dashboard-ui/channelitems.html | 2 +- dashboard-ui/channels.html | 2 +- dashboard-ui/cinemamodeconfiguration.html | 101 +- dashboard-ui/collections.html | 2 +- .../collectioneditor/collectioneditor.js | 57 +- .../directorybrowser/directorybrowser.js | 113 +- dashboard-ui/components/humanedate.js | 64 + .../imagedownloader/imagedownloader.js | 43 +- .../components/imageeditor/imageeditor.js | 60 +- dashboard-ui/components/imagestore.js | 185 + .../components/imageuploader/imageuploader.js | 37 +- .../itemidentifier/itemidentifier.js | 47 +- .../medialibrarycreator.js | 97 +- .../medialibraryeditor/medialibraryeditor.js | 97 +- .../metadataeditor/metadataeditor.js | 112 +- dashboard-ui/components/paperdialoghelper.js | 149 +- .../playlisteditor/playlisteditor.js | 57 +- dashboard-ui/components/requirecss.js | 80 + dashboard-ui/components/requirehtml.js | 46 + dashboard-ui/components/sharingwidget.js | 78 + .../subtitleeditor/subtitleeditor.js | 57 +- dashboard-ui/components/testermessage.js | 35 + dashboard-ui/components/tvguide/tvguide.js | 51 +- .../components/tvproviders/schedulesdirect.js | 25 +- dashboard-ui/connectlogin.html | 2 +- dashboard-ui/cordova/actionsheet.js | 63 - .../cordova/android/androidcredentials.js | 198 - dashboard-ui/cordova/android/appstorage.js | 70 - dashboard-ui/cordova/android/iap.js | 111 - dashboard-ui/cordova/android/immersive.js | 59 - dashboard-ui/cordova/android/localsync.js | 18 - dashboard-ui/cordova/android/logging.js | 6 - dashboard-ui/cordova/android/mediasession.js | 187 - .../cordova/android/nativedirectorychooser.js | 31 - dashboard-ui/cordova/android/newapp.js | 75 - dashboard-ui/cordova/android/vlcplayer.js | 288 - dashboard-ui/cordova/back.js | 24 - dashboard-ui/cordova/chromecast.js | 710 - dashboard-ui/cordova/connectsdk.js | 36 - dashboard-ui/cordova/externalplayer.js | 23 - dashboard-ui/cordova/fileupload.js | 69 - dashboard-ui/cordova/generaldevice.js | 675 - dashboard-ui/cordova/iap.js | 243 - dashboard-ui/cordova/imagestore.js | 126 - dashboard-ui/cordova/ios/backgroundfetch.js | 106 - dashboard-ui/cordova/ios/orientation.js | 23 - dashboard-ui/cordova/ios/tabbar.js | 171 - dashboard-ui/cordova/ios/vlcplayer.js | 263 - dashboard-ui/cordova/localassetmanager.js | 927 - dashboard-ui/cordova/prompt.js | 17 - dashboard-ui/cordova/registrationservices.js | 345 - dashboard-ui/cordova/remotecontrols.js | 189 - dashboard-ui/cordova/searchmenu.js | 32 - dashboard-ui/cordova/serverdiscovery.js | 179 - dashboard-ui/cordova/sharingwidget.js | 22 - dashboard-ui/cordova/volume.js | 28 - dashboard-ui/cordova/wakeonlan.js | 87 - dashboard-ui/css/card.css | 48 +- dashboard-ui/css/images/clients/firefox.png | Bin 20371 -> 0 bytes dashboard-ui/css/images/clients/ie.png | Bin 47399 -> 0 bytes dashboard-ui/css/images/clients/safari.png | Bin 49031 -> 0 bytes dashboard-ui/css/librarybrowser.css | 100 +- dashboard-ui/css/librarymenu.css | 42 +- dashboard-ui/css/livetv.css | 29 +- dashboard-ui/css/materialize.css | 164 - dashboard-ui/css/mediaplayer-video.css | 3 +- dashboard-ui/css/mediaplayer.css | 71 - dashboard-ui/css/nowplayingbar.css | 105 +- dashboard-ui/css/remotecontrol.css | 105 - dashboard-ui/css/search.css | 28 +- dashboard-ui/css/site.css | 55 +- dashboard-ui/css/userimage.css | 10 - dashboard-ui/dashboard.html | 2 +- dashboard-ui/dashboardgeneral.html | 4 +- dashboard-ui/dashboardhosting.html | 2 +- dashboard-ui/device.html | 2 +- dashboard-ui/devices/android/android.css | 10 +- dashboard-ui/devices/ie/ie.css | 6 +- dashboard-ui/devices/ie/ie.js | 43 +- dashboard-ui/devices/ios/ios.css | 6 +- dashboard-ui/devicesupload.html | 2 +- dashboard-ui/edititemmetadata.html | 2 +- dashboard-ui/encodingsettings.html | 2 +- dashboard-ui/favorites.html | 2 +- dashboard-ui/forgotpassword.html | 2 +- dashboard-ui/forgotpasswordpin.html | 2 +- dashboard-ui/index.html | 4 +- dashboard-ui/itemdetails.html | 4 +- dashboard-ui/itemlist.html | 2 +- dashboard-ui/legacy/buttonenabled.js | 4 + dashboard-ui/livetv.html | 12 +- dashboard-ui/livetvnewrecording.html | 2 +- dashboard-ui/livetvseriestimer.html | 2 +- dashboard-ui/livetvsettings.html | 2 +- dashboard-ui/livetvstatus.html | 2 +- dashboard-ui/livetvtimer.html | 2 +- .../livetvtunerprovider-hdhomerun.html | 2 +- dashboard-ui/livetvtunerprovider-m3u.html | 2 +- dashboard-ui/login.html | 2 +- dashboard-ui/manifest.json | 28 + dashboard-ui/metadata.html | 2 +- dashboard-ui/metadataadvanced.html | 14 +- dashboard-ui/metadataimages.html | 2 +- dashboard-ui/metadatanfo.html | 2 +- dashboard-ui/metadatasubtitles.html | 2 +- dashboard-ui/movies.html | 2 +- dashboard-ui/music.html | 23 +- dashboard-ui/mypreferencesdisplay.html | 10 +- dashboard-ui/mypreferenceshome.html | 2 +- dashboard-ui/mypreferenceslanguages.html | 8 +- dashboard-ui/mypreferencesmenu.html | 2 +- dashboard-ui/myprofile.html | 10 +- dashboard-ui/mysync.html | 2 +- dashboard-ui/mysyncjob.html | 2 +- dashboard-ui/mysyncsettings.html | 2 +- dashboard-ui/notificationlist.html | 2 +- dashboard-ui/nowplaying.html | 2 +- dashboard-ui/photos.html | 2 +- dashboard-ui/scheduledtasks.html | 2 +- dashboard-ui/scripts/actionsheet.js | 90 +- dashboard-ui/scripts/addpluginpage.js | 49 +- .../scripts/advancedconfigurationpage.js | 8 +- dashboard-ui/scripts/appservices.js | 6 +- dashboard-ui/scripts/appsettings.js | 20 +- dashboard-ui/scripts/autoorganizelog.js | 25 +- dashboard-ui/scripts/autoorganizetv.js | 6 +- dashboard-ui/scripts/backdrops.js | 4 +- dashboard-ui/scripts/channelitems.js | 22 +- dashboard-ui/scripts/channels.js | 8 +- dashboard-ui/scripts/channelsettings.js | 6 +- dashboard-ui/scripts/channelslatest.js | 10 +- dashboard-ui/scripts/chromecast.js | 61 +- .../scripts/cinemamodeconfiguration.js | 42 +- dashboard-ui/scripts/connectlogin.js | 20 +- dashboard-ui/scripts/dashboardgeneral.js | 16 +- dashboard-ui/scripts/dashboardhosting.js | 6 +- dashboard-ui/scripts/dashboardpage.js | 58 +- dashboard-ui/scripts/device.js | 6 +- dashboard-ui/scripts/devices.js | 8 +- dashboard-ui/scripts/devicesupload.js | 8 +- dashboard-ui/scripts/dlnaprofile.js | 10 +- dashboard-ui/scripts/dlnaprofiles.js | 4 +- dashboard-ui/scripts/dlnaserversettings.js | 8 +- dashboard-ui/scripts/dlnasettings.js | 6 +- dashboard-ui/scripts/edititemmetadata.js | 52 +- dashboard-ui/scripts/editorsidebar.js | 34 +- dashboard-ui/scripts/encodingsettings.js | 6 +- dashboard-ui/scripts/episodes.js | 2 +- dashboard-ui/scripts/extensions.js | 383 +- dashboard-ui/scripts/externalplayer.js | 53 +- dashboard-ui/scripts/favorites.js | 72 +- dashboard-ui/scripts/forgotpassword.js | 2 +- dashboard-ui/scripts/forgotpasswordpin.js | 2 +- dashboard-ui/scripts/gamegenrepage.js | 2 +- dashboard-ui/scripts/gamespage.js | 4 +- dashboard-ui/scripts/gamesrecommendedpage.js | 17 +- dashboard-ui/scripts/gamestudiospage.js | 2 +- dashboard-ui/scripts/gamesystemspage.js | 2 +- dashboard-ui/scripts/globalize.js | 114 +- dashboard-ui/scripts/homenextup.js | 2 +- dashboard-ui/scripts/homeupcoming.js | 6 +- dashboard-ui/scripts/htmlmediarenderer.js | 42 +- dashboard-ui/scripts/indexpage.js | 26 +- dashboard-ui/scripts/itembynamedetailpage.js | 2 +- dashboard-ui/scripts/itemdetailpage.js | 151 +- dashboard-ui/scripts/itemlistpage.js | 31 +- dashboard-ui/scripts/kids.js | 2 +- dashboard-ui/scripts/librarybrowser.js | 299 +- dashboard-ui/scripts/librarylist.js | 474 +- dashboard-ui/scripts/librarymenu.js | 433 +- dashboard-ui/scripts/librarypathmapping.js | 12 +- dashboard-ui/scripts/librarysettings.js | 8 +- dashboard-ui/scripts/livetvchannel.js | 2 +- dashboard-ui/scripts/livetvchannels.js | 2 +- dashboard-ui/scripts/livetvcomponents.js | 170 +- dashboard-ui/scripts/livetvguideprovider.js | 13 +- dashboard-ui/scripts/livetvitems.js | 4 +- dashboard-ui/scripts/livetvnewrecording.js | 18 +- dashboard-ui/scripts/livetvrecordinglist.js | 4 +- dashboard-ui/scripts/livetvrecordings.js | 11 +- dashboard-ui/scripts/livetvseriestimer.js | 24 +- dashboard-ui/scripts/livetvseriestimers.js | 8 +- dashboard-ui/scripts/livetvsettings.js | 6 +- dashboard-ui/scripts/livetvstatus.js | 18 +- dashboard-ui/scripts/livetvsuggested.js | 163 +- dashboard-ui/scripts/livetvtimer.js | 8 +- dashboard-ui/scripts/livetvtimers.js | 18 +- .../scripts/livetvtunerprovider-hdhomerun.js | 6 +- .../scripts/livetvtunerprovider-m3u.js | 6 +- dashboard-ui/scripts/localsync.js | 24 +- dashboard-ui/scripts/loginpage.js | 28 +- dashboard-ui/scripts/logpage.js | 2 +- dashboard-ui/scripts/mediacontroller.js | 158 +- dashboard-ui/scripts/medialibrarypage.js | 16 +- dashboard-ui/scripts/mediaplayer-video.js | 160 +- dashboard-ui/scripts/mediaplayer.js | 211 +- dashboard-ui/scripts/metadataadvanced.js | 32 +- .../scripts/metadataconfigurationpage.js | 46 +- dashboard-ui/scripts/metadataimagespage.js | 20 +- dashboard-ui/scripts/metadatanfo.js | 8 +- dashboard-ui/scripts/metadatasubtitles.js | 8 +- dashboard-ui/scripts/moviecollections.js | 16 +- dashboard-ui/scripts/moviegenres.js | 4 +- dashboard-ui/scripts/movies.js | 4 +- dashboard-ui/scripts/moviesrecommended.js | 22 +- dashboard-ui/scripts/moviestudios.js | 2 +- dashboard-ui/scripts/movietrailers.js | 2 +- dashboard-ui/scripts/musicalbumartists.js | 2 +- dashboard-ui/scripts/musicalbums.js | 6 +- dashboard-ui/scripts/musicartists.js | 2 +- dashboard-ui/scripts/musicfolders.js | 110 + dashboard-ui/scripts/musicgenres.js | 2 +- dashboard-ui/scripts/musicrecommended.js | 33 +- dashboard-ui/scripts/mypreferencescommon.js | 6 +- dashboard-ui/scripts/mypreferencesdisplay.js | 15 +- dashboard-ui/scripts/mypreferenceshome.js | 22 +- .../scripts/mypreferenceslanguages.js | 29 +- dashboard-ui/scripts/myprofile.js | 134 +- dashboard-ui/scripts/mysyncsettings.js | 6 +- dashboard-ui/scripts/notifications.js | 51 +- dashboard-ui/scripts/notificationsetting.js | 18 +- dashboard-ui/scripts/notificationsettings.js | 6 +- dashboard-ui/scripts/nowplayingbar.js | 161 +- dashboard-ui/scripts/nowplayingpage.js | 22 +- dashboard-ui/scripts/photos.js | 12 +- dashboard-ui/scripts/playbackconfiguration.js | 6 +- dashboard-ui/scripts/playlistedit.js | 9 +- dashboard-ui/scripts/playlists.js | 8 +- dashboard-ui/scripts/plugincatalogpage.js | 6 +- dashboard-ui/scripts/pluginspage.js | 6 +- dashboard-ui/scripts/queryfilters.js | 2 +- dashboard-ui/scripts/ratingdialog.js | 2 +- dashboard-ui/scripts/registrationservices.js | 23 +- dashboard-ui/scripts/remotecontrol.js | 22 +- dashboard-ui/scripts/reports.js | 10 +- dashboard-ui/scripts/scheduledtaskpage.js | 21 +- dashboard-ui/scripts/scheduledtaskspage.js | 35 +- dashboard-ui/scripts/search.js | 49 +- dashboard-ui/scripts/searchmenu.js | 43 +- dashboard-ui/scripts/searchpage.js | 2 +- dashboard-ui/scripts/secondaryitems.js | 10 +- dashboard-ui/scripts/sections.js | 38 +- dashboard-ui/scripts/selectserver.js | 26 +- dashboard-ui/scripts/shared.js | 2 +- dashboard-ui/scripts/sharingmanager.js | 6 +- dashboard-ui/scripts/sharingwidget.js | 85 - dashboard-ui/scripts/site.js | 1441 +- dashboard-ui/scripts/slideshow.js | 2 +- dashboard-ui/scripts/songs.js | 2 +- dashboard-ui/scripts/streamingsettings.js | 6 +- dashboard-ui/scripts/supporterkeypage.js | 29 +- dashboard-ui/scripts/sync.js | 132 +- dashboard-ui/scripts/syncactivity.js | 20 +- dashboard-ui/scripts/syncjob.js | 41 +- dashboard-ui/scripts/syncsettings.js | 6 +- dashboard-ui/scripts/taskbutton.js | 15 +- dashboard-ui/scripts/thememediaplayer.js | 3 +- dashboard-ui/scripts/tvgenres.js | 2 +- dashboard-ui/scripts/tvlatest.js | 2 +- dashboard-ui/scripts/tvrecommended.js | 12 +- dashboard-ui/scripts/tvshows.js | 2 +- dashboard-ui/scripts/tvstudios.js | 2 +- dashboard-ui/scripts/tvupcoming.js | 6 +- dashboard-ui/scripts/useredit.js | 17 +- dashboard-ui/scripts/userlibraryaccess.js | 8 +- dashboard-ui/scripts/usernew.js | 14 +- dashboard-ui/scripts/userparentalcontrol.js | 26 +- dashboard-ui/scripts/userpassword.js | 2 +- dashboard-ui/scripts/userprofilespage.js | 16 +- dashboard-ui/scripts/wizardfinishpage.js | 2 +- dashboard-ui/scripts/wizardlivetvguide.js | 6 +- dashboard-ui/scripts/wizardlivetvtuner.js | 10 +- dashboard-ui/scripts/wizardsettings.js | 44 +- dashboard-ui/scripts/wizardstartpage.js | 8 +- dashboard-ui/scripts/wizarduserpage.js | 4 +- dashboard-ui/selectserver.html | 4 +- dashboard-ui/shared.html | 2 +- dashboard-ui/strings/html/ca.json | 160 +- dashboard-ui/strings/html/de.json | 4 +- dashboard-ui/strings/html/es-MX.json | 4 +- dashboard-ui/strings/html/fr.json | 4 +- dashboard-ui/strings/html/he.json | 192 +- dashboard-ui/strings/html/hu.json | 1528 ++ dashboard-ui/strings/html/kk.json | 4 +- dashboard-ui/strings/html/nl.json | 4 +- dashboard-ui/strings/html/pl.json | 8 +- dashboard-ui/strings/html/pt-BR.json | 16 +- dashboard-ui/strings/html/ru.json | 4 +- dashboard-ui/strings/html/server.json | 1 - dashboard-ui/strings/javascript/ca.json | 146 +- dashboard-ui/strings/javascript/de.json | 6 +- dashboard-ui/strings/javascript/en-US.json | 2 +- dashboard-ui/strings/javascript/es-MX.json | 8 +- dashboard-ui/strings/javascript/fr.json | 8 +- dashboard-ui/strings/javascript/he.json | 46 +- .../strings/javascript/javascript.json | 5 +- dashboard-ui/strings/javascript/kk.json | 22 +- dashboard-ui/strings/javascript/nl.json | 2 +- dashboard-ui/strings/javascript/pl.json | 124 +- dashboard-ui/strings/javascript/pt-BR.json | 16 +- dashboard-ui/strings/javascript/ru.json | 10 +- dashboard-ui/syncactivity.html | 14 +- dashboard-ui/syncjob.html | 2 +- dashboard-ui/syncsettings.html | 2 +- dashboard-ui/themes/halloween/theme.js | 28 +- dashboard-ui/thirdparty/browser.js | 982 - dashboard-ui/thirdparty/cast_sender.js | 57 - .../fontawesome/css/font-awesome.css | 1801 -- .../fontawesome/css/font-awesome.css.map | 7 - .../fontawesome/css/font-awesome.min.css | 4 - .../fontawesome/fonts/fontawesome-webfont.eot | Bin 60767 -> 0 bytes .../fontawesome/fonts/fontawesome-webfont.svg | 565 - .../fontawesome/fonts/fontawesome-webfont.ttf | Bin 122092 -> 0 bytes .../fonts/fontawesome-webfont.woff | Bin 71508 -> 0 bytes .../fonts/fontawesome-webfont.woff2 | Bin 56780 -> 0 bytes dashboard-ui/thirdparty/headroom.js | 7 - dashboard-ui/thirdparty/hls.min.js | 7 +- .../thirdparty/jquery.unveil-custom.js | 115 +- .../jquerymobile-1.4.5/custombuild.txt | 21 - .../jquerymobile-1.4.5/jqm.checkbox.js | 624 +- .../jquerymobile-1.4.5/jqm.collapsible.js | 726 +- .../jquerymobile-1.4.5/jqm.controlgroup.js | 406 +- .../jquerymobile-1.4.5/jqm.listview.js | 511 +- .../jquerymobile-1.4.5/jqm.panel.css | 14 +- .../jquerymobile-1.4.5/jqm.panel.js | 916 +- .../jquerymobile-1.4.5/jqm.popup.css | 19 + .../jquerymobile-1.4.5/jqm.popup.js | 2468 +- .../jquerymobile-1.4.5/jqm.slider.js | 648 +- .../jquerymobile-1.4.5/jqm.table.css | 57 +- .../jquerymobile-1.4.5/jqm.table.js | 586 +- .../jquerymobile-1.4.5/jqm.widget.js | 523 + .../jquery.mobile.custom.js | 2822 +-- .../jquery.mobile.custom.structure.css | 507 - .../jquery.mobile.custom.theme.css | 320 +- .../thirdparty/paper-button-style.css | 2 +- .../thirdparty/viblast/viblast-video-js.swf | Bin 17879 -> 0 bytes .../thirdparty/viblast/viblast.crypto.js | 354 - dashboard-ui/thirdparty/viblast/viblast.js | 1537 -- .../thirdparty/viblast/viblast.remuxer.js | 260 - dashboard-ui/thirdparty/viblast/worker.html | 16 - dashboard-ui/tv.html | 2 +- dashboard-ui/userpassword.html | 2 +- dashboard-ui/voice/voice.css | 31 +- dashboard-ui/voice/voice.js | 213 +- dashboard-ui/vulcanize-in.html | 28 - dashboard-ui/vulcanize-out.html | 19601 ---------------- dashboard-ui/wizardagreement.html | 2 +- dashboard-ui/wizardlivetvtuner.html | 2 +- dashboard-ui/wizardsettings.html | 2 +- dashboard-ui/wizardstart.html | 2 +- dashboard-ui/wizarduser.html | 2 +- packages.config | 2 +- 911 files changed, 34157 insertions(+), 57125 deletions(-) delete mode 100644 dashboard-ui/apiclient/ajax.js delete mode 100644 dashboard-ui/apiclient/alt/bean.js delete mode 100644 dashboard-ui/apiclient/alt/deferred.js delete mode 100644 dashboard-ui/apiclient/alt/events.js delete mode 100644 dashboard-ui/apiclient/device.js delete mode 100644 dashboard-ui/apiclient/sha1.js create mode 100644 dashboard-ui/bower_components/cryptojslib/.bower.json create mode 100644 dashboard-ui/bower_components/cryptojslib/.gitattributes create mode 100644 dashboard-ui/bower_components/cryptojslib/.gitignore create mode 100644 dashboard-ui/bower_components/cryptojslib/bower.json create mode 100644 dashboard-ui/bower_components/cryptojslib/components/aes-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/aes.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/cipher-core-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/cipher-core.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/core-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/core.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/enc-base64-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/enc-base64.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/enc-utf16-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/enc-utf16.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/evpkdf-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/evpkdf.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/format-hex-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/format-hex.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/hmac-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/hmac.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/md5-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/md5.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-cfb-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-cfb.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ctr-gladman-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ctr-gladman.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ctr-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ctr.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ecb-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ecb.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ofb-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/mode-ofb.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-ansix923-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-ansix923.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-iso10126-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-iso10126.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-iso97971-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-iso97971.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-nopadding-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-nopadding.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pbkdf2-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/pbkdf2.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rabbit-legacy-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rabbit-legacy.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rabbit-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rabbit.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rc4-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/rc4.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/ripemd160-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/ripemd160.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha1-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha1.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha224-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha224.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha256-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha256.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha3-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha3.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha384-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha384.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha512-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/sha512.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/tripledes-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/tripledes.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/x64-core-min.js create mode 100644 dashboard-ui/bower_components/cryptojslib/components/x64-core.js create mode 100644 dashboard-ui/bower_components/cryptojslib/copyright.txt create mode 100644 dashboard-ui/bower_components/cryptojslib/push.bat create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/aes.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-md5.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-ripemd160.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha1.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha224.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha256.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha3.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha384.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/hmac-sha512.js rename dashboard-ui/{apiclient => bower_components/cryptojslib/rollups}/md5.js (100%) create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/pbkdf2.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/rabbit-legacy.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/rabbit.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/rc4.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/ripemd160.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha1.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha224.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha256.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha3.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha384.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/sha512.js create mode 100644 dashboard-ui/bower_components/cryptojslib/rollups/tripledes.js create mode 100644 dashboard-ui/bower_components/cryptojslib/status.bat delete mode 100644 dashboard-ui/bower_components/doc-ready/.bower.json delete mode 100644 dashboard-ui/bower_components/doc-ready/bower.json delete mode 100644 dashboard-ui/bower_components/doc-ready/doc-ready.js rename dashboard-ui/{thirdparty => bower_components/emby-icons}/emby-icons.html (98%) delete mode 100644 dashboard-ui/bower_components/eventEmitter/.bower.json delete mode 100644 dashboard-ui/bower_components/eventEmitter/EventEmitter.js delete mode 100644 dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js delete mode 100644 dashboard-ui/bower_components/eventEmitter/UNLICENSE delete mode 100644 dashboard-ui/bower_components/eventEmitter/bower.json delete mode 100644 dashboard-ui/bower_components/eventEmitter/component.json delete mode 100644 dashboard-ui/bower_components/eventie/.bower.json delete mode 100644 dashboard-ui/bower_components/eventie/bower.json delete mode 100644 dashboard-ui/bower_components/eventie/eventie.js delete mode 100644 dashboard-ui/bower_components/eventie/package.json create mode 100644 dashboard-ui/bower_components/fetch/.bower.json create mode 100644 dashboard-ui/bower_components/fetch/LICENSE create mode 100644 dashboard-ui/bower_components/fetch/bower.json create mode 100644 dashboard-ui/bower_components/fetch/fetch.js delete mode 100644 dashboard-ui/bower_components/fizzy-ui-utils/.bower.json delete mode 100644 dashboard-ui/bower_components/fizzy-ui-utils/bower.json delete mode 100644 dashboard-ui/bower_components/fizzy-ui-utils/utils.js delete mode 100644 dashboard-ui/bower_components/get-size/.bower.json delete mode 100644 dashboard-ui/bower_components/get-size/bower.json delete mode 100644 dashboard-ui/bower_components/get-size/get-size.js delete mode 100644 dashboard-ui/bower_components/get-size/index.html delete mode 100644 dashboard-ui/bower_components/get-style-property/.bower.json delete mode 100644 dashboard-ui/bower_components/get-style-property/bower.json delete mode 100644 dashboard-ui/bower_components/get-style-property/component.json delete mode 100644 dashboard-ui/bower_components/get-style-property/get-style-property.js delete mode 100644 dashboard-ui/bower_components/get-style-property/package.json create mode 100644 dashboard-ui/bower_components/headroom.js/.bower.json rename dashboard-ui/bower_components/{promise-polyfill => headroom.js}/LICENSE (93%) create mode 100644 dashboard-ui/bower_components/headroom.js/bower.json create mode 100644 dashboard-ui/bower_components/headroom.js/dist/angular.headroom.js create mode 100644 dashboard-ui/bower_components/headroom.js/dist/angular.headroom.min.js create mode 100644 dashboard-ui/bower_components/headroom.js/dist/headroom.js create mode 100644 dashboard-ui/bower_components/headroom.js/dist/headroom.min.js create mode 100644 dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.js create mode 100644 dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.min.js create mode 100644 dashboard-ui/bower_components/headroom.js/package.json create mode 100644 dashboard-ui/bower_components/iron-a11y-announcer/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-a11y-announcer/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-a11y-keys-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-behaviors/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-behaviors/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-checked-element-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-checked-element-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-fit-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-fit-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-flex-layout/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-flex-layout/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-flex-layout/demo/demo-snippet.html delete mode 100644 dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/test/basic.html create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/test/index.html create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/test/simple-element.html create mode 100644 dashboard-ui/bower_components/iron-form-element-behavior/test/simple-form.html create mode 100644 dashboard-ui/bower_components/iron-icons/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-icons/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-iconset-svg/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-iconset-svg/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-input/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-input/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-media-query/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-media-query/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-menu-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-meta/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-overlay-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-pages/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-pages/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/iron-selector/.travis.yml create mode 100644 dashboard-ui/bower_components/isMobile/.bower.json create mode 100644 dashboard-ui/bower_components/isMobile/bower.json create mode 100644 dashboard-ui/bower_components/isMobile/isMobile.js create mode 100644 dashboard-ui/bower_components/isMobile/isMobile.min.js create mode 100644 dashboard-ui/bower_components/isMobile/package.json delete mode 100644 dashboard-ui/bower_components/masonry/.bower.json delete mode 100644 dashboard-ui/bower_components/masonry/README.mdown delete mode 100644 dashboard-ui/bower_components/masonry/bower.json delete mode 100644 dashboard-ui/bower_components/masonry/changelog.md delete mode 100644 dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js delete mode 100644 dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js delete mode 100644 dashboard-ui/bower_components/masonry/masonry.js delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/add-items.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/basic.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/bottom-up.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/browserify/index.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/browserify/main.js delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/element-sizing.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/fit-width.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/fluid.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/jquery.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/require-js/index.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/require-js/main.js delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/right-to-left.html delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/sandbox.css delete mode 100644 dashboard-ui/bower_components/masonry/sandbox/stamps.html delete mode 100644 dashboard-ui/bower_components/matches-selector/.bower.json delete mode 100644 dashboard-ui/bower_components/matches-selector/bower.json delete mode 100644 dashboard-ui/bower_components/matches-selector/matches-selector.js create mode 100644 dashboard-ui/bower_components/native-promise-only/.bower.json create mode 100644 dashboard-ui/bower_components/native-promise-only/.gitignore create mode 100644 dashboard-ui/bower_components/native-promise-only/.npmignore create mode 100644 dashboard-ui/bower_components/native-promise-only/build.js create mode 100644 dashboard-ui/bower_components/native-promise-only/lib/npo.src.js create mode 100644 dashboard-ui/bower_components/native-promise-only/package.json create mode 100644 dashboard-ui/bower_components/native-promise-only/test_adapter.js create mode 100644 dashboard-ui/bower_components/neon-animation/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/outlayer/.bower.json delete mode 100644 dashboard-ui/bower_components/outlayer/bower.json delete mode 100644 dashboard-ui/bower_components/outlayer/item.js delete mode 100644 dashboard-ui/bower_components/outlayer/outlayer.js create mode 100644 dashboard-ui/bower_components/paper-behaviors/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-behaviors/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-behaviors/test/shadowed-ripple.html create mode 100644 dashboard-ui/bower_components/paper-button/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-button/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-checkbox/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-checkbox/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-collapse-item/.bower.json create mode 100644 dashboard-ui/bower_components/paper-collapse-item/LICENSE create mode 100644 dashboard-ui/bower_components/paper-collapse-item/bower.json create mode 100644 dashboard-ui/bower_components/paper-collapse-item/demo/index.html create mode 100644 dashboard-ui/bower_components/paper-collapse-item/doc/screenshot.png create mode 100644 dashboard-ui/bower_components/paper-collapse-item/paper-collapse-item.html create mode 100644 dashboard-ui/bower_components/paper-collapse-item/test/index.html create mode 100644 dashboard-ui/bower_components/paper-collapse-item/test/paper-collapse-item.html create mode 100644 dashboard-ui/bower_components/paper-dialog-behavior/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-dialog-behavior/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-shared-styles.html create mode 100644 dashboard-ui/bower_components/paper-dialog/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-dialog/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-drawer-panel/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md delete mode 100644 dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css create mode 100644 dashboard-ui/bower_components/paper-drawer-panel/test/index.html create mode 100644 dashboard-ui/bower_components/paper-drawer-panel/test/positioning.html create mode 100644 dashboard-ui/bower_components/paper-drawer-panel/test/small-devices.html create mode 100644 dashboard-ui/bower_components/paper-icon-button/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-icon-button/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-input/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-input/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-item/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-item/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-item/paper-item-behavior.html create mode 100644 dashboard-ui/bower_components/paper-material/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-material/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-menu-button/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-menu-button/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-radio-button/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-radio-button/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-radio-group/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-radio-group/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-ripple/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-ripple/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-slider/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-slider/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-spinner/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-spinner/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-spinner/paper-spinner-styles.html delete mode 100644 dashboard-ui/bower_components/paper-spinner/paper-spinner.css create mode 100644 dashboard-ui/bower_components/paper-styles/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-styles/index.html create mode 100644 dashboard-ui/bower_components/paper-tabs/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-tabs/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-tabs/demo/paper-tabs-demo-styles.html create mode 100644 dashboard-ui/bower_components/paper-tabs/demo/tabs-with-content-example.html delete mode 100644 dashboard-ui/bower_components/promise-polyfill/.bower.json delete mode 100644 dashboard-ui/bower_components/promise-polyfill/Gruntfile.js delete mode 100644 dashboard-ui/bower_components/promise-polyfill/Promise.js delete mode 100644 dashboard-ui/bower_components/promise-polyfill/Promise.min.js delete mode 100644 dashboard-ui/bower_components/promise-polyfill/bower.json delete mode 100644 dashboard-ui/bower_components/promise-polyfill/jasmine.json delete mode 100644 dashboard-ui/bower_components/promise-polyfill/package.json create mode 100644 dashboard-ui/components/humanedate.js create mode 100644 dashboard-ui/components/imagestore.js create mode 100644 dashboard-ui/components/requirecss.js create mode 100644 dashboard-ui/components/requirehtml.js create mode 100644 dashboard-ui/components/sharingwidget.js create mode 100644 dashboard-ui/components/testermessage.js delete mode 100644 dashboard-ui/cordova/actionsheet.js delete mode 100644 dashboard-ui/cordova/android/androidcredentials.js delete mode 100644 dashboard-ui/cordova/android/appstorage.js delete mode 100644 dashboard-ui/cordova/android/iap.js delete mode 100644 dashboard-ui/cordova/android/immersive.js delete mode 100644 dashboard-ui/cordova/android/localsync.js delete mode 100644 dashboard-ui/cordova/android/logging.js delete mode 100644 dashboard-ui/cordova/android/mediasession.js delete mode 100644 dashboard-ui/cordova/android/nativedirectorychooser.js delete mode 100644 dashboard-ui/cordova/android/newapp.js delete mode 100644 dashboard-ui/cordova/android/vlcplayer.js delete mode 100644 dashboard-ui/cordova/back.js delete mode 100644 dashboard-ui/cordova/chromecast.js delete mode 100644 dashboard-ui/cordova/connectsdk.js delete mode 100644 dashboard-ui/cordova/externalplayer.js delete mode 100644 dashboard-ui/cordova/fileupload.js delete mode 100644 dashboard-ui/cordova/generaldevice.js delete mode 100644 dashboard-ui/cordova/iap.js delete mode 100644 dashboard-ui/cordova/imagestore.js delete mode 100644 dashboard-ui/cordova/ios/backgroundfetch.js delete mode 100644 dashboard-ui/cordova/ios/orientation.js delete mode 100644 dashboard-ui/cordova/ios/tabbar.js delete mode 100644 dashboard-ui/cordova/ios/vlcplayer.js delete mode 100644 dashboard-ui/cordova/localassetmanager.js delete mode 100644 dashboard-ui/cordova/prompt.js delete mode 100644 dashboard-ui/cordova/registrationservices.js delete mode 100644 dashboard-ui/cordova/remotecontrols.js delete mode 100644 dashboard-ui/cordova/searchmenu.js delete mode 100644 dashboard-ui/cordova/serverdiscovery.js delete mode 100644 dashboard-ui/cordova/sharingwidget.js delete mode 100644 dashboard-ui/cordova/volume.js delete mode 100644 dashboard-ui/cordova/wakeonlan.js delete mode 100644 dashboard-ui/css/images/clients/firefox.png delete mode 100644 dashboard-ui/css/images/clients/ie.png delete mode 100644 dashboard-ui/css/images/clients/safari.png delete mode 100644 dashboard-ui/css/materialize.css delete mode 100644 dashboard-ui/css/mediaplayer.css delete mode 100644 dashboard-ui/css/remotecontrol.css delete mode 100644 dashboard-ui/css/userimage.css create mode 100644 dashboard-ui/legacy/buttonenabled.js create mode 100644 dashboard-ui/manifest.json create mode 100644 dashboard-ui/scripts/musicfolders.js delete mode 100644 dashboard-ui/scripts/sharingwidget.js create mode 100644 dashboard-ui/strings/html/hu.json delete mode 100644 dashboard-ui/thirdparty/browser.js delete mode 100644 dashboard-ui/thirdparty/cast_sender.js delete mode 100644 dashboard-ui/thirdparty/fontawesome/css/font-awesome.css delete mode 100644 dashboard-ui/thirdparty/fontawesome/css/font-awesome.css.map delete mode 100644 dashboard-ui/thirdparty/fontawesome/css/font-awesome.min.css delete mode 100644 dashboard-ui/thirdparty/fontawesome/fonts/fontawesome-webfont.eot delete mode 100644 dashboard-ui/thirdparty/fontawesome/fonts/fontawesome-webfont.svg delete mode 100644 dashboard-ui/thirdparty/fontawesome/fonts/fontawesome-webfont.ttf delete mode 100644 dashboard-ui/thirdparty/fontawesome/fonts/fontawesome-webfont.woff delete mode 100644 dashboard-ui/thirdparty/fontawesome/fonts/fontawesome-webfont.woff2 delete mode 100644 dashboard-ui/thirdparty/headroom.js delete mode 100644 dashboard-ui/thirdparty/jquerymobile-1.4.5/custombuild.txt create mode 100644 dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.widget.js delete mode 100644 dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.structure.css delete mode 100644 dashboard-ui/thirdparty/viblast/viblast-video-js.swf delete mode 100644 dashboard-ui/thirdparty/viblast/viblast.crypto.js delete mode 100644 dashboard-ui/thirdparty/viblast/viblast.js delete mode 100644 dashboard-ui/thirdparty/viblast/viblast.remuxer.js delete mode 100644 dashboard-ui/thirdparty/viblast/worker.html delete mode 100644 dashboard-ui/vulcanize-in.html delete mode 100644 dashboard-ui/vulcanize-out.html diff --git a/dashboard-ui/addplugin.html b/dashboard-ui/addplugin.html index ab88ddeef6..bbcefe4556 100644 --- a/dashboard-ui/addplugin.html +++ b/dashboard-ui/addplugin.html @@ -4,7 +4,7 @@ ${TitlePlugins} -
+
@@ -55,7 +55,6 @@ -
diff --git a/dashboard-ui/advanced.html b/dashboard-ui/advanced.html index 4e11c0e628..0079614c4c 100644 --- a/dashboard-ui/advanced.html +++ b/dashboard-ui/advanced.html @@ -4,7 +4,7 @@ ${TitleAdvanced} -
+
diff --git a/dashboard-ui/apiclient/ajax.js b/dashboard-ui/apiclient/ajax.js deleted file mode 100644 index c0c191ad04..0000000000 --- a/dashboard-ui/apiclient/ajax.js +++ /dev/null @@ -1,24 +0,0 @@ -(function (globalScope) { - - globalScope.HttpClient = { - - param: function (params) { - return jQuery.param(params); - }, - - send: function (request) { - - request.timeout = request.timeout || 30000; - - try { - return jQuery.ajax(request); - } catch (err) { - var deferred = DeferredBuilder.Deferred(); - deferred.reject(); - return deferred.promise(); - } - } - - }; - -})(window); \ No newline at end of file diff --git a/dashboard-ui/apiclient/alt/bean.js b/dashboard-ui/apiclient/alt/bean.js deleted file mode 100644 index 2a200cf27e..0000000000 --- a/dashboard-ui/apiclient/alt/bean.js +++ /dev/null @@ -1,736 +0,0 @@ -(function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) module.exports = definition() - else if (typeof define == 'function' && define.amd) define(definition) - else context[name] = definition() -})('bean', this, function (name, context) { - name = name || 'bean' - context = context || this - - var win = window - , old = context[name] - , namespaceRegex = /[^\.]*(?=\..*)\.|.*/ - , nameRegex = /\..*/ - , addEvent = 'addEventListener' - , removeEvent = 'removeEventListener' - , doc = document || {} - , root = doc.documentElement || {} - , W3C_MODEL = root[addEvent] - , eventSupport = W3C_MODEL ? addEvent : 'attachEvent' - , ONE = {} // singleton for quick matching making add() do one() - - , slice = Array.prototype.slice - , str2arr = function (s, d) { return s.split(d || ' ') } - , isString = function (o) { return typeof o == 'string' } - , isFunction = function (o) { return typeof o == 'function' } - - // events that we consider to be 'native', anything not in this list will - // be treated as a custom event - , standardNativeEvents = - 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons - 'mousewheel mousemultiwheel DOMMouseScroll ' + // mouse wheel - 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement - 'keydown keypress keyup ' + // keyboard - 'orientationchange ' + // mobile - 'focus blur change reset select submit ' + // form elements - 'load unload beforeunload resize move DOMContentLoaded ' + // window - 'readystatechange message ' + // window - 'error abort scroll ' // misc - // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event - // that doesn't actually exist, so make sure we only do these on newer browsers - , w3cNativeEvents = - 'show ' + // mouse buttons - 'input invalid ' + // form elements - 'touchstart touchmove touchend touchcancel ' + // touch - 'gesturestart gesturechange gestureend ' + // gesture - 'textinput ' + // TextEvent - 'readystatechange pageshow pagehide popstate ' + // window - 'hashchange offline online ' + // window - 'afterprint beforeprint ' + // printing - 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd - 'loadstart progress suspend emptied stalled loadmetadata ' + // media - 'loadeddata canplay canplaythrough playing waiting seeking ' + // media - 'seeked ended durationchange timeupdate play pause ratechange ' + // media - 'volumechange cuechange ' + // media - 'checking noupdate downloading cached updateready obsolete ' // appcache - - // convert to a hash for quick lookups - , nativeEvents = (function (hash, events, i) { - for (i = 0; i < events.length; i++) events[i] && (hash[events[i]] = 1) - return hash - }({}, str2arr(standardNativeEvents + (W3C_MODEL ? w3cNativeEvents : '')))) - - // custom events are events that we *fake*, they are not provided natively but - // we can use native events to generate them - , customEvents = (function () { - var isAncestor = 'compareDocumentPosition' in root - ? function (element, container) { - return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16 - } - : 'contains' in root - ? function (element, container) { - container = container.nodeType === 9 || container === window ? root : container - return container !== element && container.contains(element) - } - : function (element, container) { - while (element = element.parentNode) if (element === container) return 1 - return 0 - } - , check = function (event) { - var related = event.relatedTarget - return !related - ? related == null - : (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString()) - && !isAncestor(related, this)) - } - - return { - mouseenter: { base: 'mouseover', condition: check } - , mouseleave: { base: 'mouseout', condition: check } - , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' } - } - }()) - - // we provide a consistent Event object across browsers by taking the actual DOM - // event object and generating a new one from its properties. - , Event = (function () { - // a whitelist of properties (for different event types) tells us what to check for and copy - var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' + - 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' + - 'srcElement target timeStamp type view which propertyName path') - , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' + - 'fromElement offsetX offsetY pageX pageY screenX screenY toElement movementX movementY region')) - , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' + - 'axis')) // 'axis' is FF specific - , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' + - 'keyLocation location isComposing code')) - , textProps = commonProps.concat(str2arr('data')) - , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation')) - , messageProps = commonProps.concat(str2arr('data origin source')) - , stateProps = commonProps.concat(str2arr('state')) - , overOutRegex = /over|out/ - // some event types need special handling and some need special properties, do that all here - , typeFixers = [ - { // key events - reg: /key/i - , fix: function (event, newEvent) { - newEvent.keyCode = event.keyCode || event.which - return keyProps - } - } - , { // mouse events - reg: /click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i - , fix: function (event, newEvent, type) { - newEvent.rightClick = event.which === 3 || event.button === 2 - newEvent.pos = { x: 0, y: 0 } - if (event.pageX || event.pageY) { - newEvent.clientX = event.pageX - newEvent.clientY = event.pageY - } else if (event.clientX || event.clientY) { - newEvent.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft - newEvent.clientY = event.clientY + doc.body.scrollTop + root.scrollTop - } - if (overOutRegex.test(type)) { - newEvent.relatedTarget = event.relatedTarget - || event[(type == 'mouseover' ? 'from' : 'to') + 'Element'] - } - return mouseProps - } - } - , { // mouse wheel events - reg: /mouse.*(wheel|scroll)/i - , fix: function () { return mouseWheelProps } - } - , { // TextEvent - reg: /^text/i - , fix: function () { return textProps } - } - , { // touch and gesture events - reg: /^touch|^gesture/i - , fix: function () { return touchProps } - } - , { // message events - reg: /^message$/i - , fix: function () { return messageProps } - } - , { // popstate events - reg: /^popstate$/i - , fix: function () { return stateProps } - } - , { // everything else - reg: /.*/ - , fix: function () { return commonProps } - } - ] - , typeFixerMap = {} // used to map event types to fixer functions (above), a basic cache mechanism - - , Event = function (event, element, isNative) { - if (!arguments.length) return - event = event || ((element.ownerDocument || element.document || element).parentWindow || win).event - this.originalEvent = event - this.isNative = isNative - this.isBean = true - - if (!event) return - - var type = event.type - , target = event.target || event.srcElement - , i, l, p, props, fixer - - this.target = target && target.nodeType === 3 ? target.parentNode : target - - if (isNative) { // we only need basic augmentation on custom events, the rest expensive & pointless - fixer = typeFixerMap[type] - if (!fixer) { // haven't encountered this event type before, map a fixer function for it - for (i = 0, l = typeFixers.length; i < l; i++) { - if (typeFixers[i].reg.test(type)) { // guaranteed to match at least one, last is .* - typeFixerMap[type] = fixer = typeFixers[i].fix - break - } - } - } - - props = fixer(event, this, type) - for (i = props.length; i--;) { - if (!((p = props[i]) in this) && p in event) this[p] = event[p] - } - } - } - - // preventDefault() and stopPropagation() are a consistent interface to those functions - // on the DOM, stop() is an alias for both of them together - Event.prototype.preventDefault = function () { - if (this.originalEvent.preventDefault) this.originalEvent.preventDefault() - else this.originalEvent.returnValue = false - } - Event.prototype.stopPropagation = function () { - if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation() - else this.originalEvent.cancelBubble = true - } - Event.prototype.stop = function () { - this.preventDefault() - this.stopPropagation() - this.stopped = true - } - // stopImmediatePropagation() has to be handled internally because we manage the event list for - // each element - // note that originalElement may be a Bean#Event object in some situations - Event.prototype.stopImmediatePropagation = function () { - if (this.originalEvent.stopImmediatePropagation) this.originalEvent.stopImmediatePropagation() - this.isImmediatePropagationStopped = function () { return true } - } - Event.prototype.isImmediatePropagationStopped = function () { - return this.originalEvent.isImmediatePropagationStopped && this.originalEvent.isImmediatePropagationStopped() - } - Event.prototype.clone = function (currentTarget) { - //TODO: this is ripe for optimisation, new events are *expensive* - // improving this will speed up delegated events - var ne = new Event(this, this.element, this.isNative) - ne.currentTarget = currentTarget - return ne - } - - return Event - }()) - - // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both - , targetElement = function (element, isNative) { - return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element - } - - /** - * Bean maintains an internal registry for event listeners. We don't touch elements, objects - * or functions to identify them, instead we store everything in the registry. - * Each event listener has a RegEntry object, we have one 'registry' for the whole instance. - */ - , RegEntry = (function () { - // each handler is wrapped so we can handle delegation and custom events - var wrappedHandler = function (element, fn, condition, args) { - var call = function (event, eargs) { - return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs) - } - , findTarget = function (event, eventElement) { - return fn.__beanDel ? fn.__beanDel.ft(event.target, element) : eventElement - } - , handler = condition - ? function (event) { - var target = findTarget(event, this) // deleated event - if (condition.apply(target, arguments)) { - if (event) event.currentTarget = target - return call(event, arguments) - } - } - : function (event) { - if (fn.__beanDel) event = event.clone(findTarget(event)) // delegated event, fix the fix - return call(event, arguments) - } - handler.__beanDel = fn.__beanDel - return handler - } - - , RegEntry = function (element, type, handler, original, namespaces, args, root) { - var customType = customEvents[type] - , isNative - - if (type == 'unload') { - // self clean-up - handler = once(removeListener, element, type, handler, original) - } - - if (customType) { - if (customType.condition) { - handler = wrappedHandler(element, handler, customType.condition, args) - } - type = customType.base || type - } - - this.isNative = isNative = nativeEvents[type] && !!element[eventSupport] - this.customType = !W3C_MODEL && !isNative && type - this.element = element - this.type = type - this.original = original - this.namespaces = namespaces - this.eventType = W3C_MODEL || isNative ? type : 'propertychange' - this.target = targetElement(element, isNative) - this[eventSupport] = !!this.target[eventSupport] - this.root = root - this.handler = wrappedHandler(element, handler, null, args) - } - - // given a list of namespaces, is our entry in any of them? - RegEntry.prototype.inNamespaces = function (checkNamespaces) { - var i, j, c = 0 - if (!checkNamespaces) return true - if (!this.namespaces) return false - for (i = checkNamespaces.length; i--;) { - for (j = this.namespaces.length; j--;) { - if (checkNamespaces[i] == this.namespaces[j]) c++ - } - } - return checkNamespaces.length === c - } - - // match by element, original fn (opt), handler fn (opt) - RegEntry.prototype.matches = function (checkElement, checkOriginal, checkHandler) { - return this.element === checkElement && - (!checkOriginal || this.original === checkOriginal) && - (!checkHandler || this.handler === checkHandler) - } - - return RegEntry - }()) - - , registry = (function () { - // our map stores arrays by event type, just because it's better than storing - // everything in a single array. - // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for - // rootListeners so we can look them up fast - var map = {} - - // generic functional search of our registry for matching listeners, - // `fn` returns false to break out of the loop - , forAll = function (element, type, original, handler, root, fn) { - var pfx = root ? 'r' : '$' - if (!type || type == '*') { - // search the whole registry - for (var t in map) { - if (t.charAt(0) == pfx) { - forAll(element, t.substr(1), original, handler, root, fn) - } - } - } else { - var i = 0, l, list = map[pfx + type], all = element == '*' - if (!list) return - for (l = list.length; i < l; i++) { - if ((all || list[i].matches(element, original, handler)) && !fn(list[i], list, i, type)) return - } - } - } - - , has = function (element, type, original, root) { - // we're not using forAll here simply because it's a bit slower and this - // needs to be fast - var i, list = map[(root ? 'r' : '$') + type] - if (list) { - for (i = list.length; i--;) { - if (!list[i].root && list[i].matches(element, original, null)) return true - } - } - return false - } - - , get = function (element, type, original, root) { - var entries = [] - forAll(element, type, original, null, root, function (entry) { - return entries.push(entry) - }) - return entries - } - - , put = function (entry) { - var has = !entry.root && !this.has(entry.element, entry.type, null, false) - , key = (entry.root ? 'r' : '$') + entry.type - ;(map[key] || (map[key] = [])).push(entry) - return has - } - - , del = function (entry) { - forAll(entry.element, entry.type, null, entry.handler, entry.root, function (entry, list, i) { - list.splice(i, 1) - entry.removed = true - if (list.length === 0) delete map[(entry.root ? 'r' : '$') + entry.type] - return false - }) - } - - // dump all entries, used for onunload - , entries = function () { - var t, entries = [] - for (t in map) { - if (t.charAt(0) == '$') entries = entries.concat(map[t]) - } - return entries - } - - return { has: has, get: get, put: put, del: del, entries: entries } - }()) - - // we need a selector engine for delegated events, use querySelectorAll if it exists - // but for older browsers we need Qwery, Sizzle or similar - , selectorEngine - , setSelectorEngine = function (e) { - if (!arguments.length) { - selectorEngine = doc.querySelectorAll - ? function (s, r) { - return r.querySelectorAll(s) - } - : function () { - throw new Error('Bean: No selector engine installed') // eeek - } - } else { - selectorEngine = e - } - } - - // we attach this listener to each DOM event that we need to listen to, only once - // per event type per DOM element - , rootListener = function (event, type) { - if (!W3C_MODEL && type && event && event.propertyName != '_on' + type) return - - var listeners = registry.get(this, type || event.type, null, false) - , l = listeners.length - , i = 0 - - event = new Event(event, this, true) - if (type) event.type = type - - // iterate through all handlers registered for this type, calling them unless they have - // been removed by a previous handler or stopImmediatePropagation() has been called - for (; i < l && !event.isImmediatePropagationStopped(); i++) { - if (!listeners[i].removed) listeners[i].handler.call(this, event) - } - } - - // add and remove listeners to DOM elements - , listener = W3C_MODEL - ? function (element, type, add) { - // new browsers - element[add ? addEvent : removeEvent](type, rootListener, false) - } - : function (element, type, add, custom) { - // IE8 and below, use attachEvent/detachEvent and we have to piggy-back propertychange events - // to simulate event bubbling etc. - var entry - if (add) { - registry.put(entry = new RegEntry( - element - , custom || type - , function (event) { // handler - rootListener.call(element, event, custom) - } - , rootListener - , null - , null - , true // is root - )) - if (custom && element['_on' + custom] == null) element['_on' + custom] = 0 - entry.target.attachEvent('on' + entry.eventType, entry.handler) - } else { - entry = registry.get(element, custom || type, rootListener, true)[0] - if (entry) { - entry.target.detachEvent('on' + entry.eventType, entry.handler) - registry.del(entry) - } - } - } - - , once = function (rm, element, type, fn, originalFn) { - // wrap the handler in a handler that does a remove as well - return function () { - fn.apply(this, arguments) - rm(element, type, originalFn) - } - } - - , removeListener = function (element, orgType, handler, namespaces) { - var type = orgType && orgType.replace(nameRegex, '') - , handlers = registry.get(element, type, null, false) - , removed = {} - , i, l - - for (i = 0, l = handlers.length; i < l; i++) { - if ((!handler || handlers[i].original === handler) && handlers[i].inNamespaces(namespaces)) { - // TODO: this is problematic, we have a registry.get() and registry.del() that - // both do registry searches so we waste cycles doing this. Needs to be rolled into - // a single registry.forAll(fn) that removes while finding, but the catch is that - // we'll be splicing the arrays that we're iterating over. Needs extra tests to - // make sure we don't screw it up. @rvagg - registry.del(handlers[i]) - if (!removed[handlers[i].eventType] && handlers[i][eventSupport]) - removed[handlers[i].eventType] = { t: handlers[i].eventType, c: handlers[i].type } - } - } - // check each type/element for removed listeners and remove the rootListener where it's no longer needed - for (i in removed) { - if (!registry.has(element, removed[i].t, null, false)) { - // last listener of this type, remove the rootListener - listener(element, removed[i].t, false, removed[i].c) - } - } - } - - // set up a delegate helper using the given selector, wrap the handler function - , delegate = function (selector, fn) { - //TODO: findTarget (therefore $) is called twice, once for match and once for - // setting e.currentTarget, fix this so it's only needed once - var findTarget = function (target, root) { - var i, array = isString(selector) ? selectorEngine(selector, root) : selector - for (; target && target !== root; target = target.parentNode) { - for (i = array.length; i--;) { - if (array[i] === target) return target - } - } - } - , handler = function (e) { - var match = findTarget(e.target, this) - if (match) fn.apply(match, arguments) - } - - // __beanDel isn't pleasant but it's a private function, not exposed outside of Bean - handler.__beanDel = { - ft : findTarget // attach it here for customEvents to use too - , selector : selector - } - return handler - } - - , fireListener = W3C_MODEL ? function (isNative, type, element) { - // modern browsers, do a proper dispatchEvent() - var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents') - evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1) - element.dispatchEvent(evt) - } : function (isNative, type, element) { - // old browser use onpropertychange, just increment a custom property to trigger the event - element = targetElement(element, isNative) - isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++ - } - - /** - * Public API: off(), on(), add(), (remove()), one(), fire(), clone() - */ - - /** - * off(element[, eventType(s)[, handler ]]) - */ - , off = function (element, typeSpec, fn) { - var isTypeStr = isString(typeSpec) - , k, type, namespaces, i - - if (isTypeStr && typeSpec.indexOf(' ') > 0) { - // off(el, 't1 t2 t3', fn) or off(el, 't1 t2 t3') - typeSpec = str2arr(typeSpec) - for (i = typeSpec.length; i--;) - off(element, typeSpec[i], fn) - return element - } - - type = isTypeStr && typeSpec.replace(nameRegex, '') - if (type && customEvents[type]) type = customEvents[type].base - - if (!typeSpec || isTypeStr) { - // off(el) or off(el, t1.ns) or off(el, .ns) or off(el, .ns1.ns2.ns3) - if (namespaces = isTypeStr && typeSpec.replace(namespaceRegex, '')) namespaces = str2arr(namespaces, '.') - removeListener(element, type, fn, namespaces) - } else if (isFunction(typeSpec)) { - // off(el, fn) - removeListener(element, null, typeSpec) - } else { - // off(el, { t1: fn1, t2, fn2 }) - for (k in typeSpec) { - if (typeSpec.hasOwnProperty(k)) off(element, k, typeSpec[k]) - } - } - - return element - } - - /** - * on(element, eventType(s)[, selector], handler[, args ]) - */ - , on = function(element, events, selector, fn) { - var originalFn, type, types, i, args, entry, first - - //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps? - if (selector === undefined && typeof events == 'object') { - //TODO: this can't handle delegated events - for (type in events) { - if (events.hasOwnProperty(type)) { - on.call(this, element, type, events[type]) - } - } - return - } - - if (!isFunction(selector)) { - // delegated event - originalFn = fn - args = slice.call(arguments, 4) - fn = delegate(selector, originalFn, selectorEngine) - } else { - args = slice.call(arguments, 3) - fn = originalFn = selector - } - - types = str2arr(events) - - // special case for one(), wrap in a self-removing handler - if (this === ONE) { - fn = once(off, element, events, fn, originalFn) - } - - for (i = types.length; i--;) { - // add new handler to the registry and check if it's the first for this element/type - first = registry.put(entry = new RegEntry( - element - , types[i].replace(nameRegex, '') // event type - , fn - , originalFn - , str2arr(types[i].replace(namespaceRegex, ''), '.') // namespaces - , args - , false // not root - )) - if (entry[eventSupport] && first) { - // first event of this type on this element, add root listener - listener(element, entry.eventType, true, entry.customType) - } - } - - return element - } - - /** - * add(element[, selector], eventType(s), handler[, args ]) - * - * Deprecated: kept (for now) for backward-compatibility - */ - , add = function (element, events, fn, delfn) { - return on.apply( - null - , !isString(fn) - ? slice.call(arguments) - : [ element, fn, events, delfn ].concat(arguments.length > 3 ? slice.call(arguments, 5) : []) - ) - } - - /** - * one(element, eventType(s)[, selector], handler[, args ]) - */ - , one = function () { - return on.apply(ONE, arguments) - } - - /** - * fire(element, eventType(s)[, args ]) - * - * The optional 'args' argument must be an array, if no 'args' argument is provided - * then we can use the browser's DOM event system, otherwise we trigger handlers manually - */ - , fire = function (element, type, args) { - var types = str2arr(type) - , i, j, l, names, handlers - - for (i = types.length; i--;) { - type = types[i].replace(nameRegex, '') - if (names = types[i].replace(namespaceRegex, '')) names = str2arr(names, '.') - if (!names && !args && element[eventSupport]) { - fireListener(nativeEvents[type], type, element) - } else { - // non-native event, either because of a namespace, arguments or a non DOM element - // iterate over all listeners and manually 'fire' - handlers = registry.get(element, type, null, false) - args = [false].concat(args) - for (j = 0, l = handlers.length; j < l; j++) { - if (handlers[j].inNamespaces(names)) { - handlers[j].handler.apply(element, args) - } - } - } - } - return element - } - - /** - * clone(dstElement, srcElement[, eventType ]) - * - * TODO: perhaps for consistency we should allow the same flexibility in type specifiers? - */ - , clone = function (element, from, type) { - var handlers = registry.get(from, type, null, false) - , l = handlers.length - , i = 0 - , args, beanDel - - for (; i < l; i++) { - if (handlers[i].original) { - args = [ element, handlers[i].type ] - if (beanDel = handlers[i].handler.__beanDel) args.push(beanDel.selector) - args.push(handlers[i].original) - on.apply(null, args) - } - } - return element - } - - , bean = { - 'on' : on - , 'add' : add - , 'one' : one - , 'off' : off - , 'remove' : off - , 'clone' : clone - , 'fire' : fire - , 'Event' : Event - , 'setSelectorEngine' : setSelectorEngine - , 'noConflict' : function () { - context[name] = old - return this - } - } - - // for IE, clean up on unload to avoid leaks - if (win.attachEvent) { - var cleanup = function () { - var i, entries = registry.entries() - for (i in entries) { - if (entries[i].type && entries[i].type !== 'unload') off(entries[i].element, entries[i].type) - } - win.detachEvent('onunload', cleanup) - win.CollectGarbage && win.CollectGarbage() - } - win.attachEvent('onunload', cleanup) - } - - // initialize selector engine to internal default (qSA or throw Error) - setSelectorEngine() - - return bean -}); diff --git a/dashboard-ui/apiclient/alt/deferred.js b/dashboard-ui/apiclient/alt/deferred.js deleted file mode 100644 index b17c683e34..0000000000 --- a/dashboard-ui/apiclient/alt/deferred.js +++ /dev/null @@ -1,314 +0,0 @@ -(function (global) { - function isArray(arr) { - return Object.prototype.toString.call(arr) === '[object Array]'; - } - - function foreach(arr, handler) { - if (isArray(arr)) { - for (var i = 0; i < arr.length; i++) { - handler(arr[i]); - } - } - else - handler(arr); - } - - function D(fn) { - var status = 'pending', - doneFuncs = [], - failFuncs = [], - progressFuncs = [], - resultArgs = null, - - promise = { - done: function () { - for (var i = 0; i < arguments.length; i++) { - // skip any undefined or null arguments - if (!arguments[i]) { - continue; - } - - if (isArray(arguments[i])) { - var arr = arguments[i]; - for (var j = 0; j < arr.length; j++) { - // immediately call the function if the deferred has been resolved - if (status === 'resolved') { - arr[j].apply(this, resultArgs); - } - - doneFuncs.push(arr[j]); - } - } - else { - // immediately call the function if the deferred has been resolved - if (status === 'resolved') { - arguments[i].apply(this, resultArgs); - } - - doneFuncs.push(arguments[i]); - } - } - - return this; - }, - - fail: function () { - for (var i = 0; i < arguments.length; i++) { - // skip any undefined or null arguments - if (!arguments[i]) { - continue; - } - - if (isArray(arguments[i])) { - var arr = arguments[i]; - for (var j = 0; j < arr.length; j++) { - // immediately call the function if the deferred has been resolved - if (status === 'rejected') { - arr[j].apply(this, resultArgs); - } - - failFuncs.push(arr[j]); - } - } - else { - // immediately call the function if the deferred has been resolved - if (status === 'rejected') { - arguments[i].apply(this, resultArgs); - } - - failFuncs.push(arguments[i]); - } - } - - return this; - }, - - always: function () { - return this.done.apply(this, arguments).fail.apply(this, arguments); - }, - - progress: function () { - for (var i = 0; i < arguments.length; i++) { - // skip any undefined or null arguments - if (!arguments[i]) { - continue; - } - - if (isArray(arguments[i])) { - var arr = arguments[i]; - for (var j = 0; j < arr.length; j++) { - // immediately call the function if the deferred has been resolved - if (status === 'pending') { - progressFuncs.push(arr[j]); - } - } - } - else { - // immediately call the function if the deferred has been resolved - if (status === 'pending') { - progressFuncs.push(arguments[i]); - } - } - } - - return this; - }, - - then: function () { - // fail callbacks - if (arguments.length > 1 && arguments[1]) { - this.fail(arguments[1]); - } - - // done callbacks - if (arguments.length > 0 && arguments[0]) { - this.done(arguments[0]); - } - - // notify callbacks - if (arguments.length > 2 && arguments[2]) { - this.progress(arguments[2]); - } - }, - - promise: function (obj) { - if (obj == null) { - return promise; - } else { - for (var i in promise) { - obj[i] = promise[i]; - } - return obj; - } - }, - - state: function () { - return status; - }, - - debug: function () { - console.log('[debug]', doneFuncs, failFuncs, status); - }, - - isRejected: function () { - return status === 'rejected'; - }, - - isResolved: function () { - return status === 'resolved'; - }, - - pipe: function (done, fail, progress) { - return D(function (def) { - foreach(done, function (func) { - // filter function - if (typeof func === 'function') { - deferred.done(function () { - var returnval = func.apply(this, arguments); - // if a new deferred/promise is returned, its state is passed to the current deferred/promise - if (returnval && typeof returnval === 'function') { - returnval.promise().then(def.resolve, def.reject, def.notify); - } - else { // if new return val is passed, it is passed to the piped done - def.resolve(returnval); - } - }); - } - else { - deferred.done(def.resolve); - } - }); - - foreach(fail, function (func) { - if (typeof func === 'function') { - deferred.fail(function () { - var returnval = func.apply(this, arguments); - - if (returnval && typeof returnval === 'function') { - returnval.promise().then(def.resolve, def.reject, def.notify); - } else { - def.reject(returnval); - } - }); - } - else { - deferred.fail(def.reject); - } - }); - }).promise(); - } - }, - - deferred = { - resolveWith: function (context) { - if (status === 'pending') { - status = 'resolved'; - var args = resultArgs = (arguments.length > 1) ? arguments[1] : []; - for (var i = 0; i < doneFuncs.length; i++) { - doneFuncs[i].apply(context, args); - } - } - return this; - }, - - rejectWith: function (context) { - if (status === 'pending') { - status = 'rejected'; - var args = resultArgs = (arguments.length > 1) ? arguments[1] : []; - for (var i = 0; i < failFuncs.length; i++) { - failFuncs[i].apply(context, args); - } - } - return this; - }, - - notifyWith: function (context) { - if (status === 'pending') { - var args = resultArgs = (arguments.length > 1) ? arguments[1] : []; - for (var i = 0; i < progressFuncs.length; i++) { - progressFuncs[i].apply(context, args); - } - } - return this; - }, - - resolve: function () { - return this.resolveWith(this, arguments); - }, - - reject: function () { - return this.rejectWith(this, arguments); - }, - - notify: function () { - return this.notifyWith(this, arguments); - } - } - - var obj = promise.promise(deferred); - - if (fn) { - fn.apply(obj, [obj]); - } - - return obj; - } - - D.when = function () { - if (arguments.length < 2) { - var obj = arguments.length ? arguments[0] : undefined; - if (obj && (typeof obj.isResolved === 'function' && typeof obj.isRejected === 'function')) { - return obj.promise(); - } - else { - return D().resolve(obj).promise(); - } - } - else { - return (function (args) { - var df = D(), - size = args.length, - done = 0, - rp = new Array(size); // resolve params: params of each resolve, we need to track down them to be able to pass them in the correct order if the master needs to be resolved - - for (var i = 0; i < args.length; i++) { - (function (j) { - var obj = null; - - if (args[j].done) { - args[j].done(function () { rp[j] = (arguments.length < 2) ? arguments[0] : arguments; if (++done == size) { df.resolve.apply(df, rp); } }) - .fail(function () { df.reject(arguments); }); - } else { - obj = args[j]; - args[j] = new Deferred(); - - args[j].done(function () { rp[j] = (arguments.length < 2) ? arguments[0] : arguments; if (++done == size) { df.resolve.apply(df, rp); } }) - .fail(function () { df.reject(arguments); }).resolve(obj); - } - })(i); - } - - return df.promise(); - })(arguments); - } - } - - global.Deferred = D; -})(window); - -(function (globalScope) { - - globalScope.DeferredBuilder = { - - Deferred: function () { - return new globalScope.Deferred(); - }, - - when: function (promises) { - - return globalScope.Deferred.when(promises); - } - - }; - -})(window); \ No newline at end of file diff --git a/dashboard-ui/apiclient/alt/events.js b/dashboard-ui/apiclient/alt/events.js deleted file mode 100644 index 7022886df1..0000000000 --- a/dashboard-ui/apiclient/alt/events.js +++ /dev/null @@ -1,35 +0,0 @@ -(function (globalScope) { - - globalScope.Events = { - - on: function (obj, eventName, selector, fn) { - - Logger.log('event.on ' + eventName); - bean.on(obj, eventName, selector, fn); - }, - - off: function (obj, eventName, selector, fn) { - - Logger.log('event.off ' + eventName); - bean.off(obj, eventName, selector); - }, - - trigger: function (obj, eventName, params) { - - Logger.log('event.trigger ' + eventName); - - // Need to push an extra param to make the argument order consistent with jquery - var newParams = []; - newParams.push({}); - - if (params && params.length) { - for (var i = 0, length = params.length; i < length; i++) { - newParams.push(params[i]); - } - } - - bean.fire(obj, eventName, newParams); - } - }; - -})(window); \ No newline at end of file diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 0b699b697c..e5dd53f13d 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -58,24 +58,32 @@ return serverInfo; }; - var currentUserPromise; + var currentUser; /** * Gets or sets the current user id. */ self.getCurrentUser = function () { - var promise = currentUserPromise; + if (currentUser) { + return new Promise(function (resolve, reject) { - if (promise == null) { - - promise = self.getUser(self.getCurrentUserId()).fail(function () { - currentUserPromise = null; + resolve(currentUser); }); - - currentUserPromise = promise; } - return promise; + var userId = self.getCurrentUserId(); + + if (!userId) { + return new Promise(function (resolve, reject) { + + reject(); + }); + } + + return self.getUser(userId).then(function (user) { + currentUser = user; + return user; + }); }; /** @@ -111,7 +119,7 @@ }; self.setAuthenticationInfo = function (accessKey, userId) { - currentUserPromise = null; + currentUser = null; serverInfo.AccessToken = accessKey; serverInfo.UserId = userId; @@ -123,26 +131,17 @@ name = name.split('&').join('-'); name = name.split('?').join('-'); - var val = HttpClient.param({ name: name }); + var val = paramsToString({ name: name }); return val.substring(val.indexOf('=') + 1).replace("'", '%27'); }; - function onRequestFail(e) { + function onFetchFail(url, response) { Events.trigger(self, 'requestfail', [ { - url: this.url, - type: this.type, - status: e.status, - errorCode: e.getResponseHeader("X-Application-Error-Code") - }]); - } - - function onRetryRequestFail(request) { - - Events.trigger(self, 'requestfail', [ - { - url: request.url + url: url, + status: response.status, + errorCode: response.headers ? response.headers["X-Application-Error-Code"] : null }]); } @@ -179,20 +178,132 @@ throw new Error("Request cannot be null"); } + return self.fetch(request, includeAuthorization); + }; + + function getFetchPromise(request) { + + var headers = request.headers || {}; + + if (request.dataType == 'json') { + headers.accept = 'application/json'; + } + + var fetchRequest = { + headers: headers, + method: request.type + }; + + var contentType = request.contentType; + + if (request.data) { + + if (typeof request.data === 'string') { + fetchRequest.body = request.data; + } else { + fetchRequest.body = paramsToString(request.data); + + contentType = contentType || 'application/x-www-form-urlencoded; charset=UTF-8'; + } + } + + if (contentType) { + + headers['Content-Type'] = contentType; + } + + if (!request.timeout) { + return fetch(request.url, fetchRequest); + } + + return fetchWithTimeout(request.url, fetchRequest, request.timeout); + } + + function fetchWithTimeout(url, options, timeoutMs) { + + return new Promise(function (resolve, reject) { + + var timeout = setTimeout(reject, timeoutMs); + + fetch(url, options).then(function (response) { + clearTimeout(timeout); + resolve(response); + }, function (error) { + clearTimeout(timeout); + reject(); + }); + }); + } + + function paramsToString(params) { + + var values = []; + + for (var key in params) { + + var value = params[key]; + + if (value !== null && value !== undefined && value !== '') { + values.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); + } + } + return values.join('&'); + } + + /** + * Wraps around jQuery ajax methods to add additional info to the request. + */ + self.fetch = function (request, includeAuthorization) { + + if (!request) { + throw new Error("Request cannot be null"); + } + + request.headers = request.headers || {}; + if (includeAuthorization !== false) { - request.headers = request.headers || {}; self.setRequestHeaders(request.headers); } if (self.enableAutomaticNetworking === false || request.type != "GET") { logger.log('Requesting url without automatic networking: ' + request.url); - return HttpClient.send(request).fail(onRequestFail); + + return getFetchPromise(request).then(function (response) { + + if (response.status < 400) { + + if (request.dataType == 'json' || request.headers.accept == 'application/json') { + return response.json(); + } else { + return response; + } + } else { + onFetchFail(request.url, response); + return Promise.reject(response); + } + + }, function (error) { + onFetchFail(request.url, {}); + throw error; + }); } - var deferred = DeferredBuilder.Deferred(); - self.ajaxWithFailover(request, deferred, true); - return deferred.promise(); + return self.fetchWithFailover(request, true); + }; + + self.getJSON = function (url, includeAuthorization) { + + return self.fetch({ + + url: url, + type: 'GET', + dataType: 'json', + headers: { + accept: 'application/json' + } + + }, includeAuthorization); }; function switchConnectionMode(connectionMode) { @@ -221,7 +332,7 @@ return connectionMode; } - function tryReconnectInternal(deferred, connectionMode, currentRetryCount) { + function tryReconnectInternal(resolve, reject, connectionMode, currentRetryCount) { connectionMode = switchConnectionMode(connectionMode); var url = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), connectionMode); @@ -230,24 +341,24 @@ var timeout = connectionMode == MediaBrowser.ConnectionMode.Local ? 7000 : 15000; - HttpClient.send({ + fetchWithTimeout(url + "/system/info/public", { - type: "GET", - url: url + "/system/info/public", - dataType: "json", + method: 'GET', + accept: 'application/json' - timeout: timeout + // Commenting this out since the fetch api doesn't have a timeout option yet + //timeout: timeout - }).done(function () { + }, timeout).then(function () { logger.log("Reconnect succeeded to " + url); self.serverInfo().LastConnectionMode = connectionMode; self.serverAddress(url); - deferred.resolve(); + resolve(); - }).fail(function () { + }, function () { logger.log("Reconnect attempt failed to " + url); @@ -256,68 +367,76 @@ var newConnectionMode = switchConnectionMode(connectionMode); setTimeout(function () { - tryReconnectInternal(deferred, newConnectionMode, currentRetryCount + 1); - }, 500); + tryReconnectInternal(resolve, reject, newConnectionMode, currentRetryCount + 1); + }, 300); } else { - deferred.reject(); + reject(); } }); } function tryReconnect() { - var deferred = DeferredBuilder.Deferred(); - setTimeout(function () { - tryReconnectInternal(deferred, self.serverInfo().LastConnectionMode, 0); - }, 500); - return deferred.promise(); + return new Promise(function (resolve, reject) { + + setTimeout(function () { + tryReconnectInternal(resolve, reject, self.serverInfo().LastConnectionMode, 0); + }, 300); + }); } - self.ajaxWithFailover = function (request, deferred, enableReconnection) { + self.fetchWithFailover = function (request, enableReconnection) { logger.log("Requesting " + request.url); request.timeout = 30000; - HttpClient.send(request).done(function (response) { + return getFetchPromise(request).then(function (response) { - deferred.resolve(response, 0); + if (response.status < 400) { - }).fail(function (e, textStatus) { + if (request.dataType == 'json' || request.headers.accept == 'application/json') { + return response.json(); + } else { + return response; + } + } else { + onFetchFail(request.url, response); + return Promise.reject(response); + } - logger.log("Request failed with textStatus " + textStatus + " to " + request.url); + }, function (error) { - var statusCode = parseInt(e.status || '0'); - var isUserErrorCode = statusCode >= 400 && statusCode < 500; + logger.log("Request failed to " + request.url); // http://api.jquery.com/jQuery.ajax/ - if (enableReconnection && !isUserErrorCode) { + if (enableReconnection) { logger.log("Attempting reconnection"); var previousServerAddress = self.serverAddress(); - tryReconnect().done(function () { + return tryReconnect().then(function () { logger.log("Reconnect succeesed"); request.url = request.url.replace(previousServerAddress, self.serverAddress()); - self.ajaxWithFailover(request, deferred, false); + return self.fetchWithFailover(request, false); - }).fail(function () { + }, function (innerError) { logger.log("Reconnect failed"); - onRetryRequestFail(request); - deferred.reject(); - + onFetchFail(request.url, {}); + throw innerError; }); + } else { logger.log("Reporting request failure"); - onRetryRequestFail(request); - deferred.reject(); + onFetchFail(request.url, {}); + throw error; } }); }; @@ -330,15 +449,6 @@ }); }; - self.getJSON = function (url) { - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - /** * Creates an api url based on a handler name and query string parameters * @param {String} name @@ -367,7 +477,7 @@ url += name; if (params) { - params = HttpClient.param(params); + params = paramsToString(params); if (params) { url += "?" + params; } @@ -411,7 +521,8 @@ throw new Error("Cannot open web socket without access token."); } - var url = self.getUrl("socket").replace("/socket", "").replace('http', 'ws'); + var url = self.getUrl("socket").replace("emby/socket", "embywebsocket").replace('http', 'ws'); + url += "?api_key=" + accessToken; url += "&deviceId=" + deviceId; @@ -451,14 +562,14 @@ function onWebSocketMessage(msg) { if (msg.MessageType === "UserDeleted") { - currentUserPromise = null; + currentUser = null; } else if (msg.MessageType === "UserUpdated" || msg.MessageType === "UserConfigurationUpdated") { var user = msg.Data; if (user.Id == self.getCurrentUserId()) { - currentUserPromise = null; + currentUser = null; } } @@ -494,11 +605,7 @@ var url = self.getUrl("News/Product", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getDownloadSpeed = function (byteSize) { @@ -508,54 +615,41 @@ Size: byteSize }); - var deferred = DeferredBuilder.Deferred(); - var now = new Date().getTime(); - self.get(url).done(function () { + return self.ajax({ + + type: "GET", + url: url, + timeout: 5000 + + }).then(function () { var responseTimeSeconds = (new Date().getTime() - now) / 1000; var bytesPerSecond = byteSize / responseTimeSeconds; var bitrate = Math.round(bytesPerSecond * 8); - deferred.resolveWith(null, [bitrate]); - - }).fail(function () { - - deferred.reject(); + return bitrate; }); - - return deferred.promise(); }; self.detectBitrate = function () { - var deferred = DeferredBuilder.Deferred(); - // First try a small amount so that we don't hang up their mobile connection - self.getDownloadSpeed(1000000).done(function (bitrate) { + return self.getDownloadSpeed(1000000).then(function (bitrate) { if (bitrate < 1000000) { - deferred.resolveWith(null, [Math.round(bitrate * .8)]); + return Math.round(bitrate * .8); } else { // If that produced a fairly high speed, try again with a larger size to get a more accurate result - self.getDownloadSpeed(2400000).done(function (bitrate) { + return self.getDownloadSpeed(2400000).then(function (bitrate) { - deferred.resolveWith(null, [Math.round(bitrate * .8)]); - - }).fail(function () { - - deferred.reject(); + return Math.round(bitrate * .8); }); } - }).fail(function () { - - deferred.reject(); }); - - return deferred.promise(); }; /** @@ -572,11 +666,7 @@ self.getUrl("Users/" + userId + "/Items/" + itemId) : self.getUrl("Items/" + itemId); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -590,11 +680,7 @@ var url = self.getUrl("Users/" + userId + "/Items/Root"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getNotificationSummary = function (userId) { @@ -605,11 +691,7 @@ var url = self.getUrl("Notifications/" + userId + "/Summary"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getNotifications = function (userId, options) { @@ -620,11 +702,7 @@ var url = self.getUrl("Notifications/" + userId, options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.markNotificationsRead = function (userId, idList, isRead) { @@ -666,13 +744,15 @@ return self.ajax({ type: "POST", url: url - }).always(done); + + }).then(done, done); } - var deferred = DeferredBuilder.Deferred(); - done(); - deferred.resolveWith(null, []); - return deferred.promise(); + return new Promise(function (resolve, reject) { + + done(); + resolve(); + }); }; function getRemoteImagePrefix(options) { @@ -715,11 +795,7 @@ var url = self.getUrl(urlPrefix + "/RemoteImages/Providers", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getAvailableRemoteImages = function (options) { @@ -732,11 +808,7 @@ var url = self.getUrl(urlPrefix + "/RemoteImages", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.downloadRemoteImage = function (options) { @@ -759,22 +831,14 @@ var url = self.getUrl("LiveTv/Info", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvGuideInfo = function (options) { var url = self.getUrl("LiveTv/GuideInfo", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvChannel = function (id, userId) { @@ -793,22 +857,14 @@ var url = self.getUrl("LiveTv/Channels/" + id, options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvChannels = function (options) { var url = self.getUrl("LiveTv/Channels", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvPrograms = function (options) { @@ -850,22 +906,14 @@ var url = self.getUrl("LiveTv/Recordings", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvRecordingGroups = function (options) { var url = self.getUrl("LiveTv/Recordings/Groups", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvRecordingGroup = function (id) { @@ -876,11 +924,7 @@ var url = self.getUrl("LiveTv/Recordings/Groups/" + id); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvRecording = function (id, userId) { @@ -899,11 +943,7 @@ var url = self.getUrl("LiveTv/Recordings/" + id, options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvProgram = function (id, userId) { @@ -922,11 +962,7 @@ var url = self.getUrl("LiveTv/Programs/" + id, options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.deleteLiveTvRecording = function (id) { @@ -961,11 +997,7 @@ var url = self.getUrl("LiveTv/Timers", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getLiveTvTimer = function (id) { @@ -976,11 +1008,7 @@ var url = self.getUrl("LiveTv/Timers/" + id); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getNewLiveTvTimerDefaults = function (options) { @@ -989,11 +1017,7 @@ var url = self.getUrl("LiveTv/Timers/Defaults", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.createLiveTvTimer = function (item) { @@ -1046,22 +1070,14 @@ var url = self.getUrl("LiveTv/SeriesTimers", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getFileOrganizationResults = function (options) { var url = self.getUrl("Library/FileOrganization", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.deleteOriginalFileFromOrganizationResult = function (id) { @@ -1112,11 +1128,7 @@ var url = self.getUrl("LiveTv/SeriesTimers/" + id); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.cancelLiveTvSeriesTimer = function (id) { @@ -1169,11 +1181,7 @@ var url = self.getUrl("Registrations/" + feature); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1183,11 +1191,7 @@ var url = self.getUrl("System/Info"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1197,34 +1201,21 @@ var url = self.getUrl("System/Info/Public"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - - }, false); + return self.getJSON(url, false); }; self.getInstantMixFromItem = function (itemId, options) { var url = self.getUrl("Items/" + itemId + "/InstantMix", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getEpisodes = function (itemId, options) { var url = self.getUrl("Shows/" + itemId + "/Episodes", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getDisplayPreferences = function (id, userId, app) { @@ -1234,11 +1225,7 @@ client: app }); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.updateDisplayPreferences = function (id, obj, userId, app) { @@ -1260,22 +1247,14 @@ var url = self.getUrl("Shows/" + itemId + "/Seasons", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getSimilarItems = function (itemId, options) { var url = self.getUrl("Items/" + itemId + "/Similar", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1285,11 +1264,7 @@ var url = self.getUrl("Localization/cultures"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1299,11 +1274,7 @@ var url = self.getUrl("Localization/countries"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1313,11 +1284,7 @@ var url = self.getUrl("Plugins/SecurityInfo"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1335,11 +1302,7 @@ var url = self.getUrl("Environment/DirectoryContents", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1356,11 +1319,7 @@ var url = self.getUrl("Environment/NetworkShares", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1390,11 +1349,7 @@ var url = self.getUrl("Environment/Drives"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1404,11 +1359,7 @@ var url = self.getUrl("Environment/NetworkDevices"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1516,11 +1467,7 @@ var url = self.getUrl("Packages/" + name, options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1530,11 +1477,7 @@ var url = self.getUrl("Packages/Updates", { PackageType: "System" }); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1544,11 +1487,7 @@ var url = self.getUrl("Packages/Updates", { PackageType: "UserInstalled" }); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1560,11 +1499,7 @@ url = self.getUrl(url); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1574,11 +1509,7 @@ var url = self.getUrl("Library/PhysicalPaths"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1588,11 +1519,7 @@ var url = self.getUrl("System/Configuration"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1602,11 +1529,7 @@ var url = self.getUrl("System/Configuration/devices"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1618,22 +1541,14 @@ DeviceId: self.deviceId() }); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getNamedConfiguration = function (name) { var url = self.getUrl("System/Configuration/" + name); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1645,11 +1560,7 @@ var url = self.getUrl("ScheduledTasks", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1680,22 +1591,14 @@ var url = self.getUrl("ScheduledTasks/" + id); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getNextUpEpisodes = function (options) { var url = self.getUrl("Shows/NextUp", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1727,11 +1630,7 @@ var url = self.getUrl("Plugins/" + id + "/Configuration"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -1748,11 +1647,7 @@ var url = self.getUrl("Packages", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2038,11 +1933,7 @@ var url = self.getUrl("Items/" + itemId + "/Images"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getCriticReviews = function (itemId, options) { @@ -2053,22 +1944,14 @@ var url = self.getUrl("Items/" + itemId + "/CriticReviews", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getSessions = function (options) { var url = self.getUrl("Sessions", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2095,44 +1978,43 @@ throw new Error("File must be an image."); } - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var reader = new FileReader(); + var reader = new FileReader(); - reader.onerror = function () { - deferred.reject(); - }; + reader.onerror = function () { + reject(); + }; - reader.onabort = function () { - deferred.reject(); - }; + reader.onabort = function () { + reject(); + }; - // Closure to capture the file information. - reader.onload = function (e) { + // Closure to capture the file information. + reader.onload = function (e) { - // Split by a comma to remove the url: prefix - var data = e.target.result.split(',')[1]; + // Split by a comma to remove the url: prefix + var data = e.target.result.split(',')[1]; - var url = self.getUrl("Users/" + userId + "/Images/" + imageType); + var url = self.getUrl("Users/" + userId + "/Images/" + imageType); - self.ajax({ - type: "POST", - url: url, - data: data, - contentType: "image/" + file.name.substring(file.name.lastIndexOf('.') + 1) - }).done(function (result) { + self.ajax({ + type: "POST", + url: url, + data: data, + contentType: "image/" + file.name.substring(file.name.lastIndexOf('.') + 1) + }).then(function (result) { - deferred.resolveWith(null, [result]); + resolve(result); - }).fail(function () { - deferred.reject(); - }); - }; + }, function () { + reject(); + }); + }; - // Read in the image file as a data URL. - reader.readAsDataURL(file); - - return deferred.promise(); + // Read in the image file as a data URL. + reader.readAsDataURL(file); + }); }; self.uploadItemImage = function (itemId, imageType, file) { @@ -2157,42 +2039,41 @@ url += "/" + imageType; - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var reader = new FileReader(); + var reader = new FileReader(); - reader.onerror = function () { - deferred.reject(); - }; + reader.onerror = function () { + reject(); + }; - reader.onabort = function () { - deferred.reject(); - }; + reader.onabort = function () { + reject(); + }; - // Closure to capture the file information. - reader.onload = function (e) { + // Closure to capture the file information. + reader.onload = function (e) { - // Split by a comma to remove the url: prefix - var data = e.target.result.split(',')[1]; + // Split by a comma to remove the url: prefix + var data = e.target.result.split(',')[1]; - self.ajax({ - type: "POST", - url: url, - data: data, - contentType: "image/" + file.name.substring(file.name.lastIndexOf('.') + 1) - }).done(function (result) { + self.ajax({ + type: "POST", + url: url, + data: data, + contentType: "image/" + file.name.substring(file.name.lastIndexOf('.') + 1) + }).then(function (result) { - deferred.resolveWith(null, [result]); + resolve(result); - }).fail(function () { - deferred.reject(); - }); - }; + }, function () { + reject(); + }); + }; - // Read in the image file as a data URL. - reader.readAsDataURL(file); - - return deferred.promise(); + // Read in the image file as a data URL. + reader.readAsDataURL(file); + }); }; /** @@ -2208,11 +2089,7 @@ var url = self.getUrl("Plugins", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2227,11 +2104,7 @@ var url = self.getUrl("Users/" + id); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2246,11 +2119,7 @@ var url = self.getUrl("Users/" + id + "/Offline"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2270,11 +2139,7 @@ var url = self.getUrl("Studios/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2294,11 +2159,7 @@ var url = self.getUrl("Genres/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getMusicGenre = function (name, userId) { @@ -2315,11 +2176,7 @@ var url = self.getUrl("MusicGenres/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getGameGenre = function (name, userId) { @@ -2336,11 +2193,7 @@ var url = self.getUrl("GameGenres/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2360,11 +2213,7 @@ var url = self.getUrl("Artists/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2384,11 +2233,7 @@ var url = self.getUrl("Persons/" + self.encodeName(name), options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getPublicUsers = function () { @@ -2410,11 +2255,7 @@ var url = self.getUrl("users", options || {}); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -2424,11 +2265,7 @@ var url = self.getUrl("Localization/ParentalRatings"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getDefaultImageQuality = function (imageType) { @@ -2600,43 +2437,39 @@ */ self.authenticateUserByName = function (name, password) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!name) { - deferred.reject(); - return deferred.promise(); - } + if (!name) { + reject(); + return; + } - var url = self.getUrl("Users/authenticatebyname"); + var url = self.getUrl("Users/authenticatebyname"); - require(["cryptojs-sha1"], function () { - var postData = { - password: CryptoJS.SHA1(password || "").toString(), - Username: name - }; + require(["cryptojs-sha1"], function () { + var postData = { + password: CryptoJS.SHA1(password || "").toString(), + Username: name + }; - self.ajax({ - type: "POST", - url: url, - data: JSON.stringify(postData), - dataType: "json", - contentType: "application/json" + self.ajax({ + type: "POST", + url: url, + data: JSON.stringify(postData), + dataType: "json", + contentType: "application/json" - }).done(function (result) { + }).then(function (result) { - if (self.onAuthenticated) { - self.onAuthenticated(self, result); - } + if (self.onAuthenticated) { + self.onAuthenticated(self, result); + } - deferred.resolveWith(null, [result]); + resolve(result); - }).fail(function () { - - deferred.reject(); + }, reject); }); }); - - return deferred.promise(); }; /** @@ -2647,35 +2480,27 @@ */ self.updateUserPassword = function (userId, currentPassword, newPassword) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!userId) { - deferred.reject(); - return deferred.promise(); - } + if (!userId) { + reject(); + return; + } - var url = self.getUrl("Users/" + userId + "/Password"); + var url = self.getUrl("Users/" + userId + "/Password"); - require(["cryptojs-sha1"], function () { + require(["cryptojs-sha1"], function () { - self.ajax({ - type: "POST", - url: url, - data: { - currentPassword: CryptoJS.SHA1(currentPassword).toString(), - newPassword: CryptoJS.SHA1(newPassword).toString() - } - }).done(function (result) { - - deferred.resolveWith(null, [result]); - - }).fail(function () { - - deferred.reject(); + self.ajax({ + type: "POST", + url: url, + data: { + currentPassword: CryptoJS.SHA1(currentPassword).toString(), + newPassword: CryptoJS.SHA1(newPassword).toString() + } + }).then(resolve, reject); }); }); - - return deferred.promise(); }; /** @@ -2685,34 +2510,26 @@ */ self.updateEasyPassword = function (userId, newPassword) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!userId) { - deferred.reject(); - return deferred.promise(); - } + if (!userId) { + reject(); + return; + } - var url = self.getUrl("Users/" + userId + "/EasyPassword"); + var url = self.getUrl("Users/" + userId + "/EasyPassword"); - require(["cryptojs-sha1"], function () { + require(["cryptojs-sha1"], function () { - self.ajax({ - type: "POST", - url: url, - data: { - newPassword: CryptoJS.SHA1(newPassword).toString() - } - }).done(function (result) { - - deferred.resolveWith(null, [result]); - - }).fail(function () { - - deferred.reject(); + self.ajax({ + type: "POST", + url: url, + data: { + newPassword: CryptoJS.SHA1(newPassword).toString() + } + }).then(resolve, reject); }); }); - - return deferred.promise(); }; /** @@ -2968,11 +2785,7 @@ var url = self.getUrl("Items/" + itemId + "/Ancestors", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3003,11 +2816,7 @@ url = self.getUrl("Items", options); } - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getChannels = function (query) { @@ -3021,11 +2830,7 @@ var url = self.getUrl("Users/" + (userId || self.getCurrentUserId()) + "/Views", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3042,11 +2847,7 @@ var url = self.getUrl("Artists", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3063,11 +2864,7 @@ var url = self.getUrl("Artists/AlbumArtists", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3084,11 +2881,7 @@ var url = self.getUrl("Genres", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getMusicGenres = function (userId, options) { @@ -3102,11 +2895,7 @@ var url = self.getUrl("MusicGenres", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getGameGenres = function (userId, options) { @@ -3120,11 +2909,7 @@ var url = self.getUrl("GameGenres", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3141,11 +2926,7 @@ var url = self.getUrl("Persons", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3162,11 +2943,7 @@ var url = self.getUrl("Studios", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3183,11 +2960,7 @@ var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/LocalTrailers"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getAdditionalVideoParts = function (userId, itemId) { @@ -3204,11 +2977,7 @@ var url = self.getUrl("Videos/" + itemId + "/AdditionalParts", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getThemeMedia = function (userId, itemId, inherit) { @@ -3227,22 +2996,14 @@ var url = self.getUrl("Items/" + itemId + "/ThemeMedia", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getSearchHints = function (options) { var url = self.getUrl("Search/Hints", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3259,11 +3020,7 @@ var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/SpecialFeatures"); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.getDateParamValue = function (date) { @@ -3385,11 +3142,7 @@ var url = self.getUrl("Items/Counts", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; /** @@ -3450,14 +3203,12 @@ if (self.isWebSocketOpen()) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var msg = JSON.stringify(options); - - self.sendWebSocketMessage("ReportPlaybackProgress", msg); - - deferred.resolveWith(null, []); - return deferred.promise(); + var msg = JSON.stringify(options); + self.sendWebSocketMessage("ReportPlaybackProgress", msg); + resolve(); + }); } var url = self.getUrl("Sessions/Playing/Progress"); @@ -3513,11 +3264,7 @@ TargetId: deviceId }); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; self.reportSyncJobItemTransferred = function (syncJobItemId) { @@ -3662,14 +3409,8 @@ var url = self.getUrl("Packages/" + packageId + "/Reviews", options); - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); + return self.getJSON(url); }; - - }; })(window, window.JSON, window.WebSocket, window.setTimeout, window.devicePixelRatio, window.FileReader); \ No newline at end of file diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index 3bd2ebc61a..555ebcb5df 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -52,13 +52,12 @@ return list1; } - function resolveWithFailure(deferred) { + function resolveFailure(resolve) { - deferred.resolveWith(null, [ - { + resolve({ State: MediaBrowser.ConnectionState.Unavailable, ConnectUser: self.connectUser() - }]); + }); } function updateServerInfo(server, systemInfo) { @@ -83,13 +82,123 @@ return baseUrl + "/emby/" + handler; } + function getFetchPromise(request) { + + var headers = request.headers || {}; + + if (request.dataType == 'json') { + headers.accept = 'application/json'; + } + + var fetchRequest = { + headers: headers, + method: request.type + }; + + var contentType = request.contentType; + + if (request.data) { + + if (typeof request.data === 'string') { + fetchRequest.body = request.data; + } else { + fetchRequest.body = paramsToString(request.data); + + contentType = contentType || 'application/x-www-form-urlencoded; charset=UTF-8'; + } + } + + if (contentType) { + + headers['Content-Type'] = contentType; + } + + if (!request.timeout) { + return fetch(request.url, fetchRequest); + } + + return fetchWithTimeout(request.url, fetchRequest, request.timeout); + } + + function fetchWithTimeout(url, options, timeoutMs) { + + logger.log('fetchWithTimeout: timeoutMs: ' + timeoutMs + ', url: ' + url); + + return new Promise(function (resolve, reject) { + + var timeout = setTimeout(reject, timeoutMs); + + fetch(url, options).then(function (response) { + clearTimeout(timeout); + + logger.log('fetchWithTimeout: succeeded connecting to url: ' + url); + + resolve(response); + }, function (error) { + + clearTimeout(timeout); + + logger.log('fetchWithTimeout: timed out connecting to url: ' + url); + + reject(); + }); + }); + } + + function paramsToString(params) { + + var values = []; + + for (var key in params) { + + var value = params[key]; + + if (value !== null && value !== undefined && value !== '') { + values.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); + } + } + return values.join('&'); + } + + function ajax(request) { + + if (!request) { + throw new Error("Request cannot be null"); + } + + request.headers = request.headers || {}; + + logger.log('ConnectionManager requesting url: ' + request.url); + + return getFetchPromise(request).then(function (response) { + + logger.log('ConnectionManager response status: ' + response.status + ', url: ' + request.url); + + if (response.status < 400) { + + if (request.dataType == 'json' || request.headers.accept == 'application/json') { + return response.json(); + } else { + return response; + } + } else { + return Promise.reject(response); + } + + }, function (err) { + + logger.log('ConnectionManager request failed to url: ' + request.url); + throw err; + }); + } + function tryConnect(url, timeout) { url = getEmbyServerUrl(url, "system/info/public"); logger.log('tryConnect url: ' + url); - return HttpClient.send({ + return ajax({ type: "GET", url: url, @@ -188,6 +297,9 @@ var existingServer = existingServers.length ? existingServers[0] : {}; existingServer.DateLastAccessed = new Date().getTime(); existingServer.LastConnectionMode = MediaBrowser.ConnectionMode.Manual; + if (existingServer.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + existingServer.DateLastLocalConnection = new Date().getTime(); + } existingServer.ManualAddress = apiClient.serverAddress(); apiClient.serverInfo(existingServer); @@ -207,7 +319,7 @@ return; } - apiClient.getPublicSystemInfo().done(function (systemInfo) { + apiClient.getPublicSystemInfo().then(function (systemInfo) { var credentials = credentialProvider.credentials(); existingServer.Id = systemInfo.Id; @@ -289,6 +401,10 @@ if (options.updateDateLastAccessed !== false) { server.DateLastAccessed = new Date().getTime(); + + if (server.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + server.DateLastLocalConnection = new Date().getTime(); + } } server.Id = result.ServerId; @@ -343,30 +459,29 @@ function ensureConnectUser(credentials) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (connectUser && connectUser.Id == credentials.ConnectUserId) { - deferred.resolveWith(null, [[]]); - } + if (connectUser && connectUser.Id == credentials.ConnectUserId) { + resolve(); + } - else if (credentials.ConnectUserId && credentials.ConnectAccessToken) { + else if (credentials.ConnectUserId && credentials.ConnectAccessToken) { - connectUser = null; + connectUser = null; - getConnectUser(credentials.ConnectUserId, credentials.ConnectAccessToken).done(function (user) { + getConnectUser(credentials.ConnectUserId, credentials.ConnectAccessToken).then(function (user) { - onConnectUserSignIn(user); - deferred.resolveWith(null, [[]]); + onConnectUserSignIn(user); + resolve(); - }).fail(function () { - deferred.resolveWith(null, [[]]); - }); + }, function () { + resolve(); + }); - } else { - deferred.resolveWith(null, [[]]); - } - - return deferred.promise(); + } else { + resolve(); + } + }); } function getConnectUser(userId, accessToken) { @@ -380,7 +495,7 @@ var url = "https://connect.emby.media/service/user?id=" + userId; - return HttpClient.send({ + return ajax({ type: "GET", url: url, dataType: "json", @@ -405,7 +520,7 @@ url = getEmbyServerUrl(url, "Connect/Exchange?format=json&ConnectUserId=" + credentials.ConnectUserId); - return HttpClient.send({ + return ajax({ type: "GET", url: url, dataType: "json", @@ -413,70 +528,71 @@ "X-MediaBrowser-Token": server.ExchangeToken } - }).done(function (auth) { + }).then(function (auth) { server.UserId = auth.LocalUserId; server.AccessToken = auth.AccessToken; + return auth; - }).fail(function () { + }, function () { server.UserId = null; server.AccessToken = null; + return Promise.reject(); + }); } function validateAuthentication(server, connectionMode) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var url = MediaBrowser.ServerInfo.getServerAddress(server, connectionMode); + var url = MediaBrowser.ServerInfo.getServerAddress(server, connectionMode); - HttpClient.send({ + ajax({ - type: "GET", - url: getEmbyServerUrl(url, "System/Info"), - dataType: "json", - headers: { - "X-MediaBrowser-Token": server.AccessToken - } + type: "GET", + url: getEmbyServerUrl(url, "System/Info"), + dataType: "json", + headers: { + "X-MediaBrowser-Token": server.AccessToken + } - }).done(function (systemInfo) { + }).then(function (systemInfo) { - updateServerInfo(server, systemInfo); + updateServerInfo(server, systemInfo); - if (server.UserId) { + if (server.UserId) { - HttpClient.send({ + ajax({ - type: "GET", - url: getEmbyServerUrl(url, "users/" + server.UserId), - dataType: "json", - headers: { - "X-MediaBrowser-Token": server.AccessToken - } + type: "GET", + url: getEmbyServerUrl(url, "users/" + server.UserId), + dataType: "json", + headers: { + "X-MediaBrowser-Token": server.AccessToken + } - }).done(function (user) { + }).then(function (user) { - onLocalUserSignIn(user); - deferred.resolveWith(null, [[]]); + onLocalUserSignIn(user); + resolve(); - }).fail(function () { + }, function () { - server.UserId = null; - server.AccessToken = null; - deferred.resolveWith(null, [[]]); - }); - } + server.UserId = null; + server.AccessToken = null; + resolve(); + }); + } - }).fail(function () { - - server.UserId = null; - server.AccessToken = null; - deferred.resolveWith(null, [[]]); + }, function () { + server.UserId = null; + server.AccessToken = null; + resolve(); + }); }); - - return deferred.promise(); } function getImageUrl(localUser) { @@ -509,44 +625,43 @@ self.user = function (apiClient) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var localUser; + var localUser; - function onLocalUserDone() { + function onLocalUserDone(e) { - var image = getImageUrl(localUser); + var image = getImageUrl(localUser); - deferred.resolveWith(null, [ - { - localUser: localUser, - name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null), - canManageServer: localUser && localUser.Policy.IsAdministrator, - imageUrl: image.url, - supportsImageParams: image.supportsParams - }]); - } - - function onEnsureConnectUserDone() { - - if (apiClient && apiClient.getCurrentUserId()) { - apiClient.getCurrentUser().done(function (u) { - localUser = u; - }).always(onLocalUserDone); - } else { - onLocalUserDone(); + resolve({ + localUser: localUser, + name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null), + imageUrl: image.url, + supportsImageParams: image.supportsParams + }); } - } - var credentials = credentialProvider.credentials(); + function onEnsureConnectUserDone() { - if (credentials.ConnectUserId && credentials.ConnectAccessToken && !(apiClient && apiClient.getCurrentUserId())) { - ensureConnectUser(credentials).always(onEnsureConnectUserDone); - } else { - onEnsureConnectUserDone(); - } + if (apiClient && apiClient.getCurrentUserId()) { + apiClient.getCurrentUser().then(function (u) { + localUser = u; + onLocalUserDone(); - return deferred.promise(); + }, onLocalUserDone); + } else { + onLocalUserDone(); + } + } + + var credentials = credentialProvider.credentials(); + + if (credentials.ConnectUserId && credentials.ConnectAccessToken && !(apiClient && apiClient.getCurrentUserId())) { + ensureConnectUser(credentials).then(onEnsureConnectUserDone, onEnsureConnectUserDone); + } else { + onEnsureConnectUserDone(); + } + }); }; self.isLoggedIntoConnect = function () { @@ -572,7 +687,7 @@ } } - return DeferredBuilder.when(promises).done(function () { + return Promise.all(promises).then(function () { var credentials = credentialProvider.credentials(); @@ -617,7 +732,10 @@ serverId: serverInfo.Id }; - return apiClient.logout().always(function () { + return apiClient.logout().then(function () { + + Events.trigger(self, 'localusersignedout', [logoutInfo]); + }, function () { Events.trigger(self, 'localusersignedout', [logoutInfo]); }); @@ -627,46 +745,45 @@ logger.log('Begin getConnectServers'); - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!credentials.ConnectAccessToken || !credentials.ConnectUserId) { - deferred.resolveWith(null, [[]]); - return deferred.promise(); - } - - var url = "https://connect.emby.media/service/servers?userId=" + credentials.ConnectUserId; - - HttpClient.send({ - type: "GET", - url: url, - dataType: "json", - headers: { - "X-Application": appName + "/" + appVersion, - "X-Connect-UserToken": credentials.ConnectAccessToken + if (!credentials.ConnectAccessToken || !credentials.ConnectUserId) { + resolve([]); + return; } - }).done(function (servers) { + var url = "https://connect.emby.media/service/servers?userId=" + credentials.ConnectUserId; + + ajax({ + type: "GET", + url: url, + dataType: "json", + headers: { + "X-Application": appName + "/" + appVersion, + "X-Connect-UserToken": credentials.ConnectAccessToken + } + + }).then(function (servers) { + + servers = servers.map(function (i) { + return { + ExchangeToken: i.AccessKey, + ConnectServerId: i.Id, + Id: i.SystemId, + Name: i.Name, + RemoteAddress: i.Url, + LocalAddress: i.LocalAddress, + UserLinkType: (i.UserType || '').toLowerCase() == "guest" ? "Guest" : "LinkedUser" + }; + }); + + resolve(servers); + + }, function () { + resolve([]); - servers = servers.map(function (i) { - return { - ExchangeToken: i.AccessKey, - ConnectServerId: i.Id, - Id: i.SystemId, - Name: i.Name, - RemoteAddress: i.Url, - LocalAddress: i.LocalAddress, - UserLinkType: (i.UserType || '').toLowerCase() == "guest" ? "Guest" : "LinkedUser" - }; }); - - deferred.resolveWith(null, [servers]); - - }).fail(function () { - deferred.resolveWith(null, [[]]); - }); - - return deferred.promise(); } self.getSavedServers = function () { @@ -689,34 +806,27 @@ // Clone the array var credentials = credentialProvider.credentials(); - var deferred = DeferredBuilder.Deferred(); + return Promise.all([getConnectServers(credentials), findServers()]).then(function (responses) { - var connectServersPromise = getConnectServers(credentials); - var findServersPromise = findServers(); + var connectServers = responses[0]; + var foundServers = responses[1]; - connectServersPromise.done(function (connectServers) { + var servers = credentials.Servers.slice(0); + mergeServers(servers, foundServers); + mergeServers(servers, connectServers); - findServersPromise.done(function (foundServers) { + servers = filterServers(servers, connectServers); - var servers = credentials.Servers.slice(0); - mergeServers(servers, foundServers); - mergeServers(servers, connectServers); - - servers = filterServers(servers, connectServers); - - servers.sort(function (a, b) { - return (b.DateLastAccessed || 0) - (a.DateLastAccessed || 0); - }); - - credentials.Servers = servers; - - credentialProvider.credentials(credentials); - - deferred.resolveWith(null, [servers]); + servers.sort(function (a, b) { + return (b.DateLastAccessed || 0) - (a.DateLastAccessed || 0); }); - }); - return deferred.promise(); + credentials.Servers = servers; + + credentialProvider.credentials(credentials); + + return servers; + }); }; function filterServers(servers, connectServers) { @@ -738,30 +848,30 @@ function findServers() { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - require(['serverdiscovery'], function () { - ServerDiscovery.findServers(1000).done(function (foundServers) { + require(['serverdiscovery'], function (serverDiscovery) { + serverDiscovery.findServers(1000).then(function (foundServers) { - var servers = foundServers.map(function (foundServer) { + var servers = foundServers.map(function (foundServer) { - var info = { - Id: foundServer.Id, - LocalAddress: foundServer.Address, - Name: foundServer.Name, - ManualAddress: convertEndpointAddressToManualAddress(foundServer), - DateLastLocalConnection: new Date().getTime() - }; + var info = { + Id: foundServer.Id, + LocalAddress: foundServer.Address, + Name: foundServer.Name, + ManualAddress: convertEndpointAddressToManualAddress(foundServer), + DateLastLocalConnection: new Date().getTime() + }; - info.LastConnectionMode = info.ManualAddress ? MediaBrowser.ConnectionMode.Manual : MediaBrowser.ConnectionMode.Local; + info.LastConnectionMode = info.ManualAddress ? MediaBrowser.ConnectionMode.Manual : MediaBrowser.ConnectionMode.Local; - return info; + return info; + }); + resolve(servers); }); - deferred.resolveWith(null, [servers]); - }); + }); }); - return deferred.promise(); } function convertEndpointAddressToManualAddress(info) { @@ -789,18 +899,16 @@ logger.log('Begin connect'); - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - self.getAvailableServers().done(function (servers) { + self.getAvailableServers().then(function (servers) { - self.connectToServers(servers).done(function (result) { - - deferred.resolveWith(null, [result]); + self.connectToServers(servers).then(function (result) { + resolve(result); + }); }); }); - - return deferred.promise(); }; self.getOffineResult = function () { @@ -812,92 +920,89 @@ logger.log('Begin connectToServers, with ' + servers.length + ' servers'); - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (servers.length == 1) { + if (servers.length == 1) { - self.connectToServer(servers[0]).done(function (result) { + self.connectToServer(servers[0]).then(function (result) { - if (result.State == MediaBrowser.ConnectionState.Unavailable) { + if (result.State == MediaBrowser.ConnectionState.Unavailable) { - result.State = result.ConnectUser == null ? - MediaBrowser.ConnectionState.ConnectSignIn : - MediaBrowser.ConnectionState.ServerSelection; - } - - logger.log('resolving connectToServers with result.State: ' + result.State); - deferred.resolveWith(null, [result]); - - }); - - } else { - - var firstServer = servers.length ? servers[0] : null; - // See if we have any saved credentials and can auto sign in - if (firstServer) { - self.connectToServer(firstServer).done(function (result) { - - if (result.State == MediaBrowser.ConnectionState.SignedIn) { - - deferred.resolveWith(null, [result]); - - } else { - deferred.resolveWith(null, [ - { - Servers: servers, - State: (!servers.length && !self.connectUser()) ? MediaBrowser.ConnectionState.ConnectSignIn : MediaBrowser.ConnectionState.ServerSelection, - ConnectUser: self.connectUser() - }]); + result.State = result.ConnectUser == null ? + MediaBrowser.ConnectionState.ConnectSignIn : + MediaBrowser.ConnectionState.ServerSelection; } + logger.log('resolving connectToServers with result.State: ' + result.State); + resolve(result); + }); + } else { - deferred.resolveWith(null, [ - { - Servers: servers, - State: (!servers.length && !self.connectUser()) ? MediaBrowser.ConnectionState.ConnectSignIn : MediaBrowser.ConnectionState.ServerSelection, - ConnectUser: self.connectUser() - }]); - } - } + var firstServer = servers.length ? servers[0] : null; + // See if we have any saved credentials and can auto sign in + if (firstServer) { + self.connectToServer(firstServer).then(function (result) { - return deferred.promise(); + if (result.State == MediaBrowser.ConnectionState.SignedIn) { + + resolve(result); + + } else { + resolve({ + Servers: servers, + State: (!servers.length && !self.connectUser()) ? MediaBrowser.ConnectionState.ConnectSignIn : MediaBrowser.ConnectionState.ServerSelection, + ConnectUser: self.connectUser() + }); + } + + }); + } else { + + resolve({ + Servers: servers, + State: (!servers.length && !self.connectUser()) ? MediaBrowser.ConnectionState.ConnectSignIn : MediaBrowser.ConnectionState.ServerSelection, + ConnectUser: self.connectUser() + }); + } + } + + }); }; function beginWakeServer(server) { - require(['wakeonlan'], function () { + require(['wakeonlan'], function (wakeonlan) { var infos = server.WakeOnLanInfos || []; for (var i = 0, length = infos.length; i < length; i++) { - WakeOnLan.send(infos[i]); + wakeonlan.send(infos[i]); } }); } self.connectToServer = function (server, options) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var tests = []; + var tests = []; - if (server.LastConnectionMode != null) { - //tests.push(server.LastConnectionMode); - } - if (tests.indexOf(MediaBrowser.ConnectionMode.Manual) == -1) { tests.push(MediaBrowser.ConnectionMode.Manual); } - if (tests.indexOf(MediaBrowser.ConnectionMode.Local) == -1) { tests.push(MediaBrowser.ConnectionMode.Local); } - if (tests.indexOf(MediaBrowser.ConnectionMode.Remote) == -1) { tests.push(MediaBrowser.ConnectionMode.Remote); } + if (server.LastConnectionMode != null) { + //tests.push(server.LastConnectionMode); + } + if (tests.indexOf(MediaBrowser.ConnectionMode.Manual) == -1) { tests.push(MediaBrowser.ConnectionMode.Manual); } + if (tests.indexOf(MediaBrowser.ConnectionMode.Local) == -1) { tests.push(MediaBrowser.ConnectionMode.Local); } + if (tests.indexOf(MediaBrowser.ConnectionMode.Remote) == -1) { tests.push(MediaBrowser.ConnectionMode.Remote); } - beginWakeServer(server); + beginWakeServer(server); - var wakeOnLanSendTime = new Date().getTime(); + var wakeOnLanSendTime = new Date().getTime(); - options = options || {}; - testNextConnectionMode(tests, 0, server, wakeOnLanSendTime, options, deferred); - - return deferred.promise(); + options = options || {}; + testNextConnectionMode(tests, 0, server, wakeOnLanSendTime, options, resolve); + }); }; function stringEqualsIgnoreCase(str1, str2) { @@ -905,12 +1010,12 @@ return (str1 || '').toLowerCase() == (str2 || '').toLowerCase(); } - function testNextConnectionMode(tests, index, server, wakeOnLanSendTime, options, deferred) { + function testNextConnectionMode(tests, index, server, wakeOnLanSendTime, options, resolve) { if (index >= tests.length) { logger.log('Tested all connection modes. Failing server connection.'); - resolveWithFailure(deferred); + resolveFailure(resolve); return; } @@ -923,7 +1028,7 @@ if (mode == MediaBrowser.ConnectionMode.Local) { enableRetry = true; - timeout = 10000; + timeout = 8000; } else if (mode == MediaBrowser.ConnectionMode.Manual) { @@ -935,18 +1040,18 @@ } if (skipTest || !address) { - testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, deferred); + testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, resolve); return; } logger.log('testing connection mode ' + mode + ' with server ' + server.Name); - tryConnect(address, timeout).done(function (result) { + tryConnect(address, timeout).then(function (result) { logger.log('calling onSuccessfulConnection with connection mode ' + mode + ' with server ' + server.Name); - onSuccessfulConnection(server, result, mode, options, deferred); + onSuccessfulConnection(server, result, mode, options, resolve); - }).fail(function () { + }, function () { logger.log('test failed for connection mode ' + mode + ' with server ' + server.Name); @@ -956,46 +1061,50 @@ // TODO: Implement delay and retry - testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, deferred); + testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, resolve); } else { - testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, deferred); + testNextConnectionMode(tests, index + 1, server, wakeOnLanSendTime, options, resolve); } }); } - function onSuccessfulConnection(server, systemInfo, connectionMode, options, deferred) { + function onSuccessfulConnection(server, systemInfo, connectionMode, options, resolve) { var credentials = credentialProvider.credentials(); if (credentials.ConnectAccessToken) { - ensureConnectUser(credentials).done(function () { + ensureConnectUser(credentials).then(function () { if (server.ExchangeToken) { - addAuthenticationInfoFromConnect(server, connectionMode, credentials).always(function () { + addAuthenticationInfoFromConnect(server, connectionMode, credentials).then(function () { - afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, deferred); + afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, resolve); + + }, function () { + + afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, resolve); }); } else { - afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, deferred); + afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, resolve); } }); } else { - afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, deferred); + afterConnectValidated(server, credentials, systemInfo, connectionMode, true, options, resolve); } } - function afterConnectValidated(server, credentials, systemInfo, connectionMode, verifyLocalAuthentication, options, deferred) { + function afterConnectValidated(server, credentials, systemInfo, connectionMode, verifyLocalAuthentication, options, resolve) { if (verifyLocalAuthentication && server.AccessToken) { - validateAuthentication(server, connectionMode).done(function () { + validateAuthentication(server, connectionMode).then(function () { - afterConnectValidated(server, credentials, systemInfo, connectionMode, false, options, deferred); + afterConnectValidated(server, credentials, systemInfo, connectionMode, false, options, resolve); }); return; @@ -1003,10 +1112,15 @@ updateServerInfo(server, systemInfo); + server.LastConnectionMode = connectionMode; + if (options.updateDateLastAccessed !== false) { server.DateLastAccessed = new Date().getTime(); + + if (server.LastConnectionMode == MediaBrowser.ConnectionMode.Local) { + server.DateLastLocalConnection = new Date().getTime(); + } } - server.LastConnectionMode = connectionMode; credentialProvider.addOrUpdateServer(credentials.Servers, server); credentialProvider.credentials(credentials); @@ -1026,7 +1140,7 @@ afterConnected(result.ApiClient, options); } - deferred.resolveWith(null, [result]); + resolve(result); Events.trigger(self, 'connected', [result]); } @@ -1049,154 +1163,147 @@ self.connectToAddress = function (address) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!address) { - deferred.reject(); - return deferred.promise(); - } + if (!address) { + reject(); + return; + } - address = normalizeAddress(address); + address = normalizeAddress(address); - function onFail() { - logger.log('connectToAddress ' + address + ' failed'); - resolveWithFailure(deferred); - } + function onFail() { + logger.log('connectToAddress ' + address + ' failed'); + resolveFailure(resolve); + } - tryConnect(address, defaultTimeout).done(function (publicInfo) { + tryConnect(address, defaultTimeout).then(function (publicInfo) { - logger.log('connectToAddress ' + address + ' succeeded'); + logger.log('connectToAddress ' + address + ' succeeded'); - var server = { - ManualAddress: address, - LastConnectionMode: MediaBrowser.ConnectionMode.Manual - }; - updateServerInfo(server, publicInfo); + var server = { + ManualAddress: address, + LastConnectionMode: MediaBrowser.ConnectionMode.Manual + }; + updateServerInfo(server, publicInfo); - self.connectToServer(server).done(function (result) { + self.connectToServer(server).then(resolve, onFail); - deferred.resolveWith(null, [result]); + }, onFail); - }).fail(onFail); - - }).fail(onFail); - - return deferred.promise(); + }); }; self.loginToConnect = function (username, password) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!username) { - deferred.reject(); - return deferred.promise(); - } - if (!password) { - deferred.reject(); - return deferred.promise(); - } + if (!username) { + reject(); + return; + } + if (!password) { + reject(); + return; + } - require(['connectservice'], function () { + require(['connectservice', 'cryptojs-md5'], function () { - var md5 = self.getConnectPasswordHash(password); + var md5 = self.getConnectPasswordHash(password); - HttpClient.send({ - type: "POST", - url: "https://connect.emby.media/service/user/authenticate", - data: { - nameOrEmail: username, - password: md5 - }, - dataType: "json", - contentType: 'application/x-www-form-urlencoded; charset=UTF-8', - headers: { - "X-Application": appName + "/" + appVersion - } + ajax({ + type: "POST", + url: "https://connect.emby.media/service/user/authenticate", + data: { + nameOrEmail: username, + password: md5 + }, + dataType: "json", + contentType: 'application/x-www-form-urlencoded; charset=UTF-8', + headers: { + "X-Application": appName + "/" + appVersion + } - }).done(function (result) { + }).then(function (result) { - var credentials = credentialProvider.credentials(); + var credentials = credentialProvider.credentials(); - credentials.ConnectAccessToken = result.AccessToken; - credentials.ConnectUserId = result.User.Id; + credentials.ConnectAccessToken = result.AccessToken; + credentials.ConnectUserId = result.User.Id; - credentialProvider.credentials(credentials); + credentialProvider.credentials(credentials); - onConnectUserSignIn(result.User); + onConnectUserSignIn(result.User); - deferred.resolveWith(null, [result]); + resolve(result); - }).fail(function () { - deferred.reject(); + }, reject); }); }); - - return deferred.promise(); }; self.signupForConnect = function (email, username, password, passwordConfirm) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - if (!email) { - deferred.rejectWith(null, [{ errorCode: 'invalidinput' }]); - return deferred.promise(); - } - if (!username) { - deferred.rejectWith(null, [{ errorCode: 'invalidinput' }]); - return deferred.promise(); - } - if (!password) { - deferred.rejectWith(null, [{ errorCode: 'invalidinput' }]); - return deferred.promise(); - } - if (!passwordConfirm) { - deferred.rejectWith(null, [{ errorCode: 'passwordmatch' }]); - return deferred.promise(); - } - if (password != passwordConfirm) { - deferred.rejectWith(null, [{ errorCode: 'passwordmatch' }]); - return deferred.promise(); - } + if (!email) { + reject({ errorCode: 'invalidinput' }); + return; + } + if (!username) { + reject({ errorCode: 'invalidinput' }); + return; + } + if (!password) { + reject({ errorCode: 'invalidinput' }); + return; + } + if (!passwordConfirm) { + reject({ errorCode: 'passwordmatch' }); + return; + } + if (password != passwordConfirm) { + reject({ errorCode: 'passwordmatch' }); + return; + } - require(['connectservice'], function () { + require(['connectservice', 'cryptojs-md5'], function () { - var md5 = self.getConnectPasswordHash(password); + var md5 = self.getConnectPasswordHash(password); - HttpClient.send({ - type: "POST", - url: "https://connect.emby.media/service/register", - data: { - email: email, - userName: username, - password: md5 - }, - dataType: "json", - contentType: 'application/x-www-form-urlencoded; charset=UTF-8', - headers: { - "X-Application": appName + "/" + appVersion, - "X-CONNECT-TOKEN": "CONNECT-REGISTER" - } + ajax({ + type: "POST", + url: "https://connect.emby.media/service/register", + data: { + email: email, + userName: username, + password: md5 + }, + dataType: "json", + contentType: 'application/x-www-form-urlencoded; charset=UTF-8', + headers: { + "X-Application": appName + "/" + appVersion, + "X-CONNECT-TOKEN": "CONNECT-REGISTER" + } - }).done(function (result) { + }).then(resolve, function (response) { - deferred.resolve(null, []); + try { + return response.json(); - }).fail(function (e) { + } catch (err) { + reject(); + } - try { + }).then(function (result) { - var result = JSON.parse(e.responseText); + if (result && result.Status) { + reject({ errorCode: result.Status }); + } - deferred.rejectWith(null, [{ errorCode: result.Status }]); - } catch (err) { - deferred.rejectWith(null, [{}]); - } + }, reject); }); }); - - return deferred.promise(); }; self.getConnectPasswordHash = function (password) { @@ -1236,7 +1343,7 @@ var url = "https://connect.emby.media/service/servers?userId=" + self.connectUserId() + "&status=Waiting"; - return HttpClient.send({ + return ajax({ type: "GET", url: url, dataType: "json", @@ -1259,45 +1366,44 @@ }); server = server.length ? server[0] : null; - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - function onDone() { - var credentials = credentialProvider.credentials(); + function onDone() { + var credentials = credentialProvider.credentials(); - credentials.Servers = credentials.Servers.filter(function (s) { - return s.Id != serverId; - }); + credentials.Servers = credentials.Servers.filter(function (s) { + return s.Id != serverId; + }); - credentialProvider.credentials(credentials); - deferred.resolve(); - } - - if (!server.ConnectServerId) { - onDone(); - return deferred.promise(); - } - - var connectToken = self.connectToken(); - var connectUserId = self.connectUserId(); - - if (!connectToken || !connectUserId) { - onDone(); - return deferred.promise(); - } - - var url = "https://connect.emby.media/service/serverAuthorizations?serverId=" + server.ConnectServerId + "&userId=" + connectUserId; - - HttpClient.send({ - type: "DELETE", - url: url, - headers: { - "X-Connect-UserToken": connectToken, - "X-Application": appName + "/" + appVersion + credentialProvider.credentials(credentials); + resolve(); } - }).always(onDone); + if (!server.ConnectServerId) { + onDone(); + return; + } - return deferred.promise(); + var connectToken = self.connectToken(); + var connectUserId = self.connectUserId(); + + if (!connectToken || !connectUserId) { + onDone(); + return; + } + + var url = "https://connect.emby.media/service/serverAuthorizations?serverId=" + server.ConnectServerId + "&userId=" + connectUserId; + + ajax({ + type: "DELETE", + url: url, + headers: { + "X-Connect-UserToken": connectToken, + "X-Application": appName + "/" + appVersion + } + + }).then(onDone, onDone); + }); }; self.rejectServer = function (serverId) { @@ -1316,14 +1422,12 @@ var url = "https://connect.emby.media/service/serverAuthorizations?serverId=" + serverId + "&userId=" + self.connectUserId(); - return HttpClient.send({ - type: "DELETE", - url: url, + return fetch(url, { + method: "DELETE", headers: { "X-Connect-UserToken": connectToken, "X-Application": appName + "/" + appVersion } - }); }; @@ -1343,7 +1447,7 @@ var url = "https://connect.emby.media/service/ServerAuthorizations/accept?serverId=" + serverId + "&userId=" + self.connectUserId(); - return HttpClient.send({ + return ajax({ type: "GET", url: url, headers: { @@ -1356,43 +1460,53 @@ self.getRegistrationInfo = function (feature, apiClient) { - var deferred = DeferredBuilder.Deferred(); - - self.getAvailableServers().done(function (servers) { + return self.getAvailableServers().then(function (servers) { var matchedServers = servers.filter(function (s) { return stringEqualsIgnoreCase(s.Id, apiClient.serverInfo().Id); }); if (!matchedServers.length) { - deferred.resolveWith(null, [{}]); - return; + return {}; } var match = matchedServers[0]; - // 31 days - if ((new Date().getTime() - (match.DateLastLocalConnection || 0)) > 2678400000) { - deferred.resolveWith(null, [{}]); - return; + if (!match.DateLastLocalConnection) { + + return ApiClient.getJSON(ApiClient.getUrl('System/Endpoint')).then(function (info) { + + if (info.IsInNetwork) { + + updateDateLastLocalConnection(match.Id); + return apiClient.getRegistrationInfo(feature); + } else { + return {}; + } + + }); + + } else { + return apiClient.getRegistrationInfo(feature); } - - apiClient.getRegistrationInfo(feature).done(function (result) { - - deferred.resolveWith(null, [result]); - }).fail(function () { - - deferred.reject(); - }); - - }).fail(function () { - - deferred.reject(); }); - - return deferred.promise(); }; + function updateDateLastLocalConnection(serverId) { + + var credentials = credentialProvider.credentials(); + var servers = credentials.Servers.filter(function (s) { + return s.Id == serverId; + }); + + var server = servers.length ? servers[0] : null; + + if (server) { + server.DateLastLocalConnection = new Date().getTime(); + credentialProvider.addOrUpdateServer(credentials.Servers, server); + credentialProvider.credentials(credentials); + } + } return self; }; diff --git a/dashboard-ui/apiclient/device.js b/dashboard-ui/apiclient/device.js deleted file mode 100644 index 16f33e7e7b..0000000000 --- a/dashboard-ui/apiclient/device.js +++ /dev/null @@ -1,35 +0,0 @@ -(function (globalScope) { - - if (!globalScope.MediaBrowser) { - globalScope.MediaBrowser = {}; - } - - globalScope.MediaBrowser.generateDeviceId = function (keyName, seed) { - - keyName = keyName || 'randomId'; - - var keys = []; - - keys.push(navigator.userAgent); - keys.push((navigator.cpuClass || "")); - - if (seed) { - keys.push(seed); - } - var randomId = ''; - - // Since the above is not guaranteed to be unique per device, add a little more - randomId = appStorage.getItem(keyName); - - if (!randomId) { - - randomId = new Date().getTime(); - - appStorage.setItem(keyName, randomId.toString()); - } - - keys.push(randomId); - return CryptoJS.SHA1(keys.join('|')).toString(); - }; - -})(window); \ No newline at end of file diff --git a/dashboard-ui/apiclient/events.js b/dashboard-ui/apiclient/events.js index a95ba74f3a..6d99c8d267 100644 --- a/dashboard-ui/apiclient/events.js +++ b/dashboard-ui/apiclient/events.js @@ -13,87 +13,8 @@ }, trigger: function (obj, eventName, params) { - Logger.log('event.trigger ' + eventName); jQuery(obj).trigger(eventName, params); } }; -})(window); - -//(function () { - -// function useJqueryEvents(elems, eventName) { - -// eventName = eventName.type || eventName; - -// if (typeof eventName == 'string') { -// if (eventName.indexOf('page') == 0) { -// return true; -// } -// if (eventName.indexOf('loadercreate') == 0) { -// return true; -// } -// } else { -// return true; -// } - -// //console.log('bean: ' + eventName); -// return false; -// } - -// $.fn.jTrigger = $.fn.trigger; -// $.fn.jOn = $.fn.on; -// $.fn.jOff = $.fn.off; - -// $.fn.off = function (eventName, selector, fn, ex1, ex2, ex3) { - -// if (arguments.length > 3 || useJqueryEvents(this, eventName)) { -// this.jOff(eventName, selector, fn, ex1, ex2, ex3); -// return this; -// } - -// for (var i = 0, length = this.length; i < length; i++) { -// bean.off(this[i], eventName, selector, fn); -// } -// return this; -// }; - -// $.fn.on = function (eventName, selector, fn, ex1, ex2, ex3) { - -// if (arguments.length > 3 || useJqueryEvents(this, eventName)) { -// this.jOn(eventName, selector, fn, ex1, ex2, ex3); -// return this; -// } - -// for (var i = 0, length = this.length; i < length; i++) { -// bean.on(this[i], eventName, selector, fn); -// } -// return this; -// }; - -// $.fn.trigger = function (eventName, params) { - -// if (useJqueryEvents(this, eventName)) { -// this.jTrigger(eventName, params); -// return this; -// } - -// var i, length; - -// // Need to push an extra param to make the argument order consistent with jquery -// var newParams = []; -// newParams.push({}); - -// if (params && params.length) { -// for (i = 0, length = params.length; i < length; i++) { -// newParams.push(params[i]); -// } -// } - -// for (i = 0, length = this.length; i < length; i++) { -// bean.fire(this[i], eventName, newParams); -// } -// return this; -// }; - -//})(); \ No newline at end of file +})(window); \ No newline at end of file diff --git a/dashboard-ui/apiclient/fileupload.js b/dashboard-ui/apiclient/fileupload.js index 36c2f995f6..5eec9412ba 100644 --- a/dashboard-ui/apiclient/fileupload.js +++ b/dashboard-ui/apiclient/fileupload.js @@ -6,11 +6,10 @@ self.upload = function (file, name, url) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - deferred.reject(); - - return deferred.promise(); + reject(); + }); }; } diff --git a/dashboard-ui/apiclient/localassetmanager.js b/dashboard-ui/apiclient/localassetmanager.js index bd5876ba72..b8154da09c 100644 --- a/dashboard-ui/apiclient/localassetmanager.js +++ b/dashboard-ui/apiclient/localassetmanager.js @@ -1,112 +1,110 @@ (function () { function getLocalMediaSource(serverId, itemId) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [null]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(null); + }); } function saveOfflineUser(user) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolve(); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function deleteOfflineUser(id) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolve(); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function getCameraPhotos() { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [[]]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve([]); + }); } function getOfflineActions(serverId) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [[]]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve([]); + }); } function deleteOfflineActions(actions) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [[]]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve([]); + }); } function getServerItemIds(serverId) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [[]]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve([]); + }); } function removeLocalItem(itemId, serverId) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, []); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function getLocalItem(itemId, serverId) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, []); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function addOrUpdateLocalItem(localItem) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, []); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function createLocalItem(libraryItem, serverInfo, originalFileName) { - var item = {}; - - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [item]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve({}); + }); } function downloadFile(url, localPath) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, []); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(); + }); } function downloadSubtitles(url, localItem, subtitleStreamh) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [""]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(""); + }); } function hasImage(serverId, itemId, imageTag) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [false]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(false); + }); } function downloadImage(url, serverId, itemId, imageTag) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [false]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(false); + }); } function fileExists(path) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [false]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(false); + }); } function translateFilePath(path) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolveWith(null, [path]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + resolve(path); + }); } window.LocalAssetManager = { diff --git a/dashboard-ui/apiclient/serverdiscovery.js b/dashboard-ui/apiclient/serverdiscovery.js index 590bf25e01..ec0b3746c6 100644 --- a/dashboard-ui/apiclient/serverdiscovery.js +++ b/dashboard-ui/apiclient/serverdiscovery.js @@ -1,19 +1,18 @@ -(function (globalScope) { +define([], function () { - globalScope.ServerDiscovery = { + return { findServers: function (timeoutMs) { - var deferred = DeferredBuilder.Deferred(); + return new Promise(function (resolve, reject) { - var servers = []; + var servers = []; - // Expected server properties - // Name, Id, Address, EndpointAddress (optional) - - deferred.resolveWith(null, [servers]); - return deferred.promise(); + // Expected server properties + // Name, Id, Address, EndpointAddress (optional) + resolve(servers); + }); } }; -})(window); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/apiclient/sha1.js b/dashboard-ui/apiclient/sha1.js deleted file mode 100644 index d025ff4209..0000000000 --- a/dashboard-ui/apiclient/sha1.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -CryptoJS v3.1.2 -code.google.com/p/crypto-js -(c) 2009-2013 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -var CryptoJS = CryptoJS || function (e, m) { - var p = {}, j = p.lib = {}, l = function () { }, f = j.Base = { extend: function (a) { l.prototype = this; var c = new l; a && c.mixIn(a); c.hasOwnProperty("init") || (c.init = function () { c.$super.init.apply(this, arguments) }); c.init.prototype = c; c.$super = this; return c }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var c in a) a.hasOwnProperty(c) && (this[c] = a[c]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, - n = j.WordArray = f.extend({ - init: function (a, c) { a = this.words = a || []; this.sigBytes = c != m ? c : 4 * a.length }, toString: function (a) { return (a || h).stringify(this) }, concat: function (a) { var c = this.words, q = a.words, d = this.sigBytes; a = a.sigBytes; this.clamp(); if (d % 4) for (var b = 0; b < a; b++) c[d + b >>> 2] |= (q[b >>> 2] >>> 24 - 8 * (b % 4) & 255) << 24 - 8 * ((d + b) % 4); else if (65535 < q.length) for (b = 0; b < a; b += 4) c[d + b >>> 2] = q[b >>> 2]; else c.push.apply(c, q); this.sigBytes += a; return this }, clamp: function () { - var a = this.words, c = this.sigBytes; a[c >>> 2] &= 4294967295 << - 32 - 8 * (c % 4); a.length = e.ceil(c / 4) - }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var c = [], b = 0; b < a; b += 4) c.push(4294967296 * e.random() | 0); return new n.init(c, a) } - }), b = p.enc = {}, h = b.Hex = { - stringify: function (a) { var c = a.words; a = a.sigBytes; for (var b = [], d = 0; d < a; d++) { var f = c[d >>> 2] >>> 24 - 8 * (d % 4) & 255; b.push((f >>> 4).toString(16)); b.push((f & 15).toString(16)) } return b.join("") }, parse: function (a) { - for (var c = a.length, b = [], d = 0; d < c; d += 2) b[d >>> 3] |= parseInt(a.substr(d, - 2), 16) << 24 - 4 * (d % 8); return new n.init(b, c / 2) - } - }, g = b.Latin1 = { stringify: function (a) { var c = a.words; a = a.sigBytes; for (var b = [], d = 0; d < a; d++) b.push(String.fromCharCode(c[d >>> 2] >>> 24 - 8 * (d % 4) & 255)); return b.join("") }, parse: function (a) { for (var c = a.length, b = [], d = 0; d < c; d++) b[d >>> 2] |= (a.charCodeAt(d) & 255) << 24 - 8 * (d % 4); return new n.init(b, c) } }, r = b.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(g.stringify(a))) } catch (c) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return g.parse(unescape(encodeURIComponent(a))) } }, - k = j.BufferedBlockAlgorithm = f.extend({ - reset: function () { this._data = new n.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = r.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var c = this._data, b = c.words, d = c.sigBytes, f = this.blockSize, h = d / (4 * f), h = a ? e.ceil(h) : e.max((h | 0) - this._minBufferSize, 0); a = h * f; d = e.min(4 * a, d); if (a) { for (var g = 0; g < a; g += f) this._doProcessBlock(b, g); g = b.splice(0, a); c.sigBytes -= d } return new n.init(g, d) }, clone: function () { - var a = f.clone.call(this); - a._data = this._data.clone(); return a - }, _minBufferSize: 0 - }); j.Hasher = k.extend({ - cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { k.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (c, b) { return (new a.init(b)).finalize(c) } }, _createHmacHelper: function (a) { - return function (b, f) { - return (new s.HMAC.init(a, - f)).finalize(b) - } - } - }); var s = p.algo = {}; return p -}(Math); -(function () { - var e = CryptoJS, m = e.lib, p = m.WordArray, j = m.Hasher, l = [], m = e.algo.SHA1 = j.extend({ - _doReset: function () { this._hash = new p.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (f, n) { - for (var b = this._hash.words, h = b[0], g = b[1], e = b[2], k = b[3], j = b[4], a = 0; 80 > a; a++) { - if (16 > a) l[a] = f[n + a] | 0; else { var c = l[a - 3] ^ l[a - 8] ^ l[a - 14] ^ l[a - 16]; l[a] = c << 1 | c >>> 31 } c = (h << 5 | h >>> 27) + j + l[a]; c = 20 > a ? c + ((g & e | ~g & k) + 1518500249) : 40 > a ? c + ((g ^ e ^ k) + 1859775393) : 60 > a ? c + ((g & e | g & k | e & k) - 1894007588) : c + ((g ^ e ^ - k) - 899497514); j = k; k = e; e = g << 30 | g >>> 2; g = h; h = c - } b[0] = b[0] + h | 0; b[1] = b[1] + g | 0; b[2] = b[2] + e | 0; b[3] = b[3] + k | 0; b[4] = b[4] + j | 0 - }, _doFinalize: function () { var f = this._data, e = f.words, b = 8 * this._nDataBytes, h = 8 * f.sigBytes; e[h >>> 5] |= 128 << 24 - h % 32; e[(h + 64 >>> 9 << 4) + 14] = Math.floor(b / 4294967296); e[(h + 64 >>> 9 << 4) + 15] = b; f.sigBytes = 4 * e.length; this._process(); return this._hash }, clone: function () { var e = j.clone.call(this); e._hash = this._hash.clone(); return e } - }); e.SHA1 = j._createHelper(m); e.HmacSHA1 = j._createHmacHelper(m) -})(); \ No newline at end of file diff --git a/dashboard-ui/apiclient/store.js b/dashboard-ui/apiclient/store.js index bbe40ac6da..6599f47c1b 100644 --- a/dashboard-ui/apiclient/store.js +++ b/dashboard-ui/apiclient/store.js @@ -10,6 +10,7 @@ if (defaultObject) { try { defaultObject.setItem('_test', '0'); + defaultObject.removeItem('_test'); isDefaultAvailable = true; } catch (e) { diff --git a/dashboard-ui/apiclient/sync/contentuploader.js b/dashboard-ui/apiclient/sync/contentuploader.js index c07aff9f4f..f546e924da 100644 --- a/dashboard-ui/apiclient/sync/contentuploader.js +++ b/dashboard-ui/apiclient/sync/contentuploader.js @@ -8,7 +8,7 @@ var deferred = DeferredBuilder.Deferred(); - LocalAssetManager.getCameraPhotos().done(function (photos) { + LocalAssetManager.getCameraPhotos().then(function (photos) { if (!photos.length) { deferred.resolve(); @@ -17,7 +17,7 @@ var apiClient = connectionManager.getApiClient(server.Id); - apiClient.getContentUploadHistory().done(function (uploadHistory) { + apiClient.getContentUploadHistory().then(function (uploadHistory) { photos = getFilesToUpload(photos, uploadHistory); @@ -25,11 +25,11 @@ uploadNext(photos, 0, server, apiClient, deferred); - }).fail(function () { + }, function () { deferred.reject(); }); - }).fail(function () { + }, function () { deferred.reject(); }); @@ -67,10 +67,10 @@ return; } - uploadFile(files[index], apiClient).done(function () { + uploadFile(files[index], apiClient).then(function () { uploadNext(files, index + 1, server, apiClient, deferred); - }).fail(function () { + }, function () { uploadNext(files, index + 1, server, apiClient, deferred); }); } @@ -93,12 +93,12 @@ Logger.log('Uploading file to ' + url); - new MediaBrowser.FileUpload().upload(file, name, url).done(function () { + new MediaBrowser.FileUpload().upload(file, name, url).then(function () { Logger.log('File upload succeeded'); deferred.resolve(); - }).fail(function () { + }, function () { Logger.log('File upload failed'); deferred.reject(); diff --git a/dashboard-ui/apiclient/sync/mediasync.js b/dashboard-ui/apiclient/sync/mediasync.js index ddde0970b5..10ba774649 100644 --- a/dashboard-ui/apiclient/sync/mediasync.js +++ b/dashboard-ui/apiclient/sync/mediasync.js @@ -8,26 +8,26 @@ var deferred = DeferredBuilder.Deferred(); - reportOfflineActions(apiClient, serverInfo).done(function () { + reportOfflineActions(apiClient, serverInfo).then(function () { // Do the first data sync - syncData(apiClient, serverInfo, false).done(function () { + syncData(apiClient, serverInfo, false).then(function () { // Download new content - getNewMedia(apiClient, serverInfo, options).done(function () { + getNewMedia(apiClient, serverInfo, options).then(function () { // Do the second data sync - syncData(apiClient, serverInfo, false).done(function () { + syncData(apiClient, serverInfo, false).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); return deferred.promise(); }; @@ -40,24 +40,24 @@ require(['localassetmanager'], function () { - LocalAssetManager.getOfflineActions(serverInfo.Id).done(function (actions) { + LocalAssetManager.getOfflineActions(serverInfo.Id).then(function (actions) { if (!actions.length) { deferred.resolve(); return; } - apiClient.reportOfflineActions(actions).done(function () { + apiClient.reportOfflineActions(actions).then(function () { - LocalAssetManager.deleteOfflineActions(actions).done(function () { + LocalAssetManager.deleteOfflineActions(actions).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); @@ -71,7 +71,7 @@ require(['localassetmanager'], function () { - LocalAssetManager.getServerItemIds(serverInfo.Id).done(function (localIds) { + LocalAssetManager.getServerItemIds(serverInfo.Id).then(function (localIds) { var request = { TargetId: apiClient.deviceId(), @@ -79,13 +79,13 @@ OfflineUserIds: (serverInfo.Users || []).map(function (u) { return u.Id; }) }; - apiClient.syncData(request).done(function (result) { + apiClient.syncData(request).then(function (result) { afterSyncData(apiClient, serverInfo, syncUserItemAccess, result, deferred); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); @@ -95,20 +95,20 @@ Logger.log('Begin afterSyncData'); - removeLocalItems(syncDataResult, serverInfo.Id).done(function (result) { + removeLocalItems(syncDataResult, serverInfo.Id).then(function (result) { if (enableSyncUserItemAccess) { - syncUserItemAccess(syncDataResult, serverInfo.Id).done(function () { + syncUserItemAccess(syncDataResult, serverInfo.Id).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); } else { deferred.resolve(); } - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); deferred.resolve(); } @@ -134,10 +134,10 @@ return; } - removeLocalItem(itemIdsToRemove[index], serverId).done(function () { + removeLocalItem(itemIdsToRemove[index], serverId).then(function () { removeNextLocalItem(itemIdsToRemove, index + 1, serverId, deferred); - }).fail(function () { + }, function () { removeNextLocalItem(itemIdsToRemove, index + 1, serverId, deferred); }); } @@ -150,11 +150,11 @@ require(['localassetmanager'], function () { - LocalAssetManager.removeLocalItem(itemId, serverId).done(function (localIds) { + LocalAssetManager.removeLocalItem(itemId, serverId).then(function (localIds) { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); @@ -166,11 +166,11 @@ var deferred = DeferredBuilder.Deferred(); - apiClient.getReadySyncItems(apiClient.deviceId()).done(function (jobItems) { + apiClient.getReadySyncItems(apiClient.deviceId()).then(function (jobItems) { getNextNewItem(jobItems, 0, apiClient, serverInfo, options, deferred); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); return deferred.promise(); } @@ -194,7 +194,7 @@ } }; - getNewItem(jobItems[index], apiClient, serverInfo, options).done(goNext).fail(goNext); + getNewItem(jobItems[index], apiClient, serverInfo, options).then(goNext, goNext); } function getNewItem(jobItem, apiClient, serverInfo, options) { @@ -206,32 +206,32 @@ require(['localassetmanager'], function () { var libraryItem = jobItem.Item; - LocalAssetManager.createLocalItem(libraryItem, serverInfo, jobItem.OriginalFileName).done(function (localItem) { + LocalAssetManager.createLocalItem(libraryItem, serverInfo, jobItem.OriginalFileName).then(function (localItem) { - downloadMedia(apiClient, jobItem, localItem, options).done(function (isQueued) { + downloadMedia(apiClient, jobItem, localItem, options).then(function (isQueued) { if (isQueued) { deferred.resolve(); return; } - getImages(apiClient, jobItem, localItem).done(function () { + getImages(apiClient, jobItem, localItem).then(function () { - getSubtitles(apiClient, jobItem, localItem).done(function () { + getSubtitles(apiClient, jobItem, localItem).then(function () { - apiClient.reportSyncJobItemTransferred(jobItem.SyncJobItemId).done(function () { + apiClient.reportSyncJobItemTransferred(jobItem.SyncJobItemId).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); @@ -254,19 +254,19 @@ options = options || {}; - LocalAssetManager.downloadFile(url, localPath, options.enableBackgroundTransfer, options.enableNewDownloads).done(function (path, isQueued) { + LocalAssetManager.downloadFile(url, localPath, options.enableBackgroundTransfer, options.enableNewDownloads).then(function (path, isQueued) { if (isQueued) { deferred.resolveWith(null, [true]); return; } - LocalAssetManager.addOrUpdateLocalItem(localItem).done(function () { + LocalAssetManager.addOrUpdateLocalItem(localItem).then(function () { deferred.resolveWith(null, [false]); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); @@ -334,7 +334,7 @@ return; } - downloadImage(apiClient, serverId, itemId, imageTag, imageType).done(function () { + downloadImage(apiClient, serverId, itemId, imageTag, imageType).then(function () { // For the sake of simplicity, limit to one image deferred.resolve(); @@ -342,7 +342,7 @@ getNextImage(index + 1, apiClient, localItem, deferred); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); } function downloadImage(apiClient, serverId, itemId, imageTag, imageType) { @@ -352,7 +352,7 @@ require(['localassetmanager'], function () { - LocalAssetManager.hasImage(serverId, itemId, imageTag).done(function (hasImage) { + LocalAssetManager.hasImage(serverId, itemId, imageTag).then(function (hasImage) { if (hasImage) { deferred.resolve(); @@ -365,11 +365,11 @@ api_key: apiClient.accessToken() }); - LocalAssetManager.downloadImage(imageUrl, serverId, itemId, imageTag).done(function () { + LocalAssetManager.downloadImage(imageUrl, serverId, itemId, imageTag).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); }); @@ -412,11 +412,11 @@ return; } - getItemSubtitle(file, apiClient, jobItem, localItem, mediaSource).done(function () { + getItemSubtitle(file, apiClient, jobItem, localItem, mediaSource).then(function () { getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource, deferred); - }).fail(function () { + }, function () { getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource, deferred); }); } @@ -445,14 +445,14 @@ require(['localassetmanager'], function () { - LocalAssetManager.downloadSubtitles(url, localItem, subtitleStream).done(function (subtitlePath) { + LocalAssetManager.downloadSubtitles(url, localItem, subtitleStream).then(function (subtitlePath) { subtitleStream.Path = subtitlePath; - LocalAssetManager.addOrUpdateLocalItem(localItem).done(function () { + LocalAssetManager.addOrUpdateLocalItem(localItem).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); @@ -483,10 +483,10 @@ return; } - syncUserAccessForItem(itemIds[index], syncDataResult).done(function () { + syncUserAccessForItem(itemIds[index], syncDataResult).then(function () { syncNextUserAccessForItem(itemIds, index + 1, syncDataResult, serverId, deferred); - }).fail(function () { + }, function () { syncNextUserAccessForItem(itemIds, index + 1, syncDataResult, serverId, deferred); }); } @@ -498,7 +498,7 @@ require(['localassetmanager'], function () { - LocalAssetManager.getUserIdsWithAccess(itemId, serverId).done(function (savedUserIdsWithAccess) { + LocalAssetManager.getUserIdsWithAccess(itemId, serverId).then(function (savedUserIdsWithAccess) { var userIdsWithAccess = syncDataResult.ItemUserAccess[itemId]; @@ -508,12 +508,12 @@ } else { - LocalAssetManager.saveUserIdsWithAccess(itemId, serverId, userIdsWithAccess).done(function () { + LocalAssetManager.saveUserIdsWithAccess(itemId, serverId, userIdsWithAccess).then(function () { deferred.resolve(); - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); } - }).fail(getOnFail(deferred)); + }, getOnFail(deferred)); }); return deferred.promise(); diff --git a/dashboard-ui/apiclient/sync/multiserversync.js b/dashboard-ui/apiclient/sync/multiserversync.js index 8171b3e482..4521ce898e 100644 --- a/dashboard-ui/apiclient/sync/multiserversync.js +++ b/dashboard-ui/apiclient/sync/multiserversync.js @@ -31,11 +31,11 @@ require(['serversync'], function () { - new MediaBrowser.ServerSync(connectionManager).sync(server, options).done(function () { + new MediaBrowser.ServerSync(connectionManager).sync(server, options).then(function () { syncNext(servers, index + 1, options, deferred); - }).fail(function () { + }, function () { syncNext(servers, index + 1, options, deferred); }); diff --git a/dashboard-ui/apiclient/sync/offlineusersync.js b/dashboard-ui/apiclient/sync/offlineusersync.js index 63ee8e135e..2ae3b810b0 100644 --- a/dashboard-ui/apiclient/sync/offlineusersync.js +++ b/dashboard-ui/apiclient/sync/offlineusersync.js @@ -24,10 +24,10 @@ return; } - syncUser(users[index], apiClient).done(function () { + syncUser(users[index], apiClient).then(function () { syncNext(users, index + 1, deferred, apiClient, server); - }).fail(function () { + }, function () { syncNext(users, index + 1, deferred, apiClient, server); }); } @@ -36,26 +36,26 @@ var deferred = DeferredBuilder.Deferred(); - apiClient.getOfflineUser(user.Id).done(function (result) { + apiClient.getOfflineUser(user.Id).then(function (result) { require(['localassetmanager'], function () { - LocalAssetManager.saveOfflineUser(result).done(function () { + LocalAssetManager.saveOfflineUser(result).then(function () { deferred.resolve(); - }).fail(function () { + }, function () { deferred.resolve(); }); }); - }).fail(function () { + }, function () { // TODO: We should only delete if there's a 401 response require(['localassetmanager'], function () { - LocalAssetManager.deleteOfflineUser(user.Id).done(function () { + LocalAssetManager.deleteOfflineUser(user.Id).then(function () { deferred.resolve(); - }).fail(function () { + }, function () { deferred.resolve(); }); }); diff --git a/dashboard-ui/apiclient/sync/serversync.js b/dashboard-ui/apiclient/sync/serversync.js index 4fbb3f4eb5..ae4234a2f1 100644 --- a/dashboard-ui/apiclient/sync/serversync.js +++ b/dashboard-ui/apiclient/sync/serversync.js @@ -21,7 +21,7 @@ reportCapabilities: false }; - connectionManager.connectToServer(server, connectionOptions).done(function (result) { + connectionManager.connectToServer(server, connectionOptions).then(function (result) { if (result.State == MediaBrowser.ConnectionState.SignedIn) { performSync(server, options, deferred); @@ -30,7 +30,7 @@ deferred.reject(); } - }).fail(function () { + }, function () { Logger.log('Unable to connect to server id: ' + server.Id); deferred.reject(); @@ -62,13 +62,13 @@ require(['contentuploader'], function () { - new MediaBrowser.ContentUploader(connectionManager).uploadImages(server).done(function () { + new MediaBrowser.ContentUploader(connectionManager).uploadImages(server).then(function () { Logger.log("ContentUploaded succeeded to server: " + server.Id); nextAction(); - }).fail(function () { + }, function () { Logger.log("ContentUploaded failed to server: " + server.Id); @@ -88,13 +88,13 @@ var apiClient = connectionManager.getApiClient(server.Id); - new MediaBrowser.OfflineUserSync().sync(apiClient, server).done(function () { + new MediaBrowser.OfflineUserSync().sync(apiClient, server).then(function () { Logger.log("OfflineUserSync succeeded to server: " + server.Id); syncMedia(server, options, deferred); - }).fail(function () { + }, function () { Logger.log("OfflineUserSync failed to server: " + server.Id); @@ -109,13 +109,13 @@ var apiClient = connectionManager.getApiClient(server.Id); - new MediaBrowser.MediaSync().sync(apiClient, server, options).done(function () { + new MediaBrowser.MediaSync().sync(apiClient, server, options).then(function () { Logger.log("MediaSync succeeded to server: " + server.Id); deferred.resolve(); - }).fail(function () { + }, function () { Logger.log("MediaSync failed to server: " + server.Id); diff --git a/dashboard-ui/apiclient/wakeonlan.js b/dashboard-ui/apiclient/wakeonlan.js index 73aa0393e8..5f6dc19ae7 100644 --- a/dashboard-ui/apiclient/wakeonlan.js +++ b/dashboard-ui/apiclient/wakeonlan.js @@ -1,14 +1,15 @@ -(function (globalScope) { +define([], function () { function send(info) { - var deferred = DeferredBuilder.Deferred(); - deferred.resolve(); - return deferred.promise(); + return new Promise(function (resolve, reject) { + + resolve(); + }); } - globalScope.WakeOnLan = { + return { send: send }; -})(window); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/autoorganizelog.html b/dashboard-ui/autoorganizelog.html index 733d98aa9d..c7d133c1af 100644 --- a/dashboard-ui/autoorganizelog.html +++ b/dashboard-ui/autoorganizelog.html @@ -4,7 +4,7 @@ ${TitleAutoOrganize} -
+
diff --git a/dashboard-ui/autoorganizetv.html b/dashboard-ui/autoorganizetv.html index d1541aad04..64d776cf27 100644 --- a/dashboard-ui/autoorganizetv.html +++ b/dashboard-ui/autoorganizetv.html @@ -4,7 +4,7 @@ ${TitleAutoOrganize} -
+
@@ -29,7 +29,7 @@
${LabelWatchFolderHelp}
-
+
  • diff --git a/dashboard-ui/bower_components/cryptojslib/.bower.json b/dashboard-ui/bower_components/cryptojslib/.bower.json new file mode 100644 index 0000000000..a2b26693e7 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/.bower.json @@ -0,0 +1,22 @@ +{ + "name": "cryptojslib", + "version": "3.1.2", + "main": "**/*.js", + "homepage": "https://github.com/sytelus/cryptojs", + "repository": { + "type": "git", + "url": "git://github.com/sytelus/cryptojs.git" + }, + "dependencies": {}, + "devDependencies": {}, + "_release": "3.1.2", + "_resolution": { + "type": "version", + "tag": "v3.1.2", + "commit": "79faa50ca65a0bc302ff93518215c015b4d3004c" + }, + "_source": "git://github.com/sytelus/CryptoJS.git", + "_target": "~3.1.2", + "_originalSource": "cryptojslib", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/cryptojslib/.gitattributes b/dashboard-ui/bower_components/cryptojslib/.gitattributes new file mode 100644 index 0000000000..412eeda78d --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/dashboard-ui/bower_components/cryptojslib/.gitignore b/dashboard-ui/bower_components/cryptojslib/.gitignore new file mode 100644 index 0000000000..b9d6bd92f5 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/dashboard-ui/bower_components/cryptojslib/bower.json b/dashboard-ui/bower_components/cryptojslib/bower.json new file mode 100644 index 0000000000..860e1f709e --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/bower.json @@ -0,0 +1,14 @@ +{ + "name": "cryptojslib", + "version": "3.1.2", + "main": "**/*.js", + "homepage": "https://github.com/sytelus/cryptojs", + "repository": { + "type": "git", + "url": "git://github.com/sytelus/cryptojs.git" + }, + "dependencies": { + }, + "devDependencies": { + } +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/cryptojslib/components/aes-min.js b/dashboard-ui/bower_components/cryptojslib/components/aes-min.js new file mode 100644 index 0000000000..8b34064d36 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/aes-min.js @@ -0,0 +1,10 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8, +16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255]):(d=d<<8|d>>>24,d=j[d>>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255],d^=F[h/a|0]<<24);b[h]=b[h-a]^d}e=this._invKeySchedule=[];for(a=0;aa||4>=h?d:s[j[d>>>24]]^u[j[d>>>16&255]]^v[j[d>>> +8&255]]^w[j[d&255]]},encryptBlock:function(c,e){this._doCryptBlock(c,e,this._keySchedule,z,A,B,C,j)},decryptBlock:function(c,e){var a=c[e+1];c[e+1]=c[e+3];c[e+3]=a;this._doCryptBlock(c,e,this._invKeySchedule,s,u,v,w,y);a=c[e+1];c[e+1]=c[e+3];c[e+3]=a},_doCryptBlock:function(c,e,a,b,h,d,j,m){for(var n=this._nRounds,f=c[e]^a[0],g=c[e+1]^a[1],k=c[e+2]^a[2],p=c[e+3]^a[3],l=4,t=1;t>>24]^h[g>>>16&255]^d[k>>>8&255]^j[p&255]^a[l++],r=b[g>>>24]^h[k>>>16&255]^d[p>>>8&255]^j[f&255]^a[l++],s= +b[k>>>24]^h[p>>>16&255]^d[f>>>8&255]^j[g&255]^a[l++],p=b[p>>>24]^h[f>>>16&255]^d[g>>>8&255]^j[k&255]^a[l++],f=q,g=r,k=s;q=(m[f>>>24]<<24|m[g>>>16&255]<<16|m[k>>>8&255]<<8|m[p&255])^a[l++];r=(m[g>>>24]<<24|m[k>>>16&255]<<16|m[p>>>8&255]<<8|m[f&255])^a[l++];s=(m[k>>>24]<<24|m[p>>>16&255]<<16|m[f>>>8&255]<<8|m[g&255])^a[l++];p=(m[p>>>24]<<24|m[f>>>16&255]<<16|m[g>>>8&255]<<8|m[k&255])^a[l++];c[e]=q;c[e+1]=r;c[e+2]=s;c[e+3]=p},keySize:8});q.AES=x._createHelper(r)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/aes.js b/dashboard-ui/bower_components/cryptojslib/components/aes.js new file mode 100644 index 0000000000..7ba1054ebc --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/aes.js @@ -0,0 +1,213 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6 + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/cipher-core-min.js b/dashboard-ui/bower_components/cryptojslib/components/cipher-core-min.js new file mode 100644 index 0000000000..917939c8b9 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/cipher-core-min.js @@ -0,0 +1,14 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.lib.Cipher||function(u){var g=CryptoJS,f=g.lib,k=f.Base,l=f.WordArray,q=f.BufferedBlockAlgorithm,r=g.enc.Base64,v=g.algo.EvpKDF,n=f.Cipher=q.extend({cfg:k.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){q.reset.call(this);this._doReset()},process:function(a){this._append(a); +return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(a){return{encrypt:function(b,c,d){return("string"==typeof c?s:j).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?s:j).decrypt(a,b,c,d)}}}});f.StreamCipher=n.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var m=g.mode={},t=function(a,b,c){var d=this._iv;d?this._iv=u:d=this._prevBlock;for(var e= +0;e>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1; +this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt; +return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding, +blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a, +b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/cipher-core.js b/dashboard-ui/bower_components/cryptojslib/components/cipher-core.js new file mode 100644 index 0000000000..2ec8eb5144 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/cipher-core.js @@ -0,0 +1,863 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * Cipher core components. + */ +CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/core-min.js b/dashboard-ui/bower_components/cryptojslib/components/core-min.js new file mode 100644 index 0000000000..3f191b4316 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/core-min.js @@ -0,0 +1,13 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, +2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}}, +q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else if (thatWords.length > 0xffff) { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } else { + // Copy all words at once + thisWords.push.apply(thisWords, thatWords); + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + for (var i = 0; i < nBytes; i += 4) { + words.push((Math.random() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; +}(Math)); diff --git a/dashboard-ui/bower_components/cryptojslib/components/enc-base64-min.js b/dashboard-ui/bower_components/cryptojslib/components/enc-base64-min.js new file mode 100644 index 0000000000..7ab054d94b --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/enc-base64-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< +e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/enc-base64.js b/dashboard-ui/bower_components/cryptojslib/components/enc-base64.js new file mode 100644 index 0000000000..739f4a845a --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/enc-base64.js @@ -0,0 +1,109 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex != -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); + var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + + return WordArray.create(words, nBytes); + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/enc-utf16-min.js b/dashboard-ui/bower_components/cryptojslib/components/enc-utf16-min.js new file mode 100644 index 0000000000..b84d401100 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/enc-utf16-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var e=CryptoJS,f=e.lib.WordArray,e=e.enc;e.Utf16=e.Utf16BE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}};e.Utf16LE={stringify:function(b){var d=b.words;b=b.sigBytes;for(var c=[],a=0;a>>2]>>>16-8*(a%4)&65535)<<8&4278255360|(d[a>>> +2]>>>16-8*(a%4)&65535)>>>8&16711935));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a>>1,j=e[g],h=b.charCodeAt(a)<<16-16*(a%2);e[g]=j|h<<8&4278255360|h>>>8&16711935}return f.create(c,2*d)}}})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/enc-utf16.js b/dashboard-ui/bower_components/cryptojslib/components/enc-utf16.js new file mode 100644 index 0000000000..295d24e5e9 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/enc-utf16.js @@ -0,0 +1,135 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/evpkdf-min.js b/dashboard-ui/bower_components/cryptojslib/components/evpkdf-min.js new file mode 100644 index 0000000000..6c914b6a14 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/evpkdf-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,a=b.lib,f=a.Base,k=a.WordArray,a=b.algo,l=a.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),g=k.create(),f=g.words,h=c.keySize,c=c.iterations;f.lengthe&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays-min.js b/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays-min.js new file mode 100644 index 0000000000..7eee4b2ecb --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){if("function"==typeof ArrayBuffer){var b=CryptoJS.lib.WordArray,e=b.init;(b.init=function(a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));if(a instanceof Int8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if(a instanceof Uint8Array){for(var b=a.byteLength,d=[],c=0;c>>2]|=a[c]<< +24-8*(c%4);e.call(this,d,b)}else e.apply(this,arguments)}).prototype=b}})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays.js b/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays.js new file mode 100644 index 0000000000..511137b486 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/lib-typedarrays.js @@ -0,0 +1,62 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + typedArray instanceof Uint8ClampedArray || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/md5-min.js b/dashboard-ui/bower_components/cryptojslib/components/md5-min.js new file mode 100644 index 0000000000..ac725fce84 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/md5-min.js @@ -0,0 +1,12 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(E){function h(a,f,g,j,p,h,k){a=a+(f&g|~f&j)+p+k;return(a<>>32-h)+f}function k(a,f,g,j,p,h,k){a=a+(f&j|g&~j)+p+k;return(a<>>32-h)+f}function l(a,f,g,j,h,k,l){a=a+(f^g^j)+h+l;return(a<>>32-k)+f}function n(a,f,g,j,h,k,l){a=a+(g^(f|~j))+h+l;return(a<>>32-k)+f}for(var r=CryptoJS,q=r.lib,F=q.WordArray,s=q.Hasher,q=r.algo,a=[],t=0;64>t;t++)a[t]=4294967296*E.abs(E.sin(t+1))|0;q=q.MD5=s.extend({_doReset:function(){this._hash=new F.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(m,f){for(var g=0;16>g;g++){var j=f+g,p=m[j];m[j]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}var g=this._hash.words,j=m[f+0],p=m[f+1],q=m[f+2],r=m[f+3],s=m[f+4],t=m[f+5],u=m[f+6],v=m[f+7],w=m[f+8],x=m[f+9],y=m[f+10],z=m[f+11],A=m[f+12],B=m[f+13],C=m[f+14],D=m[f+15],b=g[0],c=g[1],d=g[2],e=g[3],b=h(b,c,d,e,j,7,a[0]),e=h(e,b,c,d,p,12,a[1]),d=h(d,e,b,c,q,17,a[2]),c=h(c,d,e,b,r,22,a[3]),b=h(b,c,d,e,s,7,a[4]),e=h(e,b,c,d,t,12,a[5]),d=h(d,e,b,c,u,17,a[6]),c=h(c,d,e,b,v,22,a[7]), +b=h(b,c,d,e,w,7,a[8]),e=h(e,b,c,d,x,12,a[9]),d=h(d,e,b,c,y,17,a[10]),c=h(c,d,e,b,z,22,a[11]),b=h(b,c,d,e,A,7,a[12]),e=h(e,b,c,d,B,12,a[13]),d=h(d,e,b,c,C,17,a[14]),c=h(c,d,e,b,D,22,a[15]),b=k(b,c,d,e,p,5,a[16]),e=k(e,b,c,d,u,9,a[17]),d=k(d,e,b,c,z,14,a[18]),c=k(c,d,e,b,j,20,a[19]),b=k(b,c,d,e,t,5,a[20]),e=k(e,b,c,d,y,9,a[21]),d=k(d,e,b,c,D,14,a[22]),c=k(c,d,e,b,s,20,a[23]),b=k(b,c,d,e,x,5,a[24]),e=k(e,b,c,d,C,9,a[25]),d=k(d,e,b,c,r,14,a[26]),c=k(c,d,e,b,w,20,a[27]),b=k(b,c,d,e,B,5,a[28]),e=k(e,b, +c,d,q,9,a[29]),d=k(d,e,b,c,v,14,a[30]),c=k(c,d,e,b,A,20,a[31]),b=l(b,c,d,e,t,4,a[32]),e=l(e,b,c,d,w,11,a[33]),d=l(d,e,b,c,z,16,a[34]),c=l(c,d,e,b,C,23,a[35]),b=l(b,c,d,e,p,4,a[36]),e=l(e,b,c,d,s,11,a[37]),d=l(d,e,b,c,v,16,a[38]),c=l(c,d,e,b,y,23,a[39]),b=l(b,c,d,e,B,4,a[40]),e=l(e,b,c,d,j,11,a[41]),d=l(d,e,b,c,r,16,a[42]),c=l(c,d,e,b,u,23,a[43]),b=l(b,c,d,e,x,4,a[44]),e=l(e,b,c,d,A,11,a[45]),d=l(d,e,b,c,D,16,a[46]),c=l(c,d,e,b,q,23,a[47]),b=n(b,c,d,e,j,6,a[48]),e=n(e,b,c,d,v,10,a[49]),d=n(d,e,b,c, +C,15,a[50]),c=n(c,d,e,b,t,21,a[51]),b=n(b,c,d,e,A,6,a[52]),e=n(e,b,c,d,r,10,a[53]),d=n(d,e,b,c,y,15,a[54]),c=n(c,d,e,b,p,21,a[55]),b=n(b,c,d,e,w,6,a[56]),e=n(e,b,c,d,D,10,a[57]),d=n(d,e,b,c,u,15,a[58]),c=n(c,d,e,b,B,21,a[59]),b=n(b,c,d,e,s,6,a[60]),e=n(e,b,c,d,z,10,a[61]),d=n(d,e,b,c,q,15,a[62]),c=n(c,d,e,b,x,21,a[63]);g[0]=g[0]+b|0;g[1]=g[1]+c|0;g[2]=g[2]+d|0;g[3]=g[3]+e|0},_doFinalize:function(){var a=this._data,f=a.words,g=8*this._nDataBytes,j=8*a.sigBytes;f[j>>>5]|=128<<24-j%32;var h=E.floor(g/ +4294967296);f[(j+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;f[(j+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(f.length+1);this._process();a=this._hash;f=a.words;for(g=0;4>g;g++)j=f[g],f[g]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=s.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=s._createHelper(q);r.HmacMD5=s._createHmacHelper(q)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/components/md5.js b/dashboard-ui/bower_components/cryptojslib/components/md5.js new file mode 100644 index 0000000000..e5894585fb --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/md5.js @@ -0,0 +1,254 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); +}(Math)); diff --git a/dashboard-ui/bower_components/cryptojslib/components/mode-cfb-min.js b/dashboard-ui/bower_components/cryptojslib/components/mode-cfb-min.js new file mode 100644 index 0000000000..da0da2143a --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/mode-cfb-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.mode.CFB=function(){function g(c,b,e,a){var d=this._iv;d?(d=d.slice(0),this._iv=void 0):d=this._prevBlock;a.encryptBlock(d,0);for(a=0;a>24&255)){var c=a>>16&255,b=a>>8&255,e=a&255;255===c?(c=0,255===b?(b=0,255===e?e=0:++e):++b):++c;a=0+(c<<16)+(b<<8);a+=e}else a+=16777216;return a}var g=CryptoJS.lib.BlockCipherMode.extend(),j=g.Encryptor=g.extend({processBlock:function(a,c){var b=this._cipher,e=b.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0);d=f;if(0===(d[0]=h(d[0])))d[1]=h(d[1]);f=f.slice(0);b.encryptBlock(f,0);for(b=0;b> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; +}()); + + diff --git a/dashboard-ui/bower_components/cryptojslib/components/mode-ctr-min.js b/dashboard-ui/bower_components/cryptojslib/components/mode-ctr-min.js new file mode 100644 index 0000000000..dfa8b1f9a8 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/mode-ctr-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.mode.CTR=function(){var b=CryptoJS.lib.BlockCipherMode.extend(),g=b.Encryptor=b.extend({processBlock:function(b,f){var a=this._cipher,e=a.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);c=d.slice(0);a.encryptBlock(c,0);d[e-1]=d[e-1]+1|0;for(a=0;a>>2]|=c<<24-8*(b%4);a.sigBytes+=c},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-ansix923.js b/dashboard-ui/bower_components/cryptojslib/components/pad-ansix923.js new file mode 100644 index 0000000000..440126f40a --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-ansix923.js @@ -0,0 +1,35 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ANSI X.923 padding strategy. + */ +CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } +}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126-min.js b/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126-min.js new file mode 100644 index 0000000000..adef4b34d9 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.Iso10126={pad:function(a,c){var b=4*c,b=b-a.sigBytes%b;a.concat(CryptoJS.lib.WordArray.random(b-1)).concat(CryptoJS.lib.WordArray.create([b<<24],1))},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126.js b/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126.js new file mode 100644 index 0000000000..87885e794d --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-iso10126.js @@ -0,0 +1,30 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ISO 10126 padding strategy. + */ +CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } +}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971-min.js b/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971-min.js new file mode 100644 index 0000000000..1edf02dc1e --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.Iso97971={pad:function(a,b){a.concat(CryptoJS.lib.WordArray.create([2147483648],1));CryptoJS.pad.ZeroPadding.pad(a,b)},unpad:function(a){CryptoJS.pad.ZeroPadding.unpad(a);a.sigBytes--}}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971.js b/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971.js new file mode 100644 index 0000000000..4c00b9fb47 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-iso97971.js @@ -0,0 +1,26 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * ISO/IEC 9797-1 Padding Method 2. + */ +CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } +}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding-min.js b/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding-min.js new file mode 100644 index 0000000000..6f5eb595c8 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding.js b/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding.js new file mode 100644 index 0000000000..b1683709cc --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-nopadding.js @@ -0,0 +1,16 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * A noop padding strategy. + */ +CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } +}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding-min.js b/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding-min.js new file mode 100644 index 0000000000..18f43efca8 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +CryptoJS.pad.ZeroPadding={pad:function(a,c){var b=4*c;a.clamp();a.sigBytes+=b-(a.sigBytes%b||b)},unpad:function(a){for(var c=a.words,b=a.sigBytes-1;!(c[b>>>2]>>>24-8*(b%4)&255);)b--;a.sigBytes=b+1}}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding.js b/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding.js new file mode 100644 index 0000000000..d4201187d2 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pad-zeropadding.js @@ -0,0 +1,31 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** + * Zero padding strategy. + */ +CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } +}; diff --git a/dashboard-ui/bower_components/cryptojslib/components/pbkdf2-min.js b/dashboard-ui/bower_components/cryptojslib/components/pbkdf2-min.js new file mode 100644 index 0000000000..2f0941c5d1 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/pbkdf2-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,a=b.lib,d=a.Base,m=a.WordArray,a=b.algo,q=a.HMAC,l=a.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,f=q.create(c.hasher,a),g=m.create(),d=m.create([1]),l=g.words,r=d.words,n=c.keySize,c=c.iterations;l.lengthc;c++)f[c]=d[c];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(c=0;8>c;c++){var h=a[c]+d[c],e=h&65535, +g=h>>>16;b[c]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}a[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0;a[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0;a[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0;a[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0;a[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0;a[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0;a[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0;a[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],b=[],l=j.algo.RabbitLegacy= +k.extend({_doReset:function(){for(var a=this._key.words,d=this.cfg.iv,c=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],a=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535],b=this._b=0;4>b;b++)g.call(this);for(b=0;8>b;b++)a[b]^=c[b+4&7];if(d){var c=d.words,d=c[0],c=c[1],d=(d<<8|d>>>24)&16711935|(d<< +24|d>>>8)&4278255360,c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=d>>>16|c&4294901760,e=c<<16|d&65535;a[0]^=d;a[1]^=b;a[2]^=c;a[3]^=e;a[4]^=d;a[5]^=b;a[6]^=c;a[7]^=e;for(b=0;4>b;b++)g.call(this)}},_doProcessBlock:function(a,b){var c=this._X;g.call(this);e[0]=c[0]^c[5]>>>16^c[3]<<16;e[1]=c[2]^c[7]>>>16^c[5]<<16;e[2]=c[4]^c[1]>>>16^c[7]<<16;e[3]=c[6]^c[3]>>>16^c[1]<<16;for(c=0;4>c;c++)e[c]=(e[c]<<8|e[c]>>>24)&16711935|(e[c]<<24|e[c]>>>8)&4278255360,a[b+c]^=e[c]},blockSize:4,ivSize:2});j.RabbitLegacy= +k._createHelper(l)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/rabbit-legacy.js b/dashboard-ui/bower_components/cryptojslib/components/rabbit-legacy.js new file mode 100644 index 0000000000..82a07f2e39 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/rabbit-legacy.js @@ -0,0 +1,176 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/rabbit-min.js b/dashboard-ui/bower_components/cryptojslib/components/rabbit-min.js new file mode 100644 index 0000000000..1289431745 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/rabbit-min.js @@ -0,0 +1,11 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function g(){for(var b=this._X,d=this._C,a=0;8>a;a++)f[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var h=b[a]+d[a],e=h&65535, +g=h>>>16;c[a]=((e*e>>>17)+e*g>>>15)+g*g^((h&4294901760)*h|0)+((h&65535)*h|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var j=CryptoJS,k=j.lib.StreamCipher,e=[],f=[],c=[],l=j.algo.Rabbit= +k.extend({_doReset:function(){for(var b=this._key.words,d=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var c=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)g.call(this);for(a=0;8> +a;a++)b[a]^=c[a+4&7];if(d){var a=d.words,d=a[0],a=a[1],d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,c=d>>>16|a&4294901760,e=a<<16|d&65535;b[0]^=d;b[1]^=c;b[2]^=a;b[3]^=e;b[4]^=d;b[5]^=c;b[6]^=a;b[7]^=e;for(a=0;4>a;a++)g.call(this)}},_doProcessBlock:function(b,c){var a=this._X;g.call(this);e[0]=a[0]^a[5]>>>16^a[3]<<16;e[1]=a[2]^a[7]>>>16^a[5]<<16;e[2]=a[4]^a[1]>>>16^a[7]<<16;e[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)e[a]=(e[a]<<8|e[a]>>>24)& +16711935|(e[a]<<24|e[a]>>>8)&4278255360,b[c+a]^=e[a]},blockSize:4,ivSize:2});j.Rabbit=k._createHelper(l)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/rabbit.js b/dashboard-ui/bower_components/cryptojslib/components/rabbit.js new file mode 100644 index 0000000000..fe3b9a4130 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/rabbit.js @@ -0,0 +1,178 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/rc4-min.js b/dashboard-ui/bower_components/cryptojslib/components/rc4-min.js new file mode 100644 index 0000000000..e14e018fc3 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/rc4-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function l(){for(var a=this._S,d=this._i,c=this._j,b=0,e=0;4>e;e++){var d=(d+1)%256,c=(c+a[d])%256,f=a[d];a[d]=a[c];a[c]=f;b|=a[(a[d]+a[c])%256]<<24-8*e}this._i=d;this._j=c;return b}var g=CryptoJS,k=g.lib.StreamCipher,h=g.algo,j=h.RC4=k.extend({_doReset:function(){for(var a=this._key,d=a.words,a=a.sigBytes,c=this._S=[],b=0;256>b;b++)c[b]=b;for(var e=b=0;256>b;b++){var f=b%a,e=(e+c[b]+(d[f>>>2]>>>24-8*(f%4)&255))%256,f=c[b];c[b]=c[e];c[e]=f}this._i=this._j=0},_doProcessBlock:function(a, +d){a[d]^=l.call(this)},keySize:8,ivSize:0});g.RC4=k._createHelper(j);h=h.RC4Drop=j.extend({cfg:j.cfg.extend({drop:192}),_doReset:function(){j._doReset.call(this);for(var a=this.cfg.drop;0>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/ripemd160-min.js b/dashboard-ui/bower_components/cryptojslib/components/ripemd160-min.js new file mode 100644 index 0000000000..a291651198 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/ripemd160-min.js @@ -0,0 +1,22 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/* + +(c) 2012 by C?dric Mesnil. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +(function(){var q=CryptoJS,d=q.lib,n=d.WordArray,p=d.Hasher,d=q.algo,x=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),z=n.create([11,14,15,12, +5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=n.create([0,1518500249,1859775393,2400959708,2840853838]),C=n.create([1352829926,1548603684,1836072691, +2053994217,0]),d=d.RIPEMD160=p.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,v){for(var b=0;16>b;b++){var c=v+b,f=e[c];e[c]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var c=this._hash.words,f=B.words,d=C.words,n=x.words,q=y.words,p=z.words,w=A.words,t,g,h,j,r,u,k,l,m,s;u=t=c[0];k=g=c[1];l=h=c[2];m=j=c[3];s=r=c[4];for(var a,b=0;80>b;b+=1)a=t+e[v+n[b]]|0,a=16>b?a+((g^h^j)+f[0]):32>b?a+((g&h|~g&j)+f[1]):48>b? +a+(((g|~h)^j)+f[2]):64>b?a+((g&j|h&~j)+f[3]):a+((g^(h|~j))+f[4]),a|=0,a=a<>>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>32-w[b],a=a+s|0,u=s,s=m,m=l<<10|l>>>22,l=k,k=a;a=c[1]+h+m|0;c[1]=c[2]+j+s|0;c[2]=c[3]+r+u|0;c[3]=c[4]+t+k|0;c[4]=c[0]+g+l|0;c[0]=a},_doFinalize:function(){var e=this._data,d=e.words,b=8*this._nDataBytes,c=8*e.sigBytes; +d[c>>>5]|=128<<24-c%32;d[(c+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;e.sigBytes=4*(d.length+1);this._process();e=this._hash;d=e.words;for(b=0;5>b;b++)c=d[b],d[b]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return e},clone:function(){var d=p.clone.call(this);d._hash=this._hash.clone();return d}});q.RIPEMD160=p._createHelper(d);q.HmacRIPEMD160=p._createHmacHelper(d)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/components/ripemd160.js b/dashboard-ui/bower_components/cryptojslib/components/ripemd160.js new file mode 100644 index 0000000000..4acab8b3cf --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/ripemd160.js @@ -0,0 +1,253 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +/** @preserve +(c) 2012 by Cédric Mesnil. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); +}(Math)); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha1-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha1-min.js new file mode 100644 index 0000000000..3ae0311e20 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha1-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var k=CryptoJS,b=k.lib,m=b.WordArray,l=b.Hasher,d=[],b=k.algo.SHA1=l.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,p){for(var a=this._hash.words,e=a[0],f=a[1],h=a[2],j=a[3],b=a[4],c=0;80>c;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^ +j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha1.js b/dashboard-ui/bower_components/cryptojslib/components/sha1.js new file mode 100644 index 0000000000..e10a9a2e99 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha1.js @@ -0,0 +1,136 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha224-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha224-min.js new file mode 100644 index 0000000000..b0bc65dd58 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha224-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var b=CryptoJS,d=b.lib.WordArray,a=b.algo,c=a.SHA256,a=a.SHA224=c.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=c._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=c._createHelper(a);b.HmacSHA224=c._createHmacHelper(a)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha224.js b/dashboard-ui/bower_components/cryptojslib/components/sha224.js new file mode 100644 index 0000000000..b572fe53bb --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha224.js @@ -0,0 +1,66 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha256-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha256-min.js new file mode 100644 index 0000000000..e0fe20900a --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha256-min.js @@ -0,0 +1,9 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,0.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]= +q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes; +b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha256.js b/dashboard-ui/bower_components/cryptojslib/components/sha256.js new file mode 100644 index 0000000000..a3790b07c8 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha256.js @@ -0,0 +1,185 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); +}(Math)); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha3-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha3-min.js new file mode 100644 index 0000000000..9783779fe6 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha3-min.js @@ -0,0 +1,11 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(y){for(var p=CryptoJS,m=p.lib,z=m.WordArray,q=m.Hasher,s=p.x64.Word,m=p.algo,v=[],w=[],x=[],c=1,d=0,l=0;24>l;l++){v[c+5*d]=(l+1)*(l+2)/2%64;var r=(2*c+3*d)%5,c=d%5,d=r}for(c=0;5>c;c++)for(d=0;5>d;d++)w[c+5*d]=d+5*((2*c+3*d)%5);c=1;for(d=0;24>d;d++){for(var t=r=l=0;7>t;t++){if(c&1){var u=(1<u?r^=1<c;c++)j[c]=s.create();m=m.SHA3=q.extend({cfg:q.cfg.extend({outputLength:512}),_doReset:function(){for(var c=this._state= +[],n=0;25>n;n++)c[n]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(c,n){for(var h=this._state,d=this.blockSize/2,b=0;b>>24)&16711935|(e<<24|e>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,a=h[b];a.high^=f;a.low^=e}for(d=0;24>d;d++){for(b=0;5>b;b++){for(var k=e=0,g=0;5>g;g++)a=h[b+5*g],e^=a.high,k^=a.low;a=j[b];a.high=e;a.low=k}for(b=0;5>b;b++){a=j[(b+4)%5];e=j[(b+1)%5];f=e.high;g=e.low;e=a.high^ +(f<<1|g>>>31);k=a.low^(g<<1|f>>>31);for(g=0;5>g;g++)a=h[b+5*g],a.high^=e,a.low^=k}for(f=1;25>f;f++)a=h[f],b=a.high,a=a.low,g=v[f],32>g?(e=b<>>32-g,k=a<>>32-g):(e=a<>>64-g,k=b<>>64-g),a=j[w[f]],a.high=e,a.low=k;a=j[0];b=h[0];a.high=b.high;a.low=b.low;for(b=0;5>b;b++)for(g=0;5>g;g++)f=b+5*g,a=h[f],e=j[f],f=j[(b+1)%5+5*g],k=j[(b+2)%5+5*g],a.high=e.high^~f.high&k.high,a.low=e.low^~f.low&k.low;a=h[0];b=x[d];a.high^=b.high;a.low^=b.low}},_doFinalize:function(){var c=this._data, +d=c.words,h=8*c.sigBytes,j=32*this.blockSize;d[h>>>5]|=1<<24-h%32;d[(y.ceil((h+1)/j)*j>>>5)-1]|=128;c.sigBytes=4*d.length;this._process();for(var c=this._state,d=this.cfg.outputLength/8,h=d/8,j=[],b=0;b>>24)&16711935|(f<<24|f>>>8)&4278255360,e=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;j.push(e);j.push(f)}return new z.init(j,d)},clone:function(){for(var c=q.clone.call(this),d=c._state=this._state.slice(0),h=0;25>h;h++)d[h]=d[h].clone();return c}}); +p.SHA3=q._createHelper(m);p.HmacSHA3=q._createHmacHelper(m)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha3.js b/dashboard-ui/bower_components/cryptojslib/components/sha3.js new file mode 100644 index 0000000000..53245760f6 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha3.js @@ -0,0 +1,309 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); +}(Math)); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha384-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha384-min.js new file mode 100644 index 0000000000..d29bb2046f --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha384-min.js @@ -0,0 +1,8 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){var c=CryptoJS,a=c.x64,b=a.Word,e=a.WordArray,a=c.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});c.SHA384= +d._createHelper(a);c.HmacSHA384=d._createHmacHelper(a)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha384.js b/dashboard-ui/bower_components/cryptojslib/components/sha384.js new file mode 100644 index 0000000000..927e2b43a7 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha384.js @@ -0,0 +1,69 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha512-min.js b/dashboard-ui/bower_components/cryptojslib/components/sha512-min.js new file mode 100644 index 0000000000..5df4b70767 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha512-min.js @@ -0,0 +1,15 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function a(){return d.create.apply(d,arguments)}for(var n=CryptoJS,r=n.lib.Hasher,e=n.x64,d=e.Word,T=e.WordArray,e=n.algo,ea=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317), +a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291, +2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899), +a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470, +3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],v=[],w=0;80>w;w++)v[w]=a();e=e.SHA512=r.extend({_doReset:function(){this._hash=new T.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,d){for(var f=this._hash.words, +F=f[0],e=f[1],n=f[2],r=f[3],G=f[4],H=f[5],I=f[6],f=f[7],w=F.high,J=F.low,X=e.high,K=e.low,Y=n.high,L=n.low,Z=r.high,M=r.low,$=G.high,N=G.low,aa=H.high,O=H.low,ba=I.high,P=I.low,ca=f.high,Q=f.low,k=w,g=J,z=X,x=K,A=Y,y=L,U=Z,B=M,l=$,h=N,R=aa,C=O,S=ba,D=P,V=ca,E=Q,m=0;80>m;m++){var s=v[m];if(16>m)var j=s.high=a[d+2*m]|0,b=s.low=a[d+2*m+1]|0;else{var j=v[m-15],b=j.high,p=j.low,j=(b>>>1|p<<31)^(b>>>8|p<<24)^b>>>7,p=(p>>>1|b<<31)^(p>>>8|b<<24)^(p>>>7|b<<25),u=v[m-2],b=u.high,c=u.low,u=(b>>>19|c<<13)^(b<< +3|c>>>29)^b>>>6,c=(c>>>19|b<<13)^(c<<3|b>>>29)^(c>>>6|b<<26),b=v[m-7],W=b.high,t=v[m-16],q=t.high,t=t.low,b=p+b.low,j=j+W+(b>>>0

    >>0?1:0),b=b+c,j=j+u+(b>>>0>>0?1:0),b=b+t,j=j+q+(b>>>0>>0?1:0);s.high=j;s.low=b}var W=l&R^~l&S,t=h&C^~h&D,s=k&z^k&A^z&A,T=g&x^g&y^x&y,p=(k>>>28|g<<4)^(k<<30|g>>>2)^(k<<25|g>>>7),u=(g>>>28|k<<4)^(g<<30|k>>>2)^(g<<25|k>>>7),c=ea[m],fa=c.high,da=c.low,c=E+((h>>>14|l<<18)^(h>>>18|l<<14)^(h<<23|l>>>9)),q=V+((l>>>14|h<<18)^(l>>>18|h<<14)^(l<<23|h>>>9))+(c>>>0>>0?1: +0),c=c+t,q=q+W+(c>>>0>>0?1:0),c=c+da,q=q+fa+(c>>>0>>0?1:0),c=c+b,q=q+j+(c>>>0>>0?1:0),b=u+T,s=p+s+(b>>>0>>0?1:0),V=S,E=D,S=R,D=C,R=l,C=h,h=B+c|0,l=U+q+(h>>>0>>0?1:0)|0,U=A,B=y,A=z,y=x,z=k,x=g,g=c+b|0,k=q+s+(g>>>0>>0?1:0)|0}J=F.low=J+g;F.high=w+k+(J>>>0>>0?1:0);K=e.low=K+x;e.high=X+z+(K>>>0>>0?1:0);L=n.low=L+y;n.high=Y+A+(L>>>0>>0?1:0);M=r.low=M+B;r.high=Z+U+(M>>>0>>0?1:0);N=G.low=N+h;G.high=$+l+(N>>>0>>0?1:0);O=H.low=O+C;H.high=aa+R+(O>>>0>>0?1:0);P=I.low=P+D; +I.high=ba+S+(P>>>0>>0?1:0);Q=f.low=Q+E;f.high=ca+V+(Q>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,d=a.words,f=8*this._nDataBytes,e=8*a.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+128>>>10<<5)+30]=Math.floor(f/4294967296);d[(e+128>>>10<<5)+31]=f;a.sigBytes=4*d.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});n.SHA512=r._createHelper(e);n.HmacSHA512=r._createHmacHelper(e)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/sha512.js b/dashboard-ui/bower_components/cryptojslib/components/sha512.js new file mode 100644 index 0000000000..14a16ac08b --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/sha512.js @@ -0,0 +1,309 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/tripledes-min.js b/dashboard-ui/bower_components/cryptojslib/components/tripledes-min.js new file mode 100644 index 0000000000..a669dd3269 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/tripledes-min.js @@ -0,0 +1,26 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(){function j(b,c){var a=(this._lBlock>>>b^this._rBlock)&c;this._rBlock^=a;this._lBlock^=a<>>b^this._lBlock)&c;this._lBlock^=a;this._rBlock^=a<a;a++){var f=q[a]-1;c[a]=b[f>>>5]>>>31-f%32&1}b=this._subKeys=[];for(f=0;16>f;f++){for(var d=b[f]=[],e=r[f],a=0;24>a;a++)d[a/6|0]|=c[(p[a]-1+e)%28]<<31-a%6,d[4+(a/6|0)]|=c[28+(p[a+24]-1+e)%28]<<31-a%6;d[0]=d[0]<<1|d[0]>>>31;for(a=1;7>a;a++)d[a]>>>= +4*(a-1)+3;d[7]=d[7]<<5|d[7]>>>27}c=this._invSubKeys=[];for(a=0;16>a;a++)c[a]=b[15-a]},encryptBlock:function(b,c){this._doCryptBlock(b,c,this._subKeys)},decryptBlock:function(b,c){this._doCryptBlock(b,c,this._invSubKeys)},_doCryptBlock:function(b,c,a){this._lBlock=b[c];this._rBlock=b[c+1];j.call(this,4,252645135);j.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);j.call(this,1,1431655765);for(var f=0;16>f;f++){for(var d=a[f],e=this._lBlock,h=this._rBlock,g=0,k=0;8>k;k++)g|=s[k][((h^ +d[k])&t[k])>>>0];this._lBlock=h;this._rBlock=e^g}a=this._lBlock;this._lBlock=this._rBlock;this._rBlock=a;j.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);j.call(this,16,65535);j.call(this,4,252645135);b[c]=this._lBlock;b[c+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});h.DES=e._createHelper(m);g=g.TripleDES=e.extend({_doReset:function(){var b=this._key.words;this._des1=m.createEncryptor(n.create(b.slice(0,2)));this._des2=m.createEncryptor(n.create(b.slice(2,4)));this._des3= +m.createEncryptor(n.create(b.slice(4,6)))},encryptBlock:function(b,c){this._des1.encryptBlock(b,c);this._des2.decryptBlock(b,c);this._des3.encryptBlock(b,c)},decryptBlock:function(b,c){this._des3.decryptBlock(b,c);this._des2.encryptBlock(b,c);this._des1.decryptBlock(b,c)},keySize:6,ivSize:2,blockSize:2});h.TripleDES=e._createHelper(g)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/components/tripledes.js b/dashboard-ui/bower_components/cryptojslib/components/tripledes.js new file mode 100644 index 0000000000..0606b74b8e --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/tripledes.js @@ -0,0 +1,756 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/components/x64-core-min.js b/dashboard-ui/bower_components/cryptojslib/components/x64-core-min.js new file mode 100644 index 0000000000..0566f06fd9 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/components/x64-core-min.js @@ -0,0 +1,7 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +(function(g){var a=CryptoJS,f=a.lib,e=f.Base,h=f.WordArray,a=a.x64={};a.Word=e.extend({init:function(b,c){this.high=b;this.low=c}});a.WordArray=e.extend({init:function(b,c){b=this.words=b||[];this.sigBytes=c!=g?c:8*b.length},toX32:function(){for(var b=this.words,c=b.length,a=[],d=0;d>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); +}()); diff --git a/dashboard-ui/bower_components/cryptojslib/copyright.txt b/dashboard-ui/bower_components/cryptojslib/copyright.txt new file mode 100644 index 0000000000..b729a656ba --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/copyright.txt @@ -0,0 +1,9 @@ +This is as-is copy of https://code.google.com/p/crypto-js/wiki/License. This github repo does not have anything additional to whatever original Google Code copyright notice says. + +Copyright (c) 2009-2013 Jeff Mott + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/dashboard-ui/bower_components/cryptojslib/push.bat b/dashboard-ui/bower_components/cryptojslib/push.bat new file mode 100644 index 0000000000..a123b43e57 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/push.bat @@ -0,0 +1,5 @@ +git status +git add -A +git commit -m %1 +git push +git status \ No newline at end of file diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/aes.js b/dashboard-ui/bower_components/cryptojslib/rollups/aes.js new file mode 100644 index 0000000000..827503cbd6 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/aes.js @@ -0,0 +1,35 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, +q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w< +l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]), +f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f, +m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m, +E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/ +4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math); +(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d, +b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}(); +(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8, +16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;dd||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>> +8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t= +d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/hmac-md5.js b/dashboard-ui/bower_components/cryptojslib/rollups/hmac-md5.js new file mode 100644 index 0000000000..085eb4a1f7 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/hmac-md5.js @@ -0,0 +1,21 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(q,r){var k={},g=k.lib={},p=function(){},t=g.Base={extend:function(b){p.prototype=this;var j=new p;b&&j.mixIn(b);j.hasOwnProperty("init")||(j.init=function(){j.$super.init.apply(this,arguments)});j.init.prototype=j;j.$super=this;return j},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var j in b)b.hasOwnProperty(j)&&(this[j]=b[j]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, +n=g.WordArray=t.extend({init:function(b,j){b=this.words=b||[];this.sigBytes=j!=r?j:4*b.length},toString:function(b){return(b||u).stringify(this)},concat:function(b){var j=this.words,a=b.words,l=this.sigBytes;b=b.sigBytes;this.clamp();if(l%4)for(var h=0;h>>2]|=(a[h>>>2]>>>24-8*(h%4)&255)<<24-8*((l+h)%4);else if(65535>>2]=a[h>>>2];else j.push.apply(j,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,j=this.sigBytes;b[j>>>2]&=4294967295<< +32-8*(j%4);b.length=q.ceil(j/4)},clone:function(){var b=t.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var j=[],a=0;a>>2]>>>24-8*(l%4)&255;h.push((m>>>4).toString(16));h.push((m&15).toString(16))}return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>3]|=parseInt(b.substr(l, +2),16)<<24-4*(l%8);return new n.init(h,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var h=[],l=0;l>>2]>>>24-8*(l%4)&255));return h.join("")},parse:function(b){for(var a=b.length,h=[],l=0;l>>2]|=(b.charCodeAt(l)&255)<<24-8*(l%4);return new n.init(h,a)}},s=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(h){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +h=g.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=s.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,h=a.words,l=a.sigBytes,m=this.blockSize,k=l/(4*m),k=b?q.ceil(k):q.max((k|0)-this._minBufferSize,0);b=k*m;l=q.min(4*b,l);if(b){for(var g=0;g>>32-l)+m}function k(a,m,b,j,g,l,k){a=a+(m&j|b&~j)+g+k;return(a<>>32-l)+m}function g(a,m,b,j,g,l,k){a=a+(m^b^j)+g+k;return(a<>>32-l)+m}function p(a,g,b,j,k,l,p){a=a+(b^(g|~j))+k+p;return(a<>>32-l)+g}for(var t=CryptoJS,n=t.lib,v=n.WordArray,u=n.Hasher,n=t.algo,a=[],s=0;64>s;s++)a[s]=4294967296*q.abs(q.sin(s+1))|0;n=n.MD5=u.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(h,m){for(var b=0;16>b;b++){var j=m+b,n=h[j];h[j]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var b=this._hash.words,j=h[m+0],n=h[m+1],l=h[m+2],q=h[m+3],t=h[m+4],s=h[m+5],u=h[m+6],v=h[m+7],w=h[m+8],x=h[m+9],y=h[m+10],z=h[m+11],A=h[m+12],B=h[m+13],C=h[m+14],D=h[m+15],c=b[0],d=b[1],e=b[2],f=b[3],c=r(c,d,e,f,j,7,a[0]),f=r(f,c,d,e,n,12,a[1]),e=r(e,f,c,d,l,17,a[2]),d=r(d,e,f,c,q,22,a[3]),c=r(c,d,e,f,t,7,a[4]),f=r(f,c,d,e,s,12,a[5]),e=r(e,f,c,d,u,17,a[6]),d=r(d,e,f,c,v,22,a[7]), +c=r(c,d,e,f,w,7,a[8]),f=r(f,c,d,e,x,12,a[9]),e=r(e,f,c,d,y,17,a[10]),d=r(d,e,f,c,z,22,a[11]),c=r(c,d,e,f,A,7,a[12]),f=r(f,c,d,e,B,12,a[13]),e=r(e,f,c,d,C,17,a[14]),d=r(d,e,f,c,D,22,a[15]),c=k(c,d,e,f,n,5,a[16]),f=k(f,c,d,e,u,9,a[17]),e=k(e,f,c,d,z,14,a[18]),d=k(d,e,f,c,j,20,a[19]),c=k(c,d,e,f,s,5,a[20]),f=k(f,c,d,e,y,9,a[21]),e=k(e,f,c,d,D,14,a[22]),d=k(d,e,f,c,t,20,a[23]),c=k(c,d,e,f,x,5,a[24]),f=k(f,c,d,e,C,9,a[25]),e=k(e,f,c,d,q,14,a[26]),d=k(d,e,f,c,w,20,a[27]),c=k(c,d,e,f,B,5,a[28]),f=k(f,c, +d,e,l,9,a[29]),e=k(e,f,c,d,v,14,a[30]),d=k(d,e,f,c,A,20,a[31]),c=g(c,d,e,f,s,4,a[32]),f=g(f,c,d,e,w,11,a[33]),e=g(e,f,c,d,z,16,a[34]),d=g(d,e,f,c,C,23,a[35]),c=g(c,d,e,f,n,4,a[36]),f=g(f,c,d,e,t,11,a[37]),e=g(e,f,c,d,v,16,a[38]),d=g(d,e,f,c,y,23,a[39]),c=g(c,d,e,f,B,4,a[40]),f=g(f,c,d,e,j,11,a[41]),e=g(e,f,c,d,q,16,a[42]),d=g(d,e,f,c,u,23,a[43]),c=g(c,d,e,f,x,4,a[44]),f=g(f,c,d,e,A,11,a[45]),e=g(e,f,c,d,D,16,a[46]),d=g(d,e,f,c,l,23,a[47]),c=p(c,d,e,f,j,6,a[48]),f=p(f,c,d,e,v,10,a[49]),e=p(e,f,c,d, +C,15,a[50]),d=p(d,e,f,c,s,21,a[51]),c=p(c,d,e,f,A,6,a[52]),f=p(f,c,d,e,q,10,a[53]),e=p(e,f,c,d,y,15,a[54]),d=p(d,e,f,c,n,21,a[55]),c=p(c,d,e,f,w,6,a[56]),f=p(f,c,d,e,D,10,a[57]),e=p(e,f,c,d,u,15,a[58]),d=p(d,e,f,c,B,21,a[59]),c=p(c,d,e,f,t,6,a[60]),f=p(f,c,d,e,z,10,a[61]),e=p(e,f,c,d,l,15,a[62]),d=p(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,g=a.words,b=8*this._nDataBytes,j=8*a.sigBytes;g[j>>>5]|=128<<24-j%32;var k=q.floor(b/ +4294967296);g[(j+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;g[(j+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(g.length+1);this._process();a=this._hash;g=a.words;for(b=0;4>b;b++)j=g[b],g[b]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=u.clone.call(this);a._hash=this._hash.clone();return a}});t.MD5=u._createHelper(n);t.HmacMD5=u._createHmacHelper(n)})(Math); +(function(){var q=CryptoJS,r=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(k,g){k=this._hasher=new k.init;"string"==typeof g&&(g=r.parse(g));var p=k.blockSize,q=4*p;g.sigBytes>q&&(g=k.finalize(g));g.clamp();for(var n=this._oKey=g.clone(),v=this._iKey=g.clone(),u=n.words,a=v.words,s=0;s>>2]|=(B[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=B[b>>>2];else d.push.apply(d,B);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< +32-8*(d%4);a.length=h.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new m.init(b,d/2)}},w=v.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var b=a.length,c=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new m.init(c,b)}},k=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(w.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return w.parse(unescape(encodeURIComponent(a)))}}, +u=e.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new m.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,f=b.sigBytes,e=this.blockSize,k=f/(4*e),k=a?h.ceil(k):h.max((k|0)-this._minBufferSize,0);a=k*e;f=h.min(4*a,f);if(a){for(var u=0;ub;b++){var a=e+b,d=c[a];c[a]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}var a=this._hash.words,d=x.words,h=w.words,f=A.words,j=l.words,E=m.words,F=v.words,C,n,p,q,y,D,r,s,t,z;D=C=a[0];r=n=a[1];s=p=a[2];t=q=a[3];z=y=a[4];for(var g,b=0;80>b;b+=1)g=C+c[e+f[b]]|0,g=16>b?g+((n^p^q)+d[0]):32>b?g+((n&p|~n&q)+d[1]):48>b? +g+(((n|~p)^q)+d[2]):64>b?g+((n&q|p&~q)+d[3]):g+((n^(p|~q))+d[4]),g|=0,g=g<>>32-E[b],g=g+y|0,C=y,y=q,q=p<<10|p>>>22,p=n,n=g,g=D+c[e+j[b]]|0,g=16>b?g+((r^(s|~t))+h[0]):32>b?g+((r&t|s&~t)+h[1]):48>b?g+(((r|~s)^t)+h[2]):64>b?g+((r&s|~r&t)+h[3]):g+((r^s^t)+h[4]),g|=0,g=g<>>32-F[b],g=g+z|0,D=z,z=t,t=s<<10|s>>>22,s=r,r=g;g=a[1]+p+t|0;a[1]=a[2]+q+z|0;a[2]=a[3]+y+D|0;a[3]=a[4]+C+r|0;a[4]=a[0]+n+s|0;a[0]=g},_doFinalize:function(){var c=this._data,e=c.words,b=8*this._nDataBytes,a=8*c.sigBytes; +e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;c.sigBytes=4*(e.length+1);this._process();c=this._hash;e=c.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return c},clone:function(){var c=e.clone.call(this);c._hash=this._hash.clone();return c}});h.RIPEMD160=e._createHelper(j);h.HmacRIPEMD160=e._createHmacHelper(j)})(Math); +(function(){var h=CryptoJS,j=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=j.parse(e));var h=c.blockSize,l=4*h;e.sigBytes>l&&(e=c.finalize(e));e.clamp();for(var m=this._oKey=e.clone(),v=this._iKey=e.clone(),x=m.words,w=v.words,k=0;k>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new p.init(b,c/2)}},j=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new p.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}}, +r=d.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,f=c.sigBytes,d=this.blockSize,e=f/(4*d),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*d;f=g.min(4*a,f);if(a){for(var k=0;ka;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(n<<5|n>>>27)+l+m[a];c=20>a?c+((j&h|~j&g)+1518500249):40>a?c+((j^h^g)+1859775393):60>a?c+((j&h|j&g|h&g)-1894007588):c+((j^h^ +g)-899497514);l=g;g=h;h=j<<30|j>>>2;j=n;n=c}b[0]=b[0]+n|0;b[1]=b[1]+j|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+l|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,g=8*d.sigBytes;e[g>>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(g+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(l);g.HmacSHA1=d._createHmacHelper(l)})(); +(function(){var g=CryptoJS,l=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=l.parse(d));var g=e.blockSize,k=4*g;d.sigBytes>k&&(d=e.finalize(d));d.clamp();for(var p=this._oKey=d.clone(),b=this._iKey=d.clone(),n=p.words,j=b.words,h=0;h>>2]|=(f[g>>>2]>>>24-8*(g%4)&255)<<24-8*((b+g)%4);else if(65535>>2]=f[g>>>2];else d.push.apply(d,f);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<< +32-8*(d%4);a.length=j.ceil(d/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],f=0;f>>2]>>>24-8*(b%4)&255;f.push((g>>>4).toString(16));f.push((g&15).toString(16))}return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new r.init(f,d/2)}},n=s.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var f=[],b=0;b>>2]>>>24-8*(b%4)&255));return f.join("")},parse:function(a){for(var d=a.length,f=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(f,d)}},h=s.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +u=e.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,f=d.words,b=d.sigBytes,g=this.blockSize,c=b/(4*g),c=a?j.ceil(c):j.max((c|0)-this._minBufferSize,0);a=c*g;b=j.min(4*a,b);if(a){for(var e=0;en;){var h;a:{h=l;for(var u=j.sqrt(h),t=2;t<=u;t++)if(!(h%t)){h=!1;break a}h=!0}h&&(8>n&&(m[n]=s(j.pow(l,0.5))),r[n]=s(j.pow(l,1/3)),n++);l++}var a=[],c=c.SHA256=p.extend({_doReset:function(){this._hash=new e.init(m.slice(0))},_doProcessBlock:function(d,f){for(var b=this._hash.words,g=b[0],c=b[1],e=b[2],j=b[3],h=b[4],p=b[5],m=b[6],n=b[7],q=0;64>q;q++){if(16>q)a[q]= +d[f+q]|0;else{var k=a[q-15],l=a[q-2];a[q]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[q-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[q-16]}k=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&p^~h&m)+r[q]+a[q];l=((g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22))+(g&c^g&e^c&e);n=m;m=p;p=h;h=j+k|0;j=e;e=c;c=g;g=k+l|0}b[0]=b[0]+g|0;b[1]=b[1]+c|0;b[2]=b[2]+e|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+p|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+14]=j.floor(b/4294967296);c[(e+64>>>9<<4)+15]=b;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=p.clone.call(this);a._hash=this._hash.clone();return a}});k.SHA256=p._createHelper(c);k.HmacSHA256=p._createHmacHelper(c)})(Math); +(function(){var j=CryptoJS,k=j.lib.WordArray,c=j.algo,e=c.SHA256,c=c.SHA224=e.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=e._doFinalize.call(this);c.sigBytes-=4;return c}});j.SHA224=e._createHelper(c);j.HmacSHA224=e._createHmacHelper(c)})(); +(function(){var j=CryptoJS,k=j.enc.Utf8;j.algo.HMAC=j.lib.Base.extend({init:function(c,e){c=this._hasher=new c.init;"string"==typeof e&&(e=k.parse(e));var j=c.blockSize,m=4*j;e.sigBytes>m&&(e=c.finalize(e));e.clamp();for(var r=this._oKey=e.clone(),s=this._iKey=e.clone(),l=r.words,n=s.words,h=0;h>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= +c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); +(function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]|=(e[p>>>2]>>>24-8*(p%4)&255)<<24-8*((j+p)%4);else if(65535>>2]=e[p>>>2];else b.push.apply(b,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],e=0;e>>2]>>>24-8*(j%4)&255;e.push((p>>>4).toString(16));e.push((p&15).toString(16))}return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new t.init(e,b/2)}},g=w.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var e=[],j=0;j>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var b=a.length,e=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new t.init(e,b)}},n=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, +u=d.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new t.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=n.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,e=b.words,j=b.sigBytes,p=this.blockSize,c=j/(4*p),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*p;j=q.min(4*a,j);if(a){for(var g=0;gu;u++){t[g+5*n]=(u+1)*(u+2)/2%64;var x=(2*g+3*n)%5,g=n%5,n=x}for(g=0;5>g;g++)for(n=0;5>n;n++)w[g+5*n]=n+5*((2*g+3*n)%5);g=1;for(n=0;24>n;n++){for(var a=x=u=0;7>a;a++){if(g&1){var b=(1<b?x^=1<g;g++)e[g]=s.create();c=c.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= +[],b=0;25>b;b++)a[b]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,g=this.blockSize/2,k=0;k>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h=c[k];h.high^=l;h.low^=d}for(g=0;24>g;g++){for(k=0;5>k;k++){for(var f=d=0,m=0;5>m;m++)h=c[k+5*m],d^=h.high,f^=h.low;h=e[k];h.high=d;h.low=f}for(k=0;5>k;k++){h=e[(k+4)%5];d=e[(k+1)%5];l=d.high;m=d.low;d=h.high^ +(l<<1|m>>>31);f=h.low^(m<<1|l>>>31);for(m=0;5>m;m++)h=c[k+5*m],h.high^=d,h.low^=f}for(l=1;25>l;l++)h=c[l],k=h.high,h=h.low,m=t[l],32>m?(d=k<>>32-m,f=h<>>32-m):(d=h<>>64-m,f=k<>>64-m),h=e[w[l]],h.high=d,h.low=f;h=e[0];k=c[0];h.high=k.high;h.low=k.low;for(k=0;5>k;k++)for(m=0;5>m;m++)l=k+5*m,h=c[l],d=e[l],l=e[(k+1)%5+5*m],f=e[(k+2)%5+5*m],h.high=d.high^~l.high&f.high,h.low=d.low^~l.low&f.low;h=c[0];k=r[g];h.high^=k.high;h.low^=k.low}},_doFinalize:function(){var a=this._data, +b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(q.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],g=0;g>>24)&16711935|(l<<24|l>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;e.push(f);e.push(l)}return new d.init(e,b)},clone:function(){for(var a=v.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); +f.SHA3=v._createHelper(c);f.HmacSHA3=v._createHmacHelper(c)})(Math); +(function(){var q=CryptoJS,f=q.enc.Utf8;q.algo.HMAC=q.lib.Base.extend({init:function(c,d){c=this._hasher=new c.init;"string"==typeof d&&(d=f.parse(d));var q=c.blockSize,s=4*q;d.sigBytes>s&&(d=c.finalize(d));d.clamp();for(var t=this._oKey=d.clone(),w=this._iKey=d.clone(),r=t.words,g=w.words,n=0;n>>2]|=(c[b>>>2]>>>24-8*(b%4)&255)<<24-8*((e+b)%4);else if(65535>>2]=c[b>>>2];else g.push.apply(g,c);this.sigBytes+=a;return this},clamp:function(){var C=this.words,g=this.sigBytes;C[g>>>2]&=4294967295<< +32-8*(g%4);C.length=a.ceil(g/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(C){for(var g=[],b=0;b>>2]>>>24-8*(e%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new u.init(c,b/2)}},x=k.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],e=0;e>>2]>>>24-8*(e%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new u.init(c,b)}},y=k.Utf8={stringify:function(a){try{return decodeURIComponent(escape(x.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return x.parse(unescape(encodeURIComponent(a)))}}, +$=b.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=y.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,l=c.words,e=c.sigBytes,d=this.blockSize,f=e/(4*d),f=b?a.ceil(f):a.max((f|0)-this._minBufferSize,0);b=f*d;e=a.min(4*b,e);if(b){for(var k=0;km;m++)k[m]=a();b=b.SHA512=c.extend({_doReset:function(){this._hash=new l.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words, +d=c[0],f=c[1],g=c[2],l=c[3],e=c[4],m=c[5],L=c[6],c=c[7],Z=d.high,M=d.low,aa=f.high,N=f.low,ba=g.high,O=g.low,ca=l.high,P=l.low,da=e.high,Q=e.low,ea=m.high,R=m.low,fa=L.high,S=L.low,ga=c.high,T=c.low,r=Z,n=M,F=aa,D=N,G=ba,E=O,W=ca,H=P,s=da,p=Q,U=ea,I=R,V=fa,J=S,X=ga,K=T,t=0;80>t;t++){var z=k[t];if(16>t)var q=z.high=a[b+2*t]|0,h=z.low=a[b+2*t+1]|0;else{var q=k[t-15],h=q.high,v=q.low,q=(h>>>1|v<<31)^(h>>>8|v<<24)^h>>>7,v=(v>>>1|h<<31)^(v>>>8|h<<24)^(v>>>7|h<<25),B=k[t-2],h=B.high,j=B.low,B=(h>>>19|j<< +13)^(h<<3|j>>>29)^h>>>6,j=(j>>>19|h<<13)^(j<<3|h>>>29)^(j>>>6|h<<26),h=k[t-7],Y=h.high,A=k[t-16],w=A.high,A=A.low,h=v+h.low,q=q+Y+(h>>>0>>0?1:0),h=h+j,q=q+B+(h>>>0>>0?1:0),h=h+A,q=q+w+(h>>>0>>0?1:0);z.high=q;z.low=h}var Y=s&U^~s&V,A=p&I^~p&J,z=r&F^r&G^F&G,ja=n&D^n&E^D&E,v=(r>>>28|n<<4)^(r<<30|n>>>2)^(r<<25|n>>>7),B=(n>>>28|r<<4)^(n<<30|r>>>2)^(n<<25|r>>>7),j=u[t],ka=j.high,ha=j.low,j=K+((p>>>14|s<<18)^(p>>>18|s<<14)^(p<<23|s>>>9)),w=X+((s>>>14|p<<18)^(s>>>18|p<<14)^(s<<23|p>>>9))+(j>>>0< +K>>>0?1:0),j=j+A,w=w+Y+(j>>>0>>0?1:0),j=j+ha,w=w+ka+(j>>>0>>0?1:0),j=j+h,w=w+q+(j>>>0>>0?1:0),h=B+ja,z=v+z+(h>>>0>>0?1:0),X=V,K=J,V=U,J=I,U=s,I=p,p=H+j|0,s=W+w+(p>>>0>>0?1:0)|0,W=G,H=E,G=F,E=D,F=r,D=n,n=j+h|0,r=w+z+(n>>>0>>0?1:0)|0}M=d.low=M+n;d.high=Z+r+(M>>>0>>0?1:0);N=f.low=N+D;f.high=aa+F+(N>>>0>>0?1:0);O=g.low=O+E;g.high=ba+G+(O>>>0>>0?1:0);P=l.low=P+H;l.high=ca+W+(P>>>0>>0?1:0);Q=e.low=Q+p;e.high=da+s+(Q>>>0

    >>0?1:0);R=m.low=R+I;m.high=ea+U+(R>>>0>>0?1:0); +S=L.low=S+J;L.high=fa+V+(S>>>0>>0?1:0);T=c.low=T+K;c.high=ga+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,d=8*a.sigBytes;c[d>>>5]|=128<<24-d%32;c[(d+128>>>10<<5)+30]=Math.floor(b/4294967296);c[(d+128>>>10<<5)+31]=b;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});d.SHA512=c._createHelper(b);d.HmacSHA512=c._createHmacHelper(b)})(); +(function(){var a=CryptoJS,d=a.x64,c=d.Word,b=d.WordArray,d=a.algo,f=d.SHA512,d=d.SHA384=f.extend({_doReset:function(){this._hash=new b.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384= +f._createHelper(d);a.HmacSHA384=f._createHmacHelper(d)})(); +(function(){var a=CryptoJS,d=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=d.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,x=k.words,y=0;y>>2]|=(M[b>>>2]>>>24-8*(b%4)&255)<<24-8*((e+b)%4);else if(65535>>2]=M[b>>>2];else d.push.apply(d,M);this.sigBytes+=a;return this},clamp:function(){var D=this.words,d=this.sigBytes;D[d>>>2]&=4294967295<< +32-8*(d%4);D.length=a.ceil(d/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(D){for(var d=[],b=0;b>>2]>>>24-8*(e%4)&255;b.push((c>>>4).toString(16));b.push((c&15).toString(16))}return b.join("")},parse:function(a){for(var d=a.length,b=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new u.init(b,d/2)}},y=k.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],e=0;e>>2]>>>24-8*(e%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new u.init(c,b)}},z=k.Utf8={stringify:function(a){try{return decodeURIComponent(escape(y.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return y.parse(unescape(encodeURIComponent(a)))}}, +x=b.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var d=this._data,c=d.words,e=d.sigBytes,l=this.blockSize,k=e/(4*l),k=b?a.ceil(k):a.max((k|0)-this._minBufferSize,0);b=k*l;e=a.min(4*b,e);if(b){for(var x=0;xm;m++)k[m]=a();b=b.SHA512=c.extend({_doReset:function(){this._hash=new l.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words, +f=c[0],j=c[1],d=c[2],l=c[3],e=c[4],m=c[5],N=c[6],c=c[7],aa=f.high,O=f.low,ba=j.high,P=j.low,ca=d.high,Q=d.low,da=l.high,R=l.low,ea=e.high,S=e.low,fa=m.high,T=m.low,ga=N.high,U=N.low,ha=c.high,V=c.low,r=aa,n=O,G=ba,E=P,H=ca,F=Q,Y=da,I=R,s=ea,p=S,W=fa,J=T,X=ga,K=U,Z=ha,L=V,t=0;80>t;t++){var A=k[t];if(16>t)var q=A.high=a[b+2*t]|0,g=A.low=a[b+2*t+1]|0;else{var q=k[t-15],g=q.high,v=q.low,q=(g>>>1|v<<31)^(g>>>8|v<<24)^g>>>7,v=(v>>>1|g<<31)^(v>>>8|g<<24)^(v>>>7|g<<25),C=k[t-2],g=C.high,h=C.low,C=(g>>>19| +h<<13)^(g<<3|h>>>29)^g>>>6,h=(h>>>19|g<<13)^(h<<3|g>>>29)^(h>>>6|g<<26),g=k[t-7],$=g.high,B=k[t-16],w=B.high,B=B.low,g=v+g.low,q=q+$+(g>>>0>>0?1:0),g=g+h,q=q+C+(g>>>0>>0?1:0),g=g+B,q=q+w+(g>>>0>>0?1:0);A.high=q;A.low=g}var $=s&W^~s&X,B=p&J^~p&K,A=r&G^r&H^G&H,ka=n&E^n&F^E&F,v=(r>>>28|n<<4)^(r<<30|n>>>2)^(r<<25|n>>>7),C=(n>>>28|r<<4)^(n<<30|r>>>2)^(n<<25|r>>>7),h=u[t],la=h.high,ia=h.low,h=L+((p>>>14|s<<18)^(p>>>18|s<<14)^(p<<23|s>>>9)),w=Z+((s>>>14|p<<18)^(s>>>18|p<<14)^(s<<23|p>>>9))+(h>>> +0>>0?1:0),h=h+B,w=w+$+(h>>>0>>0?1:0),h=h+ia,w=w+la+(h>>>0>>0?1:0),h=h+g,w=w+q+(h>>>0>>0?1:0),g=C+ka,A=v+A+(g>>>0>>0?1:0),Z=X,L=K,X=W,K=J,W=s,J=p,p=I+h|0,s=Y+w+(p>>>0>>0?1:0)|0,Y=H,I=F,H=G,F=E,G=r,E=n,n=h+g|0,r=w+A+(n>>>0>>0?1:0)|0}O=f.low=O+n;f.high=aa+r+(O>>>0>>0?1:0);P=j.low=P+E;j.high=ba+G+(P>>>0>>0?1:0);Q=d.low=Q+F;d.high=ca+H+(Q>>>0>>0?1:0);R=l.low=R+I;l.high=da+Y+(R>>>0>>0?1:0);S=e.low=S+p;e.high=ea+s+(S>>>0

    >>0?1:0);T=m.low=T+J;m.high=fa+W+(T>>>0>>0?1: +0);U=N.low=U+K;N.high=ga+X+(U>>>0>>0?1:0);V=c.low=V+L;c.high=ha+Z+(V>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,f=8*a.sigBytes;b[f>>>5]|=128<<24-f%32;b[(f+128>>>10<<5)+30]=Math.floor(c/4294967296);b[(f+128>>>10<<5)+31]=c;a.sigBytes=4*b.length;this._process();return this._hash.toX32()},clone:function(){var a=c.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});j.SHA512=c._createHelper(b);j.HmacSHA512=c._createHmacHelper(b)})(); +(function(){var a=CryptoJS,j=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=j.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,y=k.words,z=0;z>>2]|=(p[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=p[b>>>2];else c.push.apply(c,p);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=n.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new q.init(b,c/2)}},k=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, +u=d.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,f=b.sigBytes,l=this.blockSize,e=f/(4*l),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*l;f=g.min(4*a,f);if(a){for(var h=0;ha;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(l<<5|l>>>27)+j+m[a];c=20>a?c+((k&h|~k&g)+1518500249):40>a?c+((k^h^g)+1859775393):60>a?c+((k&h|k&g|h&g)-1894007588):c+((k^h^ +g)-899497514);j=g;g=h;h=k<<30|k>>>2;k=l;l=c}b[0]=b[0]+l|0;b[1]=b[1]+k|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+j|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,l=8*d.sigBytes;e[l>>>5]|=128<<24-l%32;e[(l+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(l+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(j);g.HmacSHA1=d._createHmacHelper(j)})(); +(function(){var g=CryptoJS,j=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=j.parse(d));var g=e.blockSize,n=4*g;d.sigBytes>n&&(d=e.finalize(d));d.clamp();for(var q=this._oKey=d.clone(),b=this._iKey=d.clone(),l=q.words,k=b.words,h=0;h>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((n+r)%4);else if(65535>>2]=m[r>>>2];else b.push.apply(b,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=c.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],m=0;m>>2]>>>24-8*(n%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>3]|=parseInt(a.substr(n, +2),16)<<24-4*(n%8);return new s.init(m,b/2)}},a=b.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var m=[],n=0;n>>2]>>>24-8*(n%4)&255));return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>2]|=(a.charCodeAt(n)&255)<<24-8*(n%4);return new s.init(m,b)}},t=b.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +u=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,m=b.words,n=b.sigBytes,r=this.blockSize,c=n/(4*r),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*r;n=q.min(4*a,n);if(a){for(var u=0;u>>2]>>>24-8*(k%4)&255)<<16|(l[k+1>>>2]>>>24-8*((k+1)%4)&255)<<8|l[k+2>>>2]>>>24-8*((k+2)%4)&255,d=0;4>d&&k+0.75*d>>6*(3-d)&63));if(l=c.charAt(64))for(;e.length%4;)e.push(l);return e.join("")},parse:function(e){var l=e.length,p=this._map,c=p.charAt(64);c&&(c=e.indexOf(c),-1!=c&&(l=c));for(var c=[],s=0,b=0;b< +l;b++)if(b%4){var d=p.indexOf(e.charAt(b-1))<<2*(b%4),a=p.indexOf(e.charAt(b))>>>6-2*(b%4);c[s>>>2]|=(d|a)<<24-8*(s%4);s++}return k.create(c,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(q){function k(a,b,c,d,m,n,r){a=a+(b&c|~b&d)+m+r;return(a<>>32-n)+b}function e(a,b,c,d,m,n,r){a=a+(b&d|c&~d)+m+r;return(a<>>32-n)+b}function l(a,b,c,d,m,n,r){a=a+(b^c^d)+m+r;return(a<>>32-n)+b}function p(a,b,c,d,m,n,r){a=a+(c^(b|~d))+m+r;return(a<>>32-n)+b}for(var c=CryptoJS,s=c.lib,b=s.WordArray,d=s.Hasher,s=c.algo,a=[],t=0;64>t;t++)a[t]=4294967296*q.abs(q.sin(t+1))|0;s=s.MD5=d.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,c){for(var d=0;16>d;d++){var t=c+d,m=b[t];b[t]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var d=this._hash.words,t=b[c+0],m=b[c+1],n=b[c+2],r=b[c+3],x=b[c+4],s=b[c+5],q=b[c+6],y=b[c+7],z=b[c+8],A=b[c+9],B=b[c+10],C=b[c+11],D=b[c+12],E=b[c+13],F=b[c+14],G=b[c+15],f=d[0],g=d[1],h=d[2],j=d[3],f=k(f,g,h,j,t,7,a[0]),j=k(j,f,g,h,m,12,a[1]),h=k(h,j,f,g,n,17,a[2]),g=k(g,h,j,f,r,22,a[3]),f=k(f,g,h,j,x,7,a[4]),j=k(j,f,g,h,s,12,a[5]),h=k(h,j,f,g,q,17,a[6]),g=k(g,h,j,f,y,22,a[7]), +f=k(f,g,h,j,z,7,a[8]),j=k(j,f,g,h,A,12,a[9]),h=k(h,j,f,g,B,17,a[10]),g=k(g,h,j,f,C,22,a[11]),f=k(f,g,h,j,D,7,a[12]),j=k(j,f,g,h,E,12,a[13]),h=k(h,j,f,g,F,17,a[14]),g=k(g,h,j,f,G,22,a[15]),f=e(f,g,h,j,m,5,a[16]),j=e(j,f,g,h,q,9,a[17]),h=e(h,j,f,g,C,14,a[18]),g=e(g,h,j,f,t,20,a[19]),f=e(f,g,h,j,s,5,a[20]),j=e(j,f,g,h,B,9,a[21]),h=e(h,j,f,g,G,14,a[22]),g=e(g,h,j,f,x,20,a[23]),f=e(f,g,h,j,A,5,a[24]),j=e(j,f,g,h,F,9,a[25]),h=e(h,j,f,g,r,14,a[26]),g=e(g,h,j,f,z,20,a[27]),f=e(f,g,h,j,E,5,a[28]),j=e(j,f, +g,h,n,9,a[29]),h=e(h,j,f,g,y,14,a[30]),g=e(g,h,j,f,D,20,a[31]),f=l(f,g,h,j,s,4,a[32]),j=l(j,f,g,h,z,11,a[33]),h=l(h,j,f,g,C,16,a[34]),g=l(g,h,j,f,F,23,a[35]),f=l(f,g,h,j,m,4,a[36]),j=l(j,f,g,h,x,11,a[37]),h=l(h,j,f,g,y,16,a[38]),g=l(g,h,j,f,B,23,a[39]),f=l(f,g,h,j,E,4,a[40]),j=l(j,f,g,h,t,11,a[41]),h=l(h,j,f,g,r,16,a[42]),g=l(g,h,j,f,q,23,a[43]),f=l(f,g,h,j,A,4,a[44]),j=l(j,f,g,h,D,11,a[45]),h=l(h,j,f,g,G,16,a[46]),g=l(g,h,j,f,n,23,a[47]),f=p(f,g,h,j,t,6,a[48]),j=p(j,f,g,h,y,10,a[49]),h=p(h,j,f,g, +F,15,a[50]),g=p(g,h,j,f,s,21,a[51]),f=p(f,g,h,j,D,6,a[52]),j=p(j,f,g,h,r,10,a[53]),h=p(h,j,f,g,B,15,a[54]),g=p(g,h,j,f,m,21,a[55]),f=p(f,g,h,j,z,6,a[56]),j=p(j,f,g,h,G,10,a[57]),h=p(h,j,f,g,q,15,a[58]),g=p(g,h,j,f,E,21,a[59]),f=p(f,g,h,j,x,6,a[60]),j=p(j,f,g,h,C,10,a[61]),h=p(h,j,f,g,n,15,a[62]),g=p(g,h,j,f,A,21,a[63]);d[0]=d[0]+f|0;d[1]=d[1]+g|0;d[2]=d[2]+h|0;d[3]=d[3]+j|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=q.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});c.MD5=d._createHelper(s);c.HmacMD5=d._createHmacHelper(s)})(Math); +(function(){var q=CryptoJS,k=q.lib,e=k.Base,l=k.WordArray,k=q.algo,p=k.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:k.MD5,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,e){for(var b=this.cfg,d=b.hasher.create(),a=l.create(),k=a.words,p=b.keySize,b=b.iterations;k.length>>2]&255}};e.BlockCipher=d.extend({cfg:d.cfg.extend({mode:a,padding:u}),reset:function(){d.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(k.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(s)},parse:function(a){a=s.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},v=e.SerializableCipher=l.extend({cfg:l.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),k=(k.kdf={}).OpenSSL={execute:function(a,c,d,e){e||(e=p.random(8));a=b.create({keySize:c+d}).compute(a,e);d=p.create(a.words.slice(c),4*d);a.sigBytes=4*c;return w.create({key:a,iv:d,salt:e})}},H=e.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:k}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c, +a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}(); +(function(){function q(){for(var b=this._X,d=this._C,a=0;8>a;a++)p[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var e=b[a]+d[a],k=e&65535, +l=e>>>16;c[a]=((k*k>>>17)+k*l>>>15)+l*l^((e&4294901760)*e|0)+((e&65535)*e|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var k=CryptoJS,e=k.lib.StreamCipher,l=[],p=[],c=[],s=k.algo.RabbitLegacy= +e.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,a=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],e=this._b=0;4>e;e++)q.call(this);for(e=0;8>e;e++)b[e]^=a[e+4&7];if(c){var a=c.words,c=a[0],a=a[1],c=(c<<8|c>>>24)&16711935|(c<< +24|c>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e=c>>>16|a&4294901760,k=a<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=a;b[3]^=k;b[4]^=c;b[5]^=e;b[6]^=a;b[7]^=k;for(e=0;4>e;e++)q.call(this)}},_doProcessBlock:function(b,c){var a=this._X;q.call(this);l[0]=a[0]^a[5]>>>16^a[3]<<16;l[1]=a[2]^a[7]>>>16^a[5]<<16;l[2]=a[4]^a[1]>>>16^a[7]<<16;l[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)l[a]=(l[a]<<8|l[a]>>>24)&16711935|(l[a]<<24|l[a]>>>8)&4278255360,b[c+a]^=l[a]},blockSize:4,ivSize:2});k.RabbitLegacy= +e._createHelper(s)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/rabbit.js b/dashboard-ui/bower_components/cryptojslib/rollups/rabbit.js new file mode 100644 index 0000000000..5ea717ed4f --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/rabbit.js @@ -0,0 +1,36 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(q,k){var e={},l=e.lib={},p=function(){},c=l.Base={extend:function(a){p.prototype=this;var b=new p;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +s=l.WordArray=c.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=k?b:4*a.length},toString:function(a){return(a||d).stringify(this)},concat:function(a){var b=this.words,m=a.words,n=this.sigBytes;a=a.sigBytes;this.clamp();if(n%4)for(var r=0;r>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((n+r)%4);else if(65535>>2]=m[r>>>2];else b.push.apply(b,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=q.ceil(b/4)},clone:function(){var a=c.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],m=0;m>>2]>>>24-8*(n%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>3]|=parseInt(a.substr(n, +2),16)<<24-4*(n%8);return new s.init(m,b/2)}},a=b.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var m=[],n=0;n>>2]>>>24-8*(n%4)&255));return m.join("")},parse:function(a){for(var b=a.length,m=[],n=0;n>>2]|=(a.charCodeAt(n)&255)<<24-8*(n%4);return new s.init(m,b)}},u=b.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, +t=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=u.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,m=b.words,n=b.sigBytes,r=this.blockSize,c=n/(4*r),c=a?q.ceil(c):q.max((c|0)-this._minBufferSize,0);a=c*r;n=q.min(4*a,n);if(a){for(var t=0;t>>2]>>>24-8*(k%4)&255)<<16|(l[k+1>>>2]>>>24-8*((k+1)%4)&255)<<8|l[k+2>>>2]>>>24-8*((k+2)%4)&255,d=0;4>d&&k+0.75*d>>6*(3-d)&63));if(l=c.charAt(64))for(;e.length%4;)e.push(l);return e.join("")},parse:function(e){var l=e.length,p=this._map,c=p.charAt(64);c&&(c=e.indexOf(c),-1!=c&&(l=c));for(var c=[],s=0,b=0;b< +l;b++)if(b%4){var d=p.indexOf(e.charAt(b-1))<<2*(b%4),a=p.indexOf(e.charAt(b))>>>6-2*(b%4);c[s>>>2]|=(d|a)<<24-8*(s%4);s++}return k.create(c,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(q){function k(a,b,c,d,m,n,r){a=a+(b&c|~b&d)+m+r;return(a<>>32-n)+b}function e(a,b,c,d,m,n,r){a=a+(b&d|c&~d)+m+r;return(a<>>32-n)+b}function l(a,b,c,d,m,n,r){a=a+(b^c^d)+m+r;return(a<>>32-n)+b}function p(a,b,c,d,m,n,r){a=a+(c^(b|~d))+m+r;return(a<>>32-n)+b}for(var c=CryptoJS,s=c.lib,b=s.WordArray,d=s.Hasher,s=c.algo,a=[],u=0;64>u;u++)a[u]=4294967296*q.abs(q.sin(u+1))|0;s=s.MD5=d.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,c){for(var d=0;16>d;d++){var s=c+d,m=b[s];b[s]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var d=this._hash.words,s=b[c+0],m=b[c+1],n=b[c+2],r=b[c+3],x=b[c+4],u=b[c+5],q=b[c+6],y=b[c+7],z=b[c+8],A=b[c+9],B=b[c+10],C=b[c+11],D=b[c+12],E=b[c+13],F=b[c+14],G=b[c+15],f=d[0],g=d[1],h=d[2],j=d[3],f=k(f,g,h,j,s,7,a[0]),j=k(j,f,g,h,m,12,a[1]),h=k(h,j,f,g,n,17,a[2]),g=k(g,h,j,f,r,22,a[3]),f=k(f,g,h,j,x,7,a[4]),j=k(j,f,g,h,u,12,a[5]),h=k(h,j,f,g,q,17,a[6]),g=k(g,h,j,f,y,22,a[7]), +f=k(f,g,h,j,z,7,a[8]),j=k(j,f,g,h,A,12,a[9]),h=k(h,j,f,g,B,17,a[10]),g=k(g,h,j,f,C,22,a[11]),f=k(f,g,h,j,D,7,a[12]),j=k(j,f,g,h,E,12,a[13]),h=k(h,j,f,g,F,17,a[14]),g=k(g,h,j,f,G,22,a[15]),f=e(f,g,h,j,m,5,a[16]),j=e(j,f,g,h,q,9,a[17]),h=e(h,j,f,g,C,14,a[18]),g=e(g,h,j,f,s,20,a[19]),f=e(f,g,h,j,u,5,a[20]),j=e(j,f,g,h,B,9,a[21]),h=e(h,j,f,g,G,14,a[22]),g=e(g,h,j,f,x,20,a[23]),f=e(f,g,h,j,A,5,a[24]),j=e(j,f,g,h,F,9,a[25]),h=e(h,j,f,g,r,14,a[26]),g=e(g,h,j,f,z,20,a[27]),f=e(f,g,h,j,E,5,a[28]),j=e(j,f, +g,h,n,9,a[29]),h=e(h,j,f,g,y,14,a[30]),g=e(g,h,j,f,D,20,a[31]),f=l(f,g,h,j,u,4,a[32]),j=l(j,f,g,h,z,11,a[33]),h=l(h,j,f,g,C,16,a[34]),g=l(g,h,j,f,F,23,a[35]),f=l(f,g,h,j,m,4,a[36]),j=l(j,f,g,h,x,11,a[37]),h=l(h,j,f,g,y,16,a[38]),g=l(g,h,j,f,B,23,a[39]),f=l(f,g,h,j,E,4,a[40]),j=l(j,f,g,h,s,11,a[41]),h=l(h,j,f,g,r,16,a[42]),g=l(g,h,j,f,q,23,a[43]),f=l(f,g,h,j,A,4,a[44]),j=l(j,f,g,h,D,11,a[45]),h=l(h,j,f,g,G,16,a[46]),g=l(g,h,j,f,n,23,a[47]),f=p(f,g,h,j,s,6,a[48]),j=p(j,f,g,h,y,10,a[49]),h=p(h,j,f,g, +F,15,a[50]),g=p(g,h,j,f,u,21,a[51]),f=p(f,g,h,j,D,6,a[52]),j=p(j,f,g,h,r,10,a[53]),h=p(h,j,f,g,B,15,a[54]),g=p(g,h,j,f,m,21,a[55]),f=p(f,g,h,j,z,6,a[56]),j=p(j,f,g,h,G,10,a[57]),h=p(h,j,f,g,q,15,a[58]),g=p(g,h,j,f,E,21,a[59]),f=p(f,g,h,j,x,6,a[60]),j=p(j,f,g,h,C,10,a[61]),h=p(h,j,f,g,n,15,a[62]),g=p(g,h,j,f,A,21,a[63]);d[0]=d[0]+f|0;d[1]=d[1]+g|0;d[2]=d[2]+h|0;d[3]=d[3]+j|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=q.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});c.MD5=d._createHelper(s);c.HmacMD5=d._createHmacHelper(s)})(Math); +(function(){var q=CryptoJS,k=q.lib,e=k.Base,l=k.WordArray,k=q.algo,p=k.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:k.MD5,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,e){for(var b=this.cfg,d=b.hasher.create(),a=l.create(),k=a.words,p=b.keySize,b=b.iterations;k.length>>2]&255}};e.BlockCipher=d.extend({cfg:d.cfg.extend({mode:a,padding:t}),reset:function(){d.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(k.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(s)},parse:function(a){a=s.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},v=e.SerializableCipher=l.extend({cfg:l.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),k=(k.kdf={}).OpenSSL={execute:function(a,c,d,e){e||(e=p.random(8));a=b.create({keySize:c+d}).compute(a,e);d=p.create(a.words.slice(c),4*d);a.sigBytes=4*c;return w.create({key:a,iv:d,salt:e})}},H=e.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:k}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c, +a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}(); +(function(){function q(){for(var b=this._X,d=this._C,a=0;8>a;a++)p[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0>>0?1:0)|0;this._b=d[7]>>>0>>0?1:0;for(a=0;8>a;a++){var e=b[a]+d[a],k=e&65535, +l=e>>>16;c[a]=((k*k>>>17)+k*l>>>15)+l*l^((e&4294901760)*e|0)+((e&65535)*e|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var k=CryptoJS,e=k.lib.StreamCipher,l=[],p=[],c=[],s=k.algo.Rabbit= +e.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var e=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)q.call(this);for(a=0;8> +a;a++)b[a]^=e[a+4&7];if(c){var a=c.words,c=a[0],a=a[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e=c>>>16|a&4294901760,k=a<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=a;b[3]^=k;b[4]^=c;b[5]^=e;b[6]^=a;b[7]^=k;for(a=0;4>a;a++)q.call(this)}},_doProcessBlock:function(b,c){var a=this._X;q.call(this);l[0]=a[0]^a[5]>>>16^a[3]<<16;l[1]=a[2]^a[7]>>>16^a[5]<<16;l[2]=a[4]^a[1]>>>16^a[7]<<16;l[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)l[a]=(l[a]<<8|l[a]>>>24)& +16711935|(l[a]<<24|l[a]>>>8)&4278255360,b[c+a]^=l[a]},blockSize:4,ivSize:2});k.Rabbit=e._createHelper(s)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/rc4.js b/dashboard-ui/bower_components/cryptojslib/rollups/rc4.js new file mode 100644 index 0000000000..aba420f5e2 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/rc4.js @@ -0,0 +1,33 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(s,l){var e={},n=e.lib={},p=function(){},b=n.Base={extend:function(c){p.prototype=this;var a=new p;c&&a.mixIn(c);a.hasOwnProperty("init")||(a.init=function(){a.$super.init.apply(this,arguments)});a.init.prototype=a;a.$super=this;return a},create:function(){var c=this.extend();c.init.apply(c,arguments);return c},init:function(){},mixIn:function(c){for(var a in c)c.hasOwnProperty(a)&&(this[a]=c[a]);c.hasOwnProperty("toString")&&(this.toString=c.toString)},clone:function(){return this.init.prototype.extend(this)}}, +d=n.WordArray=b.extend({init:function(c,a){c=this.words=c||[];this.sigBytes=a!=l?a:4*c.length},toString:function(c){return(c||q).stringify(this)},concat:function(c){var a=this.words,m=c.words,f=this.sigBytes;c=c.sigBytes;this.clamp();if(f%4)for(var r=0;r>>2]|=(m[r>>>2]>>>24-8*(r%4)&255)<<24-8*((f+r)%4);else if(65535>>2]=m[r>>>2];else a.push.apply(a,m);this.sigBytes+=c;return this},clamp:function(){var c=this.words,a=this.sigBytes;c[a>>>2]&=4294967295<< +32-8*(a%4);c.length=s.ceil(a/4)},clone:function(){var c=b.clone.call(this);c.words=this.words.slice(0);return c},random:function(c){for(var a=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((r>>>4).toString(16));m.push((r&15).toString(16))}return m.join("")},parse:function(c){for(var a=c.length,m=[],f=0;f>>3]|=parseInt(c.substr(f, +2),16)<<24-4*(f%8);return new d.init(m,a/2)}},a=t.Latin1={stringify:function(c){var a=c.words;c=c.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(c){for(var a=c.length,m=[],f=0;f>>2]|=(c.charCodeAt(f)&255)<<24-8*(f%4);return new d.init(m,a)}},v=t.Utf8={stringify:function(c){try{return decodeURIComponent(escape(a.stringify(c)))}catch(u){throw Error("Malformed UTF-8 data");}},parse:function(c){return a.parse(unescape(encodeURIComponent(c)))}}, +u=n.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new d.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=v.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var u=this._data,m=u.words,f=u.sigBytes,r=this.blockSize,e=f/(4*r),e=a?s.ceil(e):s.max((e|0)-this._minBufferSize,0);a=e*r;f=s.min(4*a,f);if(a){for(var b=0;b>>2]>>>24-8*(d%4)&255)<<16|(n[d+1>>>2]>>>24-8*((d+1)%4)&255)<<8|n[d+2>>>2]>>>24-8*((d+2)%4)&255,q=0;4>q&&d+0.75*q>>6*(3-q)&63));if(n=b.charAt(64))for(;e.length%4;)e.push(n);return e.join("")},parse:function(e){var n=e.length,p=this._map,b=p.charAt(64);b&&(b=e.indexOf(b),-1!=b&&(n=b));for(var b=[],d=0,t=0;t< +n;t++)if(t%4){var q=p.indexOf(e.charAt(t-1))<<2*(t%4),a=p.indexOf(e.charAt(t))>>>6-2*(t%4);b[d>>>2]|=(q|a)<<24-8*(d%4);d++}return l.create(b,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(s){function l(a,b,c,e,m,f,r){a=a+(b&c|~b&e)+m+r;return(a<>>32-f)+b}function e(a,b,c,e,m,f,r){a=a+(b&e|c&~e)+m+r;return(a<>>32-f)+b}function n(a,b,c,e,m,f,r){a=a+(b^c^e)+m+r;return(a<>>32-f)+b}function p(a,b,c,e,m,f,r){a=a+(c^(b|~e))+m+r;return(a<>>32-f)+b}for(var b=CryptoJS,d=b.lib,t=d.WordArray,q=d.Hasher,d=b.algo,a=[],v=0;64>v;v++)a[v]=4294967296*s.abs(s.sin(v+1))|0;d=d.MD5=q.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(b,d){for(var c=0;16>c;c++){var q=d+c,m=b[q];b[q]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var c=this._hash.words,q=b[d+0],m=b[d+1],f=b[d+2],r=b[d+3],x=b[d+4],t=b[d+5],s=b[d+6],v=b[d+7],y=b[d+8],z=b[d+9],A=b[d+10],B=b[d+11],C=b[d+12],D=b[d+13],E=b[d+14],F=b[d+15],g=c[0],h=c[1],j=c[2],k=c[3],g=l(g,h,j,k,q,7,a[0]),k=l(k,g,h,j,m,12,a[1]),j=l(j,k,g,h,f,17,a[2]),h=l(h,j,k,g,r,22,a[3]),g=l(g,h,j,k,x,7,a[4]),k=l(k,g,h,j,t,12,a[5]),j=l(j,k,g,h,s,17,a[6]),h=l(h,j,k,g,v,22,a[7]), +g=l(g,h,j,k,y,7,a[8]),k=l(k,g,h,j,z,12,a[9]),j=l(j,k,g,h,A,17,a[10]),h=l(h,j,k,g,B,22,a[11]),g=l(g,h,j,k,C,7,a[12]),k=l(k,g,h,j,D,12,a[13]),j=l(j,k,g,h,E,17,a[14]),h=l(h,j,k,g,F,22,a[15]),g=e(g,h,j,k,m,5,a[16]),k=e(k,g,h,j,s,9,a[17]),j=e(j,k,g,h,B,14,a[18]),h=e(h,j,k,g,q,20,a[19]),g=e(g,h,j,k,t,5,a[20]),k=e(k,g,h,j,A,9,a[21]),j=e(j,k,g,h,F,14,a[22]),h=e(h,j,k,g,x,20,a[23]),g=e(g,h,j,k,z,5,a[24]),k=e(k,g,h,j,E,9,a[25]),j=e(j,k,g,h,r,14,a[26]),h=e(h,j,k,g,y,20,a[27]),g=e(g,h,j,k,D,5,a[28]),k=e(k,g, +h,j,f,9,a[29]),j=e(j,k,g,h,v,14,a[30]),h=e(h,j,k,g,C,20,a[31]),g=n(g,h,j,k,t,4,a[32]),k=n(k,g,h,j,y,11,a[33]),j=n(j,k,g,h,B,16,a[34]),h=n(h,j,k,g,E,23,a[35]),g=n(g,h,j,k,m,4,a[36]),k=n(k,g,h,j,x,11,a[37]),j=n(j,k,g,h,v,16,a[38]),h=n(h,j,k,g,A,23,a[39]),g=n(g,h,j,k,D,4,a[40]),k=n(k,g,h,j,q,11,a[41]),j=n(j,k,g,h,r,16,a[42]),h=n(h,j,k,g,s,23,a[43]),g=n(g,h,j,k,z,4,a[44]),k=n(k,g,h,j,C,11,a[45]),j=n(j,k,g,h,F,16,a[46]),h=n(h,j,k,g,f,23,a[47]),g=p(g,h,j,k,q,6,a[48]),k=p(k,g,h,j,v,10,a[49]),j=p(j,k,g,h, +E,15,a[50]),h=p(h,j,k,g,t,21,a[51]),g=p(g,h,j,k,C,6,a[52]),k=p(k,g,h,j,r,10,a[53]),j=p(j,k,g,h,A,15,a[54]),h=p(h,j,k,g,m,21,a[55]),g=p(g,h,j,k,y,6,a[56]),k=p(k,g,h,j,F,10,a[57]),j=p(j,k,g,h,s,15,a[58]),h=p(h,j,k,g,D,21,a[59]),g=p(g,h,j,k,x,6,a[60]),k=p(k,g,h,j,B,10,a[61]),j=p(j,k,g,h,f,15,a[62]),h=p(h,j,k,g,z,21,a[63]);c[0]=c[0]+g|0;c[1]=c[1]+h|0;c[2]=c[2]+j|0;c[3]=c[3]+k|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=s.floor(c/ +4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});b.MD5=q._createHelper(d);b.HmacMD5=q._createHmacHelper(d)})(Math); +(function(){var s=CryptoJS,l=s.lib,e=l.Base,n=l.WordArray,l=s.algo,p=l.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(b){this.cfg=this.cfg.extend(b)},compute:function(b,d){for(var e=this.cfg,q=e.hasher.create(),a=n.create(),l=a.words,p=e.keySize,e=e.iterations;l.length>>2]&255}};e.BlockCipher=q.extend({cfg:q.cfg.extend({mode:a,padding:u}),reset:function(){q.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a, +this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(l.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(b):b).toString(d)},parse:function(a){a=d.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},c=e.SerializableCipher=n.extend({cfg:n.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=p.random(8));a=t.create({keySize:b+c}).compute(a,d);c=p.create(a.words.slice(b),4*c);a.sigBytes=4*b;return w.create({key:a,iv:c,salt:d})}},G=e.PasswordBasedCipher=c.extend({cfg:c.cfg.extend({kdf:l}),encrypt:function(a,b,d,e){e=this.cfg.extend(e);d=e.kdf.execute(d, +a.keySize,a.ivSize);e.iv=d.iv;a=c.encrypt.call(this,a,b,d.key,e);a.mixIn(d);return a},decrypt:function(a,b,d,e){e=this.cfg.extend(e);b=this._parse(b,e.format);d=e.kdf.execute(d,a.keySize,a.ivSize,b.salt);e.iv=d.iv;return c.decrypt.call(this,a,b,d.key,e)}})}(); +(function(){function s(){for(var b=this._S,d=this._i,e=this._j,q=0,a=0;4>a;a++){var d=(d+1)%256,e=(e+b[d])%256,l=b[d];b[d]=b[e];b[e]=l;q|=b[(b[d]+b[e])%256]<<24-8*a}this._i=d;this._j=e;return q}var l=CryptoJS,e=l.lib.StreamCipher,n=l.algo,p=n.RC4=e.extend({_doReset:function(){for(var b=this._key,d=b.words,b=b.sigBytes,e=this._S=[],l=0;256>l;l++)e[l]=l;for(var a=l=0;256>l;l++){var n=l%b,a=(a+e[l]+(d[n>>>2]>>>24-8*(n%4)&255))%256,n=e[l];e[l]=e[a];e[a]=n}this._i=this._j=0},_doProcessBlock:function(b, +d){b[d]^=s.call(this)},keySize:8,ivSize:0});l.RC4=e._createHelper(p);n=n.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var b=this.cfg.drop;0>>2]|=(h[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=h[b>>>2];else c.push.apply(c,h);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=j.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((g>>>4).toString(16));b.push((g&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, +2),16)<<24-4*(d%8);return new u.init(b,c/2)}},A=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var b=a.length,h=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new u.init(h,b)}},g=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(A.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return A.parse(unescape(encodeURIComponent(a)))}}, +v=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=g.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,h=b.words,d=b.sigBytes,g=this.blockSize,v=d/(4*g),v=a?j.ceil(v):j.max((v|0)-this._minBufferSize,0);a=v*g;d=j.min(4*a,d);if(a){for(var e=0;eb;b++){var a=e+b,c=g[a];g[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360}var a=this._hash.words,c=D.words,h=A.words,d=z.words,j=t.words,k=u.words,l=w.words,B,m,n,p,x,C,q,r,s,y;C=B=a[0];q=m=a[1];r=n=a[2];s=p=a[3];y=x=a[4];for(var f,b=0;80>b;b+=1)f=B+g[e+d[b]]|0,f=16>b?f+((m^n^p)+c[0]):32>b?f+((m&n|~m&p)+c[1]):48>b? +f+(((m|~n)^p)+c[2]):64>b?f+((m&p|n&~p)+c[3]):f+((m^(n|~p))+c[4]),f|=0,f=f<>>32-k[b],f=f+x|0,B=x,x=p,p=n<<10|n>>>22,n=m,m=f,f=C+g[e+j[b]]|0,f=16>b?f+((q^(r|~s))+h[0]):32>b?f+((q&s|r&~s)+h[1]):48>b?f+(((q|~r)^s)+h[2]):64>b?f+((q&r|~q&s)+h[3]):f+((q^r^s)+h[4]),f|=0,f=f<>>32-l[b],f=f+y|0,C=y,y=s,s=r<<10|r>>>22,r=q,q=f;f=a[1]+n+s|0;a[1]=a[2]+p+y|0;a[2]=a[3]+x+C|0;a[3]=a[4]+B+q|0;a[4]=a[0]+m+r|0;a[0]=f},_doFinalize:function(){var g=this._data,e=g.words,b=8*this._nDataBytes,a=8*g.sigBytes; +e[a>>>5]|=128<<24-a%32;e[(a+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;g.sigBytes=4*(e.length+1);this._process();g=this._hash;e=g.words;for(b=0;5>b;b++)a=e[b],e[b]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;return g},clone:function(){var e=l.clone.call(this);e._hash=this._hash.clone();return e}});j.RIPEMD160=l._createHelper(k);j.HmacRIPEMD160=l._createHmacHelper(k)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha1.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha1.js new file mode 100644 index 0000000000..d0d589f715 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha1.js @@ -0,0 +1,15 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, +2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, +k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^ +k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha224.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha224.js new file mode 100644 index 0000000000..e1653c9888 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha224.js @@ -0,0 +1,17 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(g,l){var f={},k=f.lib={},h=function(){},m=k.Base={extend:function(a){h.prototype=this;var c=new h;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=k.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new q.init(d,c/2)}},n=t.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},j=t.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, +w=k.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?g.ceil(f):g.max((f|0)-this._minBufferSize,0);a=f*e;b=g.min(4*a,b);if(a){for(var u=0;un;){var j;a:{j=s;for(var w=g.sqrt(j),v=2;v<=w;v++)if(!(j%v)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=t(g.pow(s,0.5))),q[n]=t(g.pow(s,1/3)),n++);s++}var a=[],f=f.SHA256=h.extend({_doReset:function(){this._hash=new k.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],k=b[3],h=b[4],l=b[5],m=b[6],n=b[7],p=0;64>p;p++){if(16>p)a[p]= +c[d+p]|0;else{var j=a[p-15],r=a[p-2];a[p]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+a[p-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+a[p-16]}j=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&m)+q[p]+a[p];r=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);n=m;m=l;l=h;h=k+j|0;k=g;g=f;f=e;e=j+r|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+k|0;b[4]=b[4]+h|0;b[5]=b[5]+l|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=g.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=h.clone.call(this);a._hash=this._hash.clone();return a}});l.SHA256=h._createHelper(f);l.HmacSHA256=h._createHmacHelper(f)})(Math); +(function(){var g=CryptoJS,l=g.lib.WordArray,f=g.algo,k=f.SHA256,f=f.SHA224=k.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=k._doFinalize.call(this);f.sigBytes-=4;return f}});g.SHA224=k._createHelper(f);g.HmacSHA224=k._createHmacHelper(f)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha256.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha256.js new file mode 100644 index 0000000000..529db30cd0 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha256.js @@ -0,0 +1,16 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, +2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, +x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]= +c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; +d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha3.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha3.js new file mode 100644 index 0000000000..652505c6b6 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha3.js @@ -0,0 +1,19 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +s=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< +32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, +2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, +t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= +[],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ +(m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, +b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); +p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha384.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha384.js new file mode 100644 index 0000000000..dec5f581c7 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha384.js @@ -0,0 +1,25 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(a,c){var d={},j=d.lib={},f=function(){},m=j.Base={extend:function(a){f.prototype=this;var b=new f;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +B=j.WordArray=m.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=c?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,g=a.words,e=this.sigBytes;a=a.sigBytes;this.clamp();if(e%4)for(var k=0;k>>2]|=(g[k>>>2]>>>24-8*(k%4)&255)<<24-8*((e+k)%4);else if(65535>>2]=g[k>>>2];else b.push.apply(b,g);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< +32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],g=0;g>>2]>>>24-8*(e%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>3]|=parseInt(a.substr(e, +2),16)<<24-4*(e%8);return new B.init(g,b/2)}},F=v.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var g=[],e=0;e>>2]>>>24-8*(e%4)&255));return g.join("")},parse:function(a){for(var b=a.length,g=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new B.init(g,b)}},ha=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(F.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return F.parse(unescape(encodeURIComponent(a)))}}, +Z=j.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new B.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=ha.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,g=b.words,e=b.sigBytes,k=this.blockSize,m=e/(4*k),m=n?a.ceil(m):a.max((m|0)-this._minBufferSize,0);n=m*k;e=a.min(4*n,e);if(n){for(var c=0;cy;y++)v[y]=a();j=j.SHA512=d.extend({_doReset:function(){this._hash=new m.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,c){for(var d=this._hash.words, +f=d[0],j=d[1],b=d[2],g=d[3],e=d[4],k=d[5],m=d[6],d=d[7],y=f.high,M=f.low,$=j.high,N=j.low,aa=b.high,O=b.low,ba=g.high,P=g.low,ca=e.high,Q=e.low,da=k.high,R=k.low,ea=m.high,S=m.low,fa=d.high,T=d.low,s=y,p=M,G=$,D=N,H=aa,E=O,W=ba,I=P,t=ca,q=Q,U=da,J=R,V=ea,K=S,X=fa,L=T,u=0;80>u;u++){var z=v[u];if(16>u)var r=z.high=a[c+2*u]|0,h=z.low=a[c+2*u+1]|0;else{var r=v[u-15],h=r.high,w=r.low,r=(h>>>1|w<<31)^(h>>>8|w<<24)^h>>>7,w=(w>>>1|h<<31)^(w>>>8|h<<24)^(w>>>7|h<<25),C=v[u-2],h=C.high,l=C.low,C=(h>>>19|l<< +13)^(h<<3|l>>>29)^h>>>6,l=(l>>>19|h<<13)^(l<<3|h>>>29)^(l>>>6|h<<26),h=v[u-7],Y=h.high,A=v[u-16],x=A.high,A=A.low,h=w+h.low,r=r+Y+(h>>>0>>0?1:0),h=h+l,r=r+C+(h>>>0>>0?1:0),h=h+A,r=r+x+(h>>>0>>0?1:0);z.high=r;z.low=h}var Y=t&U^~t&V,A=q&J^~q&K,z=s&G^s&H^G&H,ja=p&D^p&E^D&E,w=(s>>>28|p<<4)^(s<<30|p>>>2)^(s<<25|p>>>7),C=(p>>>28|s<<4)^(p<<30|s>>>2)^(p<<25|s>>>7),l=B[u],ka=l.high,ga=l.low,l=L+((q>>>14|t<<18)^(q>>>18|t<<14)^(q<<23|t>>>9)),x=X+((t>>>14|q<<18)^(t>>>18|q<<14)^(t<<23|q>>>9))+(l>>>0< +L>>>0?1:0),l=l+A,x=x+Y+(l>>>0>>0?1:0),l=l+ga,x=x+ka+(l>>>0>>0?1:0),l=l+h,x=x+r+(l>>>0>>0?1:0),h=C+ja,z=w+z+(h>>>0>>0?1:0),X=V,L=K,V=U,K=J,U=t,J=q,q=I+l|0,t=W+x+(q>>>0>>0?1:0)|0,W=H,I=E,H=G,E=D,G=s,D=p,p=l+h|0,s=x+z+(p>>>0>>0?1:0)|0}M=f.low=M+p;f.high=y+s+(M>>>0

    >>0?1:0);N=j.low=N+D;j.high=$+G+(N>>>0>>0?1:0);O=b.low=O+E;b.high=aa+H+(O>>>0>>0?1:0);P=g.low=P+I;g.high=ba+W+(P>>>0>>0?1:0);Q=e.low=Q+q;e.high=ca+t+(Q>>>0>>0?1:0);R=k.low=R+J;k.high=da+U+(R>>>0>>0?1:0); +S=m.low=S+K;m.high=ea+V+(S>>>0>>0?1:0);T=d.low=T+L;d.high=fa+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,f=8*a.sigBytes;c[f>>>5]|=128<<24-f%32;c[(f+128>>>10<<5)+30]=Math.floor(d/4294967296);c[(f+128>>>10<<5)+31]=d;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});c.SHA512=d._createHelper(j);c.HmacSHA512=d._createHmacHelper(j)})(); +(function(){var a=CryptoJS,c=a.x64,d=c.Word,j=c.WordArray,c=a.algo,f=c.SHA512,c=c.SHA384=f.extend({_doReset:function(){this._hash=new j.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384= +f._createHelper(c);a.HmacSHA384=f._createHmacHelper(c)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/sha512.js b/dashboard-ui/bower_components/cryptojslib/rollups/sha512.js new file mode 100644 index 0000000000..ecbffee76a --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/sha512.js @@ -0,0 +1,23 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< +32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, +2),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}}, +h=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;hq;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words, +g=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^ +(e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0>>0?1:0),e=e+k,u=u+D+(e>>>0>>0?1:0),e=e+C,u=u+A+(e>>>0>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0>> +0?1:0),k=k+C,A=A+Y+(k>>>0>>0?1:0),k=k+ea,A=A+ia+(k>>>0>>0?1:0),k=k+e,A=A+u+(k>>>0>>0?1:0),e=D+ha,B=z+B+(e>>>0>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0>>0?1:0);S=l.low= +S+L;l.high=ca+V+(S>>>0>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/rollups/tripledes.js b/dashboard-ui/bower_components/cryptojslib/rollups/tripledes.js new file mode 100644 index 0000000000..ba24108e7e --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/rollups/tripledes.js @@ -0,0 +1,51 @@ +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var t=0;t>>2]|=(m[t>>>2]>>>24-8*(t%4)&255)<<24-8*((f+t)%4);else if(65535>>2]=m[t>>>2];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((t>>>4).toString(16));m.push((t&15).toString(16))}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new q.init(m,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, +r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(4*t),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*t;f=u.min(4*a,f);if(a){for(var e=0;e>>2]>>>24-8*(q%4)&255)<<16|(n[q+1>>>2]>>>24-8*((q+1)%4)&255)<<8|n[q+2>>>2]>>>24-8*((q+2)%4)&255,v=0;4>v&&q+0.75*v>>6*(3-v)&63));if(n=s.charAt(64))for(;d.length%4;)d.push(n);return d.join("")},parse:function(d){var n=d.length,p=this._map,s=p.charAt(64);s&&(s=d.indexOf(s),-1!=s&&(n=s));for(var s=[],q=0,w=0;w< +n;w++)if(w%4){var v=p.indexOf(d.charAt(w-1))<<2*(w%4),b=p.indexOf(d.charAt(w))>>>6-2*(w%4);s[q>>>2]|=(v|b)<<24-8*(q%4);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); +(function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<>>32-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<>>32-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<>>32-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<>>32-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, +_doProcessBlock:function(r,e){for(var a=0;16>a;a++){var c=e+a,m=r[c];r[c]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var a=this._hash.words,c=r[e+0],m=r[e+1],f=r[e+2],t=r[e+3],y=r[e+4],q=r[e+5],s=r[e+6],w=r[e+7],v=r[e+8],u=r[e+9],x=r[e+10],z=r[e+11],A=r[e+12],B=r[e+13],C=r[e+14],D=r[e+15],g=a[0],h=a[1],j=a[2],k=a[3],g=l(g,h,j,k,c,7,b[0]),k=l(k,g,h,j,m,12,b[1]),j=l(j,k,g,h,f,17,b[2]),h=l(h,j,k,g,t,22,b[3]),g=l(g,h,j,k,y,7,b[4]),k=l(k,g,h,j,q,12,b[5]),j=l(j,k,g,h,s,17,b[6]),h=l(h,j,k,g,w,22,b[7]), +g=l(g,h,j,k,v,7,b[8]),k=l(k,g,h,j,u,12,b[9]),j=l(j,k,g,h,x,17,b[10]),h=l(h,j,k,g,z,22,b[11]),g=l(g,h,j,k,A,7,b[12]),k=l(k,g,h,j,B,12,b[13]),j=l(j,k,g,h,C,17,b[14]),h=l(h,j,k,g,D,22,b[15]),g=d(g,h,j,k,m,5,b[16]),k=d(k,g,h,j,s,9,b[17]),j=d(j,k,g,h,z,14,b[18]),h=d(h,j,k,g,c,20,b[19]),g=d(g,h,j,k,q,5,b[20]),k=d(k,g,h,j,x,9,b[21]),j=d(j,k,g,h,D,14,b[22]),h=d(h,j,k,g,y,20,b[23]),g=d(g,h,j,k,u,5,b[24]),k=d(k,g,h,j,C,9,b[25]),j=d(j,k,g,h,t,14,b[26]),h=d(h,j,k,g,v,20,b[27]),g=d(g,h,j,k,B,5,b[28]),k=d(k,g, +h,j,f,9,b[29]),j=d(j,k,g,h,w,14,b[30]),h=d(h,j,k,g,A,20,b[31]),g=n(g,h,j,k,q,4,b[32]),k=n(k,g,h,j,v,11,b[33]),j=n(j,k,g,h,z,16,b[34]),h=n(h,j,k,g,C,23,b[35]),g=n(g,h,j,k,m,4,b[36]),k=n(k,g,h,j,y,11,b[37]),j=n(j,k,g,h,w,16,b[38]),h=n(h,j,k,g,x,23,b[39]),g=n(g,h,j,k,B,4,b[40]),k=n(k,g,h,j,c,11,b[41]),j=n(j,k,g,h,t,16,b[42]),h=n(h,j,k,g,s,23,b[43]),g=n(g,h,j,k,u,4,b[44]),k=n(k,g,h,j,A,11,b[45]),j=n(j,k,g,h,D,16,b[46]),h=n(h,j,k,g,f,23,b[47]),g=p(g,h,j,k,c,6,b[48]),k=p(k,g,h,j,w,10,b[49]),j=p(j,k,g,h, +C,15,b[50]),h=p(h,j,k,g,q,21,b[51]),g=p(g,h,j,k,A,6,b[52]),k=p(k,g,h,j,t,10,b[53]),j=p(j,k,g,h,x,15,b[54]),h=p(h,j,k,g,m,21,b[55]),g=p(g,h,j,k,v,6,b[56]),k=p(k,g,h,j,D,10,b[57]),j=p(j,k,g,h,s,15,b[58]),h=p(h,j,k,g,B,21,b[59]),g=p(g,h,j,k,y,6,b[60]),k=p(k,g,h,j,z,10,b[61]),j=p(j,k,g,h,f,15,b[62]),h=p(h,j,k,g,u,21,b[63]);a[0]=a[0]+g|0;a[1]=a[1]+h|0;a[2]=a[2]+j|0;a[3]=a[3]+k|0},_doFinalize:function(){var b=this._data,e=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;e[c>>>5]|=128<<24-c%32;var m=u.floor(a/ +4294967296);e[(c+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;e[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(e.length+1);this._process();b=this._hash;e=b.words;for(a=0;4>a;a++)c=e[a],e[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math); +(function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=1;this._mode=b.call(a, +this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([1398893684, +1701076831]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var b=p.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, +decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random(8));a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),4*b);a.sigBytes=4*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e, +c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}(); +(function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<>>b^this._lBlock)&a;this._lBlock^=c;this._rBlock^=c<c;c++){var d=q[c]-1;a[c]=b[d>>>5]>>>31-d%32&1}b=this._subKeys=[];for(d=0;16>d;d++){for(var f=b[d]=[],l=v[d],c=0;24>c;c++)f[c/6|0]|=a[(w[c]-1+l)%28]<<31-c%6,f[4+(c/6|0)]|=a[28+(w[c+24]-1+l)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>= +4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}a=this._invSubKeys=[];for(c=0;16>c;c++)a[c]=b[15-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+1];u.call(this,4,252645135);u.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);u.call(this,1,1431655765);for(var d=0;16>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=0,r=0;8>r;r++)q|=b[r][((p^ +f[r])&x[r])>>>0];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);u.call(this,16,65535);u.call(this,4,252645135);e[a]=this._lBlock;e[a+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(0,2)));this._des2=r.createEncryptor(p.create(b.slice(2,4)));this._des3= +r.createEncryptor(p.create(b.slice(4,6)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=n._createHelper(s)})(); diff --git a/dashboard-ui/bower_components/cryptojslib/status.bat b/dashboard-ui/bower_components/cryptojslib/status.bat new file mode 100644 index 0000000000..f49c82cdb0 --- /dev/null +++ b/dashboard-ui/bower_components/cryptojslib/status.bat @@ -0,0 +1,2 @@ +git status +git log --branches --not --remotes \ No newline at end of file diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json deleted file mode 100644 index adda4287b4..0000000000 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "doc-ready", - "version": "1.0.4", - "description": "Let's get this party started... on document ready", - "main": "doc-ready.js", - "dependencies": { - "eventie": "^1" - }, - "homepage": "https://github.com/desandro/doc-ready", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "document", - "ready" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "examples", - "package.json", - "component.json", - "index.html" - ], - "_release": "1.0.4", - "_resolution": { - "type": "version", - "tag": "v1.0.4", - "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" - }, - "_source": "git://github.com/desandro/doc-ready.git", - "_target": "1.0.x", - "_originalSource": "doc-ready" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/doc-ready/bower.json b/dashboard-ui/bower_components/doc-ready/bower.json deleted file mode 100644 index 726600ba93..0000000000 --- a/dashboard-ui/bower_components/doc-ready/bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "doc-ready", - "version": "1.0.4", - "description": "Let's get this party started... on document ready", - "main": "doc-ready.js", - "dependencies": { - "eventie": "^1" - }, - "homepage": "https://github.com/desandro/doc-ready", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "document", - "ready" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "examples", - "package.json", - "component.json", - "index.html" - ] -} diff --git a/dashboard-ui/bower_components/doc-ready/doc-ready.js b/dashboard-ui/bower_components/doc-ready/doc-ready.js deleted file mode 100644 index bc5e40e1ec..0000000000 --- a/dashboard-ui/bower_components/doc-ready/doc-ready.js +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * docReady v1.0.4 - * Cross browser DOMContentLoaded event emitter - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true*/ -/*global define: false, require: false, module: false */ - -( function( window ) { - -'use strict'; - -var document = window.document; -// collection of functions to be triggered on ready -var queue = []; - -function docReady( fn ) { - // throw out non-functions - if ( typeof fn !== 'function' ) { - return; - } - - if ( docReady.isReady ) { - // ready now, hit it - fn(); - } else { - // queue function when ready - queue.push( fn ); - } -} - -docReady.isReady = false; - -// triggered on various doc ready events -function onReady( event ) { - // bail if already triggered or IE8 document is not ready just yet - var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; - if ( docReady.isReady || isIE8NotReady ) { - return; - } - - trigger(); -} - -function trigger() { - docReady.isReady = true; - // process queue - for ( var i=0, len = queue.length; i < len; i++ ) { - var fn = queue[i]; - fn(); - } -} - -function defineDocReady( eventie ) { - // trigger ready if page is ready - if ( document.readyState === 'complete' ) { - trigger(); - } else { - // listen for events - eventie.bind( document, 'DOMContentLoaded', onReady ); - eventie.bind( document, 'readystatechange', onReady ); - eventie.bind( window, 'load', onReady ); - } - - return docReady; -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ 'eventie/eventie' ], defineDocReady ); -} else if ( typeof exports === 'object' ) { - module.exports = defineDocReady( require('eventie') ); -} else { - // browser global - window.docReady = defineDocReady( window.eventie ); -} - -})( window ); diff --git a/dashboard-ui/thirdparty/emby-icons.html b/dashboard-ui/bower_components/emby-icons/emby-icons.html similarity index 98% rename from dashboard-ui/thirdparty/emby-icons.html rename to dashboard-ui/bower_components/emby-icons/emby-icons.html index 009ce14c89..a95f5abbe2 100644 --- a/dashboard-ui/thirdparty/emby-icons.html +++ b/dashboard-ui/bower_components/emby-icons/emby-icons.html @@ -31,8 +31,8 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for @demo demo/index.html --> - - + + @@ -141,6 +141,8 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for + + diff --git a/dashboard-ui/bower_components/eventEmitter/.bower.json b/dashboard-ui/bower_components/eventEmitter/.bower.json deleted file mode 100644 index 46dc12a4ac..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/.bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "eventEmitter", - "description": "Event based JavaScript for the browser", - "version": "4.3.0", - "main": [ - "./EventEmitter.js" - ], - "author": { - "name": "Oliver Caldwell", - "web": "http://oli.me.uk/" - }, - "license": "Unlicense", - "keywords": [ - "events", - "structure" - ], - "ignore": [ - "docs", - "tests", - "tools", - ".gitignore", - "package.json" - ], - "homepage": "https://github.com/Olical/EventEmitter", - "_release": "4.3.0", - "_resolution": { - "type": "version", - "tag": "v4.3.0", - "commit": "34545d1b761fca48d7e4d9c71efc868a8d101419" - }, - "_source": "git://github.com/Olical/EventEmitter.git", - "_target": ">=4.2 <5", - "_originalSource": "eventEmitter" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventEmitter/EventEmitter.js b/dashboard-ui/bower_components/eventEmitter/EventEmitter.js deleted file mode 100644 index 5211bae912..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/EventEmitter.js +++ /dev/null @@ -1,474 +0,0 @@ -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ - -;(function () { - 'use strict'; - - /** - * Class for managing events. - * Can be extended to provide event functionality in other classes. - * - * @class EventEmitter Manages event registering and emitting. - */ - function EventEmitter() {} - - // Shortcuts to improve speed and size - var proto = EventEmitter.prototype; - var exports = this; - var originalGlobalValue = exports.EventEmitter; - - /** - * Finds the index of the listener for the event in its storage array. - * - * @param {Function[]} listeners Array of listeners to search through. - * @param {Function} listener Method to look for. - * @return {Number} Index of the specified listener, -1 if not found - * @api private - */ - function indexOfListener(listeners, listener) { - var i = listeners.length; - while (i--) { - if (listeners[i].listener === listener) { - return i; - } - } - - return -1; - } - - /** - * Alias a method while keeping the context correct, to allow for overwriting of target method. - * - * @param {String} name The name of the target method. - * @return {Function} The aliased method - * @api private - */ - function alias(name) { - return function aliasClosure() { - return this[name].apply(this, arguments); - }; - } - - /** - * Returns the listener array for the specified event. - * Will initialise the event object and listener arrays if required. - * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them. - * Each property in the object response is an array of listener functions. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Function[]|Object} All listener functions for the event. - */ - proto.getListeners = function getListeners(evt) { - var events = this._getEvents(); - var response; - var key; - - // Return a concatenated array of all matching events if - // the selector is a regular expression. - if (evt instanceof RegExp) { - response = {}; - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - response[key] = events[key]; - } - } - } - else { - response = events[evt] || (events[evt] = []); - } - - return response; - }; - - /** - * Takes a list of listener objects and flattens it into a list of listener functions. - * - * @param {Object[]} listeners Raw listener objects. - * @return {Function[]} Just the listener functions. - */ - proto.flattenListeners = function flattenListeners(listeners) { - var flatListeners = []; - var i; - - for (i = 0; i < listeners.length; i += 1) { - flatListeners.push(listeners[i].listener); - } - - return flatListeners; - }; - - /** - * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Object} All listener functions for an event in an object. - */ - proto.getListenersAsObject = function getListenersAsObject(evt) { - var listeners = this.getListeners(evt); - var response; - - if (listeners instanceof Array) { - response = {}; - response[evt] = listeners; - } - - return response || listeners; - }; - - /** - * Adds a listener function to the specified event. - * The listener will not be added if it is a duplicate. - * If the listener returns true then it will be removed after it is called. - * If you pass a regular expression as the event name then the listener will be added to all events that match it. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListener = function addListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var listenerIsWrapped = typeof listener === 'object'; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) { - listeners[key].push(listenerIsWrapped ? listener : { - listener: listener, - once: false - }); - } - } - - return this; - }; - - /** - * Alias of addListener - */ - proto.on = alias('addListener'); - - /** - * Semi-alias of addListener. It will add a listener that will be - * automatically removed after its first execution. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addOnceListener = function addOnceListener(evt, listener) { - return this.addListener(evt, { - listener: listener, - once: true - }); - }; - - /** - * Alias of addOnceListener. - */ - proto.once = alias('addOnceListener'); - - /** - * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad. - * You need to tell it what event names should be matched by a regex. - * - * @param {String} evt Name of the event to create. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvent = function defineEvent(evt) { - this.getListeners(evt); - return this; - }; - - /** - * Uses defineEvent to define multiple events. - * - * @param {String[]} evts An array of event names to define. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvents = function defineEvents(evts) { - for (var i = 0; i < evts.length; i += 1) { - this.defineEvent(evts[i]); - } - return this; - }; - - /** - * Removes a listener function from the specified event. - * When passed a regular expression as the event name, it will remove the listener from all events that match it. - * - * @param {String|RegExp} evt Name of the event to remove the listener from. - * @param {Function} listener Method to remove from the event. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListener = function removeListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var index; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - index = indexOfListener(listeners[key], listener); - - if (index !== -1) { - listeners[key].splice(index, 1); - } - } - } - - return this; - }; - - /** - * Alias of removeListener - */ - proto.off = alias('removeListener'); - - /** - * Adds listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added. - * You can also pass it a regular expression to add the array of listeners to all events that match it. - * Yeah, this function does quite a bit. That's probably a bad thing. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListeners = function addListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(false, evt, listeners); - }; - - /** - * Removes listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be removed. - * You can also pass it a regular expression to remove the listeners from all events that match it. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListeners = function removeListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(true, evt, listeners); - }; - - /** - * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level. - * The first argument will determine if the listeners are removed (true) or added (false). - * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be added/removed. - * You can also pass it a regular expression to manipulate the listeners of all events that match it. - * - * @param {Boolean} remove True if you want to remove listeners, false if you want to add. - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add/remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) { - var i; - var value; - var single = remove ? this.removeListener : this.addListener; - var multiple = remove ? this.removeListeners : this.addListeners; - - // If evt is an object then pass each of its properties to this method - if (typeof evt === 'object' && !(evt instanceof RegExp)) { - for (i in evt) { - if (evt.hasOwnProperty(i) && (value = evt[i])) { - // Pass the single listener straight through to the singular method - if (typeof value === 'function') { - single.call(this, i, value); - } - else { - // Otherwise pass back to the multiple function - multiple.call(this, i, value); - } - } - } - } - else { - // So evt must be a string - // And listeners must be an array of listeners - // Loop over it and pass each one to the multiple method - i = listeners.length; - while (i--) { - single.call(this, evt, listeners[i]); - } - } - - return this; - }; - - /** - * Removes all listeners from a specified event. - * If you do not specify an event then all listeners will be removed. - * That means every event will be emptied. - * You can also pass a regex to remove all events that match it. - * - * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeEvent = function removeEvent(evt) { - var type = typeof evt; - var events = this._getEvents(); - var key; - - // Remove different things depending on the state of evt - if (type === 'string') { - // Remove all listeners for the specified event - delete events[evt]; - } - else if (evt instanceof RegExp) { - // Remove all events matching the regex. - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - delete events[key]; - } - } - } - else { - // Remove all listeners in all events - delete this._events; - } - - return this; - }; - - /** - * Alias of removeEvent. - * - * Added to mirror the node API. - */ - proto.removeAllListeners = alias('removeEvent'); - - /** - * Emits an event of your choice. - * When emitted, every listener attached to that event will be executed. - * If you pass the optional argument array then those arguments will be passed to every listener upon execution. - * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately. - * So they will not arrive within the array on the other side, they will be separate. - * You can also pass a regular expression to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {Array} [args] Optional array of arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emitEvent = function emitEvent(evt, args) { - var listenersMap = this.getListenersAsObject(evt); - var listeners; - var listener; - var i; - var key; - var response; - - for (key in listenersMap) { - if (listenersMap.hasOwnProperty(key)) { - listeners = listenersMap[key].slice(0); - i = listeners.length; - - while (i--) { - // If the listener returns true then it shall be removed from the event - // The function is executed either with a basic call or an apply if there is an args array - listener = listeners[i]; - - if (listener.once === true) { - this.removeListener(evt, listener.listener); - } - - response = listener.listener.apply(this, args || []); - - if (response === this._getOnceReturnValue()) { - this.removeListener(evt, listener.listener); - } - } - } - } - - return this; - }; - - /** - * Alias of emitEvent - */ - proto.trigger = alias('emitEvent'); - - /** - * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on. - * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {...*} Optional additional arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emit = function emit(evt) { - var args = Array.prototype.slice.call(arguments, 1); - return this.emitEvent(evt, args); - }; - - /** - * Sets the current value to check against when executing listeners. If a - * listeners return value matches the one set here then it will be removed - * after execution. This value defaults to true. - * - * @param {*} value The new value to check for when executing listeners. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.setOnceReturnValue = function setOnceReturnValue(value) { - this._onceReturnValue = value; - return this; - }; - - /** - * Fetches the current value to check against when executing listeners. If - * the listeners return value matches this one then it should be removed - * automatically. It will return true by default. - * - * @return {*|Boolean} The current value to check for or the default, true. - * @api private - */ - proto._getOnceReturnValue = function _getOnceReturnValue() { - if (this.hasOwnProperty('_onceReturnValue')) { - return this._onceReturnValue; - } - else { - return true; - } - }; - - /** - * Fetches the events object and creates one if required. - * - * @return {Object} The events storage object. - * @api private - */ - proto._getEvents = function _getEvents() { - return this._events || (this._events = {}); - }; - - /** - * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version. - * - * @return {Function} Non conflicting EventEmitter class. - */ - EventEmitter.noConflict = function noConflict() { - exports.EventEmitter = originalGlobalValue; - return EventEmitter; - }; - - // Expose the class either via AMD, CommonJS or the global object - if (typeof define === 'function' && define.amd) { - define(function () { - return EventEmitter; - }); - } - else if (typeof module === 'object' && module.exports){ - module.exports = EventEmitter; - } - else { - exports.EventEmitter = EventEmitter; - } -}.call(this)); diff --git a/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js b/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js deleted file mode 100644 index f85b5e371c..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ -(function(){"use strict";function t(){}function i(t,n){for(var e=t.length;e--;)if(t[e].listener===n)return e;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var e=t.prototype,r=this,s=r.EventEmitter;e.getListeners=function(n){var r,e,t=this._getEvents();if(n instanceof RegExp){r={};for(e in t)t.hasOwnProperty(e)&&n.test(e)&&(r[e]=t[e])}else r=t[n]||(t[n]=[]);return r},e.flattenListeners=function(t){var e,n=[];for(e=0;e diff --git a/dashboard-ui/bower_components/eventEmitter/bower.json b/dashboard-ui/bower_components/eventEmitter/bower.json deleted file mode 100644 index 39b9803a0c..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "eventEmitter", - "description": "Event based JavaScript for the browser", - "version": "4.3.0", - "main": [ - "./EventEmitter.js" - ], - "author": { - "name": "Oliver Caldwell", - "web": "http://oli.me.uk/" - }, - "license": "Unlicense", - "keywords": [ - "events", - "structure" - ], - "ignore": [ - "docs", - "tests", - "tools", - ".gitignore", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/eventEmitter/component.json b/dashboard-ui/bower_components/eventEmitter/component.json deleted file mode 100644 index 34e0670c60..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/component.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "eventEmitter", - "repo": "Olical/EventEmitter", - "description": "Event based JavaScript for the browser.", - "version": "4.3.0", - "scripts": ["EventEmitter.js"], - "main": "EventEmitter.js", - "license": "Unlicense" -} diff --git a/dashboard-ui/bower_components/eventie/.bower.json b/dashboard-ui/bower_components/eventie/.bower.json deleted file mode 100644 index 917d217ea8..0000000000 --- a/dashboard-ui/bower_components/eventie/.bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "main": "eventie.js", - "description": "event binding helper", - "ignore": [ - "component.json", - "test.html", - "**/.*", - "node_modules", - "bower_components" - ], - "homepage": "https://github.com/desandro/eventie", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "event" - ], - "license": "MIT", - "_release": "1.0.6", - "_resolution": { - "type": "version", - "tag": "v1.0.6", - "commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa" - }, - "_source": "git://github.com/desandro/eventie.git", - "_target": "^1", - "_originalSource": "eventie" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventie/bower.json b/dashboard-ui/bower_components/eventie/bower.json deleted file mode 100644 index 96092a6db1..0000000000 --- a/dashboard-ui/bower_components/eventie/bower.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "main": "eventie.js", - "description": "event binding helper", - "ignore": [ - "component.json", - "test.html", - "**/.*", - "node_modules", - "bower_components" - ], - "homepage": "https://github.com/desandro/eventie", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "event" - ], - "license": "MIT" -} diff --git a/dashboard-ui/bower_components/eventie/eventie.js b/dashboard-ui/bower_components/eventie/eventie.js deleted file mode 100644 index 2bf9929071..0000000000 --- a/dashboard-ui/bower_components/eventie/eventie.js +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * eventie v1.0.6 - * event binding helper - * eventie.bind( elem, 'click', myFn ) - * eventie.unbind( elem, 'click', myFn ) - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( window ) { - -'use strict'; - -var docElem = document.documentElement; - -var bind = function() {}; - -function getIEEvent( obj ) { - var event = window.event; - // add event.target - event.target = event.target || event.srcElement || obj; - return event; -} - -if ( docElem.addEventListener ) { - bind = function( obj, type, fn ) { - obj.addEventListener( type, fn, false ); - }; -} else if ( docElem.attachEvent ) { - bind = function( obj, type, fn ) { - obj[ type + fn ] = fn.handleEvent ? - function() { - var event = getIEEvent( obj ); - fn.handleEvent.call( fn, event ); - } : - function() { - var event = getIEEvent( obj ); - fn.call( obj, event ); - }; - obj.attachEvent( "on" + type, obj[ type + fn ] ); - }; -} - -var unbind = function() {}; - -if ( docElem.removeEventListener ) { - unbind = function( obj, type, fn ) { - obj.removeEventListener( type, fn, false ); - }; -} else if ( docElem.detachEvent ) { - unbind = function( obj, type, fn ) { - obj.detachEvent( "on" + type, obj[ type + fn ] ); - try { - delete obj[ type + fn ]; - } catch ( err ) { - // can't delete window object properties - obj[ type + fn ] = undefined; - } - }; -} - -var eventie = { - bind: bind, - unbind: unbind -}; - -// ----- module definition ----- // - -if ( typeof define === 'function' && define.amd ) { - // AMD - define( eventie ); -} else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = eventie; -} else { - // browser global - window.eventie = eventie; -} - -})( window ); diff --git a/dashboard-ui/bower_components/eventie/package.json b/dashboard-ui/bower_components/eventie/package.json deleted file mode 100644 index 5ce57406fc..0000000000 --- a/dashboard-ui/bower_components/eventie/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "description": "Event binding helper", - "main": "eventie.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/desandro/eventie.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/desandro/eventie/issues" - }, - "homepage": "https://github.com/desandro/eventie", - "keywords": [ - "DOM", - "event" - ], - "author": "David DeSandro" -} diff --git a/dashboard-ui/bower_components/fetch/.bower.json b/dashboard-ui/bower_components/fetch/.bower.json new file mode 100644 index 0000000000..96d72ad5cb --- /dev/null +++ b/dashboard-ui/bower_components/fetch/.bower.json @@ -0,0 +1,28 @@ +{ + "name": "fetch", + "main": "fetch.js", + "devDependencies": { + "es6-promise": "1.0.0" + }, + "ignore": [ + ".*", + "*.md", + "examples/", + "Makefile", + "package.json", + "script/", + "test/" + ], + "homepage": "https://github.com/github/fetch", + "version": "0.10.1", + "_release": "0.10.1", + "_resolution": { + "type": "version", + "tag": "v0.10.1", + "commit": "f4f8ca8d0ba6c7d11e5317a84189913cefe55809" + }, + "_source": "git://github.com/github/fetch.git", + "_target": "~0.10.1", + "_originalSource": "fetch", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/fetch/LICENSE b/dashboard-ui/bower_components/fetch/LICENSE new file mode 100644 index 0000000000..ef00ba265e --- /dev/null +++ b/dashboard-ui/bower_components/fetch/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014-2015 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dashboard-ui/bower_components/fetch/bower.json b/dashboard-ui/bower_components/fetch/bower.json new file mode 100644 index 0000000000..8966a30894 --- /dev/null +++ b/dashboard-ui/bower_components/fetch/bower.json @@ -0,0 +1,16 @@ +{ + "name": "fetch", + "main": "fetch.js", + "devDependencies": { + "es6-promise": "1.0.0" + }, + "ignore": [ + ".*", + "*.md", + "examples/", + "Makefile", + "package.json", + "script/", + "test/" + ] +} diff --git a/dashboard-ui/bower_components/fetch/fetch.js b/dashboard-ui/bower_components/fetch/fetch.js new file mode 100644 index 0000000000..f89f27a663 --- /dev/null +++ b/dashboard-ui/bower_components/fetch/fetch.js @@ -0,0 +1,381 @@ +(function() { + 'use strict'; + + if (self.fetch) { + return + } + + function normalizeName(name) { + if (typeof name !== 'string') { + name = String(name) + } + if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { + throw new TypeError('Invalid character in header field name') + } + return name.toLowerCase() + } + + function normalizeValue(value) { + if (typeof value !== 'string') { + value = String(value) + } + return value + } + + function Headers(headers) { + this.map = {} + + if (headers instanceof Headers) { + headers.forEach(function(value, name) { + this.append(name, value) + }, this) + + } else if (headers) { + Object.getOwnPropertyNames(headers).forEach(function(name) { + this.append(name, headers[name]) + }, this) + } + } + + Headers.prototype.append = function(name, value) { + name = normalizeName(name) + value = normalizeValue(value) + var list = this.map[name] + if (!list) { + list = [] + this.map[name] = list + } + list.push(value) + } + + Headers.prototype['delete'] = function(name) { + delete this.map[normalizeName(name)] + } + + Headers.prototype.get = function(name) { + var values = this.map[normalizeName(name)] + return values ? values[0] : null + } + + Headers.prototype.getAll = function(name) { + return this.map[normalizeName(name)] || [] + } + + Headers.prototype.has = function(name) { + return this.map.hasOwnProperty(normalizeName(name)) + } + + Headers.prototype.set = function(name, value) { + this.map[normalizeName(name)] = [normalizeValue(value)] + } + + Headers.prototype.forEach = function(callback, thisArg) { + Object.getOwnPropertyNames(this.map).forEach(function(name) { + this.map[name].forEach(function(value) { + callback.call(thisArg, value, name, this) + }, this) + }, this) + } + + function consumed(body) { + if (body.bodyUsed) { + return Promise.reject(new TypeError('Already read')) + } + body.bodyUsed = true + } + + function fileReaderReady(reader) { + return new Promise(function(resolve, reject) { + reader.onload = function() { + resolve(reader.result) + } + reader.onerror = function() { + reject(reader.error) + } + }) + } + + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader() + reader.readAsArrayBuffer(blob) + return fileReaderReady(reader) + } + + function readBlobAsText(blob) { + var reader = new FileReader() + reader.readAsText(blob) + return fileReaderReady(reader) + } + + var support = { + blob: 'FileReader' in self && 'Blob' in self && (function() { + try { + new Blob(); + return true + } catch(e) { + return false + } + })(), + formData: 'FormData' in self, + arrayBuffer: 'ArrayBuffer' in self + } + + function Body() { + this.bodyUsed = false + + + this._initBody = function(body) { + this._bodyInit = body + if (typeof body === 'string') { + this._bodyText = body + } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { + this._bodyBlob = body + } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { + this._bodyFormData = body + } else if (!body) { + this._bodyText = '' + } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) { + // Only support ArrayBuffers for POST method. + // Receiving ArrayBuffers happens via Blobs, instead. + } else { + throw new Error('unsupported BodyInit type') + } + } + + if (support.blob) { + this.blob = function() { + var rejected = consumed(this) + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return Promise.resolve(this._bodyBlob) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as blob') + } else { + return Promise.resolve(new Blob([this._bodyText])) + } + } + + this.arrayBuffer = function() { + return this.blob().then(readBlobAsArrayBuffer) + } + + this.text = function() { + var rejected = consumed(this) + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return readBlobAsText(this._bodyBlob) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as text') + } else { + return Promise.resolve(this._bodyText) + } + } + } else { + this.text = function() { + var rejected = consumed(this) + return rejected ? rejected : Promise.resolve(this._bodyText) + } + } + + if (support.formData) { + this.formData = function() { + return this.text().then(decode) + } + } + + this.json = function() { + return this.text().then(JSON.parse) + } + + return this + } + + // HTTP methods whose capitalization should be normalized + var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] + + function normalizeMethod(method) { + var upcased = method.toUpperCase() + return (methods.indexOf(upcased) > -1) ? upcased : method + } + + function Request(input, options) { + options = options || {} + var body = options.body + if (Request.prototype.isPrototypeOf(input)) { + if (input.bodyUsed) { + throw new TypeError('Already read') + } + this.url = input.url + this.credentials = input.credentials + if (!options.headers) { + this.headers = new Headers(input.headers) + } + this.method = input.method + this.mode = input.mode + if (!body) { + body = input._bodyInit + input.bodyUsed = true + } + } else { + this.url = input + } + + this.credentials = options.credentials || this.credentials || 'omit' + if (options.headers || !this.headers) { + this.headers = new Headers(options.headers) + } + this.method = normalizeMethod(options.method || this.method || 'GET') + this.mode = options.mode || this.mode || null + this.referrer = null + + if ((this.method === 'GET' || this.method === 'HEAD') && body) { + throw new TypeError('Body not allowed for GET or HEAD requests') + } + this._initBody(body) + } + + Request.prototype.clone = function() { + return new Request(this) + } + + function decode(body) { + var form = new FormData() + body.trim().split('&').forEach(function(bytes) { + if (bytes) { + var split = bytes.split('=') + var name = split.shift().replace(/\+/g, ' ') + var value = split.join('=').replace(/\+/g, ' ') + form.append(decodeURIComponent(name), decodeURIComponent(value)) + } + }) + return form + } + + function headers(xhr) { + var head = new Headers() + var pairs = xhr.getAllResponseHeaders().trim().split('\n') + pairs.forEach(function(header) { + var split = header.trim().split(':') + var key = split.shift().trim() + var value = split.join(':').trim() + head.append(key, value) + }) + return head + } + + Body.call(Request.prototype) + + function Response(bodyInit, options) { + if (!options) { + options = {} + } + + this._initBody(bodyInit) + this.type = 'default' + this.status = options.status + this.ok = this.status >= 200 && this.status < 300 + this.statusText = options.statusText + this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers) + this.url = options.url || '' + } + + Body.call(Response.prototype) + + Response.prototype.clone = function() { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }) + } + + Response.error = function() { + var response = new Response(null, {status: 0, statusText: ''}) + response.type = 'error' + return response + } + + var redirectStatuses = [301, 302, 303, 307, 308] + + Response.redirect = function(url, status) { + if (redirectStatuses.indexOf(status) === -1) { + throw new RangeError('Invalid status code') + } + + return new Response(null, {status: status, headers: {location: url}}) + } + + self.Headers = Headers; + self.Request = Request; + self.Response = Response; + + self.fetch = function(input, init) { + return new Promise(function(resolve, reject) { + var request + if (Request.prototype.isPrototypeOf(input) && !init) { + request = input + } else { + request = new Request(input, init) + } + + var xhr = new XMLHttpRequest() + + function responseURL() { + if ('responseURL' in xhr) { + return xhr.responseURL + } + + // Avoid security warnings on getResponseHeader when not allowed by CORS + if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) { + return xhr.getResponseHeader('X-Request-URL') + } + + return; + } + + xhr.onload = function() { + var status = (xhr.status === 1223) ? 204 : xhr.status + if (status < 100 || status > 599) { + reject(new TypeError('Network request failed')) + return + } + var options = { + status: status, + statusText: xhr.statusText, + headers: headers(xhr), + url: responseURL() + } + var body = 'response' in xhr ? xhr.response : xhr.responseText; + resolve(new Response(body, options)) + } + + xhr.onerror = function() { + reject(new TypeError('Network request failed')) + } + + xhr.open(request.method, request.url, true) + + if (request.credentials === 'include') { + xhr.withCredentials = true + } + + if ('responseType' in xhr && support.blob) { + xhr.responseType = 'blob' + } + + request.headers.forEach(function(value, name) { + xhr.setRequestHeader(name, value) + }) + + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) + }) + } + self.fetch.polyfill = true +})(); diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json b/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json deleted file mode 100644 index 1f625f15c9..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "fizzy-ui-utils", - "version": "1.0.1", - "authors": [ - "David DeSandro" - ], - "description": "UI utilities", - "main": "utils.js", - "dependencies": { - "doc-ready": "~1.0.4", - "matches-selector": "~1.0.2" - }, - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "utility", - "ui" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ], - "homepage": "https://github.com/metafizzy/fizzy-ui-utils", - "_release": "1.0.1", - "_resolution": { - "type": "version", - "tag": "v1.0.1", - "commit": "823b543b583f4831d25aadf94c26fc6018e62172" - }, - "_source": "git://github.com/metafizzy/fizzy-ui-utils.git", - "_target": "~1.0.1", - "_originalSource": "fizzy-ui-utils" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/bower.json b/dashboard-ui/bower_components/fizzy-ui-utils/bower.json deleted file mode 100644 index b7caf63c5e..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "fizzy-ui-utils", - "version": "1.0.1", - "authors": [ - "David DeSandro" - ], - "description": "UI utilities", - "main": "utils.js", - "dependencies": { - "doc-ready": "~1.0.4", - "matches-selector": "~1.0.2" - }, - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "utility", - "ui" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/utils.js b/dashboard-ui/bower_components/fizzy-ui-utils/utils.js deleted file mode 100644 index ebac88264d..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/utils.js +++ /dev/null @@ -1,270 +0,0 @@ -/** - * Fizzy UI utils v1.0.1 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - /*global define: false, module: false, require: false */ - 'use strict'; - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'doc-ready/doc-ready', - 'matches-selector/matches-selector' - ], function( docReady, matchesSelector ) { - return factory( window, docReady, matchesSelector ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('doc-ready'), - require('desandro-matches-selector') - ); - } else { - // browser global - window.fizzyUIUtils = factory( - window, - window.docReady, - window.matchesSelector - ); - } - -}( window, function factory( window, docReady, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- isArray ----- // - -var objToString = Object.prototype.toString; -utils.isArray = function( obj ) { - return objToString.call( obj ) == '[object Array]'; -}; - -// ----- makeArray ----- // - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - var ary = []; - if ( utils.isArray( obj ) ) { - // use object if already an array - ary = obj; - } else if ( obj && typeof obj.length == 'number' ) { - // convert nodeList to array - for ( var i=0, len = obj.length; i < len; i++ ) { - ary.push( obj[i] ); - } - } else { - // array of single index - ary.push( obj ); - } - return ary; -}; - -// ----- indexOf ----- // - -// index of helper cause IE8 -utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { - return ary.indexOf( obj ); - } : function( ary, obj ) { - for ( var i=0, len = ary.length; i < len; i++ ) { - if ( ary[i] === obj ) { - return i; - } - } - return -1; - }; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = utils.indexOf( ary, obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- isElement ----- // - -// http://stackoverflow.com/a/384380/182183 -utils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ? - function isElementDOM2( obj ) { - return obj instanceof HTMLElement; - } : - function isElementQuirky( obj ) { - return obj && typeof obj == 'object' && - obj.nodeType == 1 && typeof obj.nodeName == 'string'; - }; - -// ----- setText ----- // - -utils.setText = ( function() { - var setTextProperty; - function setText( elem, text ) { - // only check setTextProperty once - setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' ); - elem[ setTextProperty ] = text; - } - return setText; -})(); - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // check that elem is an actual element - if ( !utils.isElement( elem ) ) { - continue; - } - // filter & find items if we have a selector - if ( selector ) { - // filter siblings - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var j=0, jLen = childElems.length; j < jLen; j++ ) { - ffElems.push( childElems[j] ); - } - } else { - ffElems.push( elem ); - } - } - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - if ( timeout ) { - clearTimeout( timeout ); - } - var args = arguments; - - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold || 100 ); - }; -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-option attribute - */ -utils.htmlInit = function( WidgetClass, namespace ) { - docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var elems = document.querySelectorAll( '.js-' + dashedNamespace ); - var dataAttr = 'data-' + dashedNamespace + '-options'; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var attr = elem.getAttribute( dataAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + - elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' + - error ); - } - continue; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('layoutname') - var jQuery = window.jQuery; - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - } - }); -}; - -// ----- ----- // - -return utils; - -})); diff --git a/dashboard-ui/bower_components/get-size/.bower.json b/dashboard-ui/bower_components/get-size/.bower.json deleted file mode 100644 index 4064d0bff5..0000000000 --- a/dashboard-ui/bower_components/get-size/.bower.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "get-size", - "version": "1.2.2", - "main": "get-size.js", - "description": "measures element size", - "dependencies": { - "get-style-property": "1.x" - }, - "devDependencies": { - "qunit": "~1.10" - }, - "ignore": [ - "test/", - "**/.*", - "package.json", - "component.json", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "https://github.com/desandro/get-size", - "authors": [ - "David DeSandro " - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "size", - "dom", - "width", - "height" - ], - "license": "MIT", - "_release": "1.2.2", - "_resolution": { - "type": "version", - "tag": "v1.2.2", - "commit": "059bbf3aa78997e4ca761e6d742b2e9efe674e08" - }, - "_source": "git://github.com/desandro/get-size.git", - "_target": "~1.2.2", - "_originalSource": "get-size" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/get-size/bower.json b/dashboard-ui/bower_components/get-size/bower.json deleted file mode 100644 index 96563a7ea6..0000000000 --- a/dashboard-ui/bower_components/get-size/bower.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "get-size", - "version": "1.2.2", - "main": "get-size.js", - "description": "measures element size", - "dependencies": { - "get-style-property": "1.x" - }, - "devDependencies": { - "qunit": "~1.10" - }, - "ignore": [ - "test/", - "**/.*", - "package.json", - "component.json", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "https://github.com/desandro/get-size", - "authors": [ - "David DeSandro " - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "size", - "dom", - "width", - "height" - ], - "license": "MIT" -} diff --git a/dashboard-ui/bower_components/get-size/get-size.js b/dashboard-ui/bower_components/get-size/get-size.js deleted file mode 100644 index e0df175be4..0000000000 --- a/dashboard-ui/bower_components/get-size/get-size.js +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * getSize v1.2.2 - * measure size of elements - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, exports: false, require: false, module: false, console: false */ - -( function( window, undefined ) { - -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') === -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - - - -function defineGetSize( getStyleProperty ) { - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var getStyle, boxSizingProp, isBoxSizeOuter; - -/** - * setup vars and functions - * do it on initial getSize(), rather than on script load - * For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - var getComputedStyle = window.getComputedStyle; - getStyle = ( function() { - var getStyleFn = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - return function getStyle( elem ) { - var style = getStyleFn( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See http://bit.ly/getsizebug1' ); - } - return style; - }; - })(); - - // -------------------------- box sizing -------------------------- // - - boxSizingProp = getStyleProperty('boxSizing'); - - /** - * WebKit measures the outer-width on style.width on border-box elems - * IE & Firefox measures the inner-width - */ - if ( boxSizingProp ) { - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style[ boxSizingProp ] = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - - isBoxSizeOuter = getStyleSize( style.width ) === 200; - body.removeChild( div ); - } - -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem === 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem !== 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display === 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = !!( boxSizingProp && - style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' ); - - // get all measurements - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - value = mungeNonPixel( elem, value ); - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -// IE8 returns percent values, not pixels -// taken from jQuery's curCSS -function mungeNonPixel( elem, value ) { - // IE8 and has percent value - if ( window.getComputedStyle || value.indexOf('%') === -1 ) { - return value; - } - var style = elem.style; - // Remember the original values - var left = style.left; - var rs = elem.runtimeStyle; - var rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = value; - value = style.pixelLeft; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - - return value; -} - -return getSize; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD for RequireJS - define( [ 'get-style-property/get-style-property' ], defineGetSize ); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = defineGetSize( require('desandro-get-style-property') ); -} else { - // browser global - window.getSize = defineGetSize( window.getStyleProperty ); -} - -})( window ); diff --git a/dashboard-ui/bower_components/get-size/index.html b/dashboard-ui/bower_components/get-size/index.html deleted file mode 100644 index 19811d0f0d..0000000000 --- a/dashboard-ui/bower_components/get-size/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - getSize - - - - - - -

    getSize

    - -
    -
    box1
    -
    - -
    -
    box2
    -
    - -
    -
    box3
    -
    - -
    -
    box4
    -
    - -
    -
    box5
    -
    - -
    -
    box6
    -
    - - - - - diff --git a/dashboard-ui/bower_components/get-style-property/.bower.json b/dashboard-ui/bower_components/get-style-property/.bower.json deleted file mode 100644 index d943fa3b04..0000000000 --- a/dashboard-ui/bower_components/get-style-property/.bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "get-style-property", - "main": "get-style-property.js", - "version": "1.0.4", - "homepage": "https://github.com/desandro/get-style-property", - "authors": [ - "David DeSandro " - ], - "description": "quick & dirty CSS property testing", - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "CSS", - "DOM" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "_release": "1.0.4", - "_resolution": { - "type": "version", - "tag": "v1.0.4", - "commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1" - }, - "_source": "git://github.com/desandro/get-style-property.git", - "_target": "~1.0.4", - "_originalSource": "get-style-property" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/get-style-property/bower.json b/dashboard-ui/bower_components/get-style-property/bower.json deleted file mode 100644 index 9801272227..0000000000 --- a/dashboard-ui/bower_components/get-style-property/bower.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "get-style-property", - "main": "get-style-property.js", - "version": "1.0.4", - "homepage": "https://github.com/desandro/get-style-property", - "authors": [ - "David DeSandro " - ], - "description": "quick & dirty CSS property testing", - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "CSS", - "DOM" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/dashboard-ui/bower_components/get-style-property/component.json b/dashboard-ui/bower_components/get-style-property/component.json deleted file mode 100644 index e4ca369bd4..0000000000 --- a/dashboard-ui/bower_components/get-style-property/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "get-style-property", - "repo": "desandro/get-style-property", - "description": "Quick and dirty CSS property testing", - "version": "1.0.4", - "scripts": ["get-style-property.js"], - "main": "get-style-property.js" -} diff --git a/dashboard-ui/bower_components/get-style-property/get-style-property.js b/dashboard-ui/bower_components/get-style-property/get-style-property.js deleted file mode 100644 index b48064a970..0000000000 --- a/dashboard-ui/bower_components/get-style-property/get-style-property.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * getStyleProperty v1.0.4 - * original by kangax - * http://perfectionkills.com/feature-testing-css-properties/ - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true */ -/*global define: false, exports: false, module: false */ - -( function( window ) { - -'use strict'; - -var prefixes = 'Webkit Moz ms Ms O'.split(' '); -var docElemStyle = document.documentElement.style; - -function getStyleProperty( propName ) { - if ( !propName ) { - return; - } - - // test standard property first - if ( typeof docElemStyle[ propName ] === 'string' ) { - return propName; - } - - // capitalize - propName = propName.charAt(0).toUpperCase() + propName.slice(1); - - // test vendor specific properties - var prefixed; - for ( var i=0, len = prefixes.length; i < len; i++ ) { - prefixed = prefixes[i] + propName; - if ( typeof docElemStyle[ prefixed ] === 'string' ) { - return prefixed; - } - } -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( function() { - return getStyleProperty; - }); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = getStyleProperty; -} else { - // browser global - window.getStyleProperty = getStyleProperty; -} - -})( window ); diff --git a/dashboard-ui/bower_components/get-style-property/package.json b/dashboard-ui/bower_components/get-style-property/package.json deleted file mode 100644 index c32819f25c..0000000000 --- a/dashboard-ui/bower_components/get-style-property/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "desandro-get-style-property", - "version": "1.0.4", - "description": "Quick and dirty CSS property testing", - "main": "get-style-property.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/desandro/get-style-property.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/desandro/get-style-property/issues" - }, - "homepage": "https://github.com/desandro/get-style-property", - "keywords": [ - "CSS", - "DOM" - ], - "author": "David DeSandro" -} diff --git a/dashboard-ui/bower_components/headroom.js/.bower.json b/dashboard-ui/bower_components/headroom.js/.bower.json new file mode 100644 index 0000000000..56af337e88 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "headroom.js", + "version": "0.7.0", + "main": [ + "dist/headroom.js", + "dist/jQuery.headroom.js", + "dist/angular.headroom.js" + ], + "ignore": [ + "**/.*", + "node_modules", + "components", + "spec", + "Gruntfile.js", + "src", + "bower_components", + "test", + "tests" + ], + "homepage": "http://wicky.nillia.ms/headroom.js/", + "authors": [ + "WickyNilliams" + ], + "description": "Hide your header until you need it", + "keywords": [ + "header", + "js", + "scroll" + ], + "license": "MIT", + "_release": "0.7.0", + "_resolution": { + "type": "version", + "tag": "v0.7.0", + "commit": "d08c6be31172d0ba821e7bbe6b20892377d8c363" + }, + "_source": "git://github.com/WickyNilliams/headroom.js.git", + "_target": "~0.7.0", + "_originalSource": "headroom.js", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/promise-polyfill/LICENSE b/dashboard-ui/bower_components/headroom.js/LICENSE similarity index 93% rename from dashboard-ui/bower_components/promise-polyfill/LICENSE rename to dashboard-ui/bower_components/headroom.js/LICENSE index 94b9dac3f5..19b7d4b480 100644 --- a/dashboard-ui/bower_components/promise-polyfill/LICENSE +++ b/dashboard-ui/bower_components/headroom.js/LICENSE @@ -1,5 +1,6 @@ -Copyright (c) 2014 Taylor Hakes -Copyright (c) 2014 Forbes Lindesay +The MIT License (MIT) + +Copyright (c) 2013 Nick Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dashboard-ui/bower_components/headroom.js/bower.json b/dashboard-ui/bower_components/headroom.js/bower.json new file mode 100644 index 0000000000..00955b4216 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/bower.json @@ -0,0 +1,27 @@ +{ + "name": "headroom.js", + "version": "0.7.0", + "main": ["dist/headroom.js", "dist/jQuery.headroom.js", "dist/angular.headroom.js"], + "ignore": [ + "**/.*", + "node_modules", + "components", + "spec", + "Gruntfile.js", + "src", + "bower_components", + "test", + "tests" + ], + "homepage": "http://wicky.nillia.ms/headroom.js/", + "authors": [ + "WickyNilliams" + ], + "description": "Hide your header until you need it", + "keywords": [ + "header", + "js", + "scroll" + ], + "license": "MIT" +} diff --git a/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.js b/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.js new file mode 100644 index 0000000000..5dc1d755f7 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.js @@ -0,0 +1,43 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +(function(angular) { + + if(!angular) { + return; + } + + /////////////// + // Directive // + /////////////// + + angular.module('headroom', []).directive('headroom', function() { + return { + restrict: 'EA', + scope: { + tolerance: '=', + offset: '=', + classes: '=', + scroller: '@' + }, + link: function(scope, element) { + var options = {}; + angular.forEach(Headroom.options, function(value, key) { + options[key] = scope[key] || Headroom.options[key]; + }); + if (options.scroller) { + options.scroller = angular.element(options.scroller)[0]; + } + var headroom = new Headroom(element[0], options); + headroom.init(); + scope.$on('destroy', function() { + headroom.destroy(); + }); + } + }; + }); + +}(window.angular)); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.min.js b/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.min.js new file mode 100644 index 0000000000..6b72f342c5 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/angular.headroom.min.js @@ -0,0 +1,7 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +!function(a){a&&a.module("headroom",[]).directive("headroom",function(){return{restrict:"EA",scope:{tolerance:"=",offset:"=",classes:"=",scroller:"@"},link:function(b,c){var d={};a.forEach(Headroom.options,function(a,c){d[c]=b[c]||Headroom.options[c]}),d.scroller&&(d.scroller=a.element(d.scroller)[0]);var e=new Headroom(c[0],d);e.init(),b.$on("destroy",function(){e.destroy()})}}})}(window.angular); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/dist/headroom.js b/dashboard-ui/bower_components/headroom.js/dist/headroom.js new file mode 100644 index 0000000000..df812cd9ad --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/headroom.js @@ -0,0 +1,390 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +(function(window, document) { + + 'use strict'; + + /* exported features */ + + var features = { + bind : !!(function(){}.bind), + classList : 'classList' in document.documentElement, + rAF : !!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame) + }; + window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; + + /** + * Handles debouncing of events via requestAnimationFrame + * @see http://www.html5rocks.com/en/tutorials/speed/animations/ + * @param {Function} callback The callback to handle whichever event + */ + function Debouncer (callback) { + this.callback = callback; + this.ticking = false; + } + Debouncer.prototype = { + constructor : Debouncer, + + /** + * dispatches the event to the supplied callback + * @private + */ + update : function() { + this.callback && this.callback(); + this.ticking = false; + }, + + /** + * ensures events don't get stacked + * @private + */ + requestTick : function() { + if(!this.ticking) { + requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this))); + this.ticking = true; + } + }, + + /** + * Attach this as the event listeners + */ + handleEvent : function() { + this.requestTick(); + } + }; + /** + * Check if object is part of the DOM + * @constructor + * @param {Object} obj element to check + */ + function isDOMElement(obj) { + return obj && typeof window !== 'undefined' && (obj === window || obj.nodeType); + } + + /** + * Helper function for extending objects + */ + function extend (object /*, objectN ... */) { + if(arguments.length <= 0) { + throw new Error('Missing arguments in extend function'); + } + + var result = object || {}, + key, + i; + + for (i = 1; i < arguments.length; i++) { + var replacement = arguments[i] || {}; + + for (key in replacement) { + // Recurse into object except if the object is a DOM element + if(typeof result[key] === 'object' && ! isDOMElement(result[key])) { + result[key] = extend(result[key], replacement[key]); + } + else { + result[key] = result[key] || replacement[key]; + } + } + } + + return result; + } + + /** + * Helper function for normalizing tolerance option to object format + */ + function normalizeTolerance (t) { + return t === Object(t) ? t : { down : t, up : t }; + } + + /** + * UI enhancement for fixed headers. + * Hides header when scrolling down + * Shows header when scrolling up + * @constructor + * @param {DOMElement} elem the header element + * @param {Object} options options for the widget + */ + function Headroom (elem, options) { + options = extend(options, Headroom.options); + + this.lastKnownScrollY = 0; + this.elem = elem; + this.debouncer = new Debouncer(this.update.bind(this)); + this.tolerance = normalizeTolerance(options.tolerance); + this.classes = options.classes; + this.offset = options.offset; + this.scroller = options.scroller; + this.initialised = false; + this.onPin = options.onPin; + this.onUnpin = options.onUnpin; + this.onTop = options.onTop; + this.onNotTop = options.onNotTop; + } + Headroom.prototype = { + constructor : Headroom, + + /** + * Initialises the widget + */ + init : function() { + if(!Headroom.cutsTheMustard) { + return; + } + + this.elem.classList.add(this.classes.initial); + + // defer event registration to handle browser + // potentially restoring previous scroll position + setTimeout(this.attachEvent.bind(this), 100); + + return this; + }, + + /** + * Unattaches events and removes any classes that were added + */ + destroy : function() { + var classes = this.classes; + + this.initialised = false; + this.elem.classList.remove(classes.unpinned, classes.pinned, classes.top, classes.initial); + this.scroller.removeEventListener('scroll', this.debouncer, false); + }, + + /** + * Attaches the scroll event + * @private + */ + attachEvent : function() { + if(!this.initialised){ + this.lastKnownScrollY = this.getScrollY(); + this.initialised = true; + this.scroller.addEventListener('scroll', this.debouncer, false); + + this.debouncer.handleEvent(); + } + }, + + /** + * Unpins the header if it's currently pinned + */ + unpin : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(classList.contains(classes.pinned) || !classList.contains(classes.unpinned)) { + classList.add(classes.unpinned); + classList.remove(classes.pinned); + this.onUnpin && this.onUnpin.call(this); + } + }, + + /** + * Pins the header if it's currently unpinned + */ + pin : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(classList.contains(classes.unpinned)) { + classList.remove(classes.unpinned); + classList.add(classes.pinned); + this.onPin && this.onPin.call(this); + } + }, + + /** + * Handles the top states + */ + top : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.top)) { + classList.add(classes.top); + classList.remove(classes.notTop); + this.onTop && this.onTop.call(this); + } + }, + + /** + * Handles the not top state + */ + notTop : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.notTop)) { + classList.add(classes.notTop); + classList.remove(classes.top); + this.onNotTop && this.onNotTop.call(this); + } + }, + + /** + * Gets the Y scroll position + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY + * @return {Number} pixels the page has scrolled along the Y-axis + */ + getScrollY : function() { + return (this.scroller.pageYOffset !== undefined) + ? this.scroller.pageYOffset + : (this.scroller.scrollTop !== undefined) + ? this.scroller.scrollTop + : (document.documentElement || document.body.parentNode || document.body).scrollTop; + }, + + /** + * Gets the height of the viewport + * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript + * @return {int} the height of the viewport in pixels + */ + getViewportHeight : function () { + return window.innerHeight + || document.documentElement.clientHeight + || document.body.clientHeight; + }, + + /** + * Gets the height of the document + * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/ + * @return {int} the height of the document in pixels + */ + getDocumentHeight : function () { + var body = document.body, + documentElement = document.documentElement; + + return Math.max( + body.scrollHeight, documentElement.scrollHeight, + body.offsetHeight, documentElement.offsetHeight, + body.clientHeight, documentElement.clientHeight + ); + }, + + /** + * Gets the height of the DOM element + * @param {Object} elm the element to calculate the height of which + * @return {int} the height of the element in pixels + */ + getElementHeight : function (elm) { + return Math.max( + elm.scrollHeight, + elm.offsetHeight, + elm.clientHeight + ); + }, + + /** + * Gets the height of the scroller element + * @return {int} the height of the scroller element in pixels + */ + getScrollerHeight : function () { + return (this.scroller === window || this.scroller === document.body) + ? this.getDocumentHeight() + : this.getElementHeight(this.scroller); + }, + + /** + * determines if the scroll position is outside of document boundaries + * @param {int} currentScrollY the current y scroll position + * @return {bool} true if out of bounds, false otherwise + */ + isOutOfBounds : function (currentScrollY) { + var pastTop = currentScrollY < 0, + pastBottom = currentScrollY + this.getViewportHeight() > this.getScrollerHeight(); + + return pastTop || pastBottom; + }, + + /** + * determines if the tolerance has been exceeded + * @param {int} currentScrollY the current scroll y position + * @return {bool} true if tolerance exceeded, false otherwise + */ + toleranceExceeded : function (currentScrollY, direction) { + return Math.abs(currentScrollY-this.lastKnownScrollY) >= this.tolerance[direction]; + }, + + /** + * determine if it is appropriate to unpin + * @param {int} currentScrollY the current y scroll position + * @param {bool} toleranceExceeded has the tolerance been exceeded? + * @return {bool} true if should unpin, false otherwise + */ + shouldUnpin : function (currentScrollY, toleranceExceeded) { + var scrollingDown = currentScrollY > this.lastKnownScrollY, + pastOffset = currentScrollY >= this.offset; + + return scrollingDown && pastOffset && toleranceExceeded; + }, + + /** + * determine if it is appropriate to pin + * @param {int} currentScrollY the current y scroll position + * @param {bool} toleranceExceeded has the tolerance been exceeded? + * @return {bool} true if should pin, false otherwise + */ + shouldPin : function (currentScrollY, toleranceExceeded) { + var scrollingUp = currentScrollY < this.lastKnownScrollY, + pastOffset = currentScrollY <= this.offset; + + return (scrollingUp && toleranceExceeded) || pastOffset; + }, + + /** + * Handles updating the state of the widget + */ + update : function() { + var currentScrollY = this.getScrollY(), + scrollDirection = currentScrollY > this.lastKnownScrollY ? 'down' : 'up', + toleranceExceeded = this.toleranceExceeded(currentScrollY, scrollDirection); + + if(this.isOutOfBounds(currentScrollY)) { // Ignore bouncy scrolling in OSX + return; + } + + if (currentScrollY <= this.offset ) { + this.top(); + } else { + this.notTop(); + } + + if(this.shouldUnpin(currentScrollY, toleranceExceeded)) { + this.unpin(); + } + else if(this.shouldPin(currentScrollY, toleranceExceeded)) { + this.pin(); + } + + this.lastKnownScrollY = currentScrollY; + } + }; + /** + * Default options + * @type {Object} + */ + Headroom.options = { + tolerance : { + up : 0, + down : 0 + }, + offset : 0, + scroller: window, + classes : { + pinned : 'headroom--pinned', + unpinned : 'headroom--unpinned', + top : 'headroom--top', + notTop : 'headroom--not-top', + initial : 'headroom' + } + }; + Headroom.cutsTheMustard = typeof features !== 'undefined' && features.rAF && features.bind && features.classList; + + window.Headroom = Headroom; + +}(window, document)); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/dist/headroom.min.js b/dashboard-ui/bower_components/headroom.js/dist/headroom.min.js new file mode 100644 index 0000000000..fcf9c18b2c --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/headroom.min.js @@ -0,0 +1,7 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +!function(a,b){"use strict";function c(a){this.callback=a,this.ticking=!1}function d(b){return b&&"undefined"!=typeof a&&(b===a||b.nodeType)}function e(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var b,c,f=a||{};for(c=1;ca,c=a+this.getViewportHeight()>this.getScrollerHeight();return b||c},toleranceExceeded:function(a,b){return Math.abs(a-this.lastKnownScrollY)>=this.tolerance[b]},shouldUnpin:function(a,b){var c=a>this.lastKnownScrollY,d=a>=this.offset;return c&&d&&b},shouldPin:function(a,b){var c=athis.lastKnownScrollY?"down":"up",c=this.toleranceExceeded(a,b);this.isOutOfBounds(a)||(a<=this.offset?this.top():this.notTop(),this.shouldUnpin(a,c)?this.unpin():this.shouldPin(a,c)&&this.pin(),this.lastKnownScrollY=a)}},g.options={tolerance:{up:0,down:0},offset:0,scroller:a,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",initial:"headroom"}},g.cutsTheMustard="undefined"!=typeof h&&h.rAF&&h.bind&&h.classList,a.Headroom=g}(window,document); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.js b/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.js new file mode 100644 index 0000000000..8dbed4611b --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.js @@ -0,0 +1,45 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +(function($) { + + if(!$) { + return; + } + + //////////// + // Plugin // + //////////// + + $.fn.headroom = function(option) { + return this.each(function() { + var $this = $(this), + data = $this.data('headroom'), + options = typeof option === 'object' && option; + + options = $.extend(true, {}, Headroom.options, options); + + if (!data) { + data = new Headroom(this, options); + data.init(); + $this.data('headroom', data); + } + if (typeof option === 'string') { + data[option](); + } + }); + }; + + ////////////// + // Data API // + ////////////// + + $('[data-headroom]').each(function() { + var $this = $(this); + $this.headroom($this.data()); + }); + +}(window.Zepto || window.jQuery)); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.min.js b/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.min.js new file mode 100644 index 0000000000..51794cdf05 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/dist/jQuery.headroom.min.js @@ -0,0 +1,7 @@ +/*! + * headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +!function(a){a&&(a.fn.headroom=function(b){return this.each(function(){var c=a(this),d=c.data("headroom"),e="object"==typeof b&&b;e=a.extend(!0,{},Headroom.options,e),d||(d=new Headroom(this,e),d.init(),c.data("headroom",d)),"string"==typeof b&&d[b]()})},a("[data-headroom]").each(function(){var b=a(this);b.headroom(b.data())}))}(window.Zepto||window.jQuery); \ No newline at end of file diff --git a/dashboard-ui/bower_components/headroom.js/package.json b/dashboard-ui/bower_components/headroom.js/package.json new file mode 100644 index 0000000000..43503f2587 --- /dev/null +++ b/dashboard-ui/bower_components/headroom.js/package.json @@ -0,0 +1,40 @@ +{ + "name": "headroom.js", + "version": "0.7.0", + "description": "Give your page some headroom. Hide your header until you need it", + "main": "dist/headroom.js", + "scripts": { + "test": "grunt test --verbose" + }, + "repository": { + "type": "git", + "url": "https://github.com/WickyNilliams/headroom.js" + }, + "keywords": [ + "header", + "fixed", + "scroll", + "menu" + ], + "author": "Nick Williams", + "homepage": "http://wicky.nillia.ms/headroom.js", + "license": "MIT", + "bugs": { + "url": "https://github.com/WickyNilliams/headroom.js/issues" + }, + "scripts": { + "test": "grunt dist --verbose" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-uglify": "~0.2.2", + "grunt-rigger": "~0.5.0", + "grunt-contrib-jshint": "~0.6.2", + "grunt-contrib-watch": "~0.5.1", + "karma": "~0.10.8", + "grunt-karma": "~0.6.2", + "karma-firefox-launcher": "~0.1.2", + "karma-safari-launcher": "~0.1.1", + "karma-opera-launcher": "~0.1.0" + } +} diff --git a/dashboard-ui/bower_components/howler.js/.bower.json b/dashboard-ui/bower_components/howler.js/.bower.json index 5b679d6757..b704d1e27d 100644 --- a/dashboard-ui/bower_components/howler.js/.bower.json +++ b/dashboard-ui/bower_components/howler.js/.bower.json @@ -1,17 +1,16 @@ { "name": "howler.js", - "version": "1.1.27", + "version": "1.1.28", "description": "Javascript audio library for the modern web.", "main": "howler.js", "homepage": "https://github.com/goldfire/howler.js", - "_release": "1.1.27", + "_release": "1.1.28", "_resolution": { "type": "version", - "tag": "v1.1.27", - "commit": "70cbd7af0e3e7ced5a825fff8d297b7710835f6d" + "tag": "v1.1.28", + "commit": "34c22ab507f847bba7bd2eb2b003197cfc54f274" }, "_source": "git://github.com/goldfire/howler.js.git", "_target": "~1.1.27", - "_originalSource": "howler", - "_direct": true + "_originalSource": "howler" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/howler.js/CHANGELOG.md b/dashboard-ui/bower_components/howler.js/CHANGELOG.md index ffbc7be529..4e88c32b19 100644 --- a/dashboard-ui/bower_components/howler.js/CHANGELOG.md +++ b/dashboard-ui/bower_components/howler.js/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.1.28 (October 22, 2015) +- `FIXED`: Fixed typo with iOS enabler that was preventing it from working. + ## 1.1.27 (October 2, 2015) - `FIXED`: Fixed automatic audio unlocking on iOS 9 by switching to `touchend` from `touchstart`. diff --git a/dashboard-ui/bower_components/howler.js/howler.js b/dashboard-ui/bower_components/howler.js/howler.js index 736d513a0a..515235a5e6 100644 --- a/dashboard-ui/bower_components/howler.js/howler.js +++ b/dashboard-ui/bower_components/howler.js/howler.js @@ -1,5 +1,5 @@ /*! - * howler.js v1.1.27 + * howler.js v1.1.28 * howlerjs.com * * (c) 2013-2015, James Simpson of GoldFire Studios diff --git a/dashboard-ui/bower_components/howler.js/howler.min.js b/dashboard-ui/bower_components/howler.js/howler.min.js index f99a8881d9..bcc21cf443 100644 --- a/dashboard-ui/bower_components/howler.js/howler.min.js +++ b/dashboard-ui/bower_components/howler.js/howler.min.js @@ -1,5 +1,5 @@ /*! - * howler.js v1.1.27 + * howler.js v1.1.28 * howlerjs.com * * (c) 2013-2015, James Simpson of GoldFire Studios @@ -7,4 +7,4 @@ * * MIT License */ -!function(){var e={},o=null,n=!0,t=!1;try{"undefined"!=typeof AudioContext?o=new AudioContext:"undefined"!=typeof webkitAudioContext?o=new webkitAudioContext:n=!1}catch(r){n=!1}if(!n)if("undefined"!=typeof Audio)try{new Audio}catch(r){t=!0}else t=!0;if(n){var a="undefined"==typeof o.createGain?o.createGainNode():o.createGain();a.gain.value=1,a.connect(o.destination)}var i=function(e){this._volume=1,this._muted=!1,this.usingWebAudio=n,this.ctx=o,this.noAudio=t,this._howls=[],this._codecs=e,this.iOSAutoEnable=!0};i.prototype={volume:function(e){var o=this;if(e=parseFloat(e),e>=0&&1>=e){o._volume=e,n&&(a.gain.value=e);for(var t in o._howls)if(o._howls.hasOwnProperty(t)&&o._howls[t]._webAudio===!1)for(var r=0;r0?r._pos:t._sprite[e][0]/1e3,i=0;t._webAudio?(i=t._sprite[e][1]/1e3-r._pos,r._pos>0&&(a=t._sprite[e][0]/1e3+a)):i=t._sprite[e][1]/1e3-(a-t._sprite[e][0]/1e3);var u,d=!(!t._loop&&!t._sprite[e][2]),f="string"==typeof n?n:Math.round(Date.now()*Math.random())+"";if(function(){var o={id:f,sprite:e,loop:d};u=setTimeout(function(){!t._webAudio&&d&&t.stop(o.id).play(e,o.id),t._webAudio&&!d&&(t._nodeById(o.id).paused=!0,t._nodeById(o.id)._pos=0,t._clearEndTimer(o.id)),t._webAudio||d||t.stop(o.id),t.on("end",f)},1e3*i),t._onendTimer.push({timer:u,id:o.id})}(),t._webAudio){var _=t._sprite[e][0]/1e3,s=t._sprite[e][1]/1e3;r.id=f,r.paused=!1,p(t,[d,_,s],f),t._playStart=o.currentTime,r.gain.value=t._volume,"undefined"==typeof r.bufferSource.start?d?r.bufferSource.noteGrainOn(0,a,86400):r.bufferSource.noteGrainOn(0,a,i):d?r.bufferSource.start(0,a,86400):r.bufferSource.start(0,a,i)}else{if(4!==r.readyState&&(r.readyState||!navigator.isCocoonJS))return t._clearEndTimer(f),function(){var o=t,a=e,i=n,u=r,d=function(){o.play(a,i),u.removeEventListener("canplaythrough",d,!1)};u.addEventListener("canplaythrough",d,!1)}(),t;r.readyState=4,r.id=f,r.currentTime=a,r.muted=l._muted||r.muted,r.volume=t._volume*l.volume(),setTimeout(function(){r.play()},0)}return t.on("play"),"function"==typeof n&&n(f),t}),t):("function"==typeof n&&n(),t):(t.on("load",function(){t.play(e,n)}),t)},pause:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.pause(e)}),o;o._clearEndTimer(e);var n=e?o._nodeById(e):o._activeNode();if(n)if(n._pos=o.pos(null,e),o._webAudio){if(!n.bufferSource||n.paused)return o;n.paused=!0,"undefined"==typeof n.bufferSource.stop?n.bufferSource.noteOff(0):n.bufferSource.stop(0)}else n.pause();return o.on("pause"),o},stop:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.stop(e)}),o;o._clearEndTimer(e);var n=e?o._nodeById(e):o._activeNode();if(n)if(n._pos=0,o._webAudio){if(!n.bufferSource||n.paused)return o;n.paused=!0,"undefined"==typeof n.bufferSource.stop?n.bufferSource.noteOff(0):n.bufferSource.stop(0)}else isNaN(n.duration)||(n.pause(),n.currentTime=0);return o},mute:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.mute(e)}),o;var n=e?o._nodeById(e):o._activeNode();return n&&(o._webAudio?n.gain.value=0:n.muted=!0),o},unmute:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.unmute(e)}),o;var n=e?o._nodeById(e):o._activeNode();return n&&(o._webAudio?n.gain.value=o._volume:n.muted=!1),o},volume:function(e,o){var n=this;if(e=parseFloat(e),e>=0&&1>=e){if(n._volume=e,!n._loaded)return n.on("play",function(){n.volume(e,o)}),n;var t=o?n._nodeById(o):n._activeNode();return t&&(n._webAudio?t.gain.value=e:t.volume=e*l.volume()),n}return n._volume},loop:function(e){var o=this;return"boolean"==typeof e?(o._loop=e,o):o._loop},sprite:function(e){var o=this;return"object"==typeof e?(o._sprite=e,o):o._sprite},pos:function(e,n){var t=this;if(!t._loaded)return t.on("load",function(){t.pos(e)}),"number"==typeof e?t:t._pos||0;e=parseFloat(e);var r=n?t._nodeById(n):t._activeNode();if(r)return e>=0?(t.pause(n),r._pos=e,t.play(r._sprite,n),t):t._webAudio?r._pos+(o.currentTime-t._playStart):r.currentTime;if(e>=0)return t;for(var a=0;a=0||0>e))return r._pos3d;if(r._webAudio){var a=t?r._nodeById(t):r._activeNode();a&&(r._pos3d=[e,o,n],a.panner.setPosition(e,o,n),a.panner.panningModel=r._model||"HRTF")}return r},fade:function(e,o,n,t,r){var a=this,i=Math.abs(e-o),u=e>o?"down":"up",d=i/.01,l=n/d;if(!a._loaded)return a.on("load",function(){a.fade(e,o,n,t,r)}),a;a.volume(e,r);for(var f=1;d>=f;f++)!function(){var e=a._volume+("up"===u?.01:-.01)*f,n=Math.round(1e3*e)/1e3,i=o;setTimeout(function(){a.volume(n,r),n===i&&t&&t()},l*f)}()},fadeIn:function(e,o,n){return this.volume(0).play().fade(0,e,o,n)},fadeOut:function(e,o,n,t){var r=this;return r.fade(r._volume,e,o,function(){n&&n(),r.pause(t),r.on("end")},t)},_nodeById:function(e){for(var o=this,n=o._audioNode[0],t=0;t=0&&!(5>=n);e--)o._audioNode[e].paused&&(o._webAudio&&o._audioNode[e].disconnect(0),n--,o._audioNode.splice(e,1))},_clearEndTimer:function(e){for(var o=this,n=0,t=0;t=0&&l._howls.splice(r,1),delete e[o._src],o=null}},n)var _=function(o,n){if(n in e)return o._duration=e[n].duration,void c(o);if(/^data:[^;]+;base64,/.test(n)){for(var t=atob(n.split(",")[1]),r=new Uint8Array(t.length),a=0;a=0&&1>=e){o._volume=e,n&&(a.gain.value=e);for(var t in o._howls)if(o._howls.hasOwnProperty(t)&&o._howls[t]._webAudio===!1)for(var r=0;r0?r._pos:t._sprite[e][0]/1e3,i=0;t._webAudio?(i=t._sprite[e][1]/1e3-r._pos,r._pos>0&&(a=t._sprite[e][0]/1e3+a)):i=t._sprite[e][1]/1e3-(a-t._sprite[e][0]/1e3);var u,d=!(!t._loop&&!t._sprite[e][2]),f="string"==typeof n?n:Math.round(Date.now()*Math.random())+"";if(function(){var o={id:f,sprite:e,loop:d};u=setTimeout(function(){!t._webAudio&&d&&t.stop(o.id).play(e,o.id),t._webAudio&&!d&&(t._nodeById(o.id).paused=!0,t._nodeById(o.id)._pos=0,t._clearEndTimer(o.id)),t._webAudio||d||t.stop(o.id),t.on("end",f)},1e3*i),t._onendTimer.push({timer:u,id:o.id})}(),t._webAudio){var _=t._sprite[e][0]/1e3,s=t._sprite[e][1]/1e3;r.id=f,r.paused=!1,p(t,[d,_,s],f),t._playStart=o.currentTime,r.gain.value=t._volume,"undefined"==typeof r.bufferSource.start?d?r.bufferSource.noteGrainOn(0,a,86400):r.bufferSource.noteGrainOn(0,a,i):d?r.bufferSource.start(0,a,86400):r.bufferSource.start(0,a,i)}else{if(4!==r.readyState&&(r.readyState||!navigator.isCocoonJS))return t._clearEndTimer(f),function(){var o=t,a=e,i=n,u=r,d=function(){o.play(a,i),u.removeEventListener("canplaythrough",d,!1)};u.addEventListener("canplaythrough",d,!1)}(),t;r.readyState=4,r.id=f,r.currentTime=a,r.muted=l._muted||r.muted,r.volume=t._volume*l.volume(),setTimeout(function(){r.play()},0)}return t.on("play"),"function"==typeof n&&n(f),t}),t):("function"==typeof n&&n(),t):(t.on("load",function(){t.play(e,n)}),t)},pause:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.pause(e)}),o;o._clearEndTimer(e);var n=e?o._nodeById(e):o._activeNode();if(n)if(n._pos=o.pos(null,e),o._webAudio){if(!n.bufferSource||n.paused)return o;n.paused=!0,"undefined"==typeof n.bufferSource.stop?n.bufferSource.noteOff(0):n.bufferSource.stop(0)}else n.pause();return o.on("pause"),o},stop:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.stop(e)}),o;o._clearEndTimer(e);var n=e?o._nodeById(e):o._activeNode();if(n)if(n._pos=0,o._webAudio){if(!n.bufferSource||n.paused)return o;n.paused=!0,"undefined"==typeof n.bufferSource.stop?n.bufferSource.noteOff(0):n.bufferSource.stop(0)}else isNaN(n.duration)||(n.pause(),n.currentTime=0);return o},mute:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.mute(e)}),o;var n=e?o._nodeById(e):o._activeNode();return n&&(o._webAudio?n.gain.value=0:n.muted=!0),o},unmute:function(e){var o=this;if(!o._loaded)return o.on("play",function(){o.unmute(e)}),o;var n=e?o._nodeById(e):o._activeNode();return n&&(o._webAudio?n.gain.value=o._volume:n.muted=!1),o},volume:function(e,o){var n=this;if(e=parseFloat(e),e>=0&&1>=e){if(n._volume=e,!n._loaded)return n.on("play",function(){n.volume(e,o)}),n;var t=o?n._nodeById(o):n._activeNode();return t&&(n._webAudio?t.gain.value=e:t.volume=e*l.volume()),n}return n._volume},loop:function(e){var o=this;return"boolean"==typeof e?(o._loop=e,o):o._loop},sprite:function(e){var o=this;return"object"==typeof e?(o._sprite=e,o):o._sprite},pos:function(e,n){var t=this;if(!t._loaded)return t.on("load",function(){t.pos(e)}),"number"==typeof e?t:t._pos||0;e=parseFloat(e);var r=n?t._nodeById(n):t._activeNode();if(r)return e>=0?(t.pause(n),r._pos=e,t.play(r._sprite,n),t):t._webAudio?r._pos+(o.currentTime-t._playStart):r.currentTime;if(e>=0)return t;for(var a=0;a=0||0>e))return r._pos3d;if(r._webAudio){var a=t?r._nodeById(t):r._activeNode();a&&(r._pos3d=[e,o,n],a.panner.setPosition(e,o,n),a.panner.panningModel=r._model||"HRTF")}return r},fade:function(e,o,n,t,r){var a=this,i=Math.abs(e-o),u=e>o?"down":"up",d=i/.01,l=n/d;if(!a._loaded)return a.on("load",function(){a.fade(e,o,n,t,r)}),a;a.volume(e,r);for(var f=1;d>=f;f++)!function(){var e=a._volume+("up"===u?.01:-.01)*f,n=Math.round(1e3*e)/1e3,i=o;setTimeout(function(){a.volume(n,r),n===i&&t&&t()},l*f)}()},fadeIn:function(e,o,n){return this.volume(0).play().fade(0,e,o,n)},fadeOut:function(e,o,n,t){var r=this;return r.fade(r._volume,e,o,function(){n&&n(),r.pause(t),r.on("end")},t)},_nodeById:function(e){for(var o=this,n=o._audioNode[0],t=0;t=0&&!(5>=n);e--)o._audioNode[e].paused&&(o._webAudio&&o._audioNode[e].disconnect(0),n--,o._audioNode.splice(e,1))},_clearEndTimer:function(e){for(var o=this,n=0,t=0;t=0&&l._howls.splice(r,1),delete e[o._src],o=null}},n)var _=function(o,n){if(n in e)return o._duration=e[n].duration,void c(o);if(/^data:[^;]+;base64,/.test(n)){for(var t=atob(n.split(",")[1]),r=new Uint8Array(t.length),a=0;a +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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-a11y-announcer/bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json index b9bfc32ab4..ed8d8d0081 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.3", + "version": "1.0.4", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", @@ -27,6 +27,7 @@ "paper-styles": "polymerelements/paper-styles#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*" - } + "web-component-tester": "polymer/web-component-tester#^3.4.0" + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html index d9e939c56b..0dd286acf5 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html @@ -19,14 +19,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN iron-a11y-announcer demo - - -
    +
    Note: in order to hear the announcements, be sure to turn on your favorite screen reader! diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html index ef163eaf72..da42ba964e 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html @@ -23,7 +23,7 @@ Example: is: 'x-chatty', attached: function() { - // This will create the singlton element if it has not + // This will create the singleton element if it has not // been created yet: Polymer.IronA11yAnnouncer.requestAvailability(); } diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html index f73cf6fdd9..510bf6f99c 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html @@ -15,10 +15,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - @@ -56,4 +54,3 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index 75f9aadbc3..c43fd8f6e2 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-keys-behavior", - "version": "1.0.6", + "version": "1.1.0", "description": "A behavior that enables keybindings for greater a11y.", "keywords": [ "web-components", @@ -26,17 +26,18 @@ "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": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", - "_release": "1.0.6", + "ignore": [], + "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior", + "_release": "1.1.0", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f" + "tag": "v1.1.0", + "commit": "cd8c972278c0d916bef57209d7dce5b81e67687c" }, - "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", + "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-a11y-keys-behavior" + "_originalSource": "PolymerElements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.travis.yml b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.travis.yml new file mode 100644 index 0000000000..12d3d7f26f --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: OZhLlPsjjnWU4FyZ+RKq5i/Nv/tElvcjr9+OT04ENGKfh9+fkuij/XdHJQe6EpOCjrNkwt23c+I6V5YWRrSatRX/AxEkViW8EXnF32rX3HV8fWnjD6Vfn+4Qz82y4huc9II8OV5I7jFDln6yzEGZn08zAtbmhj5dSpYtT1spSf/ZuUkqn4mMRJW2wCOnzbjueP56Ry40IwQm0enLXVQLPYB3LC4fBWfT+VFrsE9qH1ZgGKcSD/n2dOD3d6xjts4FSilNp2IZ8Km5RNAFUxYmkcwrY4O2ltNtKUngWwIpeplpz0bNj5k8kOpT5xA/FT630M5sFd1ODVp846kTr/EyYTq/VCiwTaA/vDfZL85DC3O+Zt0vTHAvkxKAaXkg9sMp8gJOJ6gt6cK8rV8z7npeAUVsK1gmuHYXne1Z76SRgWwbE0/z82vyFLNgitmZDLLM1fP3TpzsK1QQg1ikn6iYXdWpHcrzBi6lk8mCafnP7D7B/yFB/Z6Y9AFI6NQI/jWP2FMMJjMWbaJVG9DAU4PWlVTiFnhfVjPI7FUEmW46/QjH1ztSZWpDA9SBozJluIpKRA1qk1EgGX1RBFBHrbFtHG//x0AGyAV6gWOfdKjl/nqcM02xFUSrDb0tkNUnEAS6K7l+X1eDaBbiaAQiakPt9Je2WvvHyc+OiZviSc72Gmc= + - secure: vIs86+z7s1QwihkHtLBRQzlmJRSIWIadq3SlDdZHS4HOivH7fNV0d4hm8QnZYZ9X8yvSvxFCzEFdLuX1TpU0H3oy5wgYky7DnfJtsEhuOfW8dobHHZeCNi/t2FQAXpobqpRwojC3A+1b1lNrY1XNpYRz7aEialO4Yr8e1SQSLex5zw/pqm7g9Vz6PnQwobDQcGXKc6ZWc84+DqOo9qfkSlnEJC/1vQxHYpUa172UnnAnmHJ7gZKdhf9aLWJSZcSpPcoKEnvslRFmeDyRMNRDWVzcg2vHnV+tc1aYzp1wsrRW3P+oqwYlvGlxo+5U92QLXKIcKZhGblVWxe8BtXgiVzgS1sz5D11vKs61Xe46onbguG/XK3UxX9bPRK5uklkC5fwAY2hhvOTGXqimTb2YrlyEWO3BCKGBk6Is3KGyCe7c2nNEmXPUSun9X1JLGRPivJb9iBR4/WSEFvibYHl6/gIke9LdXPOCHuJ3+Iu14lCz+pwi8ADIWVuGpDIxFcorG8a3BCoxQo5VouUbSe0mcNttAvSzBNxhljaaBuFs56DLDpLRr0sGhqvfA1JzdCyzVyrk4WECfZw26pAnYCyTczVXmu5msVdKnjPJKtDqWazvIhHk2G1mk8CKb14lrN58u/Kh6PQ3miJ+61c1stBWhRDlp2QffOkBJiOATKHF+AA= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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-a11y-keys-behavior/bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json index 3d53ecf2fe..961303bbef 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-keys-behavior", - "version": "1.0.6", + "version": "1.1.0", "description": "A behavior that enables keybindings for greater a11y.", "keywords": [ "web-components", @@ -26,7 +26,8 @@ "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": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html index a7f3205d15..8e5dc466ee 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html @@ -9,7 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - + @@ -22,7 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN pre { color: var(--google-blue-700); } - + .keys { line-height: 25px; } @@ -37,6 +37,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN -
    +
    diff --git a/dashboard-ui/bower_components/iron-media-query/index.html b/dashboard-ui/bower_components/iron-media-query/index.html index 7aee5c1a2c..174afb5b5e 100644 --- a/dashboard-ui/bower_components/iron-media-query/index.html +++ b/dashboard-ui/bower_components/iron-media-query/index.html @@ -1,11 +1,11 @@ diff --git a/dashboard-ui/bower_components/iron-media-query/iron-media-query.html b/dashboard-ui/bower_components/iron-media-query/iron-media-query.html index a0619622eb..60cb84b89b 100644 --- a/dashboard-ui/bower_components/iron-media-query/iron-media-query.html +++ b/dashboard-ui/bower_components/iron-media-query/iron-media-query.html @@ -50,14 +50,34 @@ Example: observer: 'queryChanged' }, + /** + * If true, the query attribute is assumed to be a complete media query + * string rather than a single media feature. + */ + full: { + type: Boolean, + value: false + }, + + /** + * @type {function(MediaQueryList)} + */ _boundMQHandler: { value: function() { return this.queryHandler.bind(this); } + }, + + /** + * @type {MediaQueryList} + */ + _mq: { + value: null } }, attached: function() { + this.style.display = 'none'; this.queryChanged(); }, @@ -84,7 +104,7 @@ Example: if (!query) { return; } - if (query[0] !== '(') { + if (!this.full && query[0] !== '(') { query = '(' + query + ')'; } this._mq = window.matchMedia(query); diff --git a/dashboard-ui/bower_components/iron-media-query/test/basic.html b/dashboard-ui/bower_components/iron-media-query/test/basic.html index c2db515dde..8649ceba3f 100644 --- a/dashboard-ui/bower_components/iron-media-query/test/basic.html +++ b/dashboard-ui/bower_components/iron-media-query/test/basic.html @@ -17,11 +17,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - - + @@ -66,6 +63,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.equal(mq.queryMatches, true); }); + suite('`full` attribute', function() { + test('media features without wrapping parentheses no longer match', function() { + mq.full = true; + mq.query = 'min-width: 1px'; + assert.equal(mq.queryMatches, false); + }); + + test('media queries with both types and features match', function() { + mq.full = true; + mq.query = 'all and (min-width: 1px)'; + assert.equal(mq.queryMatches, true); + }); + }); + suite('query does not activate on empty string or null', function() { test('empty string', function() { diff --git a/dashboard-ui/bower_components/iron-media-query/test/index.html b/dashboard-ui/bower_components/iron-media-query/test/index.html index 7baa57f6df..30e527f53c 100644 --- a/dashboard-ui/bower_components/iron-media-query/test/index.html +++ b/dashboard-ui/bower_components/iron-media-query/test/index.html @@ -1,15 +1,11 @@ - - - - - +--> Tests @@ -19,12 +15,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json index 3fa6129eac..3ab5b6c0fd 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.0.5", + "version": "1.0.7", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ @@ -29,15 +29,16 @@ "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": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.5", + "_release": "1.0.7", "_resolution": { "type": "version", - "tag": "v1.0.5", - "commit": "f06af97a224fcb2098f4a0229ec2500350d4ccf0" + "tag": "v1.0.7", + "commit": "e5ca054bbe1c24fbc43adb78217ccc50d9223601" }, "_source": "git://github.com/polymerelements/iron-menu-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml b/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml new file mode 100644 index 0000000000..c7455761ed --- /dev/null +++ b/dashboard-ui/bower_components/iron-menu-behavior/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: QxZD8yzz7s3F6b7h87ztWYiEbD2TrQp1Z1mib5u1wL7EAwsrQVkFhIEo4cJPAsTGS98qgeZAITg0ifwp/jOKVC2QKoPnC1qjm4L0AjlhXBTRbqyS5G8jvfJ8M4DgkQXADh4e+lw9ba3h2AxceJELKTYaQVq/cpTrpPg0/RH7H4o= + - secure: i76J23Bpwj6qJ4ybCCsQpGCTT+5s1PA+x0Avjbl1JTS4OsJLDFfvVl0YIWZ5xMIKJtdPC/mGDoZ2LNrh9hz82DBqDnzBlSnNjFbjnU1Aqy5CUmRWzyAF5NOjJGotISZcDYDGZd6gjsOfN0r+rICyRUiOadeyPf0Nm+6HSVQMjfM= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-menu-behavior/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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 index 66ad1b70a3..e3de70bfaa 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-menu-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-menu-behavior", - "version": "1.0.5", + "version": "1.0.7", "description": "Provides accessible menu behavior", "authors": "The Polymer Authors", "keywords": [ @@ -29,8 +29,9 @@ "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": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.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 index d7379a139b..a6ad2c2837 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/demo/index.html @@ -18,9 +18,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN iron-menu-behavior demo - - + + @@ -59,7 +59,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN -
    +

    Simple menu

    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 index 307aa07a61..748e1d75cc 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menu.html @@ -10,6 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + 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 index 0d5da1f647..0f09cdbd2a 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/demo/simple-menubar.html @@ -10,6 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + 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 index c83a4c7d2e..b970061147 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/iron-menu-behavior.html @@ -125,6 +125,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN for (var i = 0, item; item = this.items[i]; i++) { var attr = this.attrForItemTitle || 'textContent'; var title = item[attr] || item.getAttribute(attr); + if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) { this._setFocusedItem(item); break; @@ -165,7 +166,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } else { item.removeAttribute('aria-selected'); } - Polymer.IronSelectableBehavior._applySelection.apply(this, arguments); }, @@ -213,18 +213,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * @param {CustomEvent} event A key combination event. */ _onShiftTabDown: function(event) { - var oldTabIndex; + var oldTabIndex = this.getAttribute('tabindex'); Polymer.IronMenuBehaviorImpl._shiftTabPressed = true; - oldTabIndex = this.getAttribute('tabindex'); + this._setFocusedItem(null); this.setAttribute('tabindex', '-1'); this.async(function() { this.setAttribute('tabindex', oldTabIndex); Polymer.IronMenuBehaviorImpl._shiftTabPressed = false; - // NOTE(cdata): polymer/polymer#1305 + // NOTE(cdata): polymer/polymer#1305 }, 1); }, @@ -235,23 +235,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN */ _onFocus: function(event) { if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) { + // do not focus the menu itself return; } - // do not focus the menu itself + this.blur(); + // clear the cached focus item - this._setFocusedItem(null); this._defaultFocusAsync = this.async(function() { // focus the selected item when the menu receives focus, or the first item // if no item is selected var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem; + + this._setFocusedItem(null); + if (selectedItem) { this._setFocusedItem(selectedItem); } else { this._setFocusedItem(this.items[0]); } - // async 100ms to wait for `select` to get called from `_itemActivate` - }, 100); + // async 1ms to wait for `select` to get called from `_itemActivate` + }, 1); }, /** @@ -289,12 +293,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * @param {KeyboardEvent} event A keyboard event. */ _onKeydown: function(event) { - if (this.keyboardEventMatchesKeys(event, 'up down esc')) { - return; + if (!this.keyboardEventMatchesKeys(event, 'up down esc')) { + // all other keys focus the menu item starting with that character + this._focusWithKeyboardEvent(event); } + event.stopPropagation(); + }, - // all other keys focus the menu item starting with that character - this._focusWithKeyboardEvent(event); + // override _activateHandler + _activateHandler: function(event) { + Polymer.IronSelectableBehavior._activateHandler.call(this, event); + event.stopPropagation(); } }; diff --git a/dashboard-ui/bower_components/iron-menu-behavior/test/index.html b/dashboard-ui/bower_components/iron-menu-behavior/test/index.html index 4b1c82f6ce..851835ba64 100644 --- a/dashboard-ui/bower_components/iron-menu-behavior/test/index.html +++ b/dashboard-ui/bower_components/iron-menu-behavior/test/index.html @@ -1,5 +1,4 @@ - - - - +--> iron-menu-behavior tests @@ -23,13 +20,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + 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 index 309dbb163a..92ffc44fe7 100644 --- 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 @@ -17,12 +17,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + - - - - + @@ -48,6 +46,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + 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 index b007b1c1a7..020739dc30 100644 --- 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 @@ -18,11 +18,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - - diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json index 8119ebcf41..f4bfef4a7c 100644 --- a/dashboard-ui/bower_components/iron-meta/.bower.json +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-meta", - "version": "1.0.3", + "version": "1.1.1", "keywords": [ "web-components", "polymer" @@ -25,12 +25,13 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, + "main": "iron-meta.html", "homepage": "https://github.com/polymerelements/iron-meta", - "_release": "1.0.3", + "_release": "1.1.1", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04" + "tag": "v1.1.1", + "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f" }, "_source": "git://github.com/polymerelements/iron-meta.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-meta/.travis.yml b/dashboard-ui/bower_components/iron-meta/.travis.yml new file mode 100644 index 0000000000..fd27446be5 --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false +matrix: + include: + - node_js: stable + script: xvfb-run wct + addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + - node_js: node + script: + - | + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + wct -s 'default' + fi +before_script: +- npm install web-component-tester +- npm install bower +- export PATH=$PWD/node_modules/.bin:$PATH +- bower install +env: + global: + - secure: eGcuDAJt+1GPrC6u95vHufjnSXWbVBZpW7oKQhZjcHrN19l9COdOb7RVkTPsZzEanHaH/D6Psr4WJKyd72Wx5wj+bqGh4nPHTFSnK3+gNT4eJAgLvsxLwHxW8QkYYHEdZe8Wd6sOdal9geeLZ8fG9xELYEtuJR6lww5uLvFv/cw= + - secure: DoBz8LDaS4/lQ9sTXE5pnp8fqEvG47mmdQaQ14EnHQ+wLbajIaLk59vRfau5c7mIef8dEgaT40r/kVP5QRr3OiH5UJY3jLnCMVIxWJ3ZTkuGGuU6QDQvoGSSBhdA+b+G94bbK6LtHQxRBrkiyT9d0IzT5ZiHlDlteGbjdDWAgw0= diff --git a/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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-meta/bower.json b/dashboard-ui/bower_components/iron-meta/bower.json index 65a1f8f41f..614c5b3a66 100644 --- a/dashboard-ui/bower_components/iron-meta/bower.json +++ b/dashboard-ui/bower_components/iron-meta/bower.json @@ -1,6 +1,6 @@ { "name": "iron-meta", - "version": "1.0.3", + "version": "1.1.1", "keywords": [ "web-components", "polymer" @@ -24,5 +24,6 @@ "test-fixture": "polymerelements/test-fixture#^1.0.0", "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "main": "iron-meta.html" } diff --git a/dashboard-ui/bower_components/iron-meta/iron-meta.html b/dashboard-ui/bower_components/iron-meta/iron-meta.html index 4b34311828..1521be5c0e 100644 --- a/dashboard-ui/bower_components/iron-meta/iron-meta.html +++ b/dashboard-ui/bower_components/iron-meta/iron-meta.html @@ -33,7 +33,7 @@ attributes or use child nodes to define additional metadata. Now I can access that element (and it's metadata) from any iron-meta instance via the byKey method, e.g. - meta.byKey('info').getAttribute('value'). + meta.byKey('info').getAttribute('value'); Pure imperative form would be like: @@ -58,6 +58,7 @@ Or, in a Polymer element, you can include a meta in your template: // monostate data var metaDatas = {}; var metaArrays = {}; + var singleton = null; Polymer.IronMeta = Polymer({ @@ -110,9 +111,15 @@ Or, in a Polymer element, you can include a meta in your template: }, + hostAttributes: { + hidden: true + }, + /** * Only runs if someone invokes the factory/constructor directly * e.g. `new Polymer.IronMeta()` + * + * @param {{type: (string|undefined), key: (string|undefined), value}=} config */ factoryImpl: function(config) { if (config) { @@ -204,6 +211,13 @@ Or, in a Polymer element, you can include a meta in your template: }); + Polymer.IronMeta.getIronMeta = function getIronMeta() { + if (singleton === null) { + singleton = new Polymer.IronMeta(); + } + return singleton; + }; + /** `iron-meta-query` can be used to access infomation stored in `iron-meta`. @@ -270,6 +284,8 @@ Or, in a Polymer element, you can include a meta in your template: /** * Actually a factory method, not a true constructor. Only runs if * someone invokes it directly (via `new Polymer.IronMeta()`); + * + * @param {{type: (string|undefined), key: (string|undefined)}=} config */ factoryImpl: function(config) { if (config) { diff --git a/dashboard-ui/bower_components/iron-meta/test/iron-meta.html b/dashboard-ui/bower_components/iron-meta/test/iron-meta.html index c1a40282eb..c4dc2500d2 100644 --- a/dashboard-ui/bower_components/iron-meta/test/iron-meta.html +++ b/dashboard-ui/bower_components/iron-meta/test/iron-meta.html @@ -179,6 +179,15 @@ suite('', function () { expect(registeredValue).to.be.equal(secondValue); }); }); + + suite('singleton', function () { + + test('only one ironmeta created', function () { + var first = Polymer.IronMeta.getIronMeta(); + var second = Polymer.IronMeta.getIronMeta(); + expect(first).to.be.equal(second); + }); + }); }); diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index c8a556e720..77b8d27811 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -1,12 +1,10 @@ { "name": "iron-overlay-behavior", - "version": "1.0.9", + "version": "1.1.2", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, - "main": [ - "iron-overlay-behavior.html" - ], + "main": "iron-overlay-behavior.html", "keywords": [ "web-components", "polymer", @@ -31,17 +29,18 @@ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-overlay-behavior", - "_release": "1.0.9", + "ignore": [], + "homepage": "https://github.com/polymerelements/iron-overlay-behavior", + "_release": "1.1.2", "_resolution": { "type": "version", - "tag": "v1.0.9", - "commit": "87f7763d323fffa07357a08777ad831b7c2c2fb8" + "tag": "v1.1.2", + "commit": "40e39a971474f48f5c2c8ee7b8568a0ad5426bd8" }, - "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git", + "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-overlay-behavior" + "_originalSource": "polymerelements/iron-overlay-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.travis.yml b/dashboard-ui/bower_components/iron-overlay-behavior/.travis.yml new file mode 100644 index 0000000000..8bc31dc876 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: H8AA9JkWfG/vc3MiimoIoYi45KD10hKzitLJnExkomgzFI/f5o9SGtwjCii5P8Kvf4xndftDjYwRgbYyJpSg0IJeq8rm1WS89cY8O6/1dlI/tK1j5xbVRrhqmRQncxUb3K4MAT6Z9br1jwEeamRa+NKmq+v+VEpQY5vwuQ/BHJw= + - secure: EaE1AUVgWyn0Y6kqkb54z5r39RvTJzAOmeM0lRl7wXzr5k0mq3VGlxTksJqCVd1PdJESXEhy8eldBnlkwZir/imDTNQxKm13k7ZiFC0000XAzpLZElkH2cLlYCRWcuM+vS7dA9hytV0UcGK2VGqbxfpcesB20dPSneDEUuc5X64= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json index 30a3f04d91..a21be7fe4c 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json @@ -1,12 +1,10 @@ { "name": "iron-overlay-behavior", - "version": "1.0.9", + "version": "1.1.2", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, - "main": [ - "iron-overlay-behavior.html" - ], + "main": "iron-overlay-behavior.html", "keywords": [ "web-components", "polymer", @@ -31,7 +29,8 @@ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html index 4fc6bb0aa1..c58158ef1d 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html @@ -19,14 +19,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + - - - @@ -78,7 +82,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - +

    This dialog has a scrolling child.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html index fbf305ed35..7eab2432ac 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html @@ -9,7 +9,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html index 837759f7e7..c18cec68fb 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html @@ -140,7 +140,6 @@ context. You should place this element as a child of `` whenever possible. }, listeners: { - 'tap': '_onClick', 'iron-resize': '_onIronResize' }, @@ -162,6 +161,10 @@ context. You should place this element as a child of `` whenever possible. ready: function() { this._ensureSetup(); + }, + + attached: function() { + // Call _openedChanged here so that position can be computed correctly. if (this._callOpenedWhenReady) { this._openedChanged(); } @@ -393,20 +396,10 @@ context. You should place this element as a child of `` whenever possible. }, _onCaptureClick: function(event) { - // attempt to close asynchronously and prevent the close of a tap event is immediately heard - // on target. This is because in shadow dom due to event retargetting event.target is not - // useful. - if (!this.noCancelOnOutsideClick && (this._manager.currentOverlay() == this)) { - this._cancelJob = this.async(function() { - this.cancel(); - }, 10); - } - }, - - _onClick: function(event) { - if (this._cancelJob) { - this.cancelAsync(this._cancelJob); - this._cancelJob = null; + if (!this.noCancelOnOutsideClick && + this._manager.currentOverlay() === this && + Polymer.dom(event).path.indexOf(this) === -1) { + this.cancel(); } }, @@ -415,6 +408,7 @@ context. You should place this element as a child of `` whenever possible. if (!this.noCancelOnEscKey && (event.keyCode === ESC)) { this.cancel(); event.stopPropagation(); + event.stopImmediatePropagation(); } }, @@ -433,6 +427,12 @@ context. You should place this element as a child of `` whenever possible. * @event iron-overlay-opened */ +/** + * Fired when the `iron-overlay` is canceled, but before it is closed. + * Cancel the event to prevent the `iron-overlay` from closing. + * @event iron-overlay-canceled + */ + /** * Fired after the `iron-overlay` closes. * @event iron-overlay-closed diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html index a8709558da..c4fea621de 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html @@ -12,60 +12,74 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html index a352a4b189..08fbcb3000 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html @@ -20,10 +20,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - - + @@ -103,11 +100,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.equal(getComputedStyle(overlay).display, 'none', 'overlay starts hidden'); }); - test('overlay open by default', function() { + test('overlay open by default', function(done) { overlay = fixture('opened'); - runAfterOpen(overlay, function() { + overlay.addEventListener('iron-overlay-opened', function() { assert.isTrue(overlay.opened, 'overlay starts opened'); assert.notEqual(getComputedStyle(overlay).display, 'none', 'overlay starts showing'); + done(); + }); + }); + + test('overlay positioned & sized properly', function(done) { + overlay = fixture('opened'); + overlay.addEventListener('iron-overlay-opened', function() { + var s = getComputedStyle(overlay); + assert.isTrue(parseFloat(s.left) === (window.innerWidth - overlay.offsetWidth)/2, 'centered horizontally'); + assert.isTrue(parseFloat(s.top) === (window.innerHeight - overlay.offsetHeight)/2, 'centered vertically'); + done(); }); }); @@ -184,7 +192,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN overlay.addEventListener('iron-overlay-canceled', function(event) { done(); }); - Polymer.Base.fire.call(document, 'click'); + MockInteractions.tap(document.body); }); }); @@ -194,7 +202,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.isTrue(event.detail.canceled, 'overlay is canceled'); done(); }); - Polymer.Base.fire.call(document, 'click'); + MockInteractions.tap(document.body); }); }); @@ -207,7 +215,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN throw new Error('iron-overlay-closed should not fire'); }; overlay.addEventListener('iron-overlay-closed', closedListener); - Polymer.Base.fire.call(document, 'click'); + MockInteractions.tap(document.body); setTimeout(function() { overlay.removeEventListener('iron-overlay-closed', closedListener); done(); @@ -244,7 +252,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN overlay.addEventListener('iron-overlay-closed', function() { assert('iron-overlay-closed should not fire'); }); - Polymer.Base.fire.call(document, 'click'); + MockInteractions.tap(document.body); setTimeout(function() { done(); }, 10); @@ -285,6 +293,69 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); }); }); + + test('ESC closes only one opened overlay', function(done) { + runAfterOpen(overlays[0], function() { + runAfterOpen(overlays[1], function() { + // keydown is sync, keyup async (but no need to wait for it). + MockInteractions.pressAndReleaseKeyOn(document.body, 27); + // Ideally overlays[1] should be closed and overlays[0] still open, + // but in this test env overlays[0]._onCaptureKeydown gets called before + // overlays[1]._onCaptureKeydown. + // TODO investigate if this is because of CustomEvents in MockInteractions. + var opened0 = overlays[0].opened && !overlays[1].opened; + var opened1 = !overlays[0].opened && overlays[1].opened; + assert.isTrue(opened0 || opened1, 'only one overlay is still opened'); + done(); + }); + }); + }); + }); + + suite('z-ordering', function() { + + var overlays; + var originalMinimumZ; + + setup(function() { + overlays = fixture('multiple'); + originalMinimumZ = Polymer.IronOverlayManager._minimumZ; + }); + + teardown(function() { + Polymer.IronOverlayManager._minimumZ = originalMinimumZ; + }); + + // for iframes + test('default z-index is greater than 100', function(done) { + runAfterOpen(overlays[0], function() { + var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10); + assert.isTrue(styleZ > 100, 'overlays[0] z-index is <= 100'); + done(); + }); + }); + + test('ensureMinimumZ() effects z-index', function(done) { + Polymer.IronOverlayManager.ensureMinimumZ(1000); + + runAfterOpen(overlays[0], function() { + var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10); + assert.isTrue(styleZ > 1000, 'overlays[0] z-index is <= 1000'); + done(); + }); + }); + + test('ensureMinimumZ() never decreases the minimum z-index', function(done) { + Polymer.IronOverlayManager.ensureMinimumZ(1000); + Polymer.IronOverlayManager.ensureMinimumZ(500); + + runAfterOpen(overlays[0], function() { + var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10); + assert.isTrue(styleZ > 1000, 'overlays[0] z-index is <= 1000'); + done(); + }); + }); + }); suite('overlays with backdrop', function() { diff --git a/dashboard-ui/bower_components/iron-pages/.bower.json b/dashboard-ui/bower_components/iron-pages/.bower.json index f0b9d5614d..efa5d78c1c 100644 --- a/dashboard-ui/bower_components/iron-pages/.bower.json +++ b/dashboard-ui/bower_components/iron-pages/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-pages", - "version": "1.0.3", + "version": "1.0.5", "license": "http://polymer.github.io/LICENSE.txt", "description": "Organizes a set of pages and shows one at a time", "main": "iron-pages.html", @@ -26,15 +26,16 @@ "paper-styles": "polymerelements/paper-styles#^1.0.2", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, + "ignore": [], "homepage": "https://github.com/PolymerElements/iron-pages", - "_release": "1.0.3", + "_release": "1.0.5", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "ca6e7892786d60d8cb6935d8376b27c3851fdbf5" + "tag": "v1.0.5", + "commit": "e248782cb5595849e08454ae863d1ca3b7b94e0b" }, "_source": "git://github.com/PolymerElements/iron-pages.git", "_target": "~1.0.2", diff --git a/dashboard-ui/bower_components/iron-pages/.travis.yml b/dashboard-ui/bower_components/iron-pages/.travis.yml new file mode 100644 index 0000000000..ed8742cedf --- /dev/null +++ b/dashboard-ui/bower_components/iron-pages/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: QwCi1poMu8n3s7gAljvAyODa0+zmte8B9qAO/S/SziRNDcRHJF4RRZp0HJfgVYkCaHsgCOrRswfkqZqlj4QC5goPfwtwgRtIdcEarF64kAjWLXHH66aMPSlop+MZYSJwFRrrmcc0jTDTOPw6CXaz1lYrcvpGnVAAHSNq4e9xuwA= + - secure: PAn10VQ1AL+FpM/qj2ak7tJe0Epd/RP3FF+jb2eVBXhmUVd9+mBH7nRwYQL4n6fIGXMtJcUkl4t35nwzEegP/nrjZlIslXFT6D/273FbJcbH1SaCsnwLn3Rr0VffwaHC76yLsW7ph2/paAS4iLWS4AeP1c2dAR9zimSpM7Knovs= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-pages/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-pages/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-pages/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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-pages/bower.json b/dashboard-ui/bower_components/iron-pages/bower.json index e8930e2763..07dd3cfca1 100644 --- a/dashboard-ui/bower_components/iron-pages/bower.json +++ b/dashboard-ui/bower_components/iron-pages/bower.json @@ -1,6 +1,6 @@ { "name": "iron-pages", - "version": "1.0.3", + "version": "1.0.5", "license": "http://polymer.github.io/LICENSE.txt", "description": "Organizes a set of pages and shows one at a time", "main": "iron-pages.html", @@ -26,7 +26,8 @@ "paper-styles": "polymerelements/paper-styles#^1.0.2", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-pages/demo/index.html b/dashboard-ui/bower_components/iron-pages/demo/index.html index 68425e80ea..ffe2c71e14 100644 --- a/dashboard-ui/bower_components/iron-pages/demo/index.html +++ b/dashboard-ui/bower_components/iron-pages/demo/index.html @@ -18,14 +18,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + - +
    Page One
    diff --git a/dashboard-ui/bower_components/iron-pages/test/attr-for-selected.html b/dashboard-ui/bower_components/iron-pages/test/attr-for-selected.html index 22fe1629e5..954bc0762c 100644 --- a/dashboard-ui/bower_components/iron-pages/test/attr-for-selected.html +++ b/dashboard-ui/bower_components/iron-pages/test/attr-for-selected.html @@ -18,10 +18,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - @@ -51,8 +48,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.equal(pages.selected, 'page0'); }); - test('selected item', function() { - assert.equal(pages.selectedItem, pages.items[0]); + test('selected item', function(done) { + // iron-selector uses observeNodes, which is async. + Polymer.Base.async(function() { + assert.equal(pages.selectedItem, pages.items[0]) + done(); + }, 1); }); test('selected item is display:block and all others are display:none', function() { diff --git a/dashboard-ui/bower_components/iron-pages/test/basic.html b/dashboard-ui/bower_components/iron-pages/test/basic.html index 5c83322efe..f031f8e7ee 100644 --- a/dashboard-ui/bower_components/iron-pages/test/basic.html +++ b/dashboard-ui/bower_components/iron-pages/test/basic.html @@ -18,11 +18,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - - + diff --git a/dashboard-ui/bower_components/iron-pages/test/index.html b/dashboard-ui/bower_components/iron-pages/test/index.html index 2a3282bb73..0cc658d607 100644 --- a/dashboard-ui/bower_components/iron-pages/test/index.html +++ b/dashboard-ui/bower_components/iron-pages/test/index.html @@ -23,7 +23,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN WCT.loadSuites([ 'basic.html', - 'attr-for-selected.html' + 'attr-for-selected.html', + 'basic.html?dom=shadow', + 'attr-for-selected.html?dom=shadow' ]); diff --git a/dashboard-ui/bower_components/iron-range-behavior/.bower.json b/dashboard-ui/bower_components/iron-range-behavior/.bower.json index ea235a23b2..cb6b1b33f4 100644 --- a/dashboard-ui/bower_components/iron-range-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-range-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-range-behavior", - "version": "1.0.3", + "version": "1.0.4", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for something with a minimum and maximum value", "authors": "The Polymer Authors", @@ -28,11 +28,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "homepage": "https://github.com/PolymerElements/iron-range-behavior", - "_release": "1.0.3", + "_release": "1.0.4", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "3ed9a372778e31e62477666b313155c581a7dfe6" + "tag": "v1.0.4", + "commit": "71774a7d8a8c377496bfe05e60b754e91216e0b9" }, "_source": "git://github.com/PolymerElements/iron-range-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-range-behavior/bower.json b/dashboard-ui/bower_components/iron-range-behavior/bower.json index 4dafd89daf..b4967a7f56 100644 --- a/dashboard-ui/bower_components/iron-range-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-range-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-range-behavior", - "version": "1.0.3", + "version": "1.0.4", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for something with a minimum and maximum value", "authors": "The Polymer Authors", diff --git a/dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html b/dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html index 480304e6ea..28469e9eae 100644 --- a/dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html +++ b/dashboard-ui/bower_components/iron-range-behavior/iron-range-behavior.html @@ -12,11 +12,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - -``` - -### Package managers - -Bower: `bower install masonry --save` - -[npm](https://www.npmjs.com/package/masonry-layout): `npm install masonry-layout --save` - - -## Initialize - -With jQuery - -``` js -$('.grid').masonry({ - // options... - itemSelector: '.grid-item', - columnWidth: 200 -}); -``` - -With vanilla JavaScript - -``` js -// vanilla JS -var grid = document.querySelector('.grid'); -var msnry = new Masonry( grid, { - // options... - itemSelector: '.grid-item', - columnWidth: 200 -}); -``` - -With HTML - -Add a class of `js-masonry` to your element. Options can be set in JSON in `data-masonry-options`. - -``` html -
    -
    -
    - ... -
    -``` - -## License - -Masonry is released under the [MIT license](http://desandro.mit-license.org). Have at it. - -* * * - -Copyright 2015 David DeSandro diff --git a/dashboard-ui/bower_components/masonry/bower.json b/dashboard-ui/bower_components/masonry/bower.json deleted file mode 100644 index 04075bbbfe..0000000000 --- a/dashboard-ui/bower_components/masonry/bower.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "masonry", - "version": "3.3.2", - "description": "Cascading grid layout library", - "main": "masonry.js", - "dependencies": { - "get-size": "~1.2.2", - "outlayer": "~1.4.0", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "jquery-bridget": "1.1.x", - "doc-ready": "1.x", - "qunit": "^1.12", - "jquery": ">=1.4.3 <2" - }, - "ignore": [ - "examples/", - "test/", - "CONTRIBUTING.mdown", - "Gruntfile.js", - "package.json", - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "http://masonry.desandro.com", - "authors": [ - "David DeSandro" - ], - "keywords": [ - "masonry", - "layout", - "outlayer" - ], - "license": "MIT", - "moduleType": [ - "amd", - "globals", - "node" - ] -} diff --git a/dashboard-ui/bower_components/masonry/changelog.md b/dashboard-ui/bower_components/masonry/changelog.md deleted file mode 100644 index 43e95fcfed..0000000000 --- a/dashboard-ui/bower_components/masonry/changelog.md +++ /dev/null @@ -1,83 +0,0 @@ -# Changelog - -### v3.3.1 - -+ Updated Outlayer v1.4.1 - + Added jQuery events - + Fixed Safari layout and transition bugs. Fixed [#698](https://github.com/desandro/masonry/issues/698) - -## v3.3.0 - -+ Added `percentPosition` option. Fixed [#574](https://github.com/desandro/masonry/issues/574) -+ Removed first `instance` argument from `layoutComplete` and `removeComplete` events -+ Added use of [fizzy-ui-utils](https://github.com/metafizzy/fizzy-ui-utils) - -### v3.2.3 - -+ Fixed pixel rounding errors related to Firefox, gutters. Fixed [#580](https://github.com/desandro/masonry/pull/580) -+ Moved poorly named `examples/` to better named `sandbox/`. Fixed [#539](https://github.com/desandro/masonry/issues/539) -+ Moved [`masonry-v2-shim.js` shim to its own repo](https://github.com/desandro/masonry-v2-3-shim) - -### v3.2.2 - -+ Update [getSize](https://github.com/desandro/get-size) to v1.2.1 to fix IE8 bug - -### v3.2.1 - -+ Fix missing dependencies in `package.json` - -## v3.2.0 - -+ Add CommonJS support [#480](https://github.com/desandro/masonry/issues/480) -+ jQuery Bridget no longer in explicit dependency tree - -### v3.1.5 - -+ Add dist/pkgd files -+ Upgrade to Outlayer v1.2 - -### v3.1.4 - -Fix stamp bug if multiple of columnWidth - -### v3.1.3 - -Round if off by 1px - -### v3.1.2 - -Fix IE8 bugs w/ hidden items - -### v3.1.1 - -update Outlayer v1.1.2 - -## v3.1.0 - -Add better RequireJS support - -### v3.0.3 - -Fix bug with `isFitWidth` and resizing - -### v3.0.2 - -Add back `isFitWidth` - -### v3.0.1 - -fixed empty container - -## v3.0.0 - -+ Complete rewrite -+ Componentize with Bower -+ Remove jQuery as strict dependency -+ Remove smartresize jQuery plugin -+ imagesLoaded no longer included -+ jQuery animation has been removed. animationOptions has been removed. This means no animation for in IE8 and IE9. -+ Corner stamp is now integrated as `stamp` option and `stamp` method -+ `isRTL` option removed, use `isOriginLeft: false` instead -+ `isResizable` option renamed to `isResizeBound` -+ `layout` method renamed to `layoutItems` -+ `gutterWidth` option renamed to `gutter` diff --git a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js b/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js deleted file mode 100644 index a2c6fb3cab..0000000000 --- a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js +++ /dev/null @@ -1,3187 +0,0 @@ -/*! - * Masonry PACKAGED v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -/** - * Bridget makes jQuery widgets - * v1.1.0 - * MIT license - */ - -( function( window ) { - - - -// -------------------------- utils -------------------------- // - -var slice = Array.prototype.slice; - -function noop() {} - -// -------------------------- definition -------------------------- // - -function defineBridget( $ ) { - -// bail if no jQuery -if ( !$ ) { - return; -} - -// -------------------------- addOptionMethod -------------------------- // - -/** - * adds option method -> $().plugin('option', {...}) - * @param {Function} PluginClass - constructor class - */ -function addOptionMethod( PluginClass ) { - // don't overwrite original option method - if ( PluginClass.prototype.option ) { - return; - } - - // option setter - PluginClass.prototype.option = function( opts ) { - // bail out if not an object - if ( !$.isPlainObject( opts ) ){ - return; - } - this.options = $.extend( true, this.options, opts ); - }; -} - -// -------------------------- plugin bridge -------------------------- // - -// helper function for logging errors -// $.error breaks jQuery chaining -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -/** - * jQuery plugin bridge, access methods like $elem.plugin('method') - * @param {String} namespace - plugin name - * @param {Function} PluginClass - constructor class - */ -function bridge( namespace, PluginClass ) { - // add to jQuery fn namespace - $.fn[ namespace ] = function( options ) { - if ( typeof options === 'string' ) { - // call plugin method when first argument is a string - // get arguments for method - var args = slice.call( arguments, 1 ); - - for ( var i=0, len = this.length; i < len; i++ ) { - var elem = this[i]; - var instance = $.data( elem, namespace ); - if ( !instance ) { - logError( "cannot call methods on " + namespace + " prior to initialization; " + - "attempted to call '" + options + "'" ); - continue; - } - if ( !$.isFunction( instance[options] ) || options.charAt(0) === '_' ) { - logError( "no such method '" + options + "' for " + namespace + " instance" ); - continue; - } - - // trigger method with arguments - var returnValue = instance[ options ].apply( instance, args ); - - // break look and return first value if provided - if ( returnValue !== undefined ) { - return returnValue; - } - } - // return this if no return value - return this; - } else { - return this.each( function() { - var instance = $.data( this, namespace ); - if ( instance ) { - // apply options & init - instance.option( options ); - instance._init(); - } else { - // initialize new instance - instance = new PluginClass( this, options ); - $.data( this, namespace, instance ); - } - }); - } - }; - -} - -// -------------------------- bridget -------------------------- // - -/** - * converts a Prototypical class into a proper jQuery plugin - * the class must have a ._init method - * @param {String} namespace - plugin name, used in $().pluginName - * @param {Function} PluginClass - constructor class - */ -$.bridget = function( namespace, PluginClass ) { - addOptionMethod( PluginClass ); - bridge( namespace, PluginClass ); -}; - -return $.bridget; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'jquery-bridget/jquery.bridget',[ 'jquery' ], defineBridget ); -} else if ( typeof exports === 'object' ) { - defineBridget( require('jquery') ); -} else { - // get jquery from browser global - defineBridget( window.jQuery ); -} - -})( window ); - -/*! - * eventie v1.0.6 - * event binding helper - * eventie.bind( elem, 'click', myFn ) - * eventie.unbind( elem, 'click', myFn ) - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( window ) { - - - -var docElem = document.documentElement; - -var bind = function() {}; - -function getIEEvent( obj ) { - var event = window.event; - // add event.target - event.target = event.target || event.srcElement || obj; - return event; -} - -if ( docElem.addEventListener ) { - bind = function( obj, type, fn ) { - obj.addEventListener( type, fn, false ); - }; -} else if ( docElem.attachEvent ) { - bind = function( obj, type, fn ) { - obj[ type + fn ] = fn.handleEvent ? - function() { - var event = getIEEvent( obj ); - fn.handleEvent.call( fn, event ); - } : - function() { - var event = getIEEvent( obj ); - fn.call( obj, event ); - }; - obj.attachEvent( "on" + type, obj[ type + fn ] ); - }; -} - -var unbind = function() {}; - -if ( docElem.removeEventListener ) { - unbind = function( obj, type, fn ) { - obj.removeEventListener( type, fn, false ); - }; -} else if ( docElem.detachEvent ) { - unbind = function( obj, type, fn ) { - obj.detachEvent( "on" + type, obj[ type + fn ] ); - try { - delete obj[ type + fn ]; - } catch ( err ) { - // can't delete window object properties - obj[ type + fn ] = undefined; - } - }; -} - -var eventie = { - bind: bind, - unbind: unbind -}; - -// ----- module definition ----- // - -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'eventie/eventie',eventie ); -} else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = eventie; -} else { - // browser global - window.eventie = eventie; -} - -})( window ); - -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ - -;(function () { - - - /** - * Class for managing events. - * Can be extended to provide event functionality in other classes. - * - * @class EventEmitter Manages event registering and emitting. - */ - function EventEmitter() {} - - // Shortcuts to improve speed and size - var proto = EventEmitter.prototype; - var exports = this; - var originalGlobalValue = exports.EventEmitter; - - /** - * Finds the index of the listener for the event in its storage array. - * - * @param {Function[]} listeners Array of listeners to search through. - * @param {Function} listener Method to look for. - * @return {Number} Index of the specified listener, -1 if not found - * @api private - */ - function indexOfListener(listeners, listener) { - var i = listeners.length; - while (i--) { - if (listeners[i].listener === listener) { - return i; - } - } - - return -1; - } - - /** - * Alias a method while keeping the context correct, to allow for overwriting of target method. - * - * @param {String} name The name of the target method. - * @return {Function} The aliased method - * @api private - */ - function alias(name) { - return function aliasClosure() { - return this[name].apply(this, arguments); - }; - } - - /** - * Returns the listener array for the specified event. - * Will initialise the event object and listener arrays if required. - * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them. - * Each property in the object response is an array of listener functions. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Function[]|Object} All listener functions for the event. - */ - proto.getListeners = function getListeners(evt) { - var events = this._getEvents(); - var response; - var key; - - // Return a concatenated array of all matching events if - // the selector is a regular expression. - if (evt instanceof RegExp) { - response = {}; - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - response[key] = events[key]; - } - } - } - else { - response = events[evt] || (events[evt] = []); - } - - return response; - }; - - /** - * Takes a list of listener objects and flattens it into a list of listener functions. - * - * @param {Object[]} listeners Raw listener objects. - * @return {Function[]} Just the listener functions. - */ - proto.flattenListeners = function flattenListeners(listeners) { - var flatListeners = []; - var i; - - for (i = 0; i < listeners.length; i += 1) { - flatListeners.push(listeners[i].listener); - } - - return flatListeners; - }; - - /** - * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Object} All listener functions for an event in an object. - */ - proto.getListenersAsObject = function getListenersAsObject(evt) { - var listeners = this.getListeners(evt); - var response; - - if (listeners instanceof Array) { - response = {}; - response[evt] = listeners; - } - - return response || listeners; - }; - - /** - * Adds a listener function to the specified event. - * The listener will not be added if it is a duplicate. - * If the listener returns true then it will be removed after it is called. - * If you pass a regular expression as the event name then the listener will be added to all events that match it. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListener = function addListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var listenerIsWrapped = typeof listener === 'object'; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) { - listeners[key].push(listenerIsWrapped ? listener : { - listener: listener, - once: false - }); - } - } - - return this; - }; - - /** - * Alias of addListener - */ - proto.on = alias('addListener'); - - /** - * Semi-alias of addListener. It will add a listener that will be - * automatically removed after its first execution. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addOnceListener = function addOnceListener(evt, listener) { - return this.addListener(evt, { - listener: listener, - once: true - }); - }; - - /** - * Alias of addOnceListener. - */ - proto.once = alias('addOnceListener'); - - /** - * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad. - * You need to tell it what event names should be matched by a regex. - * - * @param {String} evt Name of the event to create. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvent = function defineEvent(evt) { - this.getListeners(evt); - return this; - }; - - /** - * Uses defineEvent to define multiple events. - * - * @param {String[]} evts An array of event names to define. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvents = function defineEvents(evts) { - for (var i = 0; i < evts.length; i += 1) { - this.defineEvent(evts[i]); - } - return this; - }; - - /** - * Removes a listener function from the specified event. - * When passed a regular expression as the event name, it will remove the listener from all events that match it. - * - * @param {String|RegExp} evt Name of the event to remove the listener from. - * @param {Function} listener Method to remove from the event. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListener = function removeListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var index; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - index = indexOfListener(listeners[key], listener); - - if (index !== -1) { - listeners[key].splice(index, 1); - } - } - } - - return this; - }; - - /** - * Alias of removeListener - */ - proto.off = alias('removeListener'); - - /** - * Adds listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added. - * You can also pass it a regular expression to add the array of listeners to all events that match it. - * Yeah, this function does quite a bit. That's probably a bad thing. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListeners = function addListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(false, evt, listeners); - }; - - /** - * Removes listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be removed. - * You can also pass it a regular expression to remove the listeners from all events that match it. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListeners = function removeListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(true, evt, listeners); - }; - - /** - * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level. - * The first argument will determine if the listeners are removed (true) or added (false). - * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be added/removed. - * You can also pass it a regular expression to manipulate the listeners of all events that match it. - * - * @param {Boolean} remove True if you want to remove listeners, false if you want to add. - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add/remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) { - var i; - var value; - var single = remove ? this.removeListener : this.addListener; - var multiple = remove ? this.removeListeners : this.addListeners; - - // If evt is an object then pass each of its properties to this method - if (typeof evt === 'object' && !(evt instanceof RegExp)) { - for (i in evt) { - if (evt.hasOwnProperty(i) && (value = evt[i])) { - // Pass the single listener straight through to the singular method - if (typeof value === 'function') { - single.call(this, i, value); - } - else { - // Otherwise pass back to the multiple function - multiple.call(this, i, value); - } - } - } - } - else { - // So evt must be a string - // And listeners must be an array of listeners - // Loop over it and pass each one to the multiple method - i = listeners.length; - while (i--) { - single.call(this, evt, listeners[i]); - } - } - - return this; - }; - - /** - * Removes all listeners from a specified event. - * If you do not specify an event then all listeners will be removed. - * That means every event will be emptied. - * You can also pass a regex to remove all events that match it. - * - * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeEvent = function removeEvent(evt) { - var type = typeof evt; - var events = this._getEvents(); - var key; - - // Remove different things depending on the state of evt - if (type === 'string') { - // Remove all listeners for the specified event - delete events[evt]; - } - else if (evt instanceof RegExp) { - // Remove all events matching the regex. - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - delete events[key]; - } - } - } - else { - // Remove all listeners in all events - delete this._events; - } - - return this; - }; - - /** - * Alias of removeEvent. - * - * Added to mirror the node API. - */ - proto.removeAllListeners = alias('removeEvent'); - - /** - * Emits an event of your choice. - * When emitted, every listener attached to that event will be executed. - * If you pass the optional argument array then those arguments will be passed to every listener upon execution. - * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately. - * So they will not arrive within the array on the other side, they will be separate. - * You can also pass a regular expression to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {Array} [args] Optional array of arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emitEvent = function emitEvent(evt, args) { - var listeners = this.getListenersAsObject(evt); - var listener; - var i; - var key; - var response; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - i = listeners[key].length; - - while (i--) { - // If the listener returns true then it shall be removed from the event - // The function is executed either with a basic call or an apply if there is an args array - listener = listeners[key][i]; - - if (listener.once === true) { - this.removeListener(evt, listener.listener); - } - - response = listener.listener.apply(this, args || []); - - if (response === this._getOnceReturnValue()) { - this.removeListener(evt, listener.listener); - } - } - } - } - - return this; - }; - - /** - * Alias of emitEvent - */ - proto.trigger = alias('emitEvent'); - - /** - * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on. - * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {...*} Optional additional arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emit = function emit(evt) { - var args = Array.prototype.slice.call(arguments, 1); - return this.emitEvent(evt, args); - }; - - /** - * Sets the current value to check against when executing listeners. If a - * listeners return value matches the one set here then it will be removed - * after execution. This value defaults to true. - * - * @param {*} value The new value to check for when executing listeners. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.setOnceReturnValue = function setOnceReturnValue(value) { - this._onceReturnValue = value; - return this; - }; - - /** - * Fetches the current value to check against when executing listeners. If - * the listeners return value matches this one then it should be removed - * automatically. It will return true by default. - * - * @return {*|Boolean} The current value to check for or the default, true. - * @api private - */ - proto._getOnceReturnValue = function _getOnceReturnValue() { - if (this.hasOwnProperty('_onceReturnValue')) { - return this._onceReturnValue; - } - else { - return true; - } - }; - - /** - * Fetches the events object and creates one if required. - * - * @return {Object} The events storage object. - * @api private - */ - proto._getEvents = function _getEvents() { - return this._events || (this._events = {}); - }; - - /** - * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version. - * - * @return {Function} Non conflicting EventEmitter class. - */ - EventEmitter.noConflict = function noConflict() { - exports.EventEmitter = originalGlobalValue; - return EventEmitter; - }; - - // Expose the class either via AMD, CommonJS or the global object - if (typeof define === 'function' && define.amd) { - define('eventEmitter/EventEmitter',[],function () { - return EventEmitter; - }); - } - else if (typeof module === 'object' && module.exports){ - module.exports = EventEmitter; - } - else { - exports.EventEmitter = EventEmitter; - } -}.call(this)); - -/*! - * getStyleProperty v1.0.4 - * original by kangax - * http://perfectionkills.com/feature-testing-css-properties/ - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true */ -/*global define: false, exports: false, module: false */ - -( function( window ) { - - - -var prefixes = 'Webkit Moz ms Ms O'.split(' '); -var docElemStyle = document.documentElement.style; - -function getStyleProperty( propName ) { - if ( !propName ) { - return; - } - - // test standard property first - if ( typeof docElemStyle[ propName ] === 'string' ) { - return propName; - } - - // capitalize - propName = propName.charAt(0).toUpperCase() + propName.slice(1); - - // test vendor specific properties - var prefixed; - for ( var i=0, len = prefixes.length; i < len; i++ ) { - prefixed = prefixes[i] + propName; - if ( typeof docElemStyle[ prefixed ] === 'string' ) { - return prefixed; - } - } -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'get-style-property/get-style-property',[],function() { - return getStyleProperty; - }); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = getStyleProperty; -} else { - // browser global - window.getStyleProperty = getStyleProperty; -} - -})( window ); - -/*! - * getSize v1.2.2 - * measure size of elements - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, exports: false, require: false, module: false, console: false */ - -( function( window, undefined ) { - - - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') === -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - - - -function defineGetSize( getStyleProperty ) { - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var getStyle, boxSizingProp, isBoxSizeOuter; - -/** - * setup vars and functions - * do it on initial getSize(), rather than on script load - * For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - var getComputedStyle = window.getComputedStyle; - getStyle = ( function() { - var getStyleFn = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - return function getStyle( elem ) { - var style = getStyleFn( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See http://bit.ly/getsizebug1' ); - } - return style; - }; - })(); - - // -------------------------- box sizing -------------------------- // - - boxSizingProp = getStyleProperty('boxSizing'); - - /** - * WebKit measures the outer-width on style.width on border-box elems - * IE & Firefox measures the inner-width - */ - if ( boxSizingProp ) { - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style[ boxSizingProp ] = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - - isBoxSizeOuter = getStyleSize( style.width ) === 200; - body.removeChild( div ); - } - -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem === 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem !== 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display === 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = !!( boxSizingProp && - style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' ); - - // get all measurements - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - value = mungeNonPixel( elem, value ); - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -// IE8 returns percent values, not pixels -// taken from jQuery's curCSS -function mungeNonPixel( elem, value ) { - // IE8 and has percent value - if ( window.getComputedStyle || value.indexOf('%') === -1 ) { - return value; - } - var style = elem.style; - // Remember the original values - var left = style.left; - var rs = elem.runtimeStyle; - var rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = value; - value = style.pixelLeft; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - - return value; -} - -return getSize; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD for RequireJS - define( 'get-size/get-size',[ 'get-style-property/get-style-property' ], defineGetSize ); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = defineGetSize( require('desandro-get-style-property') ); -} else { - // browser global - window.getSize = defineGetSize( window.getStyleProperty ); -} - -})( window ); - -/*! - * docReady v1.0.4 - * Cross browser DOMContentLoaded event emitter - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true*/ -/*global define: false, require: false, module: false */ - -( function( window ) { - - - -var document = window.document; -// collection of functions to be triggered on ready -var queue = []; - -function docReady( fn ) { - // throw out non-functions - if ( typeof fn !== 'function' ) { - return; - } - - if ( docReady.isReady ) { - // ready now, hit it - fn(); - } else { - // queue function when ready - queue.push( fn ); - } -} - -docReady.isReady = false; - -// triggered on various doc ready events -function onReady( event ) { - // bail if already triggered or IE8 document is not ready just yet - var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; - if ( docReady.isReady || isIE8NotReady ) { - return; - } - - trigger(); -} - -function trigger() { - docReady.isReady = true; - // process queue - for ( var i=0, len = queue.length; i < len; i++ ) { - var fn = queue[i]; - fn(); - } -} - -function defineDocReady( eventie ) { - // trigger ready if page is ready - if ( document.readyState === 'complete' ) { - trigger(); - } else { - // listen for events - eventie.bind( document, 'DOMContentLoaded', onReady ); - eventie.bind( document, 'readystatechange', onReady ); - eventie.bind( window, 'load', onReady ); - } - - return docReady; -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'doc-ready/doc-ready',[ 'eventie/eventie' ], defineDocReady ); -} else if ( typeof exports === 'object' ) { - module.exports = defineDocReady( require('eventie') ); -} else { - // browser global - window.docReady = defineDocReady( window.eventie ); -} - -})( window ); - -/** - * matchesSelector v1.0.3 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( ElemProto ) { - - - - var matchesMethod = ( function() { - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0, len = prefixes.length; i < len; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - // ----- match ----- // - - function match( elem, selector ) { - return elem[ matchesMethod ]( selector ); - } - - // ----- appendToFragment ----- // - - function checkParent( elem ) { - // not needed if already has parent - if ( elem.parentNode ) { - return; - } - var fragment = document.createDocumentFragment(); - fragment.appendChild( elem ); - } - - // ----- query ----- // - - // fall back to using QSA - // thx @jonathantneal https://gist.github.com/3062955 - function query( elem, selector ) { - // append to fragment if no parent - checkParent( elem ); - - // match elem with all selected elems of parent - var elems = elem.parentNode.querySelectorAll( selector ); - for ( var i=0, len = elems.length; i < len; i++ ) { - // return true if match - if ( elems[i] === elem ) { - return true; - } - } - // otherwise return false - return false; - } - - // ----- matchChild ----- // - - function matchChild( elem, selector ) { - checkParent( elem ); - return match( elem, selector ); - } - - // ----- matchesSelector ----- // - - var matchesSelector; - - if ( matchesMethod ) { - // IE9 supports matchesSelector, but doesn't work on orphaned elems - // check for that - var div = document.createElement('div'); - var supportsOrphans = match( div, 'div' ); - matchesSelector = supportsOrphans ? match : matchChild; - } else { - matchesSelector = query; - } - - // transport - if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'matches-selector/matches-selector',[],function() { - return matchesSelector; - }); - } else if ( typeof exports === 'object' ) { - module.exports = matchesSelector; - } - else { - // browser global - window.matchesSelector = matchesSelector; - } - -})( Element.prototype ); - -/** - * Fizzy UI utils v1.0.1 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - /*global define: false, module: false, require: false */ - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'fizzy-ui-utils/utils',[ - 'doc-ready/doc-ready', - 'matches-selector/matches-selector' - ], function( docReady, matchesSelector ) { - return factory( window, docReady, matchesSelector ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('doc-ready'), - require('desandro-matches-selector') - ); - } else { - // browser global - window.fizzyUIUtils = factory( - window, - window.docReady, - window.matchesSelector - ); - } - -}( window, function factory( window, docReady, matchesSelector ) { - - - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- isArray ----- // - -var objToString = Object.prototype.toString; -utils.isArray = function( obj ) { - return objToString.call( obj ) == '[object Array]'; -}; - -// ----- makeArray ----- // - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - var ary = []; - if ( utils.isArray( obj ) ) { - // use object if already an array - ary = obj; - } else if ( obj && typeof obj.length == 'number' ) { - // convert nodeList to array - for ( var i=0, len = obj.length; i < len; i++ ) { - ary.push( obj[i] ); - } - } else { - // array of single index - ary.push( obj ); - } - return ary; -}; - -// ----- indexOf ----- // - -// index of helper cause IE8 -utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { - return ary.indexOf( obj ); - } : function( ary, obj ) { - for ( var i=0, len = ary.length; i < len; i++ ) { - if ( ary[i] === obj ) { - return i; - } - } - return -1; - }; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = utils.indexOf( ary, obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- isElement ----- // - -// http://stackoverflow.com/a/384380/182183 -utils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ? - function isElementDOM2( obj ) { - return obj instanceof HTMLElement; - } : - function isElementQuirky( obj ) { - return obj && typeof obj == 'object' && - obj.nodeType == 1 && typeof obj.nodeName == 'string'; - }; - -// ----- setText ----- // - -utils.setText = ( function() { - var setTextProperty; - function setText( elem, text ) { - // only check setTextProperty once - setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' ); - elem[ setTextProperty ] = text; - } - return setText; -})(); - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // check that elem is an actual element - if ( !utils.isElement( elem ) ) { - continue; - } - // filter & find items if we have a selector - if ( selector ) { - // filter siblings - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var j=0, jLen = childElems.length; j < jLen; j++ ) { - ffElems.push( childElems[j] ); - } - } else { - ffElems.push( elem ); - } - } - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - if ( timeout ) { - clearTimeout( timeout ); - } - var args = arguments; - - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold || 100 ); - }; -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-option attribute - */ -utils.htmlInit = function( WidgetClass, namespace ) { - docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var elems = document.querySelectorAll( '.js-' + dashedNamespace ); - var dataAttr = 'data-' + dashedNamespace + '-options'; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var attr = elem.getAttribute( dataAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + - elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' + - error ); - } - continue; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('layoutname') - var jQuery = window.jQuery; - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - } - }); -}; - -// ----- ----- // - -return utils; - -})); - -/** - * Outlayer Item - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'outlayer/item',[ - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'get-style-property/get-style-property', - 'fizzy-ui-utils/utils' - ], - function( EventEmitter, getSize, getStyleProperty, utils ) { - return factory( window, EventEmitter, getSize, getStyleProperty, utils ); - } - ); - } else if (typeof exports === 'object') { - // CommonJS - module.exports = factory( - window, - require('wolfy87-eventemitter'), - require('get-size'), - require('desandro-get-style-property'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Outlayer = {}; - window.Outlayer.Item = factory( - window, - window.EventEmitter, - window.getSize, - window.getStyleProperty, - window.fizzyUIUtils - ); - } - -}( window, function factory( window, EventEmitter, getSize, getStyleProperty, utils ) { - - -// ----- helpers ----- // - -var getComputedStyle = window.getComputedStyle; -var getStyle = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - -var transitionProperty = getStyleProperty('transition'); -var transformProperty = getStyleProperty('transform'); -var supportsCSS3 = transitionProperty && transformProperty; -var is3d = !!getStyleProperty('perspective'); - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - MozTransition: 'transitionend', - OTransition: 'otransitionend', - transition: 'transitionend' -}[ transitionProperty ]; - -// properties that could have vendor prefix -var prefixableProperties = [ - 'transform', - 'transition', - 'transitionDuration', - 'transitionProperty' -]; - -// cache all vendor properties -var vendorProperties = ( function() { - var cache = {}; - for ( var i=0, len = prefixableProperties.length; i < len; i++ ) { - var prop = prefixableProperties[i]; - var supportedProp = getStyleProperty( prop ); - if ( supportedProp && supportedProp !== prop ) { - cache[ prop ] = supportedProp; - } - } - return cache; -})(); - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EventEmitter -utils.extend( Item.prototype, EventEmitter.prototype ); - -Item.prototype._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -Item.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -Item.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -Item.prototype.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -Item.prototype.getPosition = function() { - var style = getStyle( this.element ); - var layoutOptions = this.layout.options; - var isOriginLeft = layoutOptions.isOriginLeft; - var isOriginTop = layoutOptions.isOriginTop; - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - // convert percent to pixels - var layoutSize = this.layout.size; - var x = xValue.indexOf('%') != -1 ? - ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); - var y = yValue.indexOf('%') != -1 ? - ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); - - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -Item.prototype.layoutPosition = function() { - var layoutSize = this.layout.size; - var layoutOptions = this.layout.options; - var style = {}; - - // x - var xPadding = layoutOptions.isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = layoutOptions.isOriginLeft ? 'left' : 'right'; - var xResetProperty = layoutOptions.isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = layoutOptions.isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = layoutOptions.isOriginTop ? 'top' : 'bottom'; - var yResetProperty = layoutOptions.isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -Item.prototype.getXValue = function( x ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && !layoutOptions.isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -Item.prototype.getYValue = function( y ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && layoutOptions.isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - - -Item.prototype._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var compareX = parseInt( x, 10 ); - var compareY = parseInt( y, 10 ); - var didNotMove = compareX === this.position.x && compareY === this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -Item.prototype.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var layoutOptions = this.layout.options; - x = layoutOptions.isOriginLeft ? x : -x; - y = layoutOptions.isOriginTop ? y : -y; - - if ( is3d ) { - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; - } - - return 'translate(' + x + 'px, ' + y + 'px)'; -}; - -// non transition + transform support -Item.prototype.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -// use transition and transforms if supported -Item.prototype.moveTo = supportsCSS3 ? - Item.prototype._transitionTo : Item.prototype.goTo; - -Item.prototype.setPosition = function( x, y ) { - this.position.x = parseInt( x, 10 ); - this.position.y = parseInt( y, 10 ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -Item.prototype._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -Item.prototype._transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + - toDashedAll( vendorProperties.transform || 'transform' ); - -Item.prototype.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: this.layout.options.transitionDuration - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -Item.prototype.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ]; - -// ----- events ----- // - -Item.prototype.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -Item.prototype.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform', - '-moz-transform': 'transform', - '-o-transform': 'transform' -}; - -Item.prototype.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -Item.prototype.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -Item.prototype._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '' -}; - -Item.prototype.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -Item.prototype.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -Item.prototype.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - var _this = this; - this.once( 'transitionEnd', function() { - _this.removeElem(); - }); - this.hide(); -}; - -Item.prototype.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -Item.prototype.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -Item.prototype.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -Item.prototype.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - -/*! - * Outlayer v1.4.2 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'outlayer/outlayer',[ - 'eventie/eventie', - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'fizzy-ui-utils/utils', - './item' - ], - function( eventie, EventEmitter, getSize, utils, Item ) { - return factory( window, eventie, EventEmitter, getSize, utils, Item); - } - ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('eventie'), - require('wolfy87-eventemitter'), - require('get-size'), - require('fizzy-ui-utils'), - require('./item') - ); - } else { - // browser global - window.Outlayer = factory( - window, - window.eventie, - window.EventEmitter, - window.getSize, - window.fizzyUIUtils, - window.Outlayer.Item - ); - } - -}( window, function factory( window, eventie, EventEmitter, getSize, utils, Item ) { - - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - if ( this.options.isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - isInitLayout: true, - isOriginLeft: true, - isOriginTop: true, - isResizeBound: true, - isResizingContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -// inherit EventEmitter -utils.extend( Outlayer.prototype, EventEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -Outlayer.prototype.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -Outlayer.prototype._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - if ( this.options.isResizeBound ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -Outlayer.prototype.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -Outlayer.prototype._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0, len = itemElems.length; i < len; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -Outlayer.prototype._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -Outlayer.prototype.getItemElements = function() { - var elems = []; - for ( var i=0, len = this.items.length; i < len; i++ ) { - elems.push( this.items[i].element ); - } - return elems; -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -Outlayer.prototype.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var isInstant = this.options.isLayoutInstant !== undefined ? - this.options.isLayoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -Outlayer.prototype._init = Outlayer.prototype.layout; - -/** - * logic before any new layout - */ -Outlayer.prototype._resetLayout = function() { - this.getSize(); -}; - - -Outlayer.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -Outlayer.prototype._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option === 'string' ) { - elem = this.element.querySelector( option ); - } else if ( utils.isElement( option ) ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -Outlayer.prototype.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -Outlayer.prototype._getItemsForLayout = function( items ) { - var layoutItems = []; - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - if ( !item.isIgnored ) { - layoutItems.push( item ); - } - } - return layoutItems; -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -Outlayer.prototype._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - } - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -Outlayer.prototype._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -Outlayer.prototype._processLayoutQueue = function( queue ) { - for ( var i=0, len = queue.length; i < len; i++ ) { - var obj = queue[i]; - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant ); - } -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -Outlayer.prototype._positionItem = function( item, x, y, isInstant ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -Outlayer.prototype._postLayout = function() { - this.resizeContainer(); -}; - -Outlayer.prototype.resizeContainer = function() { - if ( !this.options.isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -Outlayer.prototype._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -Outlayer.prototype._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -Outlayer.prototype._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount === count ) { - onComplete(); - } - } - - // bind callback - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - item.once( eventName, tick ); - } -}; - -/** - * emits events via eventEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -Outlayer.prototype.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -Outlayer.prototype.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -Outlayer.prototype.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -Outlayer.prototype.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - this.ignore( elem ); - } -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -Outlayer.prototype.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - } - -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -Outlayer.prototype._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems === 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -Outlayer.prototype._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - for ( var i=0, len = this.stamps.length; i < len; i++ ) { - var stamp = this.stamps[i]; - this._manageStamp( stamp ); - } -}; - -// update boundingLeft / Top -Outlayer.prototype._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -Outlayer.prototype._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -Outlayer.prototype._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -Outlayer.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -/** - * Bind layout to window resizing - */ -Outlayer.prototype.bindResize = function() { - // bind just one listener - if ( this.isResizeBound ) { - return; - } - eventie.bind( window, 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -Outlayer.prototype.unbindResize = function() { - if ( this.isResizeBound ) { - eventie.unbind( window, 'resize', this ); - } - this.isResizeBound = false; -}; - -// original debounce by John Hann -// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ - -// this fires every resize -Outlayer.prototype.onresize = function() { - if ( this.resizeTimeout ) { - clearTimeout( this.resizeTimeout ); - } - - var _this = this; - function delayed() { - _this.resize(); - delete _this.resizeTimeout; - } - - this.resizeTimeout = setTimeout( delayed, 100 ); -}; - -// debounced, layout on resize -Outlayer.prototype.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -Outlayer.prototype.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -Outlayer.prototype.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.reveal(); - } -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.hide(); - } -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -Outlayer.prototype.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - if ( item.element === elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -Outlayer.prototype.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - } - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - for ( var i=0, len = removeItems.length; i < len; i++ ) { - var item = removeItems[i]; - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - } -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -Outlayer.prototype.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - item.destroy(); - } - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - function Layout() { - Outlayer.apply( this, arguments ); - } - // inherit Outlayer prototype, use Object.create if there - if ( Object.create ) { - Layout.prototype = Object.create( Outlayer.prototype ); - } else { - utils.extend( Layout.prototype, Outlayer.prototype ); - } - // set contructor, used for namespace and Item - Layout.prototype.constructor = Layout; - - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - // apply new options - utils.extend( Layout.defaults, options ); - // keep prototype.settings for backwards compatibility (Packery v1.2.0) - Layout.prototype.settings = {}; - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = function LayoutItem() { - Item.apply( this, arguments ); - }; - - Layout.Item.prototype = new Item(); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/*! - * Masonry v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'fizzy-ui-utils/utils' - ], - factory ); - } else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer'), - require('get-size'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Masonry = factory( - window.Outlayer, - window.getSize, - window.fizzyUIUtils - ); - } - -}( window, function factory( Outlayer, getSize, utils ) { - - - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - - Masonry.prototype._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - var i = this.cols; - this.colYs = []; - while (i--) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - }; - - Masonry.prototype.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - Masonry.prototype.getContainerWidth = function() { - // container is parent if fit width - var container = this.options.isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - Masonry.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - - var colGroup = this._getColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - var shortColIndex = utils.indexOf( colGroup, minimumY ); - - // position the brick - var position = { - x: this.columnWidth * shortColIndex, - y: minimumY - }; - - // apply setHeight to necessary columns - var setHeight = minimumY + item.size.outerHeight; - var setSpan = this.cols + 1 - colGroup.length; - for ( var i = 0; i < setSpan; i++ ) { - this.colYs[ shortColIndex + i ] = setHeight; - } - - return position; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - Masonry.prototype._getColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( i, i + colSpan ); - // and get the max value of the array - colGroup[i] = Math.max.apply( Math, groupColYs ); - } - return colGroup; - }; - - Masonry.prototype._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var firstX = this.options.isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - Masonry.prototype._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this.options.isFitWidth ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - Masonry.prototype._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - Masonry.prototype.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth !== this.containerWidth; - }; - - return Masonry; - -})); - diff --git a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js b/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js deleted file mode 100644 index f3328c5e99..0000000000 --- a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Masonry PACKAGED v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/masonry.js b/dashboard-ui/bower_components/masonry/masonry.js deleted file mode 100644 index 0b15a67d4e..0000000000 --- a/dashboard-ui/bower_components/masonry/masonry.js +++ /dev/null @@ -1,203 +0,0 @@ -/*! - * Masonry v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'fizzy-ui-utils/utils' - ], - factory ); - } else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer'), - require('get-size'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Masonry = factory( - window.Outlayer, - window.getSize, - window.fizzyUIUtils - ); - } - -}( window, function factory( Outlayer, getSize, utils ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - - Masonry.prototype._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - var i = this.cols; - this.colYs = []; - while (i--) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - }; - - Masonry.prototype.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - Masonry.prototype.getContainerWidth = function() { - // container is parent if fit width - var container = this.options.isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - Masonry.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - - var colGroup = this._getColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - var shortColIndex = utils.indexOf( colGroup, minimumY ); - - // position the brick - var position = { - x: this.columnWidth * shortColIndex, - y: minimumY - }; - - // apply setHeight to necessary columns - var setHeight = minimumY + item.size.outerHeight; - var setSpan = this.cols + 1 - colGroup.length; - for ( var i = 0; i < setSpan; i++ ) { - this.colYs[ shortColIndex + i ] = setHeight; - } - - return position; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - Masonry.prototype._getColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( i, i + colSpan ); - // and get the max value of the array - colGroup[i] = Math.max.apply( Math, groupColYs ); - } - return colGroup; - }; - - Masonry.prototype._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var firstX = this.options.isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - Masonry.prototype._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this.options.isFitWidth ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - Masonry.prototype._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - Masonry.prototype.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth !== this.containerWidth; - }; - - return Masonry; - -})); diff --git a/dashboard-ui/bower_components/masonry/sandbox/add-items.html b/dashboard-ui/bower_components/masonry/sandbox/add-items.html deleted file mode 100644 index 17c1ffbafe..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/add-items.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - add items - - - - - - -

    add items

    - -

    - - -

    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/basic.html b/dashboard-ui/bower_components/masonry/sandbox/basic.html deleted file mode 100644 index 55f9c5c20b..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/basic.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - basic - - - - - - -

    basic

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html b/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html deleted file mode 100644 index 5ee641ab5f..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - bottom up - - - - - - - - -

    bottom up

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html b/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html deleted file mode 100644 index a3aa64c19c..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - browserify - - - - - - -

    browserify

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js b/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js deleted file mode 100644 index 2baca7d560..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js +++ /dev/null @@ -1,19 +0,0 @@ -// vanilla js - -var Masonry = require('../../masonry'); - -new Masonry( '#basic', { - columnWidth: 60 -}); - -// jquery - -// var $ = require('jquery'); -// var jQBridget = require('jquery-bridget'); -// var Masonry = require('../../masonry'); -// -// $.bridget( 'masonry', Masonry ); -// -// $('#basic').masonry({ -// columnWidth: 60 -// }); diff --git a/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html b/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html deleted file mode 100644 index acbce9947b..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - element sizing - - - - - - -

    element sizing

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/fit-width.html b/dashboard-ui/bower_components/masonry/sandbox/fit-width.html deleted file mode 100644 index fc74f578f2..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/fit-width.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - fit width - - - - - - - - -

    fit width

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/fluid.html b/dashboard-ui/bower_components/masonry/sandbox/fluid.html deleted file mode 100644 index f3ec605ece..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/fluid.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - fluid - - - - - - -

    fluid

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/jquery.html b/dashboard-ui/bower_components/masonry/sandbox/jquery.html deleted file mode 100644 index 82fbaf61a2..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/jquery.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - jQuery - - - - - - -

    jQuery

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html b/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html deleted file mode 100644 index 3246194910..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - require js - - - - - - - -

    require js

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js b/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js deleted file mode 100644 index b329acff24..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js +++ /dev/null @@ -1,69 +0,0 @@ -/*global requirejs: false*/ - -// -------------------------- pkgd -------------------------- // - -/* -requirejs( [ '../../dist/masonry.pkgd' ], function( Masonry ) { - new Masonry( document.querySelector('#basic') ); -}); -// */ - -// -------------------------- bower -------------------------- // - -/* -requirejs.config({ - baseUrl: '../bower_components' -}); - -requirejs( [ '../masonry' ], function( Masonry ) { - new Masonry( document.querySelector('#basic') ); -}); -// */ - -// -------------------------- pkgd & jQuery -------------------------- // - -// /* -requirejs.config({ - paths: { - jquery: '../../bower_components/jquery/dist/jquery' - } -}); - -requirejs( [ 'require', 'jquery', '../../dist/masonry.pkgd' ], - function( require, $, Masonry ) { - require( [ - 'jquery-bridget/jquery.bridget' - ], - function() { - $.bridget( 'masonry', Masonry ); - $('#basic').masonry({ - columnWidth: 60 - }); - } - ); -}); -// */ - -// -------------------------- bower & jQuery -------------------------- // - -/* -requirejs.config({ - baseUrl: '../bower_components', - paths: { - jquery: 'jquery/dist/jquery' - } -}); - -requirejs( [ - 'jquery', - '../masonry', - 'jquery-bridget/jquery.bridget' - ], - function( $, Masonry ) { - $.bridget( 'masonry', Masonry ); - $('#basic').masonry({ - columnWidth: 60 - }); - } -); -// */ \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html b/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html deleted file mode 100644 index 8dd6a4f8db..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - right to left - - - - - - - - -

    right to left

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/sandbox.css b/dashboard-ui/bower_components/masonry/sandbox/sandbox.css deleted file mode 100644 index 2d88f22f9a..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/sandbox.css +++ /dev/null @@ -1,33 +0,0 @@ -* { - box-sizing: border-box; -} - -.container { - background: #EEE; - width: 50%; - margin-bottom: 20px; -} - -.item { - width: 60px; - height: 60px; - float: left; - border: 1px solid; - background: #09F; -} - -.item.w2 { width: 120px; } -.item.w3 { width: 180px; } -.item.w4 { width: 240px; } - -.item.h2 { height: 100px; } -.item.h3 { height: 160px; } -.item.h4 { height: 220px; } -.item.h5 { height: 280px; } - -.stamp { - background: red; - opacity: 0.75; - position: absolute; - border: 1px solid; -} diff --git a/dashboard-ui/bower_components/masonry/sandbox/stamps.html b/dashboard-ui/bower_components/masonry/sandbox/stamps.html deleted file mode 100644 index 3a9a328c70..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/stamps.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - stamps - - - - - - - - - -

    stamps

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/matches-selector/.bower.json b/dashboard-ui/bower_components/matches-selector/.bower.json deleted file mode 100644 index 98be80094b..0000000000 --- a/dashboard-ui/bower_components/matches-selector/.bower.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "matches-selector", - "version": "1.0.3", - "description": "matches/matchesSelector helper", - "main": "matches-selector.js", - "devDependencies": { - "qunit": "1.x" - }, - "homepage": "https://github.com/desandro/matches-selector", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "matchesSelector", - "matches" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "tests.*", - "component.json", - "package.json" - ], - "_release": "1.0.3", - "_resolution": { - "type": "version", - "tag": "v1.0.3", - "commit": "95e78d3f36e19066e89b0ed767ca36bd2f0b0cfb" - }, - "_source": "git://github.com/desandro/matches-selector.git", - "_target": "~1.0.2", - "_originalSource": "matches-selector" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/matches-selector/bower.json b/dashboard-ui/bower_components/matches-selector/bower.json deleted file mode 100644 index 397f30b637..0000000000 --- a/dashboard-ui/bower_components/matches-selector/bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "matches-selector", - "version": "1.0.3", - "description": "matches/matchesSelector helper", - "main": "matches-selector.js", - "devDependencies": { - "qunit": "1.x" - }, - "homepage": "https://github.com/desandro/matches-selector", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "matchesSelector", - "matches" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "tests.*", - "component.json", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/matches-selector/matches-selector.js b/dashboard-ui/bower_components/matches-selector/matches-selector.js deleted file mode 100644 index 862498233e..0000000000 --- a/dashboard-ui/bower_components/matches-selector/matches-selector.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * matchesSelector v1.0.3 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( ElemProto ) { - - 'use strict'; - - var matchesMethod = ( function() { - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0, len = prefixes.length; i < len; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - // ----- match ----- // - - function match( elem, selector ) { - return elem[ matchesMethod ]( selector ); - } - - // ----- appendToFragment ----- // - - function checkParent( elem ) { - // not needed if already has parent - if ( elem.parentNode ) { - return; - } - var fragment = document.createDocumentFragment(); - fragment.appendChild( elem ); - } - - // ----- query ----- // - - // fall back to using QSA - // thx @jonathantneal https://gist.github.com/3062955 - function query( elem, selector ) { - // append to fragment if no parent - checkParent( elem ); - - // match elem with all selected elems of parent - var elems = elem.parentNode.querySelectorAll( selector ); - for ( var i=0, len = elems.length; i < len; i++ ) { - // return true if match - if ( elems[i] === elem ) { - return true; - } - } - // otherwise return false - return false; - } - - // ----- matchChild ----- // - - function matchChild( elem, selector ) { - checkParent( elem ); - return match( elem, selector ); - } - - // ----- matchesSelector ----- // - - var matchesSelector; - - if ( matchesMethod ) { - // IE9 supports matchesSelector, but doesn't work on orphaned elems - // check for that - var div = document.createElement('div'); - var supportsOrphans = match( div, 'div' ); - matchesSelector = supportsOrphans ? match : matchChild; - } else { - matchesSelector = query; - } - - // transport - if ( typeof define === 'function' && define.amd ) { - // AMD - define( function() { - return matchesSelector; - }); - } else if ( typeof exports === 'object' ) { - module.exports = matchesSelector; - } - else { - // browser global - window.matchesSelector = matchesSelector; - } - -})( Element.prototype ); diff --git a/dashboard-ui/bower_components/native-promise-only/.bower.json b/dashboard-ui/bower_components/native-promise-only/.bower.json new file mode 100644 index 0000000000..95b80b4a0d --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/.bower.json @@ -0,0 +1,15 @@ +{ + "name": "native-promise-only", + "homepage": "https://github.com/getify/native-promise-only", + "version": "0.8.0-a", + "_release": "0.8.0-a", + "_resolution": { + "type": "version", + "tag": "0.8.0-a", + "commit": "d40a2d0197feea4f9b0bf5f8bf3079465ced3758" + }, + "_source": "git://github.com/getify/native-promise-only.git", + "_target": "~0.8.0-a", + "_originalSource": "native-promise-only", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/native-promise-only/.gitignore b/dashboard-ui/bower_components/native-promise-only/.gitignore new file mode 100644 index 0000000000..f11ac4368a --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/.gitignore @@ -0,0 +1,2 @@ +node_modules +npo.js diff --git a/dashboard-ui/bower_components/native-promise-only/.npmignore b/dashboard-ui/bower_components/native-promise-only/.npmignore new file mode 100644 index 0000000000..859204df5e --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/.npmignore @@ -0,0 +1,2 @@ +node_modules +.gitignore diff --git a/dashboard-ui/bower_components/native-promise-only/build.js b/dashboard-ui/bower_components/native-promise-only/build.js new file mode 100644 index 0000000000..7cf2ad9e3e --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/build.js @@ -0,0 +1,34 @@ +#!/usr/bin/env node + +var fs = require("fs"), + path = require("path"), + exec = require("child_process").exec, + ugly = require("uglify-js"), + + result +; + +console.log("*** Building ***"); +console.log("Minifying to npo.js."); + +try { + result = ugly.minify(path.join(__dirname,"lib","npo.src.js"),{ + mangle: true, + compress: true, + output: { + comments: /^!/ + } + }); + + fs.writeFileSync( + path.join(__dirname,"npo.js"), + result.code + "\n", + { encoding: "utf8" } + ); + + console.log("Complete."); +} +catch (err) { + console.error(err); + process.exit(1); +} diff --git a/dashboard-ui/bower_components/native-promise-only/lib/npo.src.js b/dashboard-ui/bower_components/native-promise-only/lib/npo.src.js new file mode 100644 index 0000000000..bc82fdff38 --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/lib/npo.src.js @@ -0,0 +1,373 @@ +/*! Native Promise Only + v0.8.0-a (c) Kyle Simpson + MIT License: http://getify.mit-license.org +*/ + +(function UMD(name,context,definition){ + // special form of UMD for polyfilling across evironments + context[name] = context[name] || definition(); + if (typeof module != "undefined" && module.exports) { module.exports = context[name]; } + else if (typeof define == "function" && define.amd) { define(function $AMD$(){ return context[name]; }); } +})("Promise",typeof global != "undefined" ? global : this,function DEF(){ + /*jshint validthis:true */ + "use strict"; + + var builtInProp, cycle, scheduling_queue, + ToString = Object.prototype.toString, + timer = (typeof setImmediate != "undefined") ? + function timer(fn) { return setImmediate(fn); } : + setTimeout + ; + + // dammit, IE8. + try { + Object.defineProperty({},"x",{}); + builtInProp = function builtInProp(obj,name,val,config) { + return Object.defineProperty(obj,name,{ + value: val, + writable: true, + configurable: config !== false + }); + }; + } + catch (err) { + builtInProp = function builtInProp(obj,name,val) { + obj[name] = val; + return obj; + }; + } + + // Note: using a queue instead of array for efficiency + scheduling_queue = (function Queue() { + var first, last, item; + + function Item(fn,self) { + this.fn = fn; + this.self = self; + this.next = void 0; + } + + return { + add: function add(fn,self) { + item = new Item(fn,self); + if (last) { + last.next = item; + } + else { + first = item; + } + last = item; + item = void 0; + }, + drain: function drain() { + var f = first; + first = last = cycle = void 0; + + while (f) { + f.fn.call(f.self); + f = f.next; + } + } + }; + })(); + + function schedule(fn,self) { + scheduling_queue.add(fn,self); + if (!cycle) { + cycle = timer(scheduling_queue.drain); + } + } + + // promise duck typing + function isThenable(o) { + var _then, o_type = typeof o; + + if (o != null && + ( + o_type == "object" || o_type == "function" + ) + ) { + _then = o.then; + } + return typeof _then == "function" ? _then : false; + } + + function notify() { + for (var i=0; i 0) { + schedule(notify,self); + } + } + } + catch (err) { + reject.call(new MakeDefWrapper(self),err); + } + } + + function reject(msg) { + var self = this; + + // already triggered? + if (self.triggered) { return; } + + self.triggered = true; + + // unwrap + if (self.def) { + self = self.def; + } + + self.msg = msg; + self.state = 2; + if (self.chain.length > 0) { + schedule(notify,self); + } + } + + function iteratePromises(Constructor,arr,resolver,rejecter) { + for (var idx=0; idx", + "license": "MIT" +} diff --git a/dashboard-ui/bower_components/native-promise-only/test_adapter.js b/dashboard-ui/bower_components/native-promise-only/test_adapter.js new file mode 100644 index 0000000000..ece6b8e3ea --- /dev/null +++ b/dashboard-ui/bower_components/native-promise-only/test_adapter.js @@ -0,0 +1,21 @@ +// Adapter for "promises-aplus-tests" test runner + +var path = require("path"); +var Promise = require(path.join(__dirname,"lib","npo.src.js")); + +module.exports.deferred = function __deferred__() { + var o = {}; + o.promise = new Promise(function __Promise__(resolve,reject){ + o.resolve = resolve; + o.reject = reject; + }); + return o; +}; + +module.exports.resolved = function __resolved__(val) { + return Promise.resolve(val); +}; + +module.exports.rejected = function __rejected__(reason) { + return Promise.reject(reason); +}; diff --git a/dashboard-ui/bower_components/neon-animation/.bower.json b/dashboard-ui/bower_components/neon-animation/.bower.json index 16a4ffdfce..67f935cf9f 100644 --- a/dashboard-ui/bower_components/neon-animation/.bower.json +++ b/dashboard-ui/bower_components/neon-animation/.bower.json @@ -1,6 +1,6 @@ { "name": "neon-animation", - "version": "1.0.6", + "version": "1.0.8", "authors": [ "The Polymer Authors" ], @@ -48,13 +48,13 @@ "iron-icons": "PolymerElements/iron-icons#^1.0.0", "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" }, - "_release": "1.0.6", + "_release": "1.0.8", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "ec51bf68f05c40373536cc726ca674e4549b7db2" + "tag": "v1.0.8", + "commit": "36656916b75a4715b025a03473620002c2650ee8" }, - "_source": "git://github.com/PolymerElements/neon-animation.git", + "_source": "git://github.com/polymerelements/neon-animation.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/neon-animation" + "_originalSource": "polymerelements/neon-animation" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/neon-animation/CONTRIBUTING.md b/dashboard-ui/bower_components/neon-animation/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/neon-animation/bower.json b/dashboard-ui/bower_components/neon-animation/bower.json index 5102f69190..2e3d0c6465 100644 --- a/dashboard-ui/bower_components/neon-animation/bower.json +++ b/dashboard-ui/bower_components/neon-animation/bower.json @@ -1,6 +1,6 @@ { "name": "neon-animation", - "version": "1.0.4", + "version": "1.0.8", "authors": [ "The Polymer Authors" ], diff --git a/dashboard-ui/bower_components/neon-animation/neon-animatable.html b/dashboard-ui/bower_components/neon-animation/neon-animatable.html index 6db9d83d8b..c9ed412f1c 100644 --- a/dashboard-ui/bower_components/neon-animation/neon-animatable.html +++ b/dashboard-ui/bower_components/neon-animation/neon-animatable.html @@ -46,7 +46,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN is: 'neon-animatable', behaviors: [ - Polymer.NeonAnimatableBehavior + Polymer.NeonAnimatableBehavior, + Polymer.IronResizableBehavior ] }); diff --git a/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html b/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html index 43309b7a9e..6554c01ec7 100644 --- a/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html +++ b/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html @@ -13,6 +13,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-behaviors/bower.json b/dashboard-ui/bower_components/paper-behaviors/bower.json index b05703da76..a3e0e8be2e 100644 --- a/dashboard-ui/bower_components/paper-behaviors/bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/bower.json @@ -1,12 +1,13 @@ { "name": "paper-behaviors", - "version": "1.0.5", + "version": "1.0.10", "description": "Common behaviors across the paper elements", "authors": [ "The Polymer Authors" ], "main": [ "paper-button-behavior.html", + "paper-checked-element-behavior.html", "paper-inky-focus-behavior.html" ], "keywords": [ @@ -26,7 +27,7 @@ "dependencies": { "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.2.1" }, "devDependencies": { "iron-component-page": "polymerelements/iron-component-page#^1.0.0", @@ -34,7 +35,8 @@ "paper-material": "PolymerElements/paper-material#^1.0.0", "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "*", + "web-component-tester": "^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/paper-behaviors/index.html b/dashboard-ui/bower_components/paper-behaviors/index.html index 3e003cb3be..37184eaa0d 100644 --- a/dashboard-ui/bower_components/paper-behaviors/index.html +++ b/dashboard-ui/bower_components/paper-behaviors/index.html @@ -2,11 +2,11 @@ diff --git a/dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html b/dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html index 100e94f234..bbb64038bb 100644 --- a/dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html +++ b/dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html @@ -64,8 +64,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * In addition to `IronButtonState` behavior, when space key goes down, + * In addition to `IronButtonState` behavior, when space key goes down, * create a ripple down effect. + * + * @param {!KeyboardEvent} event . */ _spaceKeyDownHandler: function(event) { Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this, event); @@ -75,8 +77,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * In addition to `IronButtonState` behavior, when space key goes up, + * In addition to `IronButtonState` behavior, when space key goes up, * create a ripple up effect. + * + * @param {!KeyboardEvent} event . */ _spaceKeyUpHandler: function(event) { Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this, event); diff --git a/dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html b/dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html index 0c475a22e9..76fffc116b 100644 --- a/dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html +++ b/dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html @@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus. * - * @polymerBehavior Polymer.PaperInkyFocusBehaviorImpl + * @polymerBehavior Polymer.PaperInkyFocusBehavior */ Polymer.PaperInkyFocusBehaviorImpl = { diff --git a/dashboard-ui/bower_components/paper-behaviors/paper-ripple-behavior.html b/dashboard-ui/bower_components/paper-behaviors/paper-ripple-behavior.html index cc210a780c..1d63b75e89 100644 --- a/dashboard-ui/bower_components/paper-behaviors/paper-ripple-behavior.html +++ b/dashboard-ui/bower_components/paper-behaviors/paper-ripple-behavior.html @@ -13,14 +13,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -21,8 +17,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'paper-button-behavior.html', 'paper-radio-button-behavior.html', 'paper-checked-element-behavior.html', - 'paper-ripple-behavior.html' + 'paper-ripple-behavior.html', + 'paper-button-behavior.html?dom=shadow', + 'paper-radio-button-behavior.html?dom=shadow', + 'paper-checked-element-behavior.html?dom=shadow', + 'paper-ripple-behavior.html?dom=shadow' ]); - - + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/paper-ripple-behavior.html b/dashboard-ui/bower_components/paper-behaviors/test/paper-ripple-behavior.html index dcccc44ab5..9139dc8edd 100644 --- a/dashboard-ui/bower_components/paper-behaviors/test/paper-ripple-behavior.html +++ b/dashboard-ui/bower_components/paper-behaviors/test/paper-ripple-behavior.html @@ -15,13 +15,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + @@ -48,6 +47,26 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/shadowed-ripple.html b/dashboard-ui/bower_components/paper-behaviors/test/shadowed-ripple.html new file mode 100644 index 0000000000..1ebad13e09 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/shadowed-ripple.html @@ -0,0 +1,55 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-button/.bower.json b/dashboard-ui/bower_components/paper-button/.bower.json index be69d03e9c..2800113b1e 100644 --- a/dashboard-ui/bower_components/paper-button/.bower.json +++ b/dashboard-ui/bower_components/paper-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-button", - "version": "1.0.8", + "version": "1.0.11", "description": "Material design button", "authors": [ "The Polymer Authors" @@ -29,19 +29,21 @@ }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-icon": "polymerelements/iron-icon#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0" }, - "_release": "1.0.8", + "ignore": [], + "_release": "1.0.11", "_resolution": { "type": "version", - "tag": "v1.0.8", - "commit": "08553a8c5e4d27fc6180bbcfb952f86b38b51345" + "tag": "v1.0.11", + "commit": "7d0f75300372d91835ae7298593d50987d4a610f" }, "_source": "git://github.com/PolymerElements/paper-button.git", "_target": "~1.0.1", diff --git a/dashboard-ui/bower_components/paper-button/.travis.yml b/dashboard-ui/bower_components/paper-button/.travis.yml new file mode 100644 index 0000000000..77c5526690 --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: geFs7Ipj7/9knSKT2FEYAB7b/zbmgWFXCgZm7cEcrG71EX/HB1do3spANGOlRly77xaZtNNF1OGYBHIP36DSyMEHRYj6TYtTrPIr2ySeHvoOv0nzYakXdscxBvfI5HJrNiFpld80KoGl8vKfroLNpVLallgumX3diydypolvW1I= + - secure: IILEhg3m49exN5hpxbPP1JA/q+s4v/QpOMbDiXVRV4Uz1XwOPGLCyrAB0ENjwzMCyeOah1Z2MyQSUiPisLheHKvZifhviNqizWN//8EDkg1gkU0R6egGdotD5mBb3UpCD0CNZ8+D0FYwOpdCWCruwr7N+zDUN+6r5H07KP/VeUU= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-button/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-button/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-button/bower.json b/dashboard-ui/bower_components/paper-button/bower.json index 0f7f3ae609..bcb07a86c0 100644 --- a/dashboard-ui/bower_components/paper-button/bower.json +++ b/dashboard-ui/bower_components/paper-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-button", - "version": "1.0.8", + "version": "1.0.11", "description": "Material design button", "authors": [ "The Polymer Authors" @@ -29,12 +29,14 @@ }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-icon": "polymerelements/iron-icon#^1.0.0", "iron-icons": "polymerelements/iron-icons#^1.0.0", "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/paper-button/demo/index.html b/dashboard-ui/bower_components/paper-button/demo/index.html index d25432f494..4f57bd5f8e 100644 --- a/dashboard-ui/bower_components/paper-button/demo/index.html +++ b/dashboard-ui/bower_components/paper-button/demo/index.html @@ -19,136 +19,104 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN paper-button demo - - + + + - - -
    -
    -

    Flat

    -
    - button - colorful - disabled - noink - ok - cancel +
    +

    Buttons can be flat, raised, toggleable, or disabled

    + + + -
    -
    +

    Buttons can have icons

    + + + -
    -

    Raised

    -
    - button - colorful - disabled - noink - ok - cancel -
    -
    +

    Buttons can hide the ripple effect using the noink attribute

    + + + -
    -

    Toggleable

    -
    - button - noink - colorful - colorful - ok - cancel -
    -
    +

    Buttons can be styled using custom properties

    + + +
    diff --git a/dashboard-ui/bower_components/paper-button/index.html b/dashboard-ui/bower_components/paper-button/index.html index e871f17d98..487bb5c38a 100644 --- a/dashboard-ui/bower_components/paper-button/index.html +++ b/dashboard-ui/bower_components/paper-button/index.html @@ -2,11 +2,11 @@ diff --git a/dashboard-ui/bower_components/paper-button/paper-button.html b/dashboard-ui/bower_components/paper-button/paper-button.html index 2e4c4b202a..c5a0d18431 100644 --- a/dashboard-ui/bower_components/paper-button/paper-button.html +++ b/dashboard-ui/bower_components/paper-button/paper-button.html @@ -1,11 +1,11 @@ @@ -154,10 +154,19 @@ Custom property | Description | Default _calculateElevation: function() { if (!this.raised) { - this.elevation = 0; + this._setElevation(0); } else { Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this); } } + /** + + Fired when the animation finishes. + This is useful if you want to wait until + the ripple animation finishes to perform some action. + + @event transitionend + @param {{node: Object}} detail Contains the animated node. + */ }); diff --git a/dashboard-ui/bower_components/paper-button/test/index.html b/dashboard-ui/bower_components/paper-button/test/index.html index 07ed03ccff..50048191aa 100644 --- a/dashboard-ui/bower_components/paper-button/test/index.html +++ b/dashboard-ui/bower_components/paper-button/test/index.html @@ -1,5 +1,4 @@ - - - - +--> paper-button tests @@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/paper-button/test/paper-button.html b/dashboard-ui/bower_components/paper-button/test/paper-button.html index 2fce0e4a63..54200e63f0 100644 --- a/dashboard-ui/bower_components/paper-button/test/paper-button.html +++ b/dashboard-ui/bower_components/paper-button/test/paper-button.html @@ -16,11 +16,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - @@ -54,6 +52,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, 1); }); + test('can be unraised after being raised imperatively', function(done) { + button.raised = true; + expect(button.hasAttribute('raised')).to.be.eql(true); + + Polymer.Base.async(function() { + expect(button.elevation).to.be.eql(1); + + button.raised = false; + expect(button.hasAttribute('raised')).to.be.eql(false); + Polymer.Base.async(function() { + expect(button.elevation).to.be.eql(0); + done(); + }, 1); + }, 1); + }); + test('can be disabled imperatively', function() { button.disabled = true; expect(button.getAttribute('aria-disabled')).to.be.eql('true'); @@ -85,7 +99,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('has aria role "button"', function() { expect(button.getAttribute('role')).to.be.eql('button'); }); - + a11ySuite('TrivialButton'); }); diff --git a/dashboard-ui/bower_components/paper-checkbox/.bower.json b/dashboard-ui/bower_components/paper-checkbox/.bower.json index 61aa7c54a9..6c870bb87c 100644 --- a/dashboard-ui/bower_components/paper-checkbox/.bower.json +++ b/dashboard-ui/bower_components/paper-checkbox/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-checkbox", - "version": "1.0.12", + "version": "1.0.16", "description": "A material design checkbox", "authors": [ "The Polymer Authors" @@ -29,17 +29,19 @@ }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" }, - "_release": "1.0.12", + "main": "paper-checkbox.html", + "_release": "1.0.16", "_resolution": { "type": "version", - "tag": "v1.0.12", - "commit": "04fefb44a6e93bcee030f892694663f8d7fd0365" + "tag": "v1.0.16", + "commit": "5bfe12e9a096664c3f199d654c890d2a8d2def31" }, "_source": "git://github.com/PolymerElements/paper-checkbox.git", "_target": "~1.0.5", diff --git a/dashboard-ui/bower_components/paper-checkbox/.travis.yml b/dashboard-ui/bower_components/paper-checkbox/.travis.yml new file mode 100644 index 0000000000..2b6f5a46f4 --- /dev/null +++ b/dashboard-ui/bower_components/paper-checkbox/.travis.yml @@ -0,0 +1,24 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install + - npm install polylint + - polylint +env: + global: + - secure: PkxMaBcKe8HD1Jv8O6qiyQ4Nux6DfaVyN/ss9opajX9Oqa2ECJRI/OCsjDSrgXKhuAc2dw0L/KwSb/j4hg3/9BzHlJYQmeR9b9+MsO377TseNw5aKlywgVRu2bj8ODv2naQ4pB4B/Us/n9K7J0vlHIwM8UAJJwGjYm2oYTQxCAw= + - secure: WQNRMEQEm6k5e+rzN08Lg0IBC83AZLz1QLP89z59JHLrAOeBu7CBh/LFG0OkhUnTC+dG2JdfIZbdQVCEciDyONjSIKzmM4ze9/LrGzFpROE8bU0ylYSLqX+3CK/6i7VMR3pJo79e1KOeprppHiJSRLVBJfhG+5uNgwAXws/sLQ4= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-checkbox/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-checkbox/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-checkbox/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-checkbox/bower.json b/dashboard-ui/bower_components/paper-checkbox/bower.json index a8113df89f..6233cb9131 100644 --- a/dashboard-ui/bower_components/paper-checkbox/bower.json +++ b/dashboard-ui/bower_components/paper-checkbox/bower.json @@ -1,6 +1,6 @@ { "name": "paper-checkbox", - "version": "1.0.12", + "version": "1.0.16", "description": "A material design checkbox", "authors": [ "The Polymer Authors" @@ -29,10 +29,12 @@ }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" - } + }, + "main": "paper-checkbox.html" } diff --git a/dashboard-ui/bower_components/paper-checkbox/demo/index.html b/dashboard-ui/bower_components/paper-checkbox/demo/index.html index a8dad0f057..46199828c4 100644 --- a/dashboard-ui/bower_components/paper-checkbox/demo/index.html +++ b/dashboard-ui/bower_components/paper-checkbox/demo/index.html @@ -17,86 +17,66 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - + + - -
    -
    -

    Enabled

    -
    - Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
    -
    -
    -

    Disabled

    -
    - Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
    -
    -
    -

    Color

    -
    - Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
    -
    -
    -

    Noink

    -
    - Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
    -
    +
    +

    Checkboxes can be checked or unchecked, or disabled entirely

    + + + + +

    Checkboxes can hide the ripple effect using the noink attribute

    + + + + +

    Checkboxes can be styled using custom properties

    + + +
    diff --git a/dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html b/dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html index 0e9afd1194..6b677f3dd9 100644 --- a/dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html +++ b/dashboard-ui/bower_components/paper-checkbox/paper-checkbox.html @@ -42,6 +42,7 @@ Custom property | Description | Default `--paper-checkbox-checked-ink-color` | Selected/focus ripple color when the input is checked | `--default-primary-color` `--paper-checkbox-checkmark-color` | Checkmark color | `white` `--paper-checkbox-label-color` | Label color | `--primary-text-color` +`--paper-checkbox-label-spacing` | Spacing between the label and the checkbox | `8px` `--paper-checkbox-error-color` | Checkbox color when invalid | `--google-red-500` @demo demo/index.html @@ -53,6 +54,7 @@ Custom property | Description | Default :host { display: inline-block; white-space: nowrap; + cursor: pointer; } :host(:focus) { @@ -68,14 +70,12 @@ Custom property | Description | Default position: relative; width: 18px; height: 18px; - cursor: pointer; - -webkit-transform: translateZ(0); - transform: translateZ(0); + min-width: 18px; vertical-align: middle; background-color: var(--paper-checkbox-unchecked-background-color, transparent); } - :host #ink { + #ink { position: absolute; top: -15px; left: -15px; @@ -86,11 +86,16 @@ Custom property | Description | Default pointer-events: none; } - :host #ink[checked] { + :host-context([dir="rtl"]) #ink { + right: -15px; + left: auto; + } + + #ink[checked] { color: var(--paper-checkbox-checked-ink-color, --default-primary-color); } - :host #checkbox { + #checkbox { position: relative; box-sizing: border-box; height: 100%; @@ -110,45 +115,29 @@ Custom property | Description | Default @-webkit-keyframes checkmark-expand { 0% { - top: 9px; - left: 6px; - width: 0px; - height: 0px; + -webkit-transform: scale(0, 0) rotate(45deg); } 100% { - top: -1px; - left: 4px; - width: 5px; - height: 10px; + -webkit-transform: scale(1, 1) rotate(45deg); } } @keyframes checkmark-expand { 0% { - top: 9px; - left: 6px; - width: 0px; - height: 0px; + transform: scale(0, 0) rotate(45deg); } 100% { - top: -1px; - left: 4px; - width: 5px; - height: 10px; + transform: scale(1, 1) rotate(45deg); } } - :host #checkbox.checked { + #checkbox.checked { background-color: var(--paper-checkbox-checked-color, --default-primary-color); border-color: var(--paper-checkbox-checked-color, --default-primary-color); } - :host #checkmark { - -webkit-transform: rotate(45deg); - transform: rotate(45deg); + #checkmark { position: absolute; - top: -1px; - left: 4px; width: 5px; height: 10px; border-style: solid; @@ -157,6 +146,8 @@ Custom property | Description | Default border-right-width: 2px; border-bottom-width: 2px; border-color: var(--paper-checkbox-checkmark-color, white); + transform-origin: 97% 86%; + -webkit-transform-origin: 97% 86%; } /* label */ @@ -164,12 +155,17 @@ Custom property | Description | Default position: relative; display: inline-block; vertical-align: middle; - padding-left: 8px; + padding-left: var(--paper-checkbox-label-spacing, 8px); white-space: normal; pointer-events: none; color: var(--paper-checkbox-label-color, --primary-text-color); } + :host-context([dir="rtl"]) #checkboxLabel { + padding-right: var(--paper-checkbox-label-spacing, 8px); + padding-left: 0; + } + #checkboxLabel[hidden] { display: none; } diff --git a/dashboard-ui/bower_components/paper-checkbox/test/basic.html b/dashboard-ui/bower_components/paper-checkbox/test/basic.html index 5461266388..5ce5ed29c3 100644 --- a/dashboard-ui/bower_components/paper-checkbox/test/basic.html +++ b/dashboard-ui/bower_components/paper-checkbox/test/basic.html @@ -15,12 +15,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - diff --git a/dashboard-ui/bower_components/paper-checkbox/test/index.html b/dashboard-ui/bower_components/paper-checkbox/test/index.html index ac9a12c5e9..6ef4ca96b5 100644 --- a/dashboard-ui/bower_components/paper-checkbox/test/index.html +++ b/dashboard-ui/bower_components/paper-checkbox/test/index.html @@ -1,14 +1,11 @@ - - - - +--> paper-checkbox tests @@ -17,8 +14,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/paper-collapse-item/.bower.json b/dashboard-ui/bower_components/paper-collapse-item/.bower.json new file mode 100644 index 0000000000..4e6bf5946f --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/.bower.json @@ -0,0 +1,45 @@ +{ + "name": "paper-collapse-item", + "version": "1.0.6", + "authors": [ + "collaborne" + ], + "description": "A Material Design item with header and collapsible content (Polymer 1.x)", + "main": "paper-collapse-item.html", + "keywords": [ + "web-components", + "polymer", + "paper", + "material design", + "lists", + "item" + ], + "license": "Apache 2", + "homepage": "https://github.com/collaborne/paper-collapse-item", + "ignore": [ + "**/.*" + ], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-icons": "PolymerElements/iron-icons#^1.0.0", + "iron-collapse": "PolymerElements/iron-collapse#^1.0.0", + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", + "paper-item": "PolymerElements/paper-item#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" + }, + "devDependencies": { + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.6", + "_resolution": { + "type": "version", + "tag": "1.0.6", + "commit": "1f809936cb13108bffd49ff2280baf8690f38ab1" + }, + "_source": "git://github.com/Collaborne/paper-collapse-item.git", + "_target": "~1.0.5", + "_originalSource": "paper-collapse-item" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-collapse-item/LICENSE b/dashboard-ui/bower_components/paper-collapse-item/LICENSE new file mode 100644 index 0000000000..8f71f43fee --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. + diff --git a/dashboard-ui/bower_components/paper-collapse-item/bower.json b/dashboard-ui/bower_components/paper-collapse-item/bower.json new file mode 100644 index 0000000000..1bed7d4787 --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/bower.json @@ -0,0 +1,36 @@ +{ + "name": "paper-collapse-item", + "version": "1.0.6", + "authors": [ + "collaborne" + ], + "description": "A Material Design item with header and collapsible content (Polymer 1.x)", + "main": "paper-collapse-item.html", + "keywords": [ + "web-components", + "polymer", + "paper", + "material design", + "lists", + "item" + ], + "license": "Apache 2", + "homepage": "https://github.com/collaborne/paper-collapse-item", + "ignore": [ + "**/.*" + ], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-icons": "PolymerElements/iron-icons#^1.0.0", + "iron-collapse": "PolymerElements/iron-collapse#^1.0.0", + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", + "paper-item": "PolymerElements/paper-item#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" + }, + "devDependencies": { + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-collapse-item/demo/index.html b/dashboard-ui/bower_components/paper-collapse-item/demo/index.html new file mode 100644 index 0000000000..cb814cf8b2 --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/demo/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + Lots of very interesting content. + + + Lots of very interesting content. + + + Lots of very interesting content. + + + diff --git a/dashboard-ui/bower_components/paper-collapse-item/doc/screenshot.png b/dashboard-ui/bower_components/paper-collapse-item/doc/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..f7321c4e4cb0a2e4886ad2778a07226693ee1980 GIT binary patch literal 7744 zcmc&(cQ{;MpEnc2AZpa;WJE6!JwXt?1krnm5}m{l1kptoy%QpOFG2JkC3-h{lo&*B zd;E6y*}wMvYu{&|d1mI$dCt9a&bi_%#B{muw+C4d0DK#`S2q!qM#JUSU z1%~!*z}H<<1sN%{o7-1rQ+_OHfjP?RxS*lo5Z}HbXvwMMpb^tmPDvVb5eEt*Vy{h{ z`2d=ztu?e=B^~VSEbLvuPc$@1XA2Wo3v)U*Yga2e8960Yb509P&@Wd`Nz&s_&N#H(w@9hl4LOE>5*yn?5O~ z=#g5FwtUy2*y6^CnA`kG!%5Rc>ifa>d+uH*x^7J;Pc1W=G7hINJclYXD)*+(*hOH( zuqZT`f3Wy9!L+=(oDaIJI83!}icr=E{ke=!8%YB^r?9SZ0EH;wHjNU0;3~cXAH}NMOjmpvE7aQC$r^n85JDsy;=_jIC8Y08 z)~&YrJ$df|KRLxzt{ib|PzXAhNDLu2X-S%hTi+*&$1$H1eqD1KG{}CD|E$LP5fe;z z)eG9ydS=ldkD<&s9mVT-M;ii*5`Tn64kPp1M%DQ#W6jZud5dn^Xg>q(Juq_EB(goo zWtZ<{XFB%H+pO$*mks%oKl5wDS(5d-4%vOmse<%kHEp*54Cq~Yy~@{0!>>9yZmK5@V;7p<7a~l~dw!4RkD6k#J@i$CizEBWCh9lR z-xLDNlK2eFhQ%rYX zrzp^^{zfH=P6Se6T7v&+oFXD1qxRQ)NvBO?Jgv?S$+L9UODL`lb($6x)i>x*LcfUntft zf1bhAHrqDKMyHEa=djppfJY^mDRFsybvI;bI8Q&_l+E$aa0=pgFQW^6LntHU8Ni}Sy~3HSZ1=G`~aoLe!-5@$L*!CEmzF+vst z*mN6FY1y4LvQVZa0bg-{oEO5S#)GRA``+#5?x0t_Bpo-hkNQvt=N7DFTN3g^Eg1#V z9|MFq$5O5P)t&wX3jhi5-otuYext4@R0$~9Jz!b|2KE`*R3mCM*`5x z)v0`a(8pGq8_Dnn4k7A!1r@?3Gi(*Lo#IXsakDR>w9uUf2y1?QdB$ru!&iTEeW8Sp z!%pk(dbs}c;AHUwrlw33#@<}LI?9B>SCN_EYj?mafIcUN23JDCfBU(9$ToQ#tuBXg z#rt94+=o_c_Tc_q^jy(geoe_Q1OLg@UGu4W8LcrA%5INQyVzvw&-P#Z{kfPiw|K7`n&ky zMn^?--~VVthW6n=wP`1I;hV`4&GB!qj<~L6+IXhcJyUtTPm!2~DjClj<_)(N&UY$@ zibnHQx;bvZWNHI(DNGICj=$0@)GRJ4P|w#bgZ*AhFdEcs-d!_iTS;?UDDR4(ely)J zFn7i4y<>-L0_2+l7+f7PRaL^Td?PFEr|6F3b93D8#Oe|-2cUTP$^TUJK^=&+C) zbu?)d8BFNkT0d+$w346U{j0%|>Q~^s2SvVjFu&bXo(8yIvttr%fuF)YJ6qO#b*%R@ zjMqfqS|%t^{AhE8QEj5aqQ5AJ#-m5rc~w>o*%lCR*eSGBH<%_OgYY5t$0M`+E0i)5 zaO{52%Uld2hHqkoxdf1l2!yCSJL~Yc-0wb0EvG$8_t;{oepq9ddKf`kl4_eF|l);cXwxy@#1(l)@J;h zHR^|A60c=lN)48LG=nsHSdVGzJ$8q8Lr+hFcSm~v%zuw<$iHPV9Ii%HTgYf5C}gz@ z?o>%MYKvO?dEJVN3ceTbu8t;gmLDirh}7~~4T}#xJ<+eOH1Cbkjo+oV(a|#Us=m)< zC|W=*Fz5J@&u&Iz2zk)Ym0;Q#+6(T^GR?*WXUFLdj*5NLk!CBeqp|DZPl0WB<8q?Z z9ItXVhg^|Ab&~cCzw>hWMJR}-BeZGA>7HS}TXFor=BgthuIn9G^f+fWO-km&tRHP?nxQOosDZ5h3sDSN|PDn z>X+r^b0DI<)$5%t%9}ViY5{39ENnzji+rl*HamwQBAk%WnmuE+oEPD?mQKA76M~=O z4&#XOXXS{0UHEY0RlZl}{CD$Zc~F9fL?_%;d?VZOSYm0oeC6%b)C&Fm@CO1D%AV5} z2?a{ZxZTHf=7Xt1=OM};G4UfVA5e?52f(s)>z%(CrV?<^KH#x=D!?OH`))ctVrn5w z-{t3%Y1`Hq$K!B?PI9URk8KVwV;`Jmz?cm`nI2Y93p|{{Hc^Z>#yp3jx5<5_6}Zb3 zY}*-1aw~tLuQr*1+zhXJ+<_8^GvXm26SZ#5RSNO2;hZh?5iHN^g2B zstS8{q?l9h1zda)$CCv@NGjY)A*x%>XNLWx7S7y)*RtSGkH6vW5!& zMm{W>KUK1i@X2bQdUA8(kX^L};H&|h)_9**p}52Sb7g|l(MJnC5C}c*8XG!Ny&Bt> zS=B)w{0b;>NZASAlf#F^ZW;^ZoDPvN``^F59CdwWmv9^=+cDA0%@7=YLHAk^6A^yw zsM(1P8r` zoQu_%iE&C@222_E7%PTNPb^5^{PZ(74xjhY(?b#OVj zMJrb*etmtJ(-Yv6D`DG_*1P(4)a(j2N z0ZJBGFp&I2q2Gs2T$`sD;dQ_7Zoi(#*)TJB^R)ycdY)4sT=ncLWCCv`S0TpX8ae-05~-5~(pUs_?(YxJ&S? ziZRjD%3dsYSjc+Q^6O+oxXpC0nr(^?%lQ-kI2M;%9}%cp=ORMe!Mvo?I$Du27IO7h zP9*7yPxi)5lzZ+o&!<-XlHOS6ZAT=aG!l{1qJ20nF}>=hRe6C%ff}#trYiL^-2^&5 ztX&NkGFNwoiZjOCa#E{zUNc|qi8jSte1(OqzC7P9r7Tp4OU<$b-o|-gBhMOHJ*_f5 zHd}RPYI%ZF-+aj$GwBKGRGEn+2`9==kX{r0b?u_}_bC;UBe+i%L!fE7-Ab4JsxfUKNKudmTg+)pCc`^b!6Bq`ZYcHs#JaG_Zp} z1hJ2ru&-YuwI0b1htaRB2u3MaMqB za$|a8>9hU9Gi^LrY8twlNAbM{j2~7b3|INgQ&Cxn9!4oq8Lq_&~a)1vo+3VJ3kavbxFiQ9#WwS z|0iNdByxPHA8c)c*mQfI^eE*YH?4?ON5sia=}Te|^RT11ERXgXoQFNG9+(dEPG_;( zVB!(P4C$OFn&{ZxH>NE}l7T4H=w`cv^CLTAPFdTz=>5qb=gr})xe{S}F9Ih-X6=GU zA!ke24{d6yu-w}PxQz5EcdSo4Si*1wc5Z+Zi`?H9NXXub^Jdy*zPDQ%I%USbx89<{ zW}Nl+cwvI*$(&2Wxd0e)%MBK}ig@R$+NgihVcpbR9`I%Iv2dk1nt00tGrQ-(r19Sz zhBJNBwPtJV00whZcwc!K950yboQvM^XC|_N4nsaQILpJ`m#H0goYuNxe@IpSaVb3F zwk^^sO=kzLTG;JRsvTCn!{RfFryf;*x-l2a@4?!?o3sb^#<8fI4{WuWu=iLdp29>>Gd7Tpg`$Fb3g zf0GjK-)~oNYLI=XLAcl+LsvoYt*D5d#jvsNI*&+<)Tr6BK2&ok{plCavjep+@+2hW z!NY(981g4`WbkjnA&%2PSGU%_c!Ah^W~};+*1RUjLaY~?oA_6w8D(Njg*^U#ZM;0_ zcLu6fp*`?k?7HP$qMrNEM2(2vwfzn@-Ky-v`to_fuC=`3#&|c7D{b*0iBp!sg$l%d zq0xKf6DEityAg*zPz`O}hjrQgfmThY%VAr^N4v9HAfbqxEIaT#5QJ=y@t_*AnTtgh zn?gy;Ue@6X!f~bcH8linguiHgK#=A`DHLT8H znh(jnBMLo86Mh?Gnc<}g?sNX=gC!@E^E*-)5@+o}_}hO2f&7vSz$WoLth>Ixa3C4@ zqL8q4Sv>W3;r-rkJ{&j^79%7$-pIj^$GiBRcf@1sUrdaK#rh}WzxG`*qr8!rzRyA2FdzwKGTw25kfgs;N);T@{-n5X zdaaT1%F1%hU>#dEjB&cKns{qu9f^%e=k=S-QPj2x{?R{xJASTdXXz zND+~|*9_RI1vtUNlXyfNj6?f2X@!A<|IeiLUxl_k*lnil z@zGpH&9WmTY?`>)l<{&8|hxZ`~`J-k)?y>wsL=Abls4tz_xI+|t@| z#X1(Sk(%z>28iw|0M{6(k0>qsmDyYIaDi1|hYSHvW|Xgz!3mziL#b*t;4XlmoDGW^(*YSM6J3cYXGaxWIh9=MTh3%G z)uLUO%7VWyFRj>5LG%1;o?;RMNGvAsn?;rbM0*}^(K{%YbLUjku`WfRv zK1LPmRKkOoUDyx*{vN$eTK*xji=E0_BC7|uYd-e%Wd(@G^=pGjV#M=^xbX(foUOC{ zlMaCO)9>2=NC3!8jgz?uV`rgBulaNthl0;4YOKUSPbKH=_JnY~8}JxFC^PnEES?$? zYvNXkL=yOLYJAgR>8|AIB`!r z-){AQ{Clm%_l}cN`{=m9qNh3~zb&H6d(3HTjHNceDx~f>8RD(8zeopjKJGNeE_Anw%QxpV7ESyRAD(pLyfn5I;D{* z4he^lvTLil(U$~FErN}NFChPo-YrOHj%4=DglUxM>lFI{eYXQBRYnnSEgKz9QFNt0_C!J;eCc%mexLCP`)(&Ac>TS)3wS!FGz(bF^* zf|%&m!RNaE{`ITb>pjU2kRvmBs`?7fF13CfKWyh=eDNu&u%v-Cc4UN~sOLpXk_H~q zdEHBRHd`8Jmgpyc56s%QEkOH~sAT(8v&g$0)ks*z6uQHJ94ax@U;BOs_H6cIobL_K zYS@O8Q1^3D=u1Y?0|M}>5HwPf3CMniQ0qxbQ3py?PQ$6+IOR2@g$7}B|Z9bPz7I2{1KlLn( z!-y95K_?2)V$H^I2{+a6O~>s>7dQ}!eL1h}%rOP~v|DaYHoz@=J2V z^Unl}?HZqyQuxnaG4<2?RuKo26lh5IYu81MZ0k{>7~hPpR^yExC>@vt2O+8QXqO7; z8;k!J7KC?Ft`(?e`6+)y0GDA7R8O=AY86A}VcKc(OOpX9D1}rDA)A;KPQHbxMu!5L zQoa--Z8AXkSK5;F+pRGh9lb(53-UdkQ1(uFF<=GF_O0lt8+<$tHe`Q%5D2 z+T(p-UZ#i=w2t?~S**TOFMkGrFv!Oe`5c0ny|bVnN(=oir=LD>k7FI|mIXhI zig6SQF!_f5x@RTLAY|Rc#F=H?8c8DH>CqDb0`Dknh><_rgwK@LsQK~`Le00!4DjDC z1v&zx{2ojBJHT{}$}Qur!HswyHvl3N;6d+~I93rCGl7dUfDJ{rf8U1UzoNN+watn8 ZfFV!nQTOg{+U-WJoV2o3$#Y}B{{W^$V~zj- literal 0 HcmV?d00001 diff --git a/dashboard-ui/bower_components/paper-collapse-item/paper-collapse-item.html b/dashboard-ui/bower_components/paper-collapse-item/paper-collapse-item.html new file mode 100644 index 0000000000..acca09faf9 --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/paper-collapse-item.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-collapse-item/test/index.html b/dashboard-ui/bower_components/paper-collapse-item/test/index.html new file mode 100644 index 0000000000..2c4f92e458 --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/test/index.html @@ -0,0 +1,13 @@ + + + + + Tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-collapse-item/test/paper-collapse-item.html b/dashboard-ui/bower_components/paper-collapse-item/test/paper-collapse-item.html new file mode 100644 index 0000000000..3bcfc3d390 --- /dev/null +++ b/dashboard-ui/bower_components/paper-collapse-item/test/paper-collapse-item.html @@ -0,0 +1,50 @@ + + + + paper-collapse-item + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json b/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json index 8fcd125940..fc4c6b94d3 100644 --- a/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json +++ b/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-dialog-behavior", - "version": "1.0.6", + "version": "1.1.0", "description": "Implements a behavior used for material design dialogs", "authors": "The Polymer Authors", "keywords": [ @@ -10,9 +10,7 @@ "overlay", "behavior" ], - "main": [ - "paper-dialog-behavior.html" - ], + "main": "paper-dialog-behavior.html", "private": true, "repository": { "type": "git", @@ -24,7 +22,7 @@ "dependencies": { "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.4", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", @@ -34,11 +32,11 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.6", + "_release": "1.1.0", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "9714b11aa532e1a59dadc2096616ed2ea3b82157" + "tag": "v1.1.0", + "commit": "e41d36a798df2ee2f9f49fb27dd7712e55366595" }, "_source": "git://github.com/PolymerElements/paper-dialog-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/.travis.yml b/dashboard-ui/bower_components/paper-dialog-behavior/.travis.yml new file mode 100644 index 0000000000..1ee292e24d --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false +matrix: + include: + - node_js: stable + script: xvfb-run wct + addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + - node_js: node + script: + - | + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then + wct -s 'default' + fi +before_script: +- npm install web-component-tester +- npm install bower +- export PATH=$PWD/node_modules/.bin:$PATH +- bower install +env: + global: + - secure: ZBrrZGA8OWY95x8yHSsKUNrQfowhRe/s/pMZhHgnoppnZ1+bDfpoms+ggOdvH0TgURAAdF+1Wq1mTCgNp0FYLJ3Oe34XseDIxiA3wXSQO/E2m4Cfj/w4fRvaSy8ikdz5urQJET33SjDKdggm1FmWmnt6vSVgW/mg8M7AW2KWDcE= + - secure: P5UKkTar39Q1k0VwtF5LhOphqNiW3r+DSnN1vRNA4oKZPrt6l3dJE1hpA9+1x1m6SryG856lLekPM6/fVZuC7nyDKFLz4vU/EWhiGdyWN1lHhE2MDh281TsCtzK56S0uJxdmlIpSiWTFWIrrEiiewN2b8dXy3FSPfy0Fo1sGn54= diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-dialog-behavior/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-dialog-behavior/bower.json b/dashboard-ui/bower_components/paper-dialog-behavior/bower.json index f3585fabc4..ef81a9e7a9 100644 --- a/dashboard-ui/bower_components/paper-dialog-behavior/bower.json +++ b/dashboard-ui/bower_components/paper-dialog-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "paper-dialog-behavior", - "version": "1.0.6", + "version": "1.1.0", "description": "Implements a behavior used for material design dialogs", "authors": "The Polymer Authors", "keywords": [ @@ -10,9 +10,7 @@ "overlay", "behavior" ], - "main": [ - "paper-dialog-behavior.html" - ], + "main": "paper-dialog-behavior.html", "private": true, "repository": { "type": "git", @@ -24,7 +22,7 @@ "dependencies": { "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.4", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html b/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html index 1bda9cdf29..a204372393 100644 --- a/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html +++ b/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html @@ -9,15 +9,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - - + - - - diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html index bc14336f74..e89685fdab 100644 --- a/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html +++ b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html @@ -10,12 +10,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - + + + + - - - - diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.bower.json b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json index 86d20878fd..3a6f86a872 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/.bower.json +++ b/dashboard-ui/bower_components/paper-drawer-panel/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-drawer-panel", - "version": "1.0.3", + "version": "1.0.6", "description": "A responsive drawer panel", "authors": [ "The Polymer Authors" @@ -19,22 +19,26 @@ "license": "http://polymer.github.io/LICENSE.txt", "homepage": "https://github.com/PolymerElements/paper-drawer-panel", "dependencies": { - "polymer": "Polymer/polymer#^1.0.0", + "iron-media-query": "PolymerElements/iron-media-query#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0", "iron-selector": "PolymerElements/iron-selector#^1.0.0", - "iron-media-query": "PolymerElements/iron-media-query#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "paper-button": "PolymerElements/paper-button#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "web-component-tester": "*", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.3", + "main": "paper-drawer-panel.html", + "ignore": [], + "_release": "1.0.6", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "92713b61eb8eec378db63af61b73341453b8180d" + "tag": "v1.0.6", + "commit": "9dd19ef9153ed303a5f8b6d573179cde31b2f5e6" }, "_source": "git://github.com/PolymerElements/paper-drawer-panel.git", "_target": "~1.0.2", diff --git a/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml b/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml new file mode 100644 index 0000000000..4b042acb72 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: PLe0gvvFLKijrgyroIeymIP14SikK6RobNUOqHyUiLDCh9S2/vSBJUp8U5TYkVmpxMr+rcKXpfIhYt/bne97bARTnMjRQUa+rlraek6EPXyFILDsyaTosYD7rmY2f8ViiW+CM3eUA+ym0P8tvYONdTx+CEdO7S6esotfq3LHrLw= + - secure: U4i/ZSfd87xQ+0YZCKxk3knQQk23V/2IxtSrvY42OnaGi10uz04Cad5XMuBcB1kCyRkAP/e9flQyp4iLaDpG+edm2fxJNPqXepWjtMr0rVFr2LoQ7dPAQCFkzO25dSiO+Wj4ffDO//hwgF5Xl/BXnyRBfSEjURZXr4EP+NjoMWU= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-drawer-panel/bower.json b/dashboard-ui/bower_components/paper-drawer-panel/bower.json index 76a2f0c6e6..d5e05e68dd 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/bower.json +++ b/dashboard-ui/bower_components/paper-drawer-panel/bower.json @@ -1,6 +1,6 @@ { "name": "paper-drawer-panel", - "version": "1.0.3", + "version": "1.0.6", "description": "A responsive drawer panel", "authors": [ "The Polymer Authors" @@ -19,15 +19,19 @@ "license": "http://polymer.github.io/LICENSE.txt", "homepage": "https://github.com/PolymerElements/paper-drawer-panel", "dependencies": { - "polymer": "Polymer/polymer#^1.0.0", + "iron-media-query": "PolymerElements/iron-media-query#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0", "iron-selector": "PolymerElements/iron-selector#^1.0.0", - "iron-media-query": "PolymerElements/iron-media-query#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "paper-button": "PolymerElements/paper-button#^1.0.0", "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "web-component-tester": "*", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } + }, + "main": "paper-drawer-panel.html", + "ignore": [] } diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css deleted file mode 100644 index 747f0bb77f..0000000000 --- a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.css +++ /dev/null @@ -1,152 +0,0 @@ -/** -@license -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/ - -:host { - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} - -iron-selector > #drawer { - position: absolute; - top: 0; - left: 0; - height: 100%; - background-color: white; - - -moz-box-sizing: border-box; - box-sizing: border-box; - - @apply(--paper-drawer-panel-drawer-container); -} - -.transition > #drawer { - transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s; - transition: transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s; -} - -.left-drawer > #drawer { - @apply(--paper-drawer-panel-left-drawer-container); -} - -.right-drawer > #drawer { - left: auto; - right: 0; - - @apply(--paper-drawer-panel-right-drawer-container); -} - -iron-selector > #main { - position: absolute; - top: 0; - right: 0; - bottom: 0; - - @apply(--paper-drawer-panel-main-container); -} - -.transition > #main { - transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; -} - -.right-drawer > #main { - left: 0; -} - -.right-drawer.transition > #main { - transition: right ease-in-out 0.3s, padding ease-in-out 0.3s; -} - -#main > ::content > [main] { - height: 100%; -} - -#drawer > ::content > [drawer] { - height: 100%; -} - -#scrim { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - visibility: hidden; - opacity: 0; - transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s; - background-color: rgba(0, 0, 0, 0.3); -} - -.narrow-layout > #drawer { - will-change: transform; -} - -.narrow-layout > #drawer.iron-selected { - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); -} - -.right-drawer.narrow-layout > #drawer.iron-selected { - box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15); -} - -.narrow-layout > #drawer > ::content > [drawer] { - border: 0; -} - -.left-drawer.narrow-layout > #drawer:not(.iron-selected) { - -webkit-transform: translateX(-100%); - transform: translateX(-100%); -} - -.right-drawer.narrow-layout > #drawer:not(.iron-selected) { - left: auto; - visibility: hidden; - - -webkit-transform: translateX(100%); - transform: translateX(100%); -} - -.right-drawer.narrow-layout.dragging > #drawer:not(.iron-selected), -.right-drawer.narrow-layout.peeking > #drawer:not(.iron-selected) { - visibility: visible; -} - -.narrow-layout > #main { - padding: 0; -} - -.right-drawer.narrow-layout > #main { - left: 0; - right: 0; -} - -.narrow-layout > #main:not(.iron-selected) > #scrim, -.dragging > #main > #scrim { - visibility: visible; - opacity: var(--paper-drawer-panel-scrim-opacity, 1); -} - -.narrow-layout > #main > * { - margin: 0; - min-height: 100%; - left: 0; - right: 0; - - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { - display: none; -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html index 4fa6ab424c..3b14d14638 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html +++ b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html @@ -10,8 +10,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + - - - + + }); + }()); + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/test/index.html b/dashboard-ui/bower_components/paper-drawer-panel/test/index.html new file mode 100644 index 0000000000..1509baa0a6 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/test/index.html @@ -0,0 +1,28 @@ + + + + + + + paper-drawer-panel tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/test/positioning.html b/dashboard-ui/bower_components/paper-drawer-panel/test/positioning.html new file mode 100644 index 0000000000..f70c2cf1cc --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/test/positioning.html @@ -0,0 +1,93 @@ + + + + + + paper-drawer-panel tests + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-drawer-panel/test/small-devices.html b/dashboard-ui/bower_components/paper-drawer-panel/test/small-devices.html new file mode 100644 index 0000000000..b3091cbd43 --- /dev/null +++ b/dashboard-ui/bower_components/paper-drawer-panel/test/small-devices.html @@ -0,0 +1,138 @@ + + + + + + paper-drawer-panel tests + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dropdown-menu/.bower.json b/dashboard-ui/bower_components/paper-dropdown-menu/.bower.json index 5b6dbf90ec..79dbb0612a 100644 --- a/dashboard-ui/bower_components/paper-dropdown-menu/.bower.json +++ b/dashboard-ui/bower_components/paper-dropdown-menu/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-dropdown-menu", - "version": "1.0.4", + "version": "1.0.5", "description": "An element that works similarly to a native browser select", "authors": [ "The Polymer Authors" @@ -28,7 +28,9 @@ "paper-input": "polymerelements/paper-input#^1.0.9", "paper-menu-button": "polymerelements/paper-menu-button#^1.0.0", "paper-ripple": "polymerelements/paper-ripple#^1.0.0", - "paper-styles": "polymerelements/paper-styles#^1.0.0" + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", + "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0" }, "devDependencies": { "iron-component-page": "polymerelements/iron-component-page#^1.0.0", @@ -40,11 +42,11 @@ "web-component-tester": "*", "paper-tabs": "polymerelements/paper-tabs#^1.0.0" }, - "_release": "1.0.4", + "_release": "1.0.5", "_resolution": { "type": "version", - "tag": "v1.0.4", - "commit": "b278c9ea1b3642c77bd4597a28b39a61996a5a9e" + "tag": "v1.0.5", + "commit": "63b8200dc68ce297dcf2000a60587f3f68464f31" }, "_source": "git://github.com/PolymerElements/paper-dropdown-menu.git", "_target": "~1.0.1", diff --git a/dashboard-ui/bower_components/paper-dropdown-menu/bower.json b/dashboard-ui/bower_components/paper-dropdown-menu/bower.json index fa482aa906..b9616ffb58 100644 --- a/dashboard-ui/bower_components/paper-dropdown-menu/bower.json +++ b/dashboard-ui/bower_components/paper-dropdown-menu/bower.json @@ -1,6 +1,6 @@ { "name": "paper-dropdown-menu", - "version": "1.0.4", + "version": "1.0.5", "description": "An element that works similarly to a native browser select", "authors": [ "The Polymer Authors" @@ -28,7 +28,9 @@ "paper-input": "polymerelements/paper-input#^1.0.9", "paper-menu-button": "polymerelements/paper-menu-button#^1.0.0", "paper-ripple": "polymerelements/paper-ripple#^1.0.0", - "paper-styles": "polymerelements/paper-styles#^1.0.0" + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", + "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0" }, "devDependencies": { "iron-component-page": "polymerelements/iron-component-page#^1.0.0", diff --git a/dashboard-ui/bower_components/paper-dropdown-menu/paper-dropdown-menu.html b/dashboard-ui/bower_components/paper-dropdown-menu/paper-dropdown-menu.html index d807a08ef6..c02d9b5848 100644 --- a/dashboard-ui/bower_components/paper-dropdown-menu/paper-dropdown-menu.html +++ b/dashboard-ui/bower_components/paper-dropdown-menu/paper-dropdown-menu.html @@ -19,8 +19,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + - - - + + - + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-icon-button/bower.json b/dashboard-ui/bower_components/paper-icon-button/bower.json index 0530c97ae2..215e5d858c 100644 --- a/dashboard-ui/bower_components/paper-icon-button/bower.json +++ b/dashboard-ui/bower_components/paper-icon-button/bower.json @@ -1,7 +1,7 @@ { "name": "paper-icon-button", "private": true, - "version": "1.0.4", + "version": "1.0.6", "license": "http://polymer.github.io/LICENSE.txt", "description": "A material design icon button", "main": "paper-icon-button.html", @@ -29,9 +29,11 @@ "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "devDependencies": { + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "*", + "web-component-tester": "polymer/web-component-tester#^3.4.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/paper-icon-button/demo/index.html b/dashboard-ui/bower_components/paper-icon-button/demo/index.html index b04e6152a3..0e0c8f96c5 100644 --- a/dashboard-ui/bower_components/paper-icon-button/demo/index.html +++ b/dashboard-ui/bower_components/paper-icon-button/demo/index.html @@ -2,152 +2,86 @@ - paper-icon-button + paper-icon-button demo - + + - - - - - -
    -
    -

    Enabled

    -
    - - - - - - + +
    +

    Buttons can use iron-icons or external images, and can be disabled

    + + + -
    -

    Disabled

    -
    - - - - - - - -
    -
    +

    Buttons can hide the ripple effect using the noink attribute

    + + + -
    -

    Color

    -
    - - - - - - - -
    -
    +

    Buttons can be styled using regular CSS and custom properties

    + + + -
    -

    Size

    -
    - -


    - -
    -
    - -
    -

    Noink

    -
    - -


    - -
    -
    +

    Buttons can be resized

    + + +
    - - diff --git a/dashboard-ui/bower_components/paper-icon-button/index.html b/dashboard-ui/bower_components/paper-icon-button/index.html index 94c3720cd7..78f963c7e8 100644 --- a/dashboard-ui/bower_components/paper-icon-button/index.html +++ b/dashboard-ui/bower_components/paper-icon-button/index.html @@ -2,11 +2,11 @@ diff --git a/dashboard-ui/bower_components/paper-icon-button/paper-icon-button.html b/dashboard-ui/bower_components/paper-icon-button/paper-icon-button.html index 0a72f27cd5..6e203cc0af 100644 --- a/dashboard-ui/bower_components/paper-icon-button/paper-icon-button.html +++ b/dashboard-ui/bower_components/paper-icon-button/paper-icon-button.html @@ -1,11 +1,11 @@ @@ -56,6 +56,7 @@ Custom property | Description | Default `--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color` `--paper-icon-button` | Mixin for a button | `{}` `--paper-icon-button-disabled` | Mixin for a disabled button | `{}` +`--paper-icon-button-hover` | Mixin for button on hover | `{}` @group Paper Elements @element paper-icon-button @@ -77,8 +78,13 @@ Custom property | Description | Default user-select: none; cursor: pointer; z-index: 0; + line-height: 1; + + width: 40px; + height: 40px; - width: 24px; + /* Because of polymer/2558, this style has lower specificity than * */ + box-sizing: border-box !important; @apply(--paper-icon-button); } @@ -93,6 +99,10 @@ Custom property | Description | Default cursor: auto; @apply(--paper-icon-button-disabled); } + + :host(:hover) { + @apply(--paper-icon-button-hover); + } iron-icon { --iron-icon-width: 100%; diff --git a/dashboard-ui/bower_components/paper-icon-button/test/a11y.html b/dashboard-ui/bower_components/paper-icon-button/test/a11y.html index f6bf6fd448..a56c9f458e 100644 --- a/dashboard-ui/bower_components/paper-icon-button/test/a11y.html +++ b/dashboard-ui/bower_components/paper-icon-button/test/a11y.html @@ -16,10 +16,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - diff --git a/dashboard-ui/bower_components/paper-icon-button/test/basic.html b/dashboard-ui/bower_components/paper-icon-button/test/basic.html index e98689c6cc..fa3afad87c 100644 --- a/dashboard-ui/bower_components/paper-icon-button/test/basic.html +++ b/dashboard-ui/bower_components/paper-icon-button/test/basic.html @@ -16,9 +16,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index b3666aed52..b59e0b67c3 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.0.15", + "version": "1.1.3", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -32,23 +32,25 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0" + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "Polymer/web-component-tester#^3.3.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", - "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "Polymer/web-component-tester#^3.4.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.15", + "_release": "1.1.3", "_resolution": { "type": "version", - "tag": "v1.0.15", - "commit": "34d19454e0ea13b1a809add8c87fba128fbc9940" + "tag": "v1.1.3", + "commit": "f070288446f9e78fbe16b032ddb429a8e8015ee7" }, "_source": "git://github.com/PolymerElements/paper-input.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/paper-input/.travis.yml b/dashboard-ui/bower_components/paper-input/.travis.yml new file mode 100644 index 0000000000..907df51d68 --- /dev/null +++ b/dashboard-ui/bower_components/paper-input/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc= + - secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-input/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# 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: [http://jsbin.com/cagaye](http://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 using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #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/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index 887a7442d7..4b1c8fe6ae 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.0.15", + "version": "1.1.3", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -32,16 +32,18 @@ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", "iron-input": "PolymerElements/iron-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0" + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "Polymer/web-component-tester#^3.3.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", - "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "Polymer/web-component-tester#^3.4.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" } } diff --git a/dashboard-ui/bower_components/paper-input/demo/index.html b/dashboard-ui/bower_components/paper-input/demo/index.html index 0966b29854..b0d02e789c 100644 --- a/dashboard-ui/bower_components/paper-input/demo/index.html +++ b/dashboard-ui/bower_components/paper-input/demo/index.html @@ -10,7 +10,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> - @@ -19,113 +18,130 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - - - - - + + + + + + + + - - - - + iron-icon { + padding-right: 5px; + } + +
    +

    Inputs can have different types, and be disabled

    + + + -
    -

    Text input

    -
    - +

    Inputs can have character counters

    + + + - +

    The label can have different floating states

    + + + - +

    Inputs can validate automatically or on demand, and can have custom error messages

    + + + - +

    Inputs can have prefixes and suffixes

    + + + - -
    - -

    Text area

    -
    - -
    - -

    Validation

    -
    - - - - - -
    - -
    - -

    Character counter

    -
    - - - - - - - - - -
    - -

    Prefixes and Suffixes

    -
    - -
    $
    -
    - - -
    @email.com
    -
    - - - - - - -
    - -

    Complex inputs

    -
    - + + + + + + + + + + + + + + + +